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 [![Version](https://badge.fury.io/js/aws-sdk.png)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.png?branch=master)](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: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Service NameClass NameAPI Version
Amazon CloudFrontAWS.CloudFront2012-05-05
2013-11-11
Amazon CloudSearchAWS.CloudSearch2011-02-01
2013-01-01
Amazon CloudWatchAWS.CloudWatch2010-08-01
Amazon DynamoDBAWS.DynamoDB2011-12-05
2012-08-10
Amazon Elastic Compute CloudAWS.EC22014-02-01
Amazon Elastic MapReduceAWS.EMR2009-03-31
Amazon Elastic TranscoderAWS.ElasticTranscoder2012-09-25
Amazon ElastiCacheAWS.ElastiCache2013-06-15
Amazon GlacierAWS.Glacier2012-06-01
Amazon KinesisAWS.Kinesis2013-12-02
Amazon RedshiftAWS.Redshift2012-12-01
Amazon Relational Database ServiceAWS.RDS2013-01-10
2013-02-12
2013-09-09
Amazon Route 53AWS.Route532013-04-01
Amazon Simple Email ServiceAWS.SES2010-12-01
Amazon Simple Notification ServiceAWS.SNS2010-03-31
Amazon Simple Queue ServiceAWS.SQS2012-11-05
Amazon Simple Storage ServiceAWS.S32006-03-01
Amazon Simple Workflow ServiceAWS.SimpleWorkflow2012-01-25
Amazon SimpleDBAWS.SimpleDB2009-04-15
Auto ScalingAWS.AutoScaling2011-01-01
AWS CloudFormationAWS.CloudFormation2010-05-15
AWS CloudTrailAWS.CloudTrail2013-11-01
AWS Data PipelineAWS.DataPipeline2012-10-29
AWS Direct ConnectAWS.DirectConnect2012-10-25
AWS Elastic BeanstalkAWS.ElasticBeanstalk2010-12-01
AWS Identity and Access ManagementAWS.IAM2010-05-08
AWS Import/ExportAWS.ImportExport2010-06-01
AWS OpsWorksAWS.OpsWorks2013-02-18
AWS Security Token ServiceAWS.STS2011-06-15
AWS Storage GatewayAWS.StorageGateway2012-06-30
2013-06-30
AWS SupportAWS.Support2013-04-15
Elastic Load BalancingAWS.ELB2012-06-01
- -## License - -This SDK is distributed under the -[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). - -```no-highlight -Copyright 2012-2014. Amazon Web Services, Inc. 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. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License 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/bower.json b/node_modules/aws-sdk/bower.json deleted file mode 100644 index 42e4c950..00000000 --- a/node_modules/aws-sdk/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "aws-sdk", - "ignore": [ - "doc-src", "features", "lib", "scripts", "tasks", "test", - "Gemfile*", "configuration*", "Rakefile", "*.json", ".*" - ], - "main": "dist/aws-sdk.js" -} diff --git a/node_modules/aws-sdk/eslint-rules/no-require-in-service.js b/node_modules/aws-sdk/eslint-rules/no-require-in-service.js deleted file mode 100644 index c88f988c..00000000 --- a/node_modules/aws-sdk/eslint-rules/no-require-in-service.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports = function(context) { - return { - CallExpression: function(node) { - if (!context.getFilename().match(/^lib\/services\//)) return; - if (node.callee.name === 'require' && node.arguments[0].value !== '../core') { - context.report(node, 'require() is disallowed in service files'); - } - } - }; -}; diff --git a/node_modules/aws-sdk/lib/aws.js b/node_modules/aws-sdk/lib/aws.js deleted file mode 100644 index 31238807..00000000 --- a/node_modules/aws-sdk/lib/aws.js +++ /dev/null @@ -1,46 +0,0 @@ -var AWS = require('./core'); -module.exports = AWS; - -// Load the xml2js XML parser -require('./xml/node_parser'); - -// Load Node HTTP client -require('./http/node'); - -// Load all service classes -require('./services'); - -// Load custom credential providers -require('./credentials/ec2_metadata_credentials'); -require('./credentials/environment_credentials'); -require('./credentials/file_system_credentials'); - -// Setup default chain providers -AWS.CredentialProviderChain.defaultProviders = [ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); }, - function () { return new AWS.EC2MetadataCredentials(); } -]; - -// Update configuration keys -AWS.util.update(AWS.Config.prototype.keys, { - credentials: function () { - var credentials = null; - new AWS.CredentialProviderChain([ - function () { return new AWS.EnvironmentCredentials('AWS'); }, - function () { return new AWS.EnvironmentCredentials('AMAZON'); } - ]).resolve(function(err, creds) { - if (!err) credentials = creds; - }); - return credentials; - }, - credentialProvider: function() { - return new AWS.CredentialProviderChain(); - }, - region: function() { - return process.env.AWS_REGION || process.env.AMAZON_REGION; - } -}); - -// Reset configuration -AWS.config = new AWS.Config(); diff --git a/node_modules/aws-sdk/lib/browser.js b/node_modules/aws-sdk/lib/browser.js deleted file mode 100644 index c7d904e0..00000000 --- a/node_modules/aws-sdk/lib/browser.js +++ /dev/null @@ -1,7 +0,0 @@ -window.AWS = module.exports = require('./core'); - -// Load the DOMParser XML parser -require('./xml/browser_parser'); - -// Load the XHR HttpClient -require('./http/xhr'); diff --git a/node_modules/aws-sdk/lib/config.js b/node_modules/aws-sdk/lib/config.js deleted file mode 100644 index 6436953b..00000000 --- a/node_modules/aws-sdk/lib/config.js +++ /dev/null @@ -1,346 +0,0 @@ -var AWS = require('./core'); -require('./credentials'); -require('./credentials/credential_provider_chain'); - -/** - * The main configuration class used by all service objects to set - * the region, credentials, and other options for requests. - * - * By default, credentials and region settings are left unconfigured. - * This should be configured by the application before using any - * AWS service APIs. - * - * In order to set global configuration options, properties should - * be assigned to the global {AWS.config} object. - * - * @see AWS.config - * - * @!attribute credentials - * @return [AWS.Credentials] the AWS credentials to sign requests with. - * - * @!attribute region - * @example Set the global region setting to us-west-2 - * AWS.config.update({region: 'us-west-2'}); - * @return [AWS.Credentials] The region to send service requests to. - * @see http://docs.amazonwebservices.com/general/latest/gr/rande.html - * A list of available endpoints for each AWS service - * - * @!attribute maxRetries - * @return [Integer] the maximum amount of retries to perform for a - * service request. By default this value is calculated by the specific - * service object that the request is being made to. - * - * @!attribute maxRedirects - * @return [Integer] the maximum amount of redirects to follow for a - * service request. Defaults to 10. - * - * @!attribute paramValidation - * @return [Boolean] whether input parameters should be validated against - * the operation description before sending the request. Defaults to true. - * - * @!attribute computeChecksums - * @return [Boolean] whether to compute checksums for payload bodies when - * the service accepts it (currently supported in S3 only). - * - * @!attribute sslEnabled - * @return [Boolean] whether SSL is enabled for requests - * - * @!attribute s3ForcePathStyle - * @return [Boolean] whether to force path style URLs for S3 objects - * - * @!attribute httpOptions - * @return [map] A set of options to pass to the low-level HTTP request. - * Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only supported in the - * Node.js environment. - * * **timeout** [Integer] — The number of milliseconds to wait before - * giving up on a connection attempt. Defaults to no timeout. - * - * @!attribute logger - * @return [#write,#log] an object that responds to .write() (like a stream) - * or .log() (like the console object) in order to log information about - * requests - * - * @!attribute signatureVersion - * @return [String] the signature version to sign requests with (overriding - * the API configuration). Possible values are: 'v2', 'v3', 'v4'. - */ -AWS.Config = AWS.util.inherit({ - - /** - * Creates a new configuration object. This is the object that passes - * option data along to service requests, including credentials, security, - * region information, and some service specific settings. - * - * @example Creating a new configuration object with credentials and region - * var config = new AWS.Config({ - * accessKeyId: 'AKID', secretAccessKey: 'SECRET', region: 'us-west-2' - * }); - * @option options accessKeyId [String] your AWS access key ID. - * @option options secretAccessKey [String] your AWS secret access key. - * @option options sessionToken [AWS.Credentials] the optional AWS - * session token to sign requests with. - * @option options credentials [AWS.Credentials] the AWS credentials - * to sign requests with. You can either specify this object, or - * specify the accessKeyId and secretAccessKey options directly. - * @option options credentialProvider [AWS.CredentialProviderChain] the - * provider chain used to resolve credentials if no static `credentials` - * property is set. - * @option options region [String] the region to send service requests to. - * See {region} for more information. - * @option options maxRetries [Integer] the maximum amount of retries to - * attempt with a request. See {maxRetries} for more information. - * @option options maxRedirects [Integer] the maximum amount of redirects to - * follow with a request. See {maxRedirects} for more information. - * @option options sslEnabled [Boolean] whether to enable SSL for - * requests. - * @option options paramValidation [Boolean] whether parameter validation - * is on. - * @option options computeChecksums [Boolean] whether to compute checksums - * for payload bodies when the service accepts it (currently supported - * in S3 only) - * @option options s3ForcePathStyle [Boolean] whether to force path - * style URLs for S3 objects. - * @option options httpOptions [map] A set of options to pass to the low-level - * HTTP request. Currently supported options are: - * - * * **proxy** [String] — the URL to proxy requests through - * * **agent** [http.Agent, https.Agent] — the Agent object to perform - * HTTP requests with. Used for connection pooling. Defaults to the global - * agent (`http.globalAgent`) for non-SSL connections. Note that for - * SSL connections, a special Agent object is used in order to enable - * peer certificate verification. This feature is only available in the - * Node.js environment. - * * **timeout** [Integer] — Sets the socket to timeout after timeout - * milliseconds of inactivity on the socket. Defaults to no timeout. - * @option options apiVersion [String, Date] a String in YYYY-MM-DD format - * (or a date) that represents the latest possible API version that can be - * used in all services (unless overridden by `apiVersions`). Specify - * 'latest' to use the latest possible version. - * @option options apiVersions [map] a map of service - * identifiers (the lowercase service class name) with the API version to - * use when instantiating a service. Specify 'latest' for each individual - * that can use the latest available version. - * @option options logger [#write,#log] an object that responds to .write() - * (like a stream) or .log() (like the console object) in order to log - * information about requests - * @option options signatureVersion [String] the signature version to sign - * requests with (overriding the API configuration). Possible values are: - * 'v2', 'v3', 'v4'. - */ - constructor: function Config(options) { - if (options === undefined) options = {}; - options = this.extractCredentials(options); - - AWS.util.each.call(this, this.keys, function (key, value) { - this.set(key, options[key], value); - }); - }, - - /** - * @overload update(options, allowUnknownKeys = false) - * Updates the current configuration object with new options. - * - * @example Update maxRetries property of a configuration object - * config.update({maxRetries: 10}); - * @param [Object] options a map of option keys and values. - * @param [Boolean] allowUnknownKeys whether unknown keys can be set on - * the configuration object. Defaults to `false`. - * @see constructor - */ - update: function update(options, allowUnknownKeys) { - allowUnknownKeys = allowUnknownKeys || false; - options = this.extractCredentials(options); - AWS.util.each.call(this, options, function (key, value) { - if (allowUnknownKeys || this.keys.hasOwnProperty(key)) this[key] = value; - }); - }, - - /** - * Loads credentials from the configuration object. This is used internally - * by the SDK to ensure that refreshable {Credentials} objects are properly - * refreshed and loaded when sending a request. If you want to ensure that - * your credentials are loaded prior to a request, you can use this method - * directly to provide accurate credential data stored in the object. - * - * @note If you configure the SDK with static or environment credentials, - * the credential data should already be present in {credentials} attribute. - * This method is primarily necessary to load credentials from asynchronous - * sources, or sources that can refresh credentials periodically. - * @example Getting your access key - * AWS.config.getCredentials(function(err) { - * if (err) console.log(err.stack); // credentials not loaded - * else console.log("Access Key:", AWS.config.credentials.accessKeyId); - * }) - * @callback callback function(err) - * Called when the {credentials} have been properly set on the configuration - * object. - * - * @param err [Error] if this is set, credentials were not successfuly - * loaded and this error provides information why. - * @see credentials - * @see Credentials - */ - getCredentials: function getCredentials(callback) { - var self = this; - - function finish(err) { - callback(err, err ? null : self.credentials); - } - - function credError(msg, err) { - return new AWS.util.error(err || new Error(), { - code: 'CredentialsError', message: msg - }); - } - - function getAsyncCredentials() { - self.credentials.get(function(err) { - if (err) { - var msg = 'Could not load credentials from ' + - self.credentials.constructor.name; - err = credError(msg, err); - } - finish(err); - }); - } - - function getStaticCredentials() { - var err = null; - if (!self.credentials.accessKeyId || !self.credentials.secretAccessKey) { - err = credError('Missing credentials'); - } - finish(err); - } - - if (self.credentials) { - if (typeof self.credentials.get === 'function') { - getAsyncCredentials(); - } else { // static credentials - getStaticCredentials(); - } - } else if (self.credentialProvider) { - self.credentialProvider.resolve(function(err, creds) { - if (err) { - err = credError('Could not load credentials from any providers', err); - } - self.credentials = creds; - finish(err); - }); - } else { - finish(credError('No credentials to load')); - } - }, - - /** - * Loads configuration data from a JSON file into this config object. - * @note Loading configuration will reset all existing configuration - * on the object. - * @!macro nobrowser - * @param path [String] the path to load configuration from - * @return [AWS.Config] the same configuration object - */ - loadFromPath: function loadFromPath(path) { - this.clear(); - - var options = JSON.parse(AWS.util.readFileSync(path)); - var fileSystemCreds = new AWS.FileSystemCredentials(path); - var chain = new AWS.CredentialProviderChain(); - chain.providers.unshift(fileSystemCreds); - chain.resolve(function (err, creds) { - if (err) throw err; - else options.credentials = creds; - }); - - this.constructor(options); - - return this; - }, - - /** - * Clears configuration data on this object - * - * @api private - */ - clear: function clear() { - /*jshint forin:false */ - AWS.util.each.call(this, this.keys, function (key) { - delete this[key]; - }); - - // reset credential provider - this.set('credentials', undefined); - this.set('credentialProvider', undefined); - }, - - /** - * Sets a property on the configuration object, allowing for a - * default value - * @api private - */ - set: function set(property, value, defaultValue) { - if (value === undefined) { - if (defaultValue === undefined) { - defaultValue = this.keys[property]; - } - if (typeof defaultValue === 'function') { - this[property] = defaultValue.call(this); - } else { - this[property] = defaultValue; - } - } else { - this[property] = value; - } - }, - - /** - * All of the keys with their default values. - * - * @constant - * @api private - */ - keys: { - credentials: null, - credentialProvider: null, - region: null, - logger: null, - apiVersions: {}, - apiVersion: null, - endpoint: undefined, - httpOptions: {}, - maxRetries: undefined, - maxRedirects: 10, - paramValidation: true, - sslEnabled: true, - s3ForcePathStyle: false, - computeChecksums: true, - dynamoDbCrc32: true - }, - - /** - * Extracts accessKeyId, secretAccessKey and sessionToken - * from a configuration hash. - * - * @api private - */ - extractCredentials: function extractCredentials(options) { - if (options.accessKeyId && options.secretAccessKey) { - options = AWS.util.copy(options); - options.credentials = new AWS.Credentials(options); - } - return options; - } -}); - -/** - * @return [AWS.Config] The global configuration object singleton instance - * @readonly - * @see AWS.Config - */ -AWS.config = new AWS.Config(); diff --git a/node_modules/aws-sdk/lib/core.js b/node_modules/aws-sdk/lib/core.js deleted file mode 100644 index e960d695..00000000 --- a/node_modules/aws-sdk/lib/core.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * The main AWS namespace - */ -var AWS = {}; - -/** - * @api private - * @!macro [new] nobrowser - * @note This feature is not supported in the browser environment of the SDK. - */ -var _hidden = {}; _hidden = {}; // hack to parse macro - -module.exports = AWS; -require('./util'); - -AWS.util.update(AWS, { - - /** - * @constant - */ - VERSION: '2.0.0-rc13', - - /** - * @api private - */ - ServiceInterface: {}, - - /** - * @api private - */ - Signers: {}, - - /** - * @api private - */ - XML: {} - -}); - -require('./service'); - -require('./credentials'); -require('./credentials/credential_provider_chain'); -require('./credentials/temporary_credentials'); -require('./credentials/web_identity_credentials'); -require('./credentials/saml_credentials'); - -require('./config'); -require('./http'); -require('./sequential_executor'); -require('./event_listeners'); -require('./request'); -require('./response'); -require('./resource_waiter'); -require('./signers/request_signer'); -require('./param_validator'); - -/** - * @readonly - * @return [AWS.SequentialExecutor] a collection of global event listeners that - * are attached to every sent request. - * @see AWS.Request AWS.Request for a list of events to listen for - * @example Logging the time taken to send a request - * AWS.events.on('send', function startSend(resp) { - * resp.startTime = new Date().getTime(); - * }).on('complete', function calculateTime(resp) { - * var time = (new Date().getTime() - resp.startTime) / 1000; - * console.log('Request took ' + time + ' seconds'); - * }); - * - * new AWS.S3().listBuckets(); // prints 'Request took 0.285 seconds' - */ -AWS.events = new AWS.SequentialExecutor(); - -if (typeof window !== 'undefined') window.AWS = AWS; diff --git a/node_modules/aws-sdk/lib/credentials.js b/node_modules/aws-sdk/lib/credentials.js deleted file mode 100644 index 70a234f9..00000000 --- a/node_modules/aws-sdk/lib/credentials.js +++ /dev/null @@ -1,150 +0,0 @@ -var AWS = require('./core'); - -/** - * Represents your AWS security credentials, specifically the - * {accessKeyId}, {secretAccessKey}, and optional {sessionToken}. - * Creating a `Credentials` object allows you to pass around your - * security information to configuration and service objects. - * - * Note that this class typically does not need to be constructed manually, - * as the {AWS.Config} and {AWS.Service} classes both accept simple - * options hashes with the three keys. These structures will be converted - * into Credentials objects automatically. - * - * ## Expiring and Refreshing Credentials - * - * Occasionally credentials can expire in the middle of a long-running - * application. In this case, the SDK will automatically attempt to - * refresh the credentials from the storage location if the Credentials - * class implements the {refresh} method. - * - * If you are implementing a credential storage location, you - * will want to create a subclass of the `Credentials` class and - * override the {refresh} method. This method allows credentials to be - * retrieved from the backing store, be it a file system, database, or - * some network storage. The method should reset the credential attributes - * on the object. - * - * @!attribute expired - * @return [Boolean] whether the credentials have been expired and - * require a refresh. Used in conjunction with {expireTime}. - * @!attribute expireTime - * @return [Date] a time when credentials should be considered expired. Used - * in conjunction with {expired}. - * @!attribute accessKeyId - * @return [String] the AWS access key ID - * @!attribute secretAccessKey - * @return [String] the AWS secret access key - * @!attribute sessionToken - * @return [String] an optional AWS session token - */ -AWS.Credentials = AWS.util.inherit({ - /** - * A credentials object can be created using positional arguments or an options - * hash. - * - * @overload AWS.Credentials(accessKeyId, secretAccessKey, sessionToken=null) - * Creates a Credentials object with a given set of credential information - * as positional arguments. - * @param accessKeyId [String] the AWS access key ID - * @param secretAccessKey [String] the AWS secret access key - * @param sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials('akid', 'secret', 'session'); - * @overload AWS.Credentials(options) - * Creates a Credentials object with a given set of credential information - * as an options hash. - * @option options accessKeyId [String] the AWS access key ID - * @option options secretAccessKey [String] the AWS secret access key - * @option options sessionToken [String] the optional AWS session token - * @example Create a credentials object with AWS credentials - * var creds = new AWS.Credentials({ - * accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'session' - * }); - */ - constructor: function Credentials() { - // hide secretAccessKey from being displayed with util.inspect - AWS.util.hideProperties(this, ['secretAccessKey']); - - this.expired = false; - this.expireTime = null; - if (arguments.length === 1 && typeof arguments[0] === 'object') { - var creds = arguments[0].credentials || arguments[0]; - this.accessKeyId = creds.accessKeyId; - this.secretAccessKey = creds.secretAccessKey; - this.sessionToken = creds.sessionToken; - } else { - this.accessKeyId = arguments[0]; - this.secretAccessKey = arguments[1]; - this.sessionToken = arguments[2]; - } - }, - - /** - * @return [Integer] the window size in seconds to attempt refreshhing of - * credentials before the expireTime occurs. - */ - expiryWindow: 15, - - /** - * @return [Boolean] whether the credentials object should call {refresh} - * @note Subclasses should override this method to provide custom refresh - * logic. - */ - needsRefresh: function needsRefresh() { - var currentTime = AWS.util.date.getDate().getTime(); - var adjustedTime = new Date(currentTime + this.expiryWindow * 1000); - - if (this.expireTime && adjustedTime > this.expireTime) { - return true; - } else { - return this.expired || !this.accessKeyId || !this.secretAccessKey; - } - }, - - /** - * Gets the existing credentials, refreshing them if they are not yet loaded - * or have expired. Users should call this method before using {refresh}, - * as this will not attempt to reload credentials when they are already - * loaded into the object. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - */ - get: function get(callback) { - var self = this; - if (this.needsRefresh()) { - this.refresh(function(err) { - if (!err) self.expired = false; // reset expired flag - if (callback) callback(err); - }); - } else if (callback) { - callback(); - } - }, - - /** - * Refreshes the credentials. Users should call {get} before attempting - * to forcibly refresh credentials. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @note Subclasses should override this class to reset the - * {accessKeyId}, {secretAccessKey} and optional {sessionToken} - * on the credentials object and then call the callback with - * any error information. - * @see get - */ - refresh: function refresh(callback) { - this.expired = false; - callback(); - } -}); diff --git a/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js b/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js deleted file mode 100644 index a67d625b..00000000 --- a/node_modules/aws-sdk/lib/credentials/credential_provider_chain.js +++ /dev/null @@ -1,113 +0,0 @@ -var AWS = require('../core'); - -/** - * Creates a credential provider chain that searches for AWS credentials - * in a list of credential providers specified by the {providers} property. - * - * By default, the chain will use the {defaultProviders} to resolve credentials. - * These providers will look in the environment using the - * {AWS.EnvironmentCredentials} class with the 'AWS' and 'AMAZON' prefixes. - * - * ## Setting Providers - * - * Each provider in the {providers} list should be a function that returns - * a {AWS.Credentials} object, or a hardcoded credentials object. The function - * form allows for delayed execution of the credential construction. - * - * ## Resolving Credentials from a Chain - * - * Call {resolve} to return the first valid credential object that can be - * loaded by the provider chain. - * - * For example, to resolve a chain with a custom provider that checks a file - * on disk after the set of {defaultProviders}: - * - * ```javascript - * var diskProvider = new AWS.FileSystemCredentials('./creds.json'); - * var chain = new AWS.CredentialProviderChain(); - * chain.providers.push(diskProvider); - * chain.resolve(); - * ``` - * - * The above code will return the `diskProvider` object if the - * file contains credentials and the `defaultProviders` do not contain - * any credential settings. - * - * @!attribute providers - * @return [Array] - * a list of credentials objects or functions that return credentials - * objects. If the provider is a function, the function will be - * executed lazily when the provider needs to be checked for valid - * credentials. By default, this object will be set to the - * {defaultProviders}. - * @see defaultProviders - */ -AWS.CredentialProviderChain = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new CredentialProviderChain with a default set of providers - * specified by {defaultProviders}. - */ - constructor: function CredentialProviderChain(providers) { - if (providers) { - this.providers = providers; - } else { - this.providers = AWS.CredentialProviderChain.defaultProviders.slice(0); - } - }, - - /** - * Resolves the provider chain by searching for the first set of - * credentials in {providers}. - * - * @callback callback function(err, credentials) - * Called when the provider resolves the chain to a credentials object - * or null if no credentials can be found. - * - * @param err [Error] the error object returned if no credentials are - * found. - * @param credentials [AWS.Credentials] the credentials object resolved - * by the provider chain. - * @return [AWS.CredentialProviderChain] the provider, for chaining. - */ - resolve: function resolve(callback) { - if (this.providers.length === 0) { - callback(new Error('No providers')); - return this; - } - - var index = 0; - var providers = this.providers.slice(0); - - function resolveNext(err, creds) { - if ((!err && creds) || index === providers.length) { - callback(err, creds); - return; - } - - var provider = providers[index++]; - if (typeof provider === 'function') { - creds = provider.call(); - } else { - creds = provider; - } - - if (creds.get) { - creds.get(function(err) { - resolveNext(err, err ? null : creds); - }); - } else { - resolveNext(null, creds); - } - } - - resolveNext(); - return this; - } - -}); - -/** - * The default set of providers used by a vanilla CredentialProviderChain. - */ -AWS.CredentialProviderChain.defaultProviders = []; diff --git a/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js b/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js deleted file mode 100644 index 1f743c4f..00000000 --- a/node_modules/aws-sdk/lib/credentials/ec2_metadata_credentials.js +++ /dev/null @@ -1,48 +0,0 @@ -var AWS = require('../core'); -require('../metadata_service'); - -/** - * Represents credentials recieved from the metadata service on an EC2 instance. - * - * By default, this class will connect to the metadata service using - * {AWS.MetadataService} and attempt to load any available credentials. If it - * can connect, and credentials are available, these will be used with zero - * configuration. - * - * @!macro nobrowser - */ -AWS.EC2MetadataCredentials = AWS.util.inherit(AWS.Credentials, { - constructor: function EC2MetadataCredentials(options) { - AWS.Credentials.call(this); - this.metadataService = new AWS.MetadataService(options); - this.metadata = {}; - }, - - /** - * Loads the credentials from the instance metadata service - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - if (!callback) callback = function(err) { if (err) throw err; }; - - self.metadataService.loadCredentials(function (err, creds) { - if (!err) { - self.expired = false; - self.metadata = creds; - self.accessKeyId = creds.AccessKeyId; - self.secretAccessKey = creds.SecretAccessKey; - self.sessionToken = creds.Token; - self.expireTime = new Date(creds.Expiration); - } - callback(err); - }); - } -}); diff --git a/node_modules/aws-sdk/lib/credentials/environment_credentials.js b/node_modules/aws-sdk/lib/credentials/environment_credentials.js deleted file mode 100644 index b8534f54..00000000 --- a/node_modules/aws-sdk/lib/credentials/environment_credentials.js +++ /dev/null @@ -1,84 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials from the environment. - * - * By default, this class will look for the matching environment variables - * prefixed by a given {envPrefix}. The un-prefixed environment variable names - * for each credential value is listed below: - * - * ```javascript - * accessKeyId: ACCESS_KEY_ID - * secretAccessKey: SECRET_ACCESS_KEY - * sessionToken: SESSION_TOKEN - * ``` - * - * With the default prefix of 'AWS', the environment variables would be: - * - * AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN - * - * @!attribute envPrefix - * @readonly - * @return [String] the prefix for the environment variable names excluding - * the separating underscore ('_'). - */ -AWS.EnvironmentCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * Creates a new EnvironmentCredentials class with a given variable - * prefix {envPrefix}. For example, to load credentials using the 'AWS' - * prefix: - * - * ```javascript - * var creds = new AWS.EnvironmentCredentials('AWS'); - * creds.accessKeyId == 'AKID' // from AWS_ACCESS_KEY_ID env var - * ``` - * - * @param envPrefix [String] the prefix to use (e.g., 'AWS') for environment - * variables. Do not include the separating underscore. - */ - constructor: function EnvironmentCredentials(envPrefix) { - AWS.Credentials.call(this); - this.envPrefix = envPrefix; - this.get(function() {}); - }, - - /** - * Loads credentials from the environment using the prefixed - * environment variables. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = function(err) { if (err) throw err; }; - - if (process === undefined) { - callback(new Error('No process info available')); - return; - } - - var keys = ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY', 'SESSION_TOKEN']; - var values = []; - - for (var i = 0; i < keys.length; i++) { - var prefix = ''; - if (this.envPrefix) prefix = this.envPrefix + '_'; - values[i] = process.env[prefix + keys[i]]; - if (!values[i] && keys[i] !== 'SESSION_TOKEN') { - callback(new Error('Variable ' + prefix + keys[i] + ' not set.')); - return; - } - } - - this.expired = false; - AWS.Credentials.apply(this, values); - callback(); - } - -}); diff --git a/node_modules/aws-sdk/lib/credentials/file_system_credentials.js b/node_modules/aws-sdk/lib/credentials/file_system_credentials.js deleted file mode 100644 index 78a93c97..00000000 --- a/node_modules/aws-sdk/lib/credentials/file_system_credentials.js +++ /dev/null @@ -1,65 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials from a JSON file on disk. - * If the credentials expire, the SDK can {refresh} the credentials - * from the file. - * - * The format of the file should be similar to the options passed to - * {AWS.Config}: - * - * ```javascript - * {accessKeyId: 'akid', secretAccessKey: 'secret', sessionToken: 'optional'} - * ``` - * - * @example Loading credentials from disk - * var creds = new AWS.FileSystemCredentials('./configuration.json'); - * creds.accessKeyId == 'AKID' - * - * @!attribute filename - * @readonly - * @return [String] the path to the JSON file on disk containing the - * credentials. - * @!macro nobrowser - */ -AWS.FileSystemCredentials = AWS.util.inherit(AWS.Credentials, { - - /** - * @overload AWS.FileSystemCredentials(filename) - * Creates a new FileSystemCredentials object from a filename - * - * @param filename [String] the path on disk to the JSON file to load. - */ - constructor: function FileSystemCredentials(filename) { - AWS.Credentials.call(this); - this.filename = filename; - this.get(function() {}); - }, - - /** - * Loads the credentials from the {filename} on disk. - * - * @callback callback function(err) - * Called when the instance metadata service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - if (!callback) callback = function(err) { if (err) throw err; }; - try { - var creds = JSON.parse(AWS.util.readFileSync(this.filename)); - AWS.Credentials.call(this, creds); - if (!this.accessKeyId || !this.secretAccessKey) { - throw new Error('Credentials not set in ' + this.filename); - } - this.expired = false; - callback(); - } catch (err) { - callback(err); - } - } - -}); diff --git a/node_modules/aws-sdk/lib/credentials/saml_credentials.js b/node_modules/aws-sdk/lib/credentials/saml_credentials.js deleted file mode 100644 index 6743312f..00000000 --- a/node_modules/aws-sdk/lib/credentials/saml_credentials.js +++ /dev/null @@ -1,80 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials retrieved from STS SAML support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithSAML} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given, as well as a `PrincipalArn` - * representing the ARN for the SAML identity provider. In addition, the - * `SAMLAssertion` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn`, `PrincipalArn`, and `SAMLAssertion` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the SAMLAssertion, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.SAMLAssertion = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithSAML}. To update the token, set the - * `params.SAMLAssertion` property. - */ -AWS.SAMLCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithSAML) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.SAMLCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/SAMLRole', - * PrincipalArn: 'arn:aws:iam::1234567890:role/SAMLPrincipal', - * SAMLAssertion: 'base64-token', // base64-encoded token from IdP - * }); - * @see AWS.STS.assumeRoleWithSAML - */ - constructor: function SAMLCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.service = new AWS.STS(); - this.params = params; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithSAML} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.assumeRoleWithSAML(self.params, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - } -}); diff --git a/node_modules/aws-sdk/lib/credentials/temporary_credentials.js b/node_modules/aws-sdk/lib/credentials/temporary_credentials.js deleted file mode 100644 index 6c9bd776..00000000 --- a/node_modules/aws-sdk/lib/credentials/temporary_credentials.js +++ /dev/null @@ -1,103 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents temporary credentials retrieved from {AWS.STS}. Without any - * extra parameters, credentials will be fetched from the - * {AWS.STS.getSessionToken} operation. If an IAM role is provided, the - * {AWS.STS.assumeRole} operation will be used to fetch credentials for the - * role instead. - * - * To setup temporary credentials, configure a set of master credentials - * using the standard credentials providers (environment, EC2 instance metadata, - * or from the filesystem), then set the global credentials to a new - * temporary credentials object: - * - * ```javascript - * // Note that environment credentials are loaded by default, - * // the following line is shown for clarity: - * AWS.config.credentials = new AWS.EnvironmentCredentials('AWS'); - * - * // Now set temporary credentials seeded from the master credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * - * // subsequent requests will now use temporary credentials from AWS STS. - * new AWS.S3().listBucket(function(err, data) { ... }); - * ``` - * - * @!attribute masterCredentials - * @return [AWS.Credentials] the master (non-temporary) credentials used to - * get and refresh temporary credentials from AWS STS. - * @note (see constructor) - */ -AWS.TemporaryCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new temporary credentials object. - * - * @note In order to create temporary credentials, you first need to have - * "master" credentials configured in {AWS.Config.credentials}. These - * master credentials are necessary to retrieve the temporary credentials, - * as well as refresh the credentials when they expire. - * @param params [map] a map of options that are passed to the - * {AWS.STS.assumeRole} or {AWS.STS.getSessionToken} operations. - * If a `RoleArn` parameter is passed in, credentials will be based on the - * IAM role. - * @example Creating a new credenials object for generic temporary credentials - * AWS.config.credentials = new AWS.TemporaryCredentials(); - * @example Creating a new credentials object for an IAM role - * AWS.config.credentials = new AWS.TemporaryCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/TemporaryCredentials', - * }); - * @see AWS.STS.assumeRole - * @see AWS.STS.getSessionToken - */ - constructor: function TemporaryCredentials(params) { - AWS.Credentials.call(this); - this.loadMasterCredentials(); - this.service = new AWS.STS(); - this.expired = true; - - this.params = params || {}; - if (this.params.RoleArn) { - this.params.RoleSessionName = - this.params.RoleSessionName || 'temporary-credentials'; - } - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRole} or - * {AWS.STS.getSessionToken}, depending on whether an IAM role ARN was passed - * to the credentials {constructor}. - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.config.credentials = self.masterCredentials; - var operation = self.params.RoleArn ? - self.service.assumeRole : self.service.getSessionToken; - operation.call(self.service, self.params, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - }, - - /** - * @api private - */ - loadMasterCredentials: function loadMasterCredentials() { - this.masterCredentials = AWS.config.credentials; - while (this.masterCredentials.masterCredentials) { - this.masterCredentials = this.masterCredentials.masterCredentials; - } - } -}); diff --git a/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js b/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js deleted file mode 100644 index 3e5e1858..00000000 --- a/node_modules/aws-sdk/lib/credentials/web_identity_credentials.js +++ /dev/null @@ -1,80 +0,0 @@ -var AWS = require('../core'); - -/** - * Represents credentials retrieved from STS Web Identity Federation support. - * - * By default this provider gets credentials using the - * {AWS.STS.assumeRoleWithWebIdentity} service operation. This operation - * requires a `RoleArn` containing the ARN of the IAM trust policy for the - * application for which credentials will be given. In addition, the - * `WebIdentityToken` must be set to the token provided by the identity - * provider. See {constructor} for an example on creating a credentials - * object with proper `RoleArn` and `WebIdentityToken` values. - * - * ## Refreshing Credentials from Identity Service - * - * In addition to AWS credentials expiring after a given amount of time, the - * login token from the identity provider will also expire. Once this token - * expires, it will not be usable to refresh AWS credentials, and another - * token will be needed. The SDK does not manage refreshing of the token value, - * but this can be done through a "refresh token" supported by most identity - * providers. Consult the documentation for the identity provider for refreshing - * tokens. Once the refreshed token is acquired, you should make sure to update - * this new token in the credentials object's {params} property. The following - * code will update the WebIdentityToken, assuming you have retrieved an updated - * token from the identity provider: - * - * ```javascript - * AWS.config.credentials.params.WebIdentityToken = updatedToken; - * ``` - * - * Future calls to `credentials.refresh()` will now use the new token. - * - * @!attribute params - * @return [map] the map of params passed to - * {AWS.STS.assumeRoleWithWebIdentity}. To update the token, set the - * `params.WebIdentityToken` property. - */ -AWS.WebIdentityCredentials = AWS.util.inherit(AWS.Credentials, { - /** - * Creates a new credentials object. - * @param (see AWS.STS.assumeRoleWithWebIdentity) - * @example Creating a new credentials object - * AWS.config.credentials = new AWS.WebIdentityCredentials({ - * RoleArn: 'arn:aws:iam::1234567890:role/WebIdentity', - * WebIdentityToken: 'ABCDEFGHIJKLMNOP', // token from identity service - * RoleSessionName: 'web' // optional name, defaults to web-identity - * }); - * @see AWS.STS.assumeRoleWithWebIdentity - */ - constructor: function WebIdentityCredentials(params) { - AWS.Credentials.call(this); - this.expired = true; - this.service = new AWS.STS(); - this.params = params; - this.params.RoleSessionName = this.params.RoleSessionName || 'web-identity'; - }, - - /** - * Refreshes credentials using {AWS.STS.assumeRoleWithWebIdentity} - * - * @callback callback function(err) - * Called when the STS service responds (or fails). When - * this callback is called with no error, it means that the credentials - * information has been loaded into the object (as the `accessKeyId`, - * `secretAccessKey`, and `sessionToken` properties). - * @param err [Error] if an error occurred, this value will be filled - * @see get - */ - refresh: function refresh(callback) { - var self = this; - if (!callback) callback = function(err) { if (err) throw err; }; - - self.service.assumeRoleWithWebIdentity(self.params, function (err, data) { - if (!err) { - self.service.credentialsFrom(data, self); - } - callback(err); - }); - } -}); diff --git a/node_modules/aws-sdk/lib/event_listeners.js b/node_modules/aws-sdk/lib/event_listeners.js deleted file mode 100644 index 8c76cb45..00000000 --- a/node_modules/aws-sdk/lib/event_listeners.js +++ /dev/null @@ -1,385 +0,0 @@ -var AWS = require('./core'); -require('./sequential_executor'); -require('./service_interface/json'); -require('./service_interface/query'); -require('./service_interface/rest'); -require('./service_interface/rest_json'); -require('./service_interface/rest_xml'); - -/** - * The namespace used to register global event listeners for request building - * and sending. - */ -AWS.EventListeners = { - /** - * @!attribute VALIDATE_CREDENTIALS - * A request listener that validates whether the request is being - * sent with credentials. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating credentials - * var listener = AWS.EventListeners.Core.VALIDATE_CREDENTIALS; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_REGION - * A request listener that validates whether the region is set - * for a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating region configuration - * var listener = AWS.EventListeners.Core.VALIDATE_REGION; - * request.removeListener('validate', listener); - * @readonly - * @return [Function] - * @!attribute VALIDATE_PARAMETERS - * A request listener that validates input parameters in a request. - * Handles the {AWS.Request~validate 'validate' Request event} - * @example Sending a request without validating parameters - * var listener = AWS.EventListeners.Core.VALIDATE_PARAMETERS; - * request.removeListener('validate', listener); - * @example Disable parameter validation globally - * AWS.EventListeners.Core.removeListener('validate', - * AWS.EventListeners.Core.VALIDATE_REGION); - * @readonly - * @return [Function] - * @!attribute SEND - * A request listener that initiates the HTTP connection for a - * request being sent. Handles the {AWS.Request~send 'send' Request event} - * @example Replacing the HTTP handler - * var listener = AWS.EventListeners.Core.SEND; - * request.removeListener('send', listener); - * request.on('send', function(response) { - * customHandler.send(response); - * }); - * @return [Function] - * @readonly - * @!attribute HTTP_DATA - * A request listener that reads data from the HTTP connection in order - * to build the response data. - * Handles the {AWS.Request~httpData 'httpData' Request event}. - * Remove this handler if you are overriding the 'httpData' event and - * do not want extra data processing and buffering overhead. - * @example Disabling default data processing - * var listener = AWS.EventListeners.Core.HTTP_DATA; - * request.removeListener('httpData', listener); - * @return [Function] - * @readonly - */ - Core: {} /* doc hack */ -}; - -AWS.EventListeners = { - Core: new AWS.SequentialExecutor().addNamedListeners(function(add, addAsync) { - addAsync('VALIDATE_CREDENTIALS', 'validate', - function VALIDATE_CREDENTIALS(req, done) { - req.service.config.getCredentials(function(err) { - if (err) { - req.response.err = AWS.util.error(err, - {code: 'SigningError', message: 'Missing credentials in config'}); - } - done(); - }); - }); - - add('VALIDATE_REGION', 'validate', function VALIDATE_REGION(req) { - if (!req.service.config.region && !req.service.hasGlobalEndpoint()) { - req.response.error = AWS.util.error(new Error(), - {code: 'SigningError', message: 'Missing region in config'}); - } - }); - - add('VALIDATE_PARAMETERS', 'validate', function VALIDATE_PARAMETERS(req) { - var rules = req.service.api.operations[req.operation].input; - new AWS.ParamValidator().validate(rules, req.params); - }); - - add('SET_CONTENT_LENGTH', 'afterBuild', function SET_CONTENT_LENGTH(req) { - if (req.httpRequest.headers['Content-Length'] === undefined) { - var length = AWS.util.string.byteLength(req.httpRequest.body); - req.httpRequest.headers['Content-Length'] = length; - } - }); - - add('SET_HTTP_HOST', 'afterBuild', function SET_HTTP_HOST(req) { - req.httpRequest.headers['Host'] = req.httpRequest.endpoint.host; - }); - - addAsync('SIGN', 'sign', function SIGN(req, done) { - if (!req.service.api.signatureVersion) return done(); // none - - req.service.config.getCredentials(function (err, credentials) { - if (err) { - req.response.error = err; - return done(); - } - - try { - var date = AWS.util.date.getDate(); - var SignerClass = req.service.getSignerClass(req); - var signer = new SignerClass(req.httpRequest, - req.service.api.signingName || req.service.api.endpointPrefix); - - // clear old authorization headers - delete req.httpRequest.headers['Authorization']; - delete req.httpRequest.headers['Date']; - delete req.httpRequest.headers['X-Amz-Date']; - - // add new authorization - signer.addAuthorization(credentials, date); - req.signedAt = date; - } catch (e) { - req.response.error = e; - } - done(); - }); - }); - - add('VALIDATE_RESPONSE', 'validateResponse', function VALIDATE_RESPONSE(resp) { - if (this.service.successfulResponse(resp, this)) { - resp.data = {}; - resp.error = null; - } else { - resp.data = null; - resp.error = AWS.util.error(new Error(), - {code: 'UnknownError', message: 'An unknown error occurred.'}); - } - }); - - addAsync('SEND', 'send', function SEND(resp, done) { - resp.httpResponse._abortCallback = done; - resp.error = null; - resp.data = null; - - function callback(httpResp) { - resp.httpResponse.stream = httpResp; - - httpResp.on('headers', function onHeaders(statusCode, headers) { - resp.request.emit('httpHeaders', [statusCode, headers, resp]); - - if (!resp.request.httpRequest._streaming) { - if (AWS.HttpClient.streamsApiVersion === 2) { // streams2 API check - httpResp.on('readable', function onReadable() { - var data = httpResp.read(); - if (data !== null) { - resp.request.emit('httpData', [data, resp]); - } - }); - } else { // legacy streams API - httpResp.on('data', function onData(data) { - resp.request.emit('httpData', [data, resp]); - }); - } - } - }); - - httpResp.on('end', function onEnd() { - resp.request.emit('httpDone'); - done(); - }); - } - - function progress(httpResp) { - httpResp.on('sendProgress', function onSendProgress(progress) { - resp.request.emit('httpUploadProgress', [progress, resp]); - }); - - httpResp.on('receiveProgress', function onReceiveProgress(progress) { - resp.request.emit('httpDownloadProgress', [progress, resp]); - }); - } - - function error(err) { - resp.error = AWS.util.error(err, { - code: 'NetworkingError', - region: resp.request.httpRequest.region, - hostname: resp.request.httpRequest.endpoint.hostname, - retryable: true - }); - resp.request.emit('httpError', [resp.error, resp], function() { - done(); - }); - } - - function executeSend() { - var http = AWS.HttpClient.getInstance(); - var httpOptions = resp.request.service.config.httpOptions || {}; - var stream = http.handleRequest(resp.request.httpRequest, httpOptions, - callback, error); - progress(stream); - } - - var timeDiff = (AWS.util.date.getDate() - this.signedAt) / 1000; - if (timeDiff >= 60 * 10) { // if we signed 10min ago, re-sign - this.emit('sign', [this], function(err) { - if (err) done(err); - else executeSend(); - }); - } else { - executeSend(); - } - }); - - add('HTTP_HEADERS', 'httpHeaders', - function HTTP_HEADERS(statusCode, headers, resp) { - resp.httpResponse.statusCode = statusCode; - resp.httpResponse.headers = headers; - resp.httpResponse.body = new AWS.util.Buffer(''); - resp.httpResponse.buffers = []; - resp.httpResponse.numBytes = 0; - }); - - add('HTTP_DATA', 'httpData', function HTTP_DATA(chunk, resp) { - if (chunk) { - if (AWS.util.isNode()) { - resp.httpResponse.numBytes += chunk.length; - - var total = resp.httpResponse.headers['content-length']; - var progress = { loaded: resp.httpResponse.numBytes, total: total }; - resp.request.emit('httpDownloadProgress', [progress, resp]); - } - - resp.httpResponse.buffers.push(new AWS.util.Buffer(chunk)); - } - }); - - add('HTTP_DONE', 'httpDone', function HTTP_DONE(resp) { - // convert buffers array into single buffer - if (resp.httpResponse.buffers && resp.httpResponse.buffers.length > 0) { - var body = AWS.util.buffer.concat(resp.httpResponse.buffers); - resp.httpResponse.body = body; - } - delete resp.httpResponse.numBytes; - delete resp.httpResponse.buffers; - }); - - add('FINALIZE_ERROR', 'retry', function FINALIZE_ERROR(resp) { - if (resp.httpResponse.statusCode) { - resp.error.statusCode = resp.httpResponse.statusCode; - if (resp.error.retryable === undefined) { - resp.error.retryable = this.service.retryableError(resp.error, this); - } - } - }); - - add('INVALIDATE_CREDENTIALS', 'retry', function INVALIDATE_CREDENTIALS(resp) { - switch (resp.error.code) { - case 'RequestExpired': // EC2 only - case 'ExpiredTokenException': - case 'ExpiredToken': - resp.error.retryable = true; - resp.request.service.config.credentials.expired = true; - } - }); - - add('REDIRECT', 'retry', function REDIRECT(resp) { - if (resp.error && resp.error.statusCode >= 300 && - resp.error.statusCode < 400 && resp.httpResponse.headers['location']) { - this.httpRequest.endpoint = - new AWS.Endpoint(resp.httpResponse.headers['location']); - resp.error.redirect = true; - resp.error.retryable = true; - } - }); - - add('RETRY_CHECK', 'retry', function RETRY_CHECK(resp) { - if (resp.error) { - if (resp.error.redirect && resp.redirectCount < resp.maxRedirects) { - resp.error.retryDelay = 0; - resp.redirectCount++; - resp.error._willRetry = true; - } else if (resp.error.retryable && resp.retryCount < resp.maxRetries) { - var delays = this.service.retryDelays(); - resp.error.retryDelay = delays[resp.retryCount] || 0; - resp.retryCount++; - resp.error._willRetry = true; - } else { - resp.error._willRetry = false; - } - } - }); - - addAsync('RESET_RETRY_STATE', 'afterRetry', function RESET_RETRY_STATE(resp, done) { - if (resp.error && resp.error._willRetry) { - var delay = resp.error.retryDelay || 0; - resp.error = null; - setTimeout(done, delay); - } else { - done(); - } - }); - - }), - - CorePost: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('EXTRACT_REQUEST_ID', 'extractData', function EXTRACT_REQUEST_ID(resp) { - resp.requestId = resp.httpResponse.headers['x-amz-request-id'] || - resp.httpResponse.headers['x-amzn-requestid']; - }); - }), - - Logger: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('LOG_REQUEST', 'complete', function LOG_REQUEST(resp) { - var req = resp.request; - var logger = req.service.config.logger; - if (!logger) return; - - function buildMessage() { - var time = AWS.util.date.getDate().getTime(); - var delta = (time - req.startTime.getTime()) / 1000; - var ansi = logger.isTTY ? true : false; - var status = resp.httpResponse.statusCode; - var params = require('util').inspect(req.params, true, true); - - var message = ''; - if (ansi) message += '\x1B[33m'; - message += '[AWS ' + req.service.serviceIdentifier + ' ' + status; - message += ' ' + delta.toString() + 's ' + resp.retryCount + ' retries]'; - if (ansi) message += '\x1B[0;1m'; - message += ' ' + req.operation + '(' + params + ')'; - if (ansi) message += '\x1B[0m'; - return message; - } - - var line = buildMessage(); - if (typeof logger.log === 'function') { - logger.log(line); - } else if (typeof logger.write === 'function') { - logger.write(line + '\n'); - } - }); - }), - - Json: new AWS.SequentialExecutor().addNamedListeners(function(add) { - var svc = AWS.ServiceInterface.Json; - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Rest: new AWS.SequentialExecutor().addNamedListeners(function(add) { - var svc = AWS.ServiceInterface.Rest; - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestJson: new AWS.SequentialExecutor().addNamedListeners(function(add) { - var svc = AWS.ServiceInterface.RestJson; - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - RestXml: new AWS.SequentialExecutor().addNamedListeners(function(add) { - var svc = AWS.ServiceInterface.RestXml; - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }), - - Query: new AWS.SequentialExecutor().addNamedListeners(function(add) { - var svc = AWS.ServiceInterface.Query; - add('BUILD', 'build', svc.buildRequest); - add('EXTRACT_DATA', 'extractData', svc.extractData); - add('EXTRACT_ERROR', 'extractError', svc.extractError); - }) -}; diff --git a/node_modules/aws-sdk/lib/http.js b/node_modules/aws-sdk/lib/http.js deleted file mode 100644 index f7114d34..00000000 --- a/node_modules/aws-sdk/lib/http.js +++ /dev/null @@ -1,166 +0,0 @@ -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * The endpoint that a service will talk to, for example, - * `'https://ec2.ap-southeast-1.amazonaws.com'`. If - * you need to override an endpoint for a service, you can - * set the endpoint on a service by passing the endpoint - * object with the `endpoint` option key: - * - * ```javascript - * var ep = new AWS.Endpoint('awsproxy.example.com'); - * var s3 = new AWS.S3({endpoint: ep}); - * s3.service.endpoint.hostname == 'awsproxy.example.com' - * ``` - * - * Note that if you do not specify a protocol, the protocol will - * be selected based on your current {AWS.config} configuration. - * - * @!attribute protocol - * @return [String] the protocol (http or https) of the endpoint - * URL - * @!attribute hostname - * @return [String] the host portion of the endpoint, e.g., - * example.com - * @!attribute host - * @return [String] the host portion of the endpoint including - * the port, e.g., example.com:80 - * @!attribute port - * @return [Integer] the port of the endpoint - * @!attribute href - * @return [String] the full URL of the endpoint - */ -AWS.Endpoint = inherit({ - - /** - * @overload Endpoint(endpoint) - * Constructs a new endpoint given an endpoint URL. If the - * URL omits a protocol (http or https), the default protocol - * set in the global {AWS.config} will be used. - * @param endpoint [String] the URL to construct an endpoint from - */ - constructor: function Endpoint(endpoint, config) { - AWS.util.hideProperties(this, ['slashes', 'auth', 'hash', 'search', 'query']); - - if (typeof endpoint === 'undefined' || endpoint === null) { - throw new Error('Invalid endpoint: ' + endpoint); - } else if (typeof endpoint !== 'string') { - return AWS.util.copy(endpoint); - } - - if (!endpoint.match(/^http/)) { - var useSSL = config && config.sslEnabled !== undefined ? - config.sslEnabled : AWS.config.sslEnabled; - endpoint = (useSSL ? 'https' : 'http') + '://' + endpoint; - } - - AWS.util.update(this, AWS.util.urlParse(endpoint)); - - // Ensure the port property is set as an integer - if (this.port) { - this.port = parseInt(this.port, 10); - } else { - this.port = this.protocol === 'https:' ? 443 : 80; - } - } - -}); - -/** - * The low level HTTP request object, encapsulating all HTTP header - * and body data sent by a service request. - * - * @!attribute method - * @return [String] the HTTP method of the request - * @!attribute path - * @return [String] the path portion of the URI, e.g., - * "/list/?start=5&num=10" - * @!attribute headers - * @return [map] - * a map of header keys and their respective values - * @!attribute body - * @return [String] the request body payload - * @!attribute endpoint - * @return [AWS.Endpoint] the endpoint for the request - * @!attribute region - * @api private - * @return [String] the region, for signing purposes only. - */ -AWS.HttpRequest = inherit({ - - /** - * @api private - */ - constructor: function HttpRequest(endpoint, region) { - endpoint = new AWS.Endpoint(endpoint); - this.method = 'POST'; - this.path = endpoint.path || '/'; - this.headers = {}; - this.body = ''; - this.endpoint = endpoint; - this.region = region; - this.setUserAgent(); - }, - - /** - * @api private - */ - setUserAgent: function setUserAgent() { - var prefix = AWS.util.isBrowser() ? 'X-Amz-' : ''; - this.headers[prefix + 'User-Agent'] = AWS.util.userAgent(); - }, - - /** - * @return [String] the part of the {path} excluding the - * query string - */ - pathname: function pathname() { - return this.path.split('?', 1)[0]; - }, - - /** - * @return [String] the query string portion of the {path} - */ - search: function search() { - return this.path.split('?', 2)[1] || ''; - } - -}); - -/** - * The low level HTTP response object, encapsulating all HTTP header - * and body data returned from the request. - * - * @!attribute statusCode - * @return [Integer] the HTTP status code of the response (e.g., 200, 404) - * @!attribute headers - * @return [map] - * a map of response header keys and their respective values - * @!attribute body - * @return [String] the response body payload - */ -AWS.HttpResponse = inherit({ - - /** - * @api private - */ - constructor: function HttpResponse() { - this.statusCode = undefined; - this.headers = {}; - this.body = undefined; - } -}); - - -AWS.HttpClient = inherit({}); - -/** - * @api private - */ -AWS.HttpClient.getInstance = function getInstance() { - if (this.singleton === undefined) { - this.singleton = new this(); - } - return this.singleton; -}; diff --git a/node_modules/aws-sdk/lib/http/node.js b/node_modules/aws-sdk/lib/http/node.js deleted file mode 100644 index 247a8f57..00000000 --- a/node_modules/aws-sdk/lib/http/node.js +++ /dev/null @@ -1,147 +0,0 @@ -var AWS = require('../core'); -var Stream = AWS.util.nodeRequire('stream').Stream; -var WritableStream = AWS.util.nodeRequire('stream').Writable; -var ReadableStream = AWS.util.nodeRequire('stream').Readable; -require('../http'); - -/** - * @api private - */ -AWS.NodeHttpClient = AWS.util.inherit({ - handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { - var endpoint = httpRequest.endpoint; - var pathPrefix = ''; - if (!httpOptions) httpOptions = {}; - if (httpOptions.proxy) { - pathPrefix = endpoint.protocol + '//' + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - pathPrefix += ':' + endpoint.port; - } - endpoint = new AWS.Endpoint(httpOptions.proxy); - } - - var useSSL = endpoint.protocol === 'https:'; - var http = useSSL ? require('https') : require('http'); - var options = { - host: endpoint.hostname, - port: endpoint.port, - method: httpRequest.method, - headers: httpRequest.headers, - path: pathPrefix + httpRequest.path - }; - - if (useSSL && !httpOptions.agent) { - options.agent = this.sslAgent(); - } - - AWS.util.update(options, httpOptions); - delete options.proxy; // proxy isn't an HTTP option - delete options.timeout; // timeout isn't an HTTP option - - var stream = http.request(options, function (httpResp) { - callback(httpResp); - httpResp.emit('headers', httpResp.statusCode, httpResp.headers); - }); - httpRequest.stream = stream; // attach stream to httpRequest - - // timeout support - stream.setTimeout(httpOptions.timeout || 0); - stream.once('timeout', function() { - var msg = 'Connection timed out after ' + httpOptions.timeout + 'ms'; - errCallback(AWS.util.error(new Error(msg), {code: 'TimeoutError'})); - - // HACK - abort the connection without tripping our error handler - // since we already raised our TimeoutError. Otherwise the connection - // comes back with ECONNRESET, which is not a helpful error message - stream.removeListener('error', errCallback); - stream.on('error', function() { }); - stream.abort(); - }); - - stream.on('error', errCallback); - this.writeBody(stream, httpRequest); - return stream; - }, - - writeBody: function writeBody(stream, httpRequest) { - var body = httpRequest.body; - - if (body && WritableStream && ReadableStream) { // progress support - if (!(body instanceof Stream)) body = this.bufferToStream(body); - body.pipe(this.progressStream(stream, httpRequest)); - } - - if (body instanceof Stream) { - body.pipe(stream); - } else if (body) { - stream.end(body); - } else { - stream.end(); - } - }, - - sslAgent: function sslAgent() { - var https = require('https'); - - if (!AWS.NodeHttpClient.sslAgent) { - AWS.NodeHttpClient.sslAgent = new https.Agent({rejectUnauthorized: true}); - AWS.NodeHttpClient.sslAgent.setMaxListeners(0); - - // delegate maxSockets to globalAgent - Object.defineProperty(AWS.NodeHttpClient.sslAgent, 'maxSockets', { - enumerable: true, - get: function() { return https.globalAgent.maxSockets; } - }); - } - return AWS.NodeHttpClient.sslAgent; - }, - - progressStream: function progressStream(stream, httpRequest) { - var numBytes = 0; - var totalBytes = httpRequest.headers['Content-Length']; - var writer = new WritableStream(); - writer._write = function(chunk, encoding, callback) { - if (chunk) { - numBytes += chunk.length; - stream.emit('sendProgress', { - loaded: numBytes, total: totalBytes - }); - } - callback(); - }; - return writer; - }, - - bufferToStream: function bufferToStream(buffer) { - if (!AWS.util.Buffer.isBuffer(buffer)) buffer = new AWS.util.Buffer(buffer); - - var readable = new ReadableStream(); - var pos = 0; - readable._read = function(size) { - if (pos >= buffer.length) return readable.push(null); - - var end = pos + size; - if (end > buffer.length) end = buffer.length; - readable.push(buffer.slice(pos, end)); - pos = end; - }; - - return readable; - }, - - emitter: null -}); - -/** - * @!ignore - */ - -/** - * @api private - */ -AWS.HttpClient.prototype = AWS.NodeHttpClient.prototype; - -/** - * @api private - */ -AWS.HttpClient.streamsApiVersion = ReadableStream ? 2 : 1; diff --git a/node_modules/aws-sdk/lib/http/xhr.js b/node_modules/aws-sdk/lib/http/xhr.js deleted file mode 100644 index 6005c8bd..00000000 --- a/node_modules/aws-sdk/lib/http/xhr.js +++ /dev/null @@ -1,112 +0,0 @@ -var AWS = require('../core'); -var EventEmitter = require('events').EventEmitter; -require('../http'); - -/** - * @api private - */ -AWS.XHRClient = AWS.util.inherit({ - handleRequest: function handleRequest(httpRequest, httpOptions, callback, errCallback) { - var self = this; - var endpoint = httpRequest.endpoint; - var emitter = new EventEmitter(); - var href = endpoint.protocol + '//' + endpoint.hostname; - if (endpoint.port !== 80 && endpoint.port !== 443) { - href += ':' + endpoint.port; - } - href += httpRequest.path; - - var xhr = new XMLHttpRequest(); - httpRequest.stream = xhr; - - if (httpOptions.timeout) { - xhr.timeout = httpOptions.timeout; - } - - xhr.addEventListener('readystatechange', function() { - try { - if (xhr.status === 0) return; // 0 code is invalid - } catch (e) { return; } - - if (this.readyState === this.HEADERS_RECEIVED) { - try { xhr.responseType = 'arraybuffer'; } catch (e) {} - emitter.statusCode = xhr.status; - emitter.headers = self.parseHeaders(xhr.getAllResponseHeaders()); - emitter.emit('headers', emitter.statusCode, emitter.headers); - } else if (this.readyState === this.DONE) { - self.finishRequest(xhr, emitter); - } - }, false); - xhr.upload.addEventListener('progress', function (evt) { - emitter.emit('sendProgress', evt); - }); - xhr.addEventListener('progress', function (evt) { - emitter.emit('receiveProgress', evt); - }, false); - xhr.addEventListener('timeout', function () { - errCallback(AWS.util.error(new Error('Timeout'), {code: 'TimeoutError'})); - }, false); - xhr.addEventListener('error', function () { - errCallback(AWS.util.error(new Error('Network Failure'), { - code: 'NetworkingError' - })); - }, false); - - callback(emitter); - xhr.open(httpRequest.method, href, true); - AWS.util.each(httpRequest.headers, function (key, value) { - if (key !== 'Content-Length' && key !== 'User-Agent' && key !== 'Host') { - xhr.setRequestHeader(key, value); - } - }); - - if (httpRequest.body && typeof httpRequest.body.buffer === 'object') { - xhr.send(httpRequest.body.buffer); // typed arrays sent as ArrayBuffer - } else { - xhr.send(httpRequest.body); - } - - return emitter; - }, - - parseHeaders: function parseHeaders(rawHeaders) { - var headers = {}; - AWS.util.arrayEach(rawHeaders.split(/\r?\n/), function (line) { - var key = line.split(':', 1)[0]; - var value = line.substring(key.length + 2); - if (key.length > 0) headers[key] = value; - }); - return headers; - }, - - finishRequest: function finishRequest(xhr, emitter) { - var buffer; - if (xhr.responseType === 'arraybuffer' && xhr.response) { - var ab = xhr.response; - buffer = new AWS.util.Buffer(ab.byteLength); - var view = new Uint8Array(ab); - for (var i = 0; i < buffer.length; ++i) { - buffer[i] = view[i]; - } - } - - try { - if (!buffer && typeof xhr.responseText === 'string') { - buffer = new AWS.util.Buffer(xhr.responseText); - } - } catch (e) {} - - if (buffer) emitter.emit('data', buffer); - emitter.emit('end'); - } -}); - -/** - * @api private - */ -AWS.HttpClient.prototype = AWS.XHRClient.prototype; - -/** - * @api private - */ -AWS.HttpClient.streamsApiVersion = 1; diff --git a/node_modules/aws-sdk/lib/json/builder.js b/node_modules/aws-sdk/lib/json/builder.js deleted file mode 100644 index e9b09562..00000000 --- a/node_modules/aws-sdk/lib/json/builder.js +++ /dev/null @@ -1,76 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.JSON = {}; - -/** - * @api private - */ -AWS.JSON.Builder = inherit({ - - constructor: function JSONBuilder(rules, options) { - this.rules = rules; - this.timestampFormat = options.timestampFormat; - }, - - build: function build(params) { - return JSON.stringify(this.translate(this.rules, params)); - }, - - translate: function translate(rules, value) { - if (value === null || value === undefined) return undefined; - - if (rules.type === 'structure') { - - // translate structures (hashes with pre-defined keys) - var struct = {}; - AWS.util.each.call(this, value, function (memberName, memberValue) { - var memberRules = rules.members[memberName] || {}; - var result = this.translate(memberRules, memberValue); - if (result !== undefined) struct[memberName] = result; - }); - return struct; - - } else if (rules.type === 'list') { - - // translate each member of the list - var list = []; - AWS.util.arrayEach.call(this, value, function (memberValue) { - var memberRules = rules.members || {}; - var result = this.translate(memberRules, memberValue); - if (result !== undefined) list.push(result); - }); - return list; - - } else if (rules.type === 'map') { - - // translate maps (hashes with user supplied keys) - var map = {}; - AWS.util.each.call(this, value, function (memberName, memberValue) { - var memberRules = rules.members || {}; - var result = this.translate(memberRules, memberValue); - if (result !== undefined) map[memberName] = result; - }); - return map; - - } else if (rules.type === 'timestamp') { - - var timestampFormat = rules.format || this.timestampFormat; - return AWS.util.date.format(value, timestampFormat); - - } else if (rules.type === 'integer') { - return parseInt(value, 10); - } else if (rules.type === 'float') { - return parseFloat(value); - } else { - - // all other shapes - return value; - - } - } - -}); diff --git a/node_modules/aws-sdk/lib/metadata_service.js b/node_modules/aws-sdk/lib/metadata_service.js deleted file mode 100644 index 169b4dfe..00000000 --- a/node_modules/aws-sdk/lib/metadata_service.js +++ /dev/null @@ -1,98 +0,0 @@ -var AWS = require('./core'); -require('./http'); -var inherit = AWS.util.inherit; - -/** - * Represents a metadata service available on EC2 instances. Using the - * {request} method, you can receieve metadata about any available resource - * on the metadata service. - * - * @!attribute [r] httpOptions - * @return [map] a map of options to pass to the underlying HTTP request - * @!macro nobrowser - */ -AWS.MetadataService = inherit({ - /** - * @return [String] the hostname of the instance metadata service - */ - host: '169.254.169.254', - - /** - * @!ignore - */ - - /** - * Options - */ - httpOptions: { timeout: 1000 }, - - /** - * Creates a new MetadataService object with a given set of options. - * - * @option options host [String] the hostname of the instance metadata - * service - * @option options httpOptions [map] a map of options to pass to the - * underlying HTTP request - */ - constructor: function MetadataService(options) { - AWS.util.update(this, options); - }, - - /** - * Sends a request to the instance metadata service for a given resource. - * - * @param path [String] the path of the resource to get - * @callback callback function(err, data) - * Called when a response is available from the service. - * @param err [Error, null] if an error occurred, this value will be set - * @param data [String, null] if the request was successful, the body of - * the response - */ - request: function request(path, callback) { - path = path || '/'; - - var data = ''; - var http = AWS.HttpClient.getInstance(); - var httpRequest = new AWS.HttpRequest('http://' + this.host + path); - httpRequest.method = 'GET'; - - http.handleRequest(httpRequest, this.httpOptions, function(httpResponse) { - httpResponse.on('data', function(chunk) { data += chunk.toString(); }); - httpResponse.on('end', function() { callback(null, data); }); - }, callback); - }, - - /** - * Loads a set of credentials stored in the instance metadata service - * - * @api private - * @callback callback function(err, credentials) - * Called when credentials are loaded from the resource - * @param err [Error] if an error occurred, this value will be set - * @param credentials [Object] the raw JSON object containing all - * metadata from the credentials resource - */ - loadCredentials: function loadCredentials(callback) { - var self = this; - var basePath = '/latest/meta-data/iam/security-credentials/'; - self.request(basePath, function (err, roleName) { - if (err) callback(err); - else { - roleName = roleName.split('\n')[0]; // grab first (and only) role - self.request(basePath + roleName, function (credErr, credData) { - if (credErr) callback(credErr); - else { - try { - var credentials = JSON.parse(credData); - callback(null, credentials); - } catch (parseError) { - callback(parseError); - } - } - }); - } - }); - } -}); - -module.exports = AWS.MetadataService; diff --git a/node_modules/aws-sdk/lib/param_validator.js b/node_modules/aws-sdk/lib/param_validator.js deleted file mode 100644 index 44cafc52..00000000 --- a/node_modules/aws-sdk/lib/param_validator.js +++ /dev/null @@ -1,168 +0,0 @@ -var AWS = require('./core'); - -/** - * @api private - */ -AWS.ParamValidator = AWS.util.inherit({ - validate: function validate(rules, params, context) { - var cRules = (rules || {}).members || {}; - var payload = rules ? rules.xml : null; - if (payload) { - cRules = AWS.util.merge(cRules, (cRules[payload] || {}).members || {}); - delete cRules[payload]; - } - - return this.validateStructure(cRules, params || {}, context || 'params'); - }, - - validateStructure: function validateStructure(rules, params, context) { - this.validateType(context, params, ['object'], 'structure'); - - for (var paramName in rules) { - if (!rules.hasOwnProperty(paramName)) continue; - var value = params[paramName]; - var notSet = value === undefined || value === null; - if (rules[paramName].required && notSet) { - this.fail('MissingRequiredParameter', - 'Missing required key \'' + paramName + '\' in ' + context); - } - } - - // validate hash members - for (paramName in params) { - if (!params.hasOwnProperty(paramName)) continue; - - var paramValue = params[paramName], - paramRules = rules[paramName]; - - if (paramRules !== undefined) { - var memberContext = [context, paramName].join('.'); - this.validateMember(paramRules, paramValue, memberContext); - } else { - this.fail('UnexpectedParameter', - 'Unexpected key \'' + paramName + '\' found in ' + context); - } - } - - return true; - }, - - validateMember: function validateMember(rules, param, context) { - var memberRules = rules.members || {}; - switch(rules.type) { - case 'structure': - return this.validateStructure(memberRules, param, context); - case 'list': - return this.validateList(memberRules, param, context); - case 'map': - return this.validateMap(memberRules, param, context); - default: - return this.validateScalar(rules, param, context); - } - }, - - validateList: function validateList(rules, params, context) { - this.validateType(context, params, [Array]); - - // validate array members - for (var i = 0; i < params.length; i++) { - this.validateMember(rules, params[i], context + '[' + i + ']'); - } - }, - - validateMap: function validateMap(rules, params, context) { - this.validateType(context, params, ['object'], 'map'); - - for (var param in params) { - if (!params.hasOwnProperty(param)) continue; - this.validateMember(rules, params[param], - context + '[\'' + param + '\']'); - } - }, - - validateScalar: function validateScalar(rules, value, context) { - switch (rules.type) { - case null: - case undefined: - case 'string': - return this.validateType(context, value, ['string']); - case 'base64': - case 'binary': - return this.validatePayload(context, value); - case 'integer': - case 'float': - return this.validateNumber(context, value); - case 'boolean': - return this.validateType(context, value, ['boolean']); - case 'timestamp': - return this.validateType(context, value, [Date, - /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/, 'number'], - 'Date object, ISO-8601 string, or a UNIX timestamp'); - default: - return this.fail('UnkownType', 'Unhandled type ' + - rules.type + ' for ' + context); - } - }, - - fail: function fail(code, message) { - throw AWS.util.error(new Error(message), {code: code}); - }, - - validateType: function validateType(context, value, acceptedTypes, type) { - if (value === null || value === undefined) return; - - var foundInvalidType = false; - for (var i = 0; i < acceptedTypes.length; i++) { - if (typeof acceptedTypes[i] === 'string') { - if (typeof value === acceptedTypes[i]) return; - } else if (acceptedTypes[i] instanceof RegExp) { - if ((value || '').toString().match(acceptedTypes[i])) return; - } else { - if (value instanceof acceptedTypes[i]) return; - if (AWS.util.isType(value, acceptedTypes[i])) return; - if (!type && !foundInvalidType) acceptedTypes = acceptedTypes.slice(); - acceptedTypes[i] = AWS.util.typeName(acceptedTypes[i]); - } - foundInvalidType = true; - } - - var acceptedType = type; - if (!acceptedType) { - acceptedType = acceptedTypes.join(', ').replace(/,([^,]+)$/, ', or$1'); - } - - var vowel = acceptedType.match(/^[aeiou]/i) ? 'n' : ''; - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a' + - vowel + ' ' + acceptedType); - }, - - validateNumber: function validateNumber(context, value) { - if (value === null || value === undefined) return; - if (typeof value === 'string') { - var castedValue = parseFloat(value); - if (castedValue.toString() === value) value = castedValue; - } - this.validateType(context, value, ['number']); - }, - - validatePayload: function validatePayload(context, value) { - if (value === null || value === undefined) return; - if (typeof value === 'string') return; - if (value && typeof value.byteLength === 'number') return; // typed arrays - if (AWS.util.isNode()) { // special check for buffer/stream in Node.js - var Stream = AWS.util.nodeRequire('stream').Stream; - if (AWS.util.Buffer.isBuffer(value) || value instanceof Stream) return; - } - - var types = ['Buffer', 'Stream', 'File', 'Blob', 'ArrayBuffer', 'DataView']; - if (value) { - for (var i = 0; i < types.length; i++) { - if (AWS.util.isType(value, types[i])) return; - if (AWS.util.typeName(value.constructor) === types[i]) return; - } - } - - this.fail('InvalidParameterType', 'Expected ' + context + ' to be a ' + - 'string, Buffer, Stream, Blob, or typed array object'); - } -}); diff --git a/node_modules/aws-sdk/lib/request.js b/node_modules/aws-sdk/lib/request.js deleted file mode 100644 index 924e5980..00000000 --- a/node_modules/aws-sdk/lib/request.js +++ /dev/null @@ -1,602 +0,0 @@ -var AWS = require('./core'); -var AcceptorStateMachine = require('./state_machine'); -var inherit = AWS.util.inherit; - -var fsm = new AcceptorStateMachine(); -fsm.setupStates = function() { - var hardErrorStates = {success:1, error:1, complete:1}; - var transition = function transition(err, done) { - try { - var self = this; - var origError = self.response.error; - self.emit(self._asm.currentState, function() { - function isTerminalState() { - return hardErrorStates[self._asm.currentState] === 1; - } - - var nextError = self.response.error; - if (self.response.error && origError !== self.response.error) { - if (isTerminalState()) self._hardError = true; - } - - if (self.response.error && !self._hardError && isTerminalState()) { - // error did not change to complete, no need to pass this as an - // uncaughtException - nextError = null; - } - - done(nextError); - }); - - } catch (e) { - this.response.error = e; - if (this._hardError) { - throw e; - } - else if (hardErrorStates.indexOf(this._asm.currentState) >= 0) { - this._hardError = true; - } - done(e); - } - }; - - this.addState('validate', 'build', 'error', transition); - this.addState('restart', 'build', 'error', function(err, done) { - err = this.response.error; - if (!err) return done(); - if (!err.retryable) return done(err); - - if (this.response.retryCount < this.service.config.maxRetries) { - this.response.retryCount++; - done(); - } else { - done(err); - } - }); - this.addState('build', 'afterBuild', 'restart', transition); - this.addState('afterBuild', 'sign', 'restart', transition); - this.addState('sign', 'send', 'retry', transition); - this.addState('retry', 'afterRetry', 'afterRetry', transition); - this.addState('afterRetry', 'sign', 'error', transition); - this.addState('send', 'validateResponse', 'retry', transition); - this.addState('validateResponse', 'extractData', 'extractError', transition); - this.addState('extractError', 'extractData', 'retry', transition); - this.addState('extractData', 'success', 'retry', transition); - this.addState('success', 'complete', 'complete', transition); - this.addState('error', 'complete', 'complete', transition); - this.addState('complete', null, 'uncaughtException', transition); - this.addState('uncaughtException', function(err, done) { - try { - AWS.SequentialExecutor.prototype.unhandledErrorCallback.call(this, err); - } catch (e) { - if (this._hardError) { - e._hardError = true; - throw e; - } - } - done(err); - }); -}; -fsm.setupStates(); - -/** - * ## Asynchronous Requests - * - * All requests made through the SDK are asynchronous and use a - * callback interface. Each service method that kicks off a request - * returns an `AWS.Request` object that you can use to register - * callbacks. - * - * For example, the following service method returns the request - * object as "request", which can be used to register callbacks: - * - * ```javascript - * // request is an AWS.Request object - * var request = ec2.describeInstances(); - * - * // register callbacks on request to retrieve response data - * request.on('success', function(response) { - * console.log(response.data); - * }); - * ``` - * - * When a request is ready to be sent, the {send} method should - * be called: - * - * ```javascript - * request.send(); - * ``` - * - * ## Removing Default Listeners for Events - * - * Request objects are built with default listeners for the various events, - * depending on the service type. In some cases, you may want to remove - * some built-in listeners to customize behaviour. Doing this requires - * access to the built-in listener functions, which are exposed through - * the {AWS.EventListeners.Core} namespace. For instance, you may - * want to customize the HTTP handler used when sending a request. In this - * case, you can remove the built-in listener associated with the 'send' - * event, the {AWS.EventListeners.Core.SEND} listener and add your own. - * - * ## Multiple Callbacks and Chaining - * - * You can register multiple callbacks on any request object. The - * callbacks can be registered for different events, or all for the - * same event. In addition, you can chain callback registration, for - * example: - * - * ```javascript - * request. - * on('success', function(response) { - * console.log("Success!"); - * }). - * on('error', function(response) { - * console.log("Error!"); - * }). - * on('complete', function(response) { - * console.log("Always!"); - * }). - * send(); - * ``` - * - * The above example will print either "Success! Always!", or "Error! Always!", - * depending on whether the request succeeded or not. - * - * @!attribute httpRequest - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpRequest] the raw HTTP request object - * containing request headers and body information - * sent by the service. - * - * @!attribute startTime - * @readonly - * @!group Operation Properties - * @return [Date] the time that the request started - * - * @!group Request Building Events - * - * @!event validate(request) - * Triggered when a request is being validated. Listeners - * should throw an error if the request should not be sent. - * @param request [Request] the request object being sent - * @see AWS.EventListeners.Core.VALIDATE_CREDENTIALS - * @see AWS.EventListeners.Core.VALIDATE_REGION - * - * @!event build(request) - * Triggered when the request payload is being built. Listeners - * should fill the necessary information to send the request - * over HTTP. - * @param (see AWS.Request~validate) - * - * @!event sign(request) - * Triggered when the request is being signed. Listeners should - * add the correct authentication headers and/or adjust the body, - * depending on the authentication mechanism being used. - * @param (see AWS.Request~validate) - * - * @!group Request Sending Events - * - * @!event send(response) - * Triggered when the request is ready to be sent. Listeners - * should call the underlying transport layer to initiate - * the sending of the request. - * @param response [Response] the response object - * @context [Request] the request object that was sent - * @see AWS.EventListeners.Core.SEND - * - * @!event retry(response) - * Triggered when a request failed and might need to be retried. - * Listeners are responsible for checking to see if the request - * is retryable, and if so, re-signing and re-sending the request. - * Information about the failure is set in the `response.error` - * property. - * - * If a listener decides that a request should not be retried, - * that listener should `throw` an error to cancel the event chain. - * Unsetting `response.error` will have no effect. - * - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group Data Parsing Events - * - * @!event extractError(response) - * Triggered on all non-2xx requests so that listeners can extract - * error details from the response body. Listeners to this event - * should set the `response.error` property. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event extractData(response) - * Triggered in successful requests to allow listeners to - * de-serialize the response body into `response.data`. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group Completion Events - * - * @!event success(response) - * Triggered when the request completed successfully. - * `response.data` will contain the response data and - * `response.error` will be null. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event error(error, response) - * Triggered when an error occurs at any point during the - * request. `response.error` will contain details about the error - * that occurred. `response.data` will be null. - * @param error [Error] the error object containing details about - * the error that occurred. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event complete(response) - * Triggered whenever a request cycle completes. `response.error` - * should be checked, since the request may have failed. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!group HTTP Events - * - * @!event httpHeaders(statusCode, headers, response) - * Triggered when headers are sent by the remote server - * @param statusCode [Integer] the HTTP response code - * @param headers [map] the response headers - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpData(chunk, response) - * Triggered when data is sent by the remote server - * @param chunk [Buffer] the buffer data containing the next data chunk - * from the server - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @see AWS.EventListeners.Core.HTTP_DATA - * - * @!event httpUploadProgress(progress, response) - * Triggered when the HTTP request has uploaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpDownloadProgress(progress, response) - * Triggered when the HTTP request has downloaded more data - * @param progress [map] An object containing the `loaded` and `total` bytes - * of the request. - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * @note This event will not be emitted in Node.js 0.8.x. - * - * @!event httpError(error, response) - * Triggered when the HTTP request failed - * @param error [Error] the error object that was thrown - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @!event httpDone(response) - * Triggered when the server is finished sending data - * @param (see AWS.Request~send) - * @context (see AWS.Request~send) - * - * @see AWS.Response - */ -AWS.Request = inherit({ - - /** - * Creates a request for an operation on a given service with - * a set of input parameters. - * - * @param service [AWS.Service] the service to perform the operation on - * @param operation [String] the operation to perform on the service - * @param params [Object] parameters to send to the operation. - * See the operation's documentation for the format of the - * parameters. - */ - constructor: function Request(service, operation, params) { - var endpoint = service.endpoint; - var region = service.config.region; - - // global endpoints sign as us-east-1 - if (service.hasGlobalEndpoint()) region = 'us-east-1'; - - this.service = service; - this.operation = operation; - this.params = params || {}; - this.httpRequest = new AWS.HttpRequest(endpoint, region); - this.startTime = AWS.util.date.getDate(); - - this.response = new AWS.Response(this); - this.restartCount = 0; - this._asm = new AcceptorStateMachine(fsm.states, 'validate'); - - AWS.SequentialExecutor.call(this); - this.emit = this.emitEvent; - }, - - /** - * @!group Sending a Request - */ - - /** - * @overload send(callback = null) - * Sends the request object. - * - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - * @example Sending a request with a callback - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.send(function(err, data) { console.log(err, data); }); - * @example Sending a request with no callback (using event handlers) - * request = s3.putObject({Bucket: 'bucket', Key: 'key'}); - * request.on('complete', function(response) { ... }); // register a callback - * request.send(); - */ - send: function send(callback) { - if (callback) { - this.on('complete', function (resp) { - try { - callback.call(resp, resp.error, resp.data); - } catch (e) { - resp.request._hardError = true; - throw e; - } - }); - } - this.runTo(); - - return this.response; - }, - - build: function build(callback) { - this._hardError = callback ? false : true; - return this.runTo('send', callback); - }, - - runTo: function runTo(state, done) { - this._asm.runTo(state, done, this); - return this; - }, - - /** - * Aborts a request, emitting the error and complete events. - * - * @!macro nobrowser - * @example Aborting a request after sending - * var params = { - * Bucket: 'bucket', Key: 'key', - * Body: new Buffer(1024 * 1024 * 5) // 5MB payload - * }; - * var request = s3.putObject(params); - * request.send(function (err, data) { - * if (err) console.log("Error:", err.code, err.message); - * else console.log(data); - * }); - * - * // abort request in 1 second - * setTimeout(request.abort.bind(request), 1000); - * - * // prints "Error: RequestAbortedError Request aborted by user" - * @return [AWS.Request] the same request object, for chaining. - * @since v1.4.0 - */ - abort: function abort() { - this.removeAllListeners('validateResponse'); - this.removeAllListeners('extractError'); - this.on('validateResponse', function addAbortedError(resp) { - resp.error = AWS.util.error(new Error('Request aborted by user'), { - code: 'RequestAbortedError', retryable: false - }); - }); - - if (this.httpRequest.stream) { // abort HTTP stream - this.httpRequest.stream.abort(); - if (this.httpRequest._abortCallback) { - this.httpRequest._abortCallback(); - } else { - this.removeAllListeners('send'); // haven't sent yet, so let's not - } - } - - return this; - }, - - /** - * Iterates over each page of results given a pageable request, calling - * the provided callback with each page of data. After all pages have been - * retrieved, the callback is called with `null` data. - * - * @note This operation can generate multiple requests to a service. - * @example Iterating over multiple pages of objects in an S3 bucket - * var pages = 1; - * s3.listObjects().eachPage(function(err, data) { - * if (err) return; - * console.log("Page", pages++); - * console.log(data); - * }); - * @callback callback function(err, data) - * Called with each page of resulting data from the request. - * - * @param err [Error] an error object, if an error occurred. - * @param data [Object] a single page of response data. If there is no - * more data, this object will be `null`. - * @return [Boolean] if the callback returns `false`, pagination will - * stop. - * - * @api experimental - * @see AWS.Request.eachItem - * @see AWS.Response.nextPage - * @since v1.4.0 - */ - eachPage: function eachPage(callback) { - function wrappedCallback(response) { - var result = callback.call(response, response.error, response.data); - if (result === false) return; - - if (response.hasNextPage()) { - response.nextPage().on('complete', wrappedCallback).send(); - } else { - callback.call(response, null, null); - } - } - - this.on('complete', wrappedCallback).send(); - }, - - /** - * Enumerates over individual items of a request, paging the responses if - * necessary. - * - * @api experimental - * @since v1.4.0 - */ - eachItem: function eachItem(callback) { - function wrappedCallback(err, data) { - if (err) return callback(err, null); - if (data === null) return callback(null, null); - - var config = this.request.service.paginationConfig(this.request.operation); - var resultKey = config.resultKey; - if (Array.isArray(resultKey)) resultKey = resultKey[0]; - var results = AWS.util.jamespath.query(resultKey, data); - AWS.util.arrayEach(results, function(result) { - AWS.util.arrayEach(result, function(item) { callback(null, item); }); - }); - } - - this.eachPage(wrappedCallback); - }, - - /** - * @return [Boolean] whether the operation can return multiple pages of - * response data. - * @api experimental - * @see AWS.Response.eachPage - * @since v1.4.0 - */ - isPageable: function isPageable() { - return this.service.paginationConfig(this.operation) ? true : false; - }, - - /** - * Converts the request object into a readable stream that - * can be read from or piped into a writable stream. - * - * @note The data read from a readable stream contains only - * the raw HTTP body contents. - * @example Manually reading from a stream - * request.createReadStream().on('data', function(data) { - * console.log("Got data:", data.toString()); - * }); - * @example Piping a request body into a file - * var out = fs.createWriteStream('/path/to/outfile.jpg'); - * s3.service.getObject(params).createReadStream().pipe(out); - * @return [Stream] the readable stream object that can be piped - * or read from (by registering 'data' event listeners). - * @!macro nobrowser - */ - createReadStream: function createReadStream() { - var streams = AWS.util.nodeRequire('stream'); - var req = this; - var stream = null; - var legacyStreams = false; - - if (AWS.HttpClient.streamsApiVersion === 2) { - stream = new streams.Readable(); - stream._read = function() { stream.push(''); }; - } else { - stream = new streams.Stream(); - stream.readable = true; - } - - stream.sent = false; - stream.on('newListener', function(event) { - if (!stream.sent && (event === 'data' || event === 'readable')) { - if (event === 'data') legacyStreams = true; - stream.sent = true; - process.nextTick(function() { req.send(function() { }); }); - } - }); - - this.on('httpHeaders', function streamHeaders(statusCode, headers, resp) { - if (statusCode < 300) { - this.httpRequest._streaming = true; - - req.removeListener('httpData', AWS.EventListeners.Core.HTTP_DATA); - req.removeListener('httpError', AWS.EventListeners.Core.HTTP_ERROR); - req.on('httpError', function streamHttpError(error, resp) { - resp.error = error; - resp.error.retryable = false; - }); - - var httpStream = resp.httpResponse.stream; - stream.response = resp; - stream._read = function() { - var data; - do { - data = httpStream.read(); - if (data) stream.push(data); - } while (data); - stream.push(''); - }; - - var events = ['end', 'error', (legacyStreams ? 'data' : 'readable')]; - AWS.util.arrayEach(events, function(event) { - httpStream.on(event, function(arg) { - stream.emit(event, arg); - }); - }); - } - }); - - this.on('error', function(err) { - stream.emit('error', err); - }); - - return stream; - }, - - /** - * @param [Array,Response] args This should be the response object, - * or an array of args to send to the event. - * @api private - */ - emitEvent: function emit(eventName, args, done) { - if (typeof args === 'function') { done = args; args = null; } - if (!done) done = this.unhandledErrorCallback; - if (!args) args = this.eventParameters(eventName, this.response); - - var origEmit = AWS.SequentialExecutor.prototype.emit; - origEmit.call(this, eventName, args, function (err) { - if (err) this.response.error = err; - done.call(this, err); - }); - }, - - /** - * @api private - */ - eventParameters: function eventParameters(eventName) { - switch (eventName) { - case 'validate': - case 'sign': - case 'build': - case 'afterBuild': - return [this]; - case 'error': - return [this.response.error, this.response]; - default: - return [this.response]; - } - } -}); - -AWS.util.mixin(AWS.Request, AWS.SequentialExecutor); diff --git a/node_modules/aws-sdk/lib/resource_waiter.js b/node_modules/aws-sdk/lib/resource_waiter.js deleted file mode 100644 index 18bbe917..00000000 --- a/node_modules/aws-sdk/lib/resource_waiter.js +++ /dev/null @@ -1,200 +0,0 @@ -/** - * Copyright 2012-2013 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. - */ - -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.ResourceWaiter = inherit({ - /** - * Waits for a given state on a service object - * @param service [Service] the service object to wait on - * @param state [String] the state (defined in waiter configuration) to wait - * for. - * @example Create a waiter for running EC2 instances - * var ec2 = new AWS.EC2; - * var waiter = new AWS.ResourceWaiter(ec2, 'instanceRunning'); - */ - constructor: function constructor(service, state) { - this.service = service; - this.state = state; - this.config = {}; - - if (typeof this.state === 'object') { - AWS.util.each.call(this, this.state, function (key, value) { - this.state = key; - this.expectedValue = value; - }); - } - - this.loadWaiterConfig(this.state); - if (!this.expectedValue) { - this.expectedValue = this.config.successValue; - } - this.config.operation = AWS.util.string.lowerFirst(this.config.operation); - }, - - service: null, - - state: null, - - expectedValue: null, - - config: null, - - waitDone: false, - - Listeners: { - retry: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('RETRY_CHECK', 'retry', function(resp) { - var waiter = resp.request._waiter; - if (resp.error && resp.error.code === 'ResourceNotReady') { - resp.error.retryDelay = waiter.config.interval * 1000; - } - }); - }), - - output: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('CHECK_OUT_ERROR', 'extractError', function CHECK_OUT_ERROR(resp) { - if (resp.error) { - resp.request._waiter.setError(resp, true); - } - }); - - add('CHECK_OUTPUT', 'extractData', function CHECK_OUTPUT(resp) { - var waiter = resp.request._waiter; - var success = waiter.checkSuccess(resp); - if (!success) { - waiter.setError(resp, success === null ? false : true); - } else { - resp.error = null; - } - }); - }), - - error: new AWS.SequentialExecutor().addNamedListeners(function(add) { - add('CHECK_ERROR', 'extractError', function CHECK_ERROR(resp) { - var waiter = resp.request._waiter; - var success = waiter.checkError(resp); - if (!success) { - waiter.setError(resp, success === null ? false : true); - } else { - resp.error = null; - resp.request.removeAllListeners('extractData'); - } - }); - - add('CHECK_ERR_OUTPUT', 'extractData', function CHECK_ERR_OUTPUT(resp) { - resp.request._waiter.setError(resp, true); - }); - }) - }, - - /** - * @return [AWS.Request] - */ - wait: function wait(params, callback) { - if (typeof params === 'function') { - callback = params; params = undefined; - } - - var request = this.service.makeRequest(this.config.operation, params); - var listeners = this.Listeners[this.config.successType]; - request._waiter = this; - request.response.maxRetries = this.config.maxAttempts; - request.addListeners(this.Listeners.retry); - if (listeners) request.addListeners(listeners); - - if (callback) request.send(callback); - return request; - }, - - setError: function setError(resp, retryable) { - resp.data = null; - resp.error = AWS.util.error(resp.error || new Error(), { - code: 'ResourceNotReady', - message: 'Resource is not in the state ' + this.state, - retryable: retryable - }); - }, - - /** - * Checks if the terminal expected success state has been met - * @return [Boolean] - */ - checkSuccess: function checkSuccess(resp) { - if (!this.config.successPath) { - return resp.httpResponse.statusCode < 300; - } - - var r = AWS.util.jamespath.find(this.config.successPath, resp.data); - - if (this.config.failureValue && - this.config.failureValue.indexOf(r) >= 0) { - return null; // fast fail - } - - if (this.expectedValue) { - return r === this.expectedValue; - } else { - return r ? true : false; - } - }, - - /** - * Checks if the terminal expected error state has been met - * @return [Boolean] - */ - checkError: function checkError(resp) { - return resp.httpResponse.statusCode === this.config.successValue; - }, - - /** - * Loads waiter configuration from API configuration and deals with inherited - * properties. - * - * @api private - */ - loadWaiterConfig: function loadWaiterConfig(state, noException) { - if (!this.service.api.waiters[state]) { - if (noException) return; - throw new AWS.util.error(new Error(), { - code: 'StateNotFoundError', - message: 'State ' + state + ' not found.' - }); - } - - if (state !== '__default__') { - var superState = this.service.api.waiters[state]['extends']; - superState = superState || '__default__'; - this.loadWaiterConfig(superState, true); - } - - var config = this.config; - AWS.util.update(config, this.service.api.waiters[state]); - - // inherit acceptor data - (function () { // anonymous function to avoid max complexity count - config.successType = config.successType || config.acceptorType; - config.successPath = config.successPath || config.acceptorPath; - config.successValue = config.successValue || config.acceptorValue; - config.failureType = config.failureType || config.acceptorType; - config.failurePath = config.failurePath || config.acceptorPath; - config.failureValue = config.failureValue || config.acceptorValue; - })(); - } -}); diff --git a/node_modules/aws-sdk/lib/response.js b/node_modules/aws-sdk/lib/response.js deleted file mode 100644 index 7ee84881..00000000 --- a/node_modules/aws-sdk/lib/response.js +++ /dev/null @@ -1,195 +0,0 @@ -var AWS = require('./core'); -var inherit = AWS.util.inherit; - -/** - * This class encapsulates the the response information - * from a service request operation sent through {AWS.Request}. - * The response object has two main properties for getting information - * back from a request: - * - * ## The `data` property - * - * The `response.data` property contains the serialized object data - * retrieved from the service request. For instance, for an - * Amazon DynamoDB `listTables` method call, the response data might - * look like: - * - * ``` - * > resp.data - * { TableNames: - * [ 'table1', 'table2', ... ] } - * ``` - * - * The `data` property can be null if an error occurs (see below). - * - * ## The `error` property - * - * In the event of a service error (or transfer error), the - * `response.error` property will be filled with the given - * error data in the form: - * - * ``` - * { code: 'SHORT_UNIQUE_ERROR_CODE', - * message: 'Some human readable error message' } - * ``` - * - * In the case of an error, the `data` property will be `null`. - * Note that if you handle events that can be in a failure state, - * you should always check whether `response.error` is set - * before attempting to access the `response.data` property. - * - * @!attribute data - * @readonly - * @!group Data Properties - * @note Inside of a {AWS.Request~httpData} event, this - * property contains a single raw packet instead of the - * full de-serialized service response. - * @return [Object] the de-serialized response data - * from the service. - * - * @!attribute error - * An structure containing information about a service - * or networking error. - * @readonly - * @!group Data Properties - * @note This attribute is only filled if a service or - * networking error occurs. - * @return [Object] - * * code [String] a unique short code representing the - * error that was emitted. - * * message [String] a longer human readable error message - * * retryable [Boolean] whether the error message is - * retryable. - * - * @!attribute requestId - * @readonly - * @!group Data Properties - * @return [String] the unique request ID associated with the response. - * Log this value when debugging requests for AWS support. - * - * @!attribute retryCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of retries that were - * attempted before the request was completed. - * - * @!attribute redirectCount - * @readonly - * @!group Operation Properties - * @return [Integer] the number of redirects that were - * followed before the request was completed. - * - * @!attribute httpResponse - * @readonly - * @!group HTTP Properties - * @return [AWS.HttpResponse] the raw HTTP response object - * containing the response headers and body information - * from the server. - * - * @see AWS.Request - */ -AWS.Response = inherit({ - - /** - * @api private - */ - constructor: function Response(request) { - this.request = request; - this.data = null; - this.error = null; - this.retryCount = 0; - this.redirectCount = 0; - this.httpResponse = new AWS.HttpResponse(); - if (request) { - this.maxRetries = request.service.numRetries(); - this.maxRedirects = request.service.config.maxRedirects; - } - }, - - /** - * Creates a new request for the next page of response data, calling the - * callback with the page data if a callback is provided. - * - * @callback callback function(err, data) - * Called when a page of data is returned from the next request. - * - * @param err [Error] an error object, if an error occurred in the request - * @param data [Object] the next page of data, or null, if there are no - * more pages left. - * @return [AWS.Request] the request object for the next page of data - * @return [null] if no callback is provided and there are no pages left - * to retrieve. - * @api experimental - * @since v1.4.0 - */ - nextPage: function nextPage(callback) { - var config; - var service = this.request.service; - var operation = this.request.operation; - try { - config = service.paginationConfig(operation, true); - } catch (e) { this.error = e; } - - if (!this.hasNextPage()) { - if (callback) callback(this.error, null); - else if (this.error) throw this.error; - return null; - } - - var params = AWS.util.copy(this.request.params); - if (!this.nextPageTokens) { - return callback ? callback(null, null) : null; - } else { - var inputTokens = config.inputToken; - if (typeof inputTokens === 'string') inputTokens = [inputTokens]; - for (var i = 0; i < inputTokens.length; i++) { - params[inputTokens[i]] = this.nextPageTokens[i]; - } - return service.makeRequest(this.request.operation, params, callback); - } - }, - - /** - * @return [Boolean] whether more pages of data can be returned by further - * requests - * @api experimental - * @since v1.4.0 - */ - hasNextPage: function hasNextPage() { - this.cacheNextPageTokens(); - if (this.nextPageTokens) return true; - if (this.nextPageTokens === undefined) return undefined; - else return false; - }, - - /** - * @api private - */ - cacheNextPageTokens: function cacheNextPageTokens() { - if (this.hasOwnProperty('nextPageTokens')) return this.nextPageTokens; - this.nextPageTokens = undefined; - - var config = this.request.service.paginationConfig(this.request.operation); - if (!config) return this.nextPageTokens; - - this.nextPageTokens = null; - if (config.moreResults) { - if (!AWS.util.jamespath.find(config.moreResults, this.data)) { - return this.nextPageTokens; - } - } - - var exprs = config.outputToken; - if (typeof exprs === 'string') exprs = [exprs]; - AWS.util.arrayEach.call(this, exprs, function (expr) { - var output = AWS.util.jamespath.find(expr, this.data); - if (output) { - this.nextPageTokens = this.nextPageTokens || []; - this.nextPageTokens.push(output); - } - }); - - return this.nextPageTokens; - } - -}); diff --git a/node_modules/aws-sdk/lib/sequential_executor.js b/node_modules/aws-sdk/lib/sequential_executor.js deleted file mode 100644 index 1c9e5d2c..00000000 --- a/node_modules/aws-sdk/lib/sequential_executor.js +++ /dev/null @@ -1,255 +0,0 @@ -var AWS = require('./core'); -var domain = AWS.util.nodeRequire('domain'); - -/** - * @!method on(eventName, callback) - * Registers an event listener callback for the event given by `eventName`. - * Parameters passed to the callback function depend on the individual event - * being triggered. See the event documentation for those parameters. - * - * @param eventName [String] the event name to register the listener for - * @param callback [Function] the listener callback function - * @return [AWS.SequentialExecutor] the same object for chaining - */ -AWS.SequentialExecutor = AWS.util.inherit({ - - constructor: function SequentialExecutor() { - this.domain = domain && domain.active; - this._events = {}; - }, - - /** - * @api private - */ - listeners: function listeners(eventName) { - return this._events[eventName] ? this._events[eventName].slice(0) : []; - }, - - on: function on(eventName, listener) { - if (this._events[eventName]) { - this._events[eventName].push(listener); - } else { - this._events[eventName] = [listener]; - } - return this; - }, - - /** - * @api private - */ - onAsync: function onAsync(eventName, listener) { - listener._isAsync = true; - return this.on(eventName, listener); - }, - - removeListener: function removeListener(eventName, listener) { - var listeners = this._events[eventName]; - if (listeners) { - var length = listeners.length; - var position = -1; - for (var i = 0; i < length; ++i) { - if (listeners[i] === listener) { - position = i; - } - } - if (position > -1) { - listeners.splice(position, 1); - } - } - return this; - }, - - removeAllListeners: function removeAllListeners(eventName) { - if (eventName) { - delete this._events[eventName]; - } else { - this._events = {}; - } - return this; - }, - - /** - * @api private - */ - emit: function emit(eventName, eventArgs, doneCallback) { - if (!doneCallback) doneCallback = this.unhandledErrorCallback; - if (domain && this.domain instanceof domain.Domain) - this.domain.enter(); - - var listeners = this.listeners(eventName); - var count = listeners.length; - this.callListeners(listeners, eventArgs, doneCallback); - return count > 0; - }, - - /** - * @api private - */ - callListeners: function callListeners(listeners, args, doneCallback) { - if (listeners.length === 0) { - doneCallback.call(this); - if (domain && this.domain instanceof domain.Domain) - this.domain.exit(); - } else { - var listener = listeners.shift(); - if (listener._isAsync) { - - // asynchronous listener - var self = this; - var callNextListener = function(err) { - if (err) { - doneCallback.call(self, err); - if (domain && self.domain instanceof domain.Domain) - self.domain.exit(); - } else { - self.callListeners(listeners, args, doneCallback); - } - }; - listener.apply(this, args.concat([callNextListener])); - - } else { - - // synchronous listener - try { - listener.apply(this, args); - this.callListeners(listeners, args, doneCallback); - } catch (err) { - if (err._hardError) throw err; - - doneCallback.call(this, err); - if (domain && this.domain instanceof domain.Domain) - this.domain.exit(); - } - - } - } - }, - - /** - * Adds or copies a set of listeners from another list of - * listeners or SequentialExecutor object. - * - * @param listeners [map>, AWS.SequentialExecutor] - * a list of events and callbacks, or an event emitter object - * containing listeners to add to this emitter object. - * @return [AWS.SequentialExecutor] the emitter object, for chaining. - * @example Adding listeners from a map of listeners - * emitter.addListeners({ - * event1: [function() { ... }, function() { ... }], - * event2: [function() { ... }] - * }); - * emitter.emit('event1'); // emitter has event1 - * emitter.emit('event2'); // emitter has event2 - * @example Adding listeners from another emitter object - * var emitter1 = new AWS.SequentialExecutor(); - * emitter1.on('event1', function() { ... }); - * emitter1.on('event2', function() { ... }); - * var emitter2 = new AWS.SequentialExecutor(); - * emitter2.addListeners(emitter1); - * emitter2.emit('event1'); // emitter2 has event1 - * emitter2.emit('event2'); // emitter2 has event2 - */ - addListeners: function addListeners(listeners) { - var self = this; - - // extract listeners if parameter is an SequentialExecutor object - if (listeners._events) listeners = listeners._events; - - AWS.util.each(listeners, function(event, callbacks) { - if (typeof callbacks === 'function') callbacks = [callbacks]; - AWS.util.arrayEach(callbacks, function(callback) { - self.on(event, callback); - }); - }); - - return self; - }, - - /** - * Registers an event with {on} and saves the callback handle function - * as a property on the emitter object using a given `name`. - * - * @param name [String] the property name to set on this object containing - * the callback function handle so that the listener can be removed in - * the future. - * @param (see on) - * @return (see on) - * @example Adding a named listener DATA_CALLBACK - * var listener = function() { doSomething(); }; - * emitter.addNamedListener('DATA_CALLBACK', 'data', listener); - * - * // the following prints: true - * console.log(emitter.DATA_CALLBACK == listener); - */ - addNamedListener: function addNamedListener(name, eventName, callback) { - this[name] = callback; - this.addListener(eventName, callback); - return this; - }, - - /** - * @api private - */ - addNamedAsyncListener: function addNamedAsyncListener(name, eventName, callback) { - callback._isAsync = true; - return this.addNamedListener(name, eventName, callback); - }, - - /** - * Helper method to add a set of named listeners using - * {addNamedListener}. The callback contains a parameter - * with a handle to the `addNamedListener` method. - * - * @callback callback function(add) - * The callback function is called immediately in order to provide - * the `add` function to the block. This simplifies the addition of - * a large group of named listeners. - * @param add [Function] the {addNamedListener} function to call - * when registering listeners. - * @example Adding a set of named listeners - * emitter.addNamedListeners(function(add) { - * add('DATA_CALLBACK', 'data', function() { ... }); - * add('OTHER', 'otherEvent', function() { ... }); - * add('LAST', 'lastEvent', function() { ... }); - * }); - * - * // these properties are now set: - * emitter.DATA_CALLBACK; - * emitter.OTHER; - * emitter.LAST; - */ - addNamedListeners: function addNamedListeners(callback) { - var self = this; - callback( - function() { - self.addNamedListener.apply(self, arguments); - }, - function() { - self.addNamedAsyncListener.apply(self, arguments); - } - ); - return this; - }, - - /** - * @api private - */ - unhandledErrorCallback: function unhandledErrorCallback(err) { - if (err) { - if (domain && this.domain instanceof domain.Domain) { - err.domainEmitter = this; - err.domain = this.domain; - err.domainThrown = false; - this.domain.emit('error', err); - } else { - throw err; - } - } - } -}); - -/** - * {on} is the prefered method. - * @api private - */ -AWS.SequentialExecutor.prototype.addListener = AWS.SequentialExecutor.prototype.on; diff --git a/node_modules/aws-sdk/lib/service.js b/node_modules/aws-sdk/lib/service.js deleted file mode 100644 index 651bae26..00000000 --- a/node_modules/aws-sdk/lib/service.js +++ /dev/null @@ -1,519 +0,0 @@ -var AWS = require('./core'); -var Translator = require('aws-sdk-apis/lib/translator'); -var inherit = AWS.util.inherit; - -/** - * The service class representing an AWS service. - * - * @abstract - * - * @!attribute apiVersions - * @return [Array] the list of API versions supported by this service. - * @readonly - */ -AWS.Service = inherit({ - /** - * Create a new service object with a configuration object - * - * @param config [map] a map of configuration options - */ - constructor: function Service(config) { - if (!this.loadServiceClass) { - throw AWS.util.error(new Error(), - 'Service must be constructed with `new\' operator'); - } - var ServiceClass = this.loadServiceClass(config || {}); - if (ServiceClass) return new ServiceClass(config); - this.initialize(config); - }, - - /** - * @api private - */ - initialize: function initialize(config) { - AWS.util.hideProperties(this, ['client']); - this.client = this; // backward compatibility with client property - this.config = new AWS.Config(AWS.config); - if (config) this.config.update(config, true); - this.setEndpoint(this.config.endpoint); - }, - - /** - * @api private - */ - loadServiceClass: function loadServiceClass(serviceConfig) { - var config = serviceConfig; - if (!AWS.util.isEmpty(this.api)) { - return null; - } else if (config.apiConfig) { - return AWS.Service.defineServiceApi(this.constructor, config.apiConfig); - } else if (!this.constructor.services) { - return null; - } else { - config = new AWS.Config(AWS.config); - config.update(serviceConfig, true); - var version = config.apiVersions[this.constructor.serviceIdentifier]; - version = version || config.apiVersion; - return this.getLatestServiceClass(version); - } - }, - - /** - * @api private - */ - getLatestServiceClass: function getLatestServiceClass(version) { - version = this.getLatestServiceVersion(version); - if (this.constructor.services[version] === null) { - AWS.Service.defineServiceApi(this.constructor, version); - } - - return this.constructor.services[version]; - }, - - /** - * @api private - */ - getLatestServiceVersion: function getLatestServiceVersion(version) { - if (!this.constructor.services || this.constructor.services.length === 0) { - throw new Error('No services defined on ' + - this.constructor.serviceIdentifier); - } - - if (!version) { - version = 'latest'; - } else if (AWS.util.isType(version, Date)) { - version = AWS.util.date.iso8601(version).split('T')[0]; - } - - if (Object.hasOwnProperty(this.constructor.services, version)) { - return version; - } - - var keys = Object.keys(this.constructor.services).sort(); - var selectedVersion = null; - for (var i = keys.length - 1; i >= 0; i--) { - // versions that end in "*" are not available on disk and can be - // skipped, so do not choose these as selectedVersions - if (keys[i][keys[i].length - 1] !== '*') { - selectedVersion = keys[i]; - } - if (keys[i].substr(0, 10) <= version) { - return selectedVersion; - } - } - - throw new Error('Could not find ' + this.constructor.serviceIdentifier + - ' API to satisfy version constraint `' + version + '\''); - }, - - /** - * @api private - */ - api: {}, - - /** - * @api private - */ - defaultRetryCount: 3, - - /** - * Calls an operation on a service with the given input parameters. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeRequest: function makeRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = null; - } - - params = params || {}; - if (this.config.params) { // copy only toplevel bound params - var rules = this.api.operations[operation]; - if (rules) { - params = AWS.util.copy(params); - AWS.util.each(this.config.params, function(key, value) { - if (rules.input.members[key]) { - if (params[key] === undefined || params[key] === null) { - params[key] = value; - } - } - }); - } - } - - var request = new AWS.Request(this, operation, params); - this.addAllRequestListeners(request); - - if (callback) request.send(callback); - return request; - }, - - /** - * Calls an operation on a service with the given input parameters, without - * any authentication data. This method is useful for "public" API operations. - * - * @param operation [String] the name of the operation to call on the service. - * @param params [map] a map of input options for the operation - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - makeUnauthenticatedRequest: function makeUnauthenticatedRequest(operation, params, callback) { - if (typeof params === 'function') { - callback = params; - params = {}; - } - - var request = this.makeRequest(operation, params); - request.removeListener('validate', AWS.EventListeners.Core.VALIDATE_CREDENTIALS); - request.removeListener('sign', AWS.EventListeners.Core.SIGN); - if (this.api.format === 'query') { // query services turn into GET requests - request.addListener('build', function convertToGET(request) { - request.httpRequest.method = 'GET'; - request.httpRequest.path = '/?' + request.httpRequest.body; - request.httpRequest.body = ''; - - // don't need these headers on a GET request - delete request.httpRequest.headers['Content-Length']; - delete request.httpRequest.headers['Content-Type']; - }); - } - - return callback ? request.send(callback) : request; - }, - - /** - * Waits for a given state - * - * @param state [String] the state on the service to wait for - * @param params [map] a map of parameters to pass with each request - * @callback callback function(err, data) - * If a callback is supplied, it is called when a response is returned - * from the service. - * @param err [Error] the error object returned from the request. - * Set to `null` if the request is successful. - * @param data [Object] the de-serialized data returned from - * the request. Set to `null` if a request error occurs. - */ - waitFor: function waitFor(state, params, callback) { - var waiter = new AWS.ResourceWaiter(this, state); - return waiter.wait(params, callback); - }, - - /** - * @api private - */ - addAllRequestListeners: function addAllRequestListeners(request) { - var list = [AWS.events, AWS.EventListeners.Core, this.serviceInterface(), - AWS.EventListeners.CorePost]; - for (var i = 0; i < list.length; i++) { - if (list[i]) request.addListeners(list[i]); - } - - // disable parameter validation - if (!this.config.paramValidation) { - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_PARAMETERS); - } - - if (this.config.logger) { // add logging events - request.addListeners(AWS.EventListeners.Logger); - } - - this.setupRequestListeners(request); - }, - - /** - * Override this method to setup any custom request listeners for each - * new request to the service. - * - * @abstract - */ - setupRequestListeners: function setupRequestListeners() { - }, - - /** - * Gets the signer class for a given request - * @api private - */ - getSignerClass: function getSignerClass() { - var version = this.api.signatureVersion; - if (this.config.signatureVersion) version = this.config.signatureVersion; - else if (this.isRegionV4()) version = 'v4'; - return AWS.Signers.RequestSigner.getVersion(version); - }, - - /** - * @api private - */ - serviceInterface: function serviceInterface() { - switch (this.api.format) { - case 'query': return AWS.EventListeners.Query; - case 'json': return AWS.EventListeners.Json; - case 'rest-json': return AWS.EventListeners.RestJson; - case 'rest-xml': return AWS.EventListeners.RestXml; - } - if (this.api.format) { - throw new Error('Invalid service `format\' ' + - this.api.format + ' in API config'); - } - }, - - /** - * @api private - */ - successfulResponse: function successfulResponse(resp) { - return resp.httpResponse.statusCode < 300; - }, - - /** - * How many times a failed request should be retried before giving up. - * the defaultRetryCount can be overriden by service classes. - * - * @api private - */ - numRetries: function numRetries() { - if (this.config.maxRetries !== undefined) { - return this.config.maxRetries; - } else { - return this.defaultRetryCount; - } - }, - - /** - * @api private - */ - retryDelays: function retryDelays() { - var retryCount = this.numRetries(); - var delays = []; - for (var i = 0; i < retryCount; ++i) { - delays[i] = Math.pow(2, i) * 30; - } - return delays; - }, - - /** - * @api private - */ - retryableError: function retryableError(error) { - if (this.networkingError(error)) return true; - if (this.expiredCredentialsError(error)) return true; - if (this.throttledError(error)) return true; - if (error.statusCode >= 500) return true; - return false; - }, - - /** - * @api private - */ - networkingError: function networkingError(error) { - return error.code === 'NetworkingError'; - }, - - /** - * @api private - */ - expiredCredentialsError: function expiredCredentialsError(error) { - // TODO : this only handles *one* of the expired credential codes - return (error.code === 'ExpiredTokenException'); - }, - - /** - * @api private - */ - throttledError: function throttledError(error) { - // this logic varies between services - return (error.code === 'ProvisionedThroughputExceededException'); - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - if (endpoint) { - this.endpoint = new AWS.Endpoint(endpoint, this.config); - } else if (this.hasGlobalEndpoint()) { - this.endpoint = new AWS.Endpoint(this.api.globalEndpoint, this.config); - } else { - var host = this.api.endpointPrefix + '.' + this.config.region + - this.endpointSuffix(); - this.endpoint = new AWS.Endpoint(host, this.config); - } - }, - - /** - * @api private - */ - hasGlobalEndpoint: function hasGlobalEndpoint() { - if (this.isRegionV4()) return false; - return this.api.globalEndpoint; - }, - - /** - * @api private - */ - endpointSuffix: function endpointSuffix() { - var suffix = '.amazonaws.com'; - if (this.isRegionCN()) return suffix + '.cn'; - else return suffix; - }, - - /** - * @api private - */ - isRegionCN: function isRegionCN() { - if (!this.config.region) return false; - return this.config.region.match(/^cn-/) ? true : false; - }, - - /** - * @api private - */ - isRegionV4: function isRegionV4() { - return this.isRegionCN(); - }, - - /** - * @api private - */ - paginationConfig: function paginationConfig(operation, throwException) { - function fail(name) { - if (throwException) { - var e = new Error(); - throw AWS.util.error(e, 'No pagination configuration for ' + name); - } - return null; - } - - if (!this.api.pagination) return fail('service'); - if (!this.api.pagination[operation]) return fail(operation); - return this.api.pagination[operation]; - } -}); - -AWS.util.update(AWS.Service, { - - /** - * Adds one method for each operation described in the api configuration - * - * @api private - */ - defineMethods: function defineMethods(svc) { - AWS.util.each(svc.prototype.api.operations, function iterator(method) { - if (svc.prototype[method]) return; - svc.prototype[method] = function (params, callback) { - return this.makeRequest(method, params, callback); - }; - }); - }, - - /** - * Defines a new Service class using a service identifier and list of versions - * including an optional set of features (functions) to apply to the class - * prototype. - * - * @param serviceIdentifier [String] the identifier for the service - * @param versions [Array] a list of versions that work with this - * service - * @param features [Object] an object to attach to the prototype - * @return [Class] the service class defined by this function. - */ - defineService: function defineService(serviceIdentifier, versions, features) { - if (!Array.isArray(versions)) { - features = versions; - versions = []; - } - - var svc = inherit(AWS.Service, features || {}); - - if (typeof serviceIdentifier === 'string') { - AWS.Service.addVersions(svc, versions); - - var identifier = svc.serviceIdentifier || serviceIdentifier; - svc.serviceIdentifier = identifier; - } else { // defineService called with an API - svc.prototype.api = serviceIdentifier; - AWS.Service.defineMethods(svc); - } - - return svc; - }, - - /** - * @api private - */ - addVersions: function addVersions(svc, versions) { - if (!Array.isArray(versions)) versions = [versions]; - - svc.services = svc.services || {}; - for (var i = 0; i < versions.length; i++) { - if (svc.services[versions[i]] === undefined) { - svc.services[versions[i]] = null; - } - } - - svc.apiVersions = Object.keys(svc.services).sort(); - }, - - /** - * @api private - */ - defineServiceApi: function defineServiceApi(superclass, version, apiConfig) { - var svc = inherit(superclass, { - serviceIdentifier: superclass.serviceIdentifier - }); - - function setApi(api) { - if (api.type && api.api_version) { - svc.prototype.api = new Translator(api, {documentation: false}); - } else { - svc.prototype.api = api; - } - } - - if (typeof version === 'string') { - if (apiConfig) { - setApi(apiConfig); - } else { - var fs = AWS.util.nodeRequire('fs'); - var path = AWS.util.nodeRequire('path'); - var apis = AWS.util.nodeRequire('aws-sdk-apis'); - - try { - var name = null; - if (apis) name = apis.serviceName(superclass.serviceIdentifier); - var file = (name || superclass.serviceIdentifier) + '-' + version; - var fullPath = path.dirname(require.resolve('aws-sdk-apis')) + - '/apis/' + file + '.json'; - setApi(JSON.parse(fs.readFileSync(fullPath))); - } catch (err) { - throw AWS.util.error(err, { - message: 'Could not find API configuration ' + file - }); - } - } - if (!superclass.services.hasOwnProperty(version)) { - superclass.apiVersions = superclass.apiVersions.concat(version).sort(); - } - superclass.services[version] = svc; - } else { - setApi(version); - } - - AWS.Service.defineMethods(svc); - return svc; - } -}); diff --git a/node_modules/aws-sdk/lib/service_interface/json.js b/node_modules/aws-sdk/lib/service_interface/json.js deleted file mode 100644 index a730d7c1..00000000 --- a/node_modules/aws-sdk/lib/service_interface/json.js +++ /dev/null @@ -1,50 +0,0 @@ -var AWS = require('../core'); -require('../json/builder'); - -/** - * @api private - */ -AWS.ServiceInterface.Json = { - buildRequest: function buildRequest(req) { - var httpRequest = req.httpRequest; - var api = req.service.api; - var target = api.targetPrefix + '.' + api.operations[req.operation].name; - var version = api.jsonVersion || '1.0'; - - var rules = api.operations[req.operation].input; - var builder = new AWS.JSON.Builder(rules, api); - - httpRequest.body = builder.build(req.params || {}); - httpRequest.headers['Content-Type'] = 'application/x-amz-json-' + version; - httpRequest.headers['X-Amz-Target'] = target; - }, - - extractError: function extractError(resp) { - var error = {}; - var httpResponse = resp.httpResponse; - - if (httpResponse.body.length > 0) { - var e = JSON.parse(httpResponse.body.toString()); - if (e.__type || e.code) { - error.code = (e.__type || e.code).split('#').pop(); - } else { - error.code = 'UnknownError'; - } - if (error.code === 'RequestEntityTooLarge') { - error.message = 'Request body must be less than 1 MB'; - } else { - error.message = (e.message || e.Message || null); - } - } else { - error.code = httpResponse.statusCode; - error.message = null; - } - - resp.error = AWS.util.error(new Error(), error); - }, - - extractData: function extractData(resp) { - resp.data = JSON.parse(resp.httpResponse.body.toString() || '{}'); - } - -}; diff --git a/node_modules/aws-sdk/lib/service_interface/query.js b/node_modules/aws-sdk/lib/service_interface/query.js deleted file mode 100644 index d8ce8895..00000000 --- a/node_modules/aws-sdk/lib/service_interface/query.js +++ /dev/null @@ -1,155 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.ServiceInterface.Query = { - buildRequest: function buildRequest(req) { - var operation = req.service.api.operations[req.operation]; - var httpRequest = req.httpRequest; - httpRequest.headers['Content-Type'] = - 'application/x-www-form-urlencoded; charset=utf-8'; - httpRequest.params = { - Version: req.service.api.apiVersion, - Action: operation.name - }; - - // convert the request parameters into a list of query params, - // e.g. Deeply.NestedParam.0.Name=value - var rules = operation.input; - if (rules) rules = rules.members; - var builder = new AWS.QueryParamSerializer(rules, req.service.api); - builder.serialize(req.params, function(name, value) { - httpRequest.params[name] = value; - }); - httpRequest.body = AWS.util.queryParamsToString(httpRequest.params); - }, - - extractError: function extractError(resp) { - var data, body = resp.httpResponse.body.toString(); - if (body.match(' 0 ? path + '?' + parts.join('&') : path); - } else { - uri = path; - } - - req.httpRequest.path = uri; - }, - - escapePathParam: function escapePathParam(value) { - return AWS.util.uriEscape(String(value)); - }, - - escapeQuerystringParam: function escapeQuerystringParam(value) { - return AWS.util.uriEscape(String(value)); - }, - - populateHeaders: function populateHeaders(req) { - var operation = req.service.api.operations[req.operation]; - var rules = (operation.input || {}).members || {}; - - AWS.util.each.call(this, rules, function (name, rule) { - if (rule.location === 'header' && req.params[name]) { - if (rule.type === 'map') { - AWS.util.each(req.params[name], function (key, value) { - req.httpRequest.headers[rule.name + key] = value; - }); - } else { - var value = req.params[name]; - if (rule.type === 'timestamp') { - var timestampFormat = rule.format || req.service.api.timestampFormat; - value = AWS.util.date.format(value, timestampFormat); - } - req.httpRequest.headers[rule.name || name] = value; - } - } - }); - - } -}; diff --git a/node_modules/aws-sdk/lib/service_interface/rest_json.js b/node_modules/aws-sdk/lib/service_interface/rest_json.js deleted file mode 100644 index 36caf16f..00000000 --- a/node_modules/aws-sdk/lib/service_interface/rest_json.js +++ /dev/null @@ -1,72 +0,0 @@ -var AWS = require('../core'); -require('./rest'); -require('./json'); - -/** - * @api private - */ -AWS.ServiceInterface.RestJson = { - buildRequest: function buildRequest(req) { - AWS.ServiceInterface.Rest.buildRequest(req); - AWS.ServiceInterface.RestJson.populateBody(req); - }, - - extractError: function extractError(resp) { - AWS.ServiceInterface.Json.extractError(resp); - }, - - extractData: function extractData(resp) { - AWS.ServiceInterface.Rest.extractData(resp); - - var req = resp.request; - var rules = req.service.api.operations[req.operation].output || {}; - if (rules.payload && rules.members[rules.payload]) { - if (rules.members[rules.payload].streaming) { - resp.data[rules.payload] = resp.httpResponse.body; - } else { - resp.data[rules.payload] = resp.httpResponse.body.toString(); - } - } else { - var data = resp.data; - AWS.ServiceInterface.Json.extractData(resp); - resp.data = AWS.util.merge(data, resp.data); - } - }, - - populateBody: function populateBody(req) { - var input = req.service.api.operations[req.operation].input; - var payload = input.payload; - var params = {}; - - if (typeof payload === 'string') { - - var rules = input.members[payload]; - params = req.params[payload]; - - if (params === undefined) return; - - if (rules.type === 'structure') { - req.httpRequest.body = this.buildJSON(params, input, req.service.api); - } else { - // non-xml paylaod - req.httpRequest.body = params; - } - - } else if (payload) { - - AWS.util.arrayEach(payload, function (param) { - if (req.params[param] !== undefined) { - params[param] = req.params[param]; - } - }); - req.httpRequest.body = this.buildJSON(params, input, req.service.api); - - } - }, - - buildJSON: function buildJSON(params, rules, api) { - var builder = new AWS.JSON.Builder(rules, api); - return builder.build(params); - } - -}; diff --git a/node_modules/aws-sdk/lib/service_interface/rest_xml.js b/node_modules/aws-sdk/lib/service_interface/rest_xml.js deleted file mode 100644 index aca34a9f..00000000 --- a/node_modules/aws-sdk/lib/service_interface/rest_xml.js +++ /dev/null @@ -1,90 +0,0 @@ -var AWS = require('../core'); -require('../xml/builder'); -require('./rest'); - -/** - * @api private - */ -AWS.ServiceInterface.RestXml = { - buildRequest: function buildRequest(req) { - AWS.ServiceInterface.Rest.buildRequest(req); - AWS.ServiceInterface.RestXml.populateBody(req); - }, - - extractError: function extractError(resp) { - AWS.ServiceInterface.Rest.extractError(resp); - - var data = new AWS.XML.Parser({}).parse(resp.httpResponse.body.toString()); - if (data.Errors) data = data.Errors; - if (data.Error) data = data.Error; - if (data.Code) { - resp.error = AWS.util.error(new Error(), { - code: data.Code, - message: data.Message - }); - } else { - resp.error = AWS.util.error(new Error(), { - code: resp.httpResponse.statusCode, - message: null - }); - } - }, - - extractData: function extractData(resp) { - AWS.ServiceInterface.Rest.extractData(resp); - - var req = resp.request; - var httpResponse = resp.httpResponse; - var operation = req.service.api.operations[req.operation]; - var rules = operation.output.members; - - var output = operation.output; - var payload = output.payload; - - if (payload) { - if (rules[payload].streaming) { - resp.data[payload] = httpResponse.body; - } else { - resp.data[payload] = httpResponse.body.toString(); - } - } else if (httpResponse.body.length > 0) { - var parser = new AWS.XML.Parser(operation.output || {}); - AWS.util.update(resp.data, parser.parse(httpResponse.body.toString())); - } - }, - - populateBody: function populateBody(req) { - var input = req.service.api.operations[req.operation].input; - var payload = input.payload; - var rules = {}; - var builder = null; - var params = req.params; - - if (typeof payload === 'string') { - - rules = input.members[payload]; - params = params[payload]; - - if (params === undefined) return; - - if (rules.type === 'structure') { - builder = new AWS.XML.Builder(payload, rules.members, req.service.api); - req.httpRequest.body = builder.toXML(params); - } else { - // non-xml paylaod - req.httpRequest.body = params; - } - - } else if (payload) { - - AWS.util.arrayEach(payload, function (member) { - rules[member] = input.members[member]; - }); - - builder = new AWS.XML.Builder(input.wrapper, rules, req.service.api); - req.httpRequest.body = builder.toXML(params); - - } - - } -}; diff --git a/node_modules/aws-sdk/lib/services.js b/node_modules/aws-sdk/lib/services.js deleted file mode 100644 index d50e9c6f..00000000 --- a/node_modules/aws-sdk/lib/services.js +++ /dev/null @@ -1,15 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var AWS = require('./core'); -var apis = require('aws-sdk-apis'); - -// define services using map -apis.serviceNames.forEach(function(name) { - var identifier = apis.serviceIdentifier(name); - var versions = apis.serviceVersions(identifier); - AWS[name] = AWS.Service.defineService(identifier, versions); - - // load any customizations from lib/services/.js - var svcFile = path.join(__dirname, 'services', identifier + '.js'); - if (fs.existsSync(svcFile)) require(svcFile); -}); diff --git a/node_modules/aws-sdk/lib/services/dynamodb.js b/node_modules/aws-sdk/lib/services/dynamodb.js deleted file mode 100644 index 9a20a9b2..00000000 --- a/node_modules/aws-sdk/lib/services/dynamodb.js +++ /dev/null @@ -1,52 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.DynamoDB.prototype, { - setupRequestListeners: function setupRequestListeners(request) { - if (request.service.config.dynamoDbCrc32) { - request.addListener('extractData', this.checkCrc32); - } - }, - - /** - * @api private - */ - checkCrc32: function checkCrc32(resp) { - if (!resp.request.service.crc32IsValid(resp)) { - resp.error = AWS.util.error(new Error(), { - code: 'CRC32CheckFailed', - message: 'CRC32 integrity check failed', - retryable: true - }); - } - }, - - /** - * @api private - */ - crc32IsValid: function crc32IsValid(resp) { - var crc = resp.httpResponse.headers['x-amz-crc32']; - if (!crc) return true; // no (valid) CRC32 header - return parseInt(crc, 10) === AWS.util.crypto.crc32(resp.httpResponse.body); - }, - - /** - * @api private - */ - defaultRetryCount: 10, - - /** - * @api private - */ - retryDelays: function retryDelays() { - var retryCount = this.numRetries(); - var delays = []; - for (var i = 0; i < retryCount; ++i) { - if (i === 0) { - delays.push(0); - } else { - delays.push(50 * Math.pow(2, i - 1)); - } - } - return delays; - } -}); diff --git a/node_modules/aws-sdk/lib/services/ec2.js b/node_modules/aws-sdk/lib/services/ec2.js deleted file mode 100644 index 50fa9d2e..00000000 --- a/node_modules/aws-sdk/lib/services/ec2.js +++ /dev/null @@ -1,30 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.EC2.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.removeListener('extractError', AWS.EventListeners.Query.EXTRACT_ERROR); - request.addListener('extractError', this.extractError); - }, - - /** - * @api private - */ - extractError: function extractError(resp) { - // EC2 nests the error code and message deeper than other AWS Query services. - var httpResponse = resp.httpResponse; - var data = new AWS.XML.Parser({}).parse(httpResponse.body.toString() || ''); - if (data.Errors) - resp.error = AWS.util.error(new Error(), { - code: data.Errors.Error.Code, - message: data.Errors.Error.Message - }); - else - resp.error = AWS.util.error(new Error(), { - code: httpResponse.statusCode, - message: null - }); - } -}); diff --git a/node_modules/aws-sdk/lib/services/elastictranscoder.js b/node_modules/aws-sdk/lib/services/elastictranscoder.js deleted file mode 100644 index 54bc7812..00000000 --- a/node_modules/aws-sdk/lib/services/elastictranscoder.js +++ /dev/null @@ -1,18 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.ElasticTranscoder.prototype, { - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('extractError', this.extractErrorCode); - }, - - /** - * @api private - */ - extractErrorCode: function extractErrorCode(resp) { - // ETS stores error type in the header - var errorType = resp.httpResponse.headers['x-amzn-errortype']; - if (errorType) { - resp.error.name = resp.error.code = errorType.split(':')[0]; - } - } -}); diff --git a/node_modules/aws-sdk/lib/services/glacier.js b/node_modules/aws-sdk/lib/services/glacier.js deleted file mode 100644 index bb4b1505..00000000 --- a/node_modules/aws-sdk/lib/services/glacier.js +++ /dev/null @@ -1,96 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.Glacier.prototype, { - setupRequestListeners: function setupRequestListeners(request) { - request.on('validate', this.validateAccountId); - request.on('build', this.addGlacierApiVersion); - request.on('build', this.addTreeHashHeaders); - }, - - validateAccountId: function validateAccountId(request) { - if (request.params.accountId !== undefined) return; - request.params = AWS.util.copy(request.params); - request.params.accountId = '-'; - }, - - addGlacierApiVersion: function addGlacierApiVersion(request) { - var version = request.service.api.apiVersion; - request.httpRequest.headers['x-amz-glacier-version'] = version; - }, - - addTreeHashHeaders: function addTreeHashHeaders(request) { - if (request.params.body === undefined) return; - - var hashes = request.service.computeChecksums(request.params.body); - request.httpRequest.headers['x-amz-content-sha256'] = hashes.linearHash; - - if (!request.httpRequest.headers['x-amz-sha256-tree-hash']) { - request.httpRequest.headers['x-amz-sha256-tree-hash'] = hashes.treeHash; - } - }, - - /** - * @!group Computing Checksums - */ - - /** - * Computes the SHA-256 linear and tree hash checksums for a given - * block of Buffer data. Pass the tree hash of the computed checksums - * as the checksum input to the {completeMultipartUpload} when performing - * a multi-part upload. - * - * @example Calculate checksum of 5.5MB data chunk - * var glacier = new AWS.Glacier(); - * var data = new Buffer(5.5 * 1024 * 1024); - * data.fill('0'); // fill with zeros - * var results = glacier.computeChecksums(data); - * // Result: { linearHash: '68aff0c5a9...', treeHash: '154e26c78f...' } - * @param data [Buffer, String] data to calculate the checksum for - * @return [map] a map containing - * the linearHash and treeHash properties representing hex based digests - * of the respective checksums. - * @see completeMultipartUpload - */ - computeChecksums: function computeChecksums(data) { - if (!AWS.util.Buffer.isBuffer(data)) data = new AWS.util.Buffer(data); - - var mb = 1024 * 1024; - var hashes = []; - var hash = AWS.util.crypto.createHash('sha256'); - - // build leaf nodes in 1mb chunks - for (var i = 0; i < data.length; i += mb) { - var chunk = data.slice(i, Math.min(i + mb, data.length)); - hash.update(chunk); - hashes.push(AWS.util.crypto.sha256(chunk)); - } - - return { - linearHash: hash.digest('hex'), - treeHash: this.buildHashTree(hashes) - }; - }, - - /** - * @api private - */ - buildHashTree: function buildHashTree(hashes) { - // merge leaf nodes - while (hashes.length > 1) { - var tmpHashes = []; - for (var i = 0; i < hashes.length; i += 2) { - if (hashes[i + 1]) { - var tmpHash = new AWS.util.Buffer(64); - tmpHash.write(hashes[i], 0, 32, 'binary'); - tmpHash.write(hashes[i + 1], 32, 32, 'binary'); - tmpHashes.push(AWS.util.crypto.sha256(tmpHash)); - } else { - tmpHashes.push(hashes[i]); - } - } - hashes = tmpHashes; - } - - return AWS.util.crypto.toHex(hashes[0]); - } -}); diff --git a/node_modules/aws-sdk/lib/services/route53.js b/node_modules/aws-sdk/lib/services/route53.js deleted file mode 100644 index 6beb5ea9..00000000 --- a/node_modules/aws-sdk/lib/services/route53.js +++ /dev/null @@ -1,30 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.Route53.prototype, { - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.on('build', this.sanitizeUrl); - }, - - /** - * @api private - */ - sanitizeUrl: function sanitizeUrl(request) { - var path = request.httpRequest.path; - request.httpRequest.path = path.replace(/\/%2F\w+%2F/, '/'); - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - if (endpoint) { - AWS.Service.prototype.setEndpoint(endpoint); - } else { - var opts = {sslEnabled: true}; // SSL is always enabled for Route53 - this.endpoint = new AWS.Endpoint(this.api.globalEndpoint, opts); - } - } -}); diff --git a/node_modules/aws-sdk/lib/services/s3.js b/node_modules/aws-sdk/lib/services/s3.js deleted file mode 100644 index 61bea879..00000000 --- a/node_modules/aws-sdk/lib/services/s3.js +++ /dev/null @@ -1,396 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.S3.prototype, { - /** - * @api private - */ - initialize: function initialize(options) { - AWS.Service.prototype.initialize.call(this, options); - this.setEndpoint((options || {}).endpoint, options); - }, - - /** - * @api private - */ - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('build', this.addContentType); - request.addListener('build', this.populateURI); - request.addListener('build', this.computeContentMd5); - request.addListener('build', this.computeSha256); - request.removeListener('validate', - AWS.EventListeners.Core.VALIDATE_REGION); - request.addListener('extractError', this.extractError); - request.addListener('extractData', this.extractData); - }, - - /** - * S3 prefers dns-compatible bucket names to be moved from the uri path - * to the hostname as a sub-domain. This is not possible, even for dns-compat - * buckets when using SSL and the bucket name contains a dot ('.'). The - * ssl wildcard certificate is only 1-level deep. - * - * @api private - */ - populateURI: function populateURI(req) { - var httpRequest = req.httpRequest; - var b = req.params.Bucket; - - if (b) { - if (!req.service.pathStyleBucketName(b)) { - httpRequest.endpoint.host = httpRequest.endpoint.hostname = b + '.' + - httpRequest.endpoint.hostname; - - httpRequest.virtualHostedBucket = b; // needed for signing the request - httpRequest.path = httpRequest.path.replace(new RegExp('^/' + b), ''); - if (httpRequest.path[0] !== '/') { - httpRequest.path = '/' + httpRequest.path; - } - } - } - }, - - /** - * Adds a default content type if none is supplied. - * - * @api private - */ - addContentType: function addContentType(req) { - var httpRequest = req.httpRequest; - if (!httpRequest.headers['Content-Type']) { // always have a Content-Type - httpRequest.headers['Content-Type'] = 'application/octet-stream'; - } - if (AWS.util.isBrowser() && navigator.userAgent.match(/Firefox/)) { - if (!httpRequest.headers['Content-Type'].match(/;/)) { - var charset = '; charset=UTF-8'; - httpRequest.headers['Content-Type'] += charset; - } - } - }, - - /** - * @api private - */ - computableChecksumOperations: { - putBucketCors: true, - putBucketLifecycle: true, - putBucketTagging: true, - deleteObjects: true - }, - - /** - * Checks whether checksums should be computed for the request. - * If the request requires checksums to be computed, this will always - * return true, otherwise it depends on whether {AWS.Config.computeChecksums} - * is set. - * - * @param req [AWS.Request] the request to check against - * @return [Boolean] whether to compute checksums for a request. - * @api private - */ - willComputeChecksums: function willComputeChecksums(req) { - if (this.computableChecksumOperations[req.operation]) return true; - if (!this.config.computeChecksums) return false; - - // TODO: compute checksums for Stream objects - if (!AWS.util.Buffer.isBuffer(req.httpRequest.body) && - typeof req.httpRequest.body !== 'string') { - return false; - } - - var rules = req.service.api.operations[req.operation].input.members; - - // V4 signer uses SHA256 signatures so only compute MD5 if it is required - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - if (rules.ContentMD5 && !rules.ContentMD5.required) return false; - } - - if (rules.ContentMD5 && !req.params.ContentMD5) return true; - }, - - /** - * A listener that computes the Content-MD5 and sets it in the header. - * @see AWS.S3.willComputeChecksums - * @api private - */ - computeContentMd5: function computeContentMd5(req) { - if (req.service.willComputeChecksums(req)) { - var md5 = AWS.util.crypto.md5(req.httpRequest.body, 'base64'); - req.httpRequest.headers['Content-MD5'] = md5; - } - }, - - /** - * @api private - */ - computeSha256: function computeSha256(req) { - if (req.service.getSignerClass(req) === AWS.Signers.V4) { - req.httpRequest.headers['X-Amz-Content-Sha256'] = - AWS.util.crypto.sha256(req.httpRequest.body || '', 'hex'); - } - }, - - /** - * Returns true if the bucket name should be left in the URI path for - * a request to S3. This function takes into account the current - * endpoint protocol (e.g. http or https). - * - * @api private - */ - pathStyleBucketName: function pathStyleBucketName(bucketName) { - // user can force path style requests via the configuration - if (this.config.s3ForcePathStyle) return true; - - if (this.dnsCompatibleBucketName(bucketName)) { - return (this.config.sslEnabled && bucketName.match(/\./)) ? true : false; - } else { - return true; // not dns compatible names must always use path style - } - }, - - /** - * Returns true if the bucket name is DNS compatible. Buckets created - * outside of the classic region MUST be DNS compatible. - * - * @api private - */ - dnsCompatibleBucketName: function dnsCompatibleBucketName(bucketName) { - var b = bucketName; - var domain = new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/); - var ipAddress = new RegExp(/(\d+\.){3}\d+/); - var dots = new RegExp(/\.\./); - return (b.match(domain) && !b.match(ipAddress) && !b.match(dots)) ? true : false; - }, - - /** - * S3 requires that path params not escape forward slashes. - * - * @api private - */ - escapePathParam: function escapePathParam(value) { - return AWS.util.uriEscapePath(String(value)); - }, - - /** - * @return [Boolean] whether response contains an error - * @api private - */ - successfulResponse: function successfulResponse(resp) { - var req = resp.request; - var httpResponse = resp.httpResponse; - if (req.operation === 'completeMultipartUpload' && - httpResponse.body.toString().match('')) - return false; - else - return httpResponse.statusCode < 300; - }, - - /** - * @return [Boolean] whether the error can be retried - * @api private - */ - retryableError: function retryableError(error, request) { - if (request.operation === 'completeMultipartUpload' && - error.statusCode === 200) { - return true; - } else { - var _super = AWS.Service.prototype.retryableError; - return _super.call(this, error, request); - } - }, - - /** - * Provides a specialized parser for getBucketLocation -- all other - * operations are parsed by the super class. - * - * @api private - */ - extractData: function extractData(resp) { - var req = resp.request; - if (req.operation === 'getBucketLocation') { - var match = resp.httpResponse.body.toString().match(/>(.+)<\/Location/); - if (match) { - delete resp.data['_']; - resp.data.LocationConstraint = match[1]; - } - } - }, - - /** - * Extracts an error object from the http response. - * - * @api private - */ - extractError: function extractError(resp) { - var codes = { - 304: 'NotModified', - 403: 'Forbidden', - 400: 'BadRequest', - 404: 'NotFound' - }; - - var code = resp.httpResponse.statusCode; - var body = resp.httpResponse.body; - if (codes[code] && body.length === 0) { - resp.error = AWS.util.error(new Error(), { - code: codes[resp.httpResponse.statusCode], - message: null - }); - } else { - var data = new AWS.XML.Parser({}).parse(body.toString()); - resp.error = AWS.util.error(new Error(), { - code: data.Code || code, - message: data.Message || null - }); - } - }, - - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - if (endpoint) { - this.endpoint = new AWS.Endpoint(endpoint, this.config); - } else if (this.config.region && this.config.region !== 'us-east-1') { - var sep = '-'; - if (this.isRegionV4()) sep = '.'; - var hostname = 's3' + sep + this.config.region + this.endpointSuffix(); - this.endpoint = new AWS.Endpoint(hostname); - } else { - this.endpoint = new AWS.Endpoint(this.api.globalEndpoint, this.config); - } - }, - - /** - * Get a pre-signed URL for a given operation name. - * - * @note You must ensure that you have static or previously resolved - * credentials if you call this method synchronously (with no callback), - * otherwise it may not properly sign the request. If you cannot guarantee - * this (you are using an asynchronous credential provider, i.e., EC2 - * IAM roles), you should always call this method with an asynchronous - * callback. - * @param operation [String] the name of the operation to call - * @param params [map] parameters to pass to the operation. See the given - * operation for the expected operation parameters. In addition, you can - * also pass the "Expires" parameter to inform S3 how long the URL should - * work for. - * @option params Expires [Integer] (900) the number of seconds to expire - * the pre-signed URL operation in. Defaults to 15 minutes. - * @param callback [Function] if a callback is provided, this function will - * pass the URL as the second parameter (after the error parameter) to - * the callback function. - * @return [String] if called synchronously (with no callback), returns the - * signed URL. - * @return [null] nothing is returned if a callback is provided. - * @example Pre-signing a getObject operation (synchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); - * @example Pre-signing a putObject (asynchronously) - * var params = {Bucket: 'bucket', Key: 'key'}; - * s3.getSignedUrl('putObject', params, function (err, url) { - * console.log('The URL is', url); - * }); - * @example Pre-signing a putObject operation with a specific payload - * var params = {Bucket: 'bucket', Key: 'key', Body: 'body'}; - * var url = s3.getSignedUrl('putObject', params); - * console.log('The URL is', url); - * @example Passing in a 1-minute expiry time for a pre-signed URL - * var params = {Bucket: 'bucket', Key: 'key', Expires: 60}; - * var url = s3.getSignedUrl('getObject', params); - * console.log('The URL is', url); // expires in 60 seconds - */ - getSignedUrl: function getSignedUrl(operation, params, callback) { - params = AWS.util.copy(params || {}); - var expires = params.Expires || 900; - delete params.Expires; // we can't validate this - var request = this.makeRequest(operation, params); - - var expiresHeader = 'presigned-expires'; - - function signedUrlBuilder() { - delete request.httpRequest.headers['User-Agent']; - delete request.httpRequest.headers['X-Amz-User-Agent']; - - if (request.service.getSignerClass() === AWS.Signers.V4) { - if (expires > 604800) { // one week expiry is invalid - var message = 'getSignedUrl() does not support expiry time greater ' + - 'than a week with SigV4 signing.'; - throw AWS.util.error(new Error(), { - code: 'InvalidExpiryTime', message: message, retryable: false - }); - } - request.httpRequest.headers[expiresHeader] = expires; - } else { - request.httpRequest.headers[expiresHeader] = parseInt( - AWS.util.date.unixTimestamp() + expires, 10).toString(); - } - } - - function signedUrlSigner() { - var queryParams = {}; - - AWS.util.each(request.httpRequest.headers, function (key, value) { - if (key === expiresHeader) key = 'Expires'; - queryParams[key] = value; - }); - delete request.httpRequest.headers[expiresHeader]; - - var auth = queryParams['Authorization'].split(' '); - if (auth[0] === 'AWS') { - auth = auth[1].split(':'); - queryParams['AWSAccessKeyId'] = auth[0]; - queryParams['Signature'] = auth[1]; - } else if (auth[0] === 'AWS4-HMAC-SHA256') { // SigV4 signing - auth.shift(); - var rest = auth.join(' '); - var signature = rest.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1]; - queryParams['X-Amz-Signature'] = signature; - delete queryParams['Expires']; - } - delete queryParams['Authorization']; - delete queryParams['Host']; - - // build URL - var endpoint = request.httpRequest.endpoint; - var parsedUrl = AWS.util.urlParse(request.httpRequest.path); - var querystring = AWS.util.queryParamsToString(queryParams); - endpoint.pathname = parsedUrl.pathname; - endpoint.search = !parsedUrl.search ? querystring : - parsedUrl.search + '&' + querystring; - } - - request.on('build', signedUrlBuilder); - request.on('sign', signedUrlSigner); - request.removeListener('build', this.addContentType); - request.removeAllListeners('afterBuild'); - if (!params.Body) { // no Content-MD5/SHA-256 if body is not provided - request.removeListener('build', this.computeContentMd5); - request.removeListener('build', this.computeSha256); - } - - if (callback) { - request.build(function() { - if (request.response.error) callback(request.response.error, null); - else callback(null, AWS.util.urlFormat(request.httpRequest.endpoint)); - }); - } else { - request.build(); - return AWS.util.urlFormat(request.httpRequest.endpoint); - } - }, - - createBucket: function createBucket(params, callback) { - // When creating a bucket *outside* the classic region, the location - // constraint must be set for the bucket and it must match the endpoint. - // This chunk of code will set the location constraint param based - // on the region (when possible), but it will not override a passed-in - // location constraint. - if (!params) params = {}; - var hostname = this.endpoint.hostname; - if (hostname !== this.api.globalEndpoint && !params.CreateBucketConfiguration) { - params.CreateBucketConfiguration = { LocationConstraint: this.config.region }; - } - return this.makeRequest('createBucket', params, callback); - } -}); diff --git a/node_modules/aws-sdk/lib/services/simpledb.js b/node_modules/aws-sdk/lib/services/simpledb.js deleted file mode 100644 index d0a5b1b7..00000000 --- a/node_modules/aws-sdk/lib/services/simpledb.js +++ /dev/null @@ -1,15 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.SimpleDB.prototype, { - /** - * @api private - */ - setEndpoint: function setEndpoint(endpoint) { - if (this.config.region === 'us-east-1') { - var prefix = this.api.endpointPrefix; - this.endpoint = new AWS.Endpoint(prefix + '.amazonaws.com'); - } else { - AWS.Service.prototype.setEndpoint.call(this, endpoint); - } - } -}); diff --git a/node_modules/aws-sdk/lib/services/sqs.js b/node_modules/aws-sdk/lib/services/sqs.js deleted file mode 100644 index e5f52a8c..00000000 --- a/node_modules/aws-sdk/lib/services/sqs.js +++ /dev/null @@ -1,107 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.SQS.prototype, { - setupRequestListeners: function setupRequestListeners(request) { - request.addListener('build', this.buildEndpoint); - - if (request.service.config.computeChecksums) { - if (request.operation === 'sendMessage') { - request.addListener('extractData', this.verifySendMessageChecksum); - } else if (request.operation === 'sendMessageBatch') { - request.addListener('extractData', this.verifySendMessageBatchChecksum); - } else if (request.operation === 'receiveMessage') { - request.addListener('extractData', this.verifyReceiveMessageChecksum); - } - } - }, - - verifySendMessageChecksum: function verifySendMessageChecksum(response) { - if (!response.data) return; - - var md5 = response.data.MD5OfMessageBody; - var body = this.params.MessageBody; - var calculatedMd5 = this.service.calculateChecksum(body); - if (calculatedMd5 !== md5) { - var msg = 'Got "' + response.data.MD5OfMessageBody + - '", expecting "' + calculatedMd5 + '".'; - this.service.throwInvalidChecksumError(response, - [response.data.MessageId], msg); - } - }, - - verifySendMessageBatchChecksum: function verifySendMessageBatchChecksum(response) { - if (!response.data) return; - - var service = this.service; - var entries = {}; - var errors = []; - var messageIds = []; - AWS.util.arrayEach(response.data.Successful, function (entry) { - entries[entry.Id] = entry; - }); - AWS.util.arrayEach(this.params.Entries, function (entry) { - if (entries[entry.Id]) { - var md5 = entries[entry.Id].MD5OfMessageBody; - var body = entry.MessageBody; - if (!service.isChecksumValid(md5, body)) { - errors.push(entry.Id); - messageIds.push(entries[entry.Id].MessageId); - } - } - }); - - if (errors.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + errors.join(', ')); - } - }, - - verifyReceiveMessageChecksum: function verifyReceiveMessageChecksum(response) { - if (!response.data) return; - - var service = this.service; - var messageIds = []; - AWS.util.arrayEach(response.data.Messages, function(message) { - var md5 = message.MD5OfBody; - var body = message.Body; - if (!service.isChecksumValid(md5, body)) { - messageIds.push(message.MessageId); - } - }); - - if (messageIds.length > 0) { - service.throwInvalidChecksumError(response, messageIds, - 'Invalid messages: ' + messageIds.join(', ')); - } - }, - - throwInvalidChecksumError: function throwInvalidChecksumError(response, ids, message) { - response.error = AWS.util.error(new Error(), { - retryable: true, - code: 'InvalidChecksum', - messageIds: ids, - message: response.request.operation + - ' returned an invalid MD5 response. ' + message - }); - }, - - isChecksumValid: function isChecksumValid(checksum, data) { - return this.calculateChecksum(data) === checksum; - }, - - calculateChecksum: function calculateChecksum(data) { - return AWS.util.crypto.md5(data, 'hex'); - }, - - buildEndpoint: function buildEndpoint(request) { - var url = request.httpRequest.params.QueueUrl; - if (url) { - request.httpRequest.endpoint = new AWS.Endpoint(url); - - // signature version 4 requires the region name to be set, - // sqs queue urls contain the region name - var matches = request.httpRequest.endpoint.host.match(/^sqs\.(.+?)\./); - if (matches) request.httpRequest.region = matches[1]; - } - } -}); diff --git a/node_modules/aws-sdk/lib/services/sts.js b/node_modules/aws-sdk/lib/services/sts.js deleted file mode 100644 index 6e9fd00c..00000000 --- a/node_modules/aws-sdk/lib/services/sts.js +++ /dev/null @@ -1,47 +0,0 @@ -var AWS = require('../core'); - -AWS.util.update(AWS.STS.prototype, { - /** - * @overload credentialsFrom(data, credentials = null) - * Creates a credentials object from STS response data containing - * credentials information. Useful for quickly setting AWS credentials. - * - * @note This is a low-level utility function. If you want to load temporary - * credentials into your process for subsequent requests to AWS resources, - * you should use {AWS.TemporaryCredentials} instead. - * @param data [map] data retrieved from a call to {getFederatedToken}, - * {getSessionToken}, {assumeRole}, or {assumeRoleWithWebIdentity}. - * @param credentials [AWS.Credentials] an optional credentials object to - * fill instead of creating a new object. Useful when modifying an - * existing credentials object from a refresh call. - * @return [AWS.TemporaryCredentials] the set of temporary credentials - * loaded from a raw STS operation response. - * @example Using credentialsFrom to load global AWS credentials - * var sts = new AWS.STS(); - * sts.getSessionToken(function (err, data) { - * if (err) console.log("Error getting credentials"); - * else { - * AWS.config.credentials = sts.credentialsFrom(data); - * } - * }); - * @see AWS.TemporaryCredentials - */ - credentialsFrom: function credentialsFrom(data, credentials) { - if (!data) return null; - if (!credentials) credentials = new AWS.TemporaryCredentials(); - credentials.expired = false; - credentials.accessKeyId = data.Credentials.AccessKeyId; - credentials.secretAccessKey = data.Credentials.SecretAccessKey; - credentials.sessionToken = data.Credentials.SessionToken; - credentials.expireTime = data.Credentials.Expiration; - return credentials; - }, - - assumeRoleWithWebIdentity: function assumeRoleWithWebIdentity(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithWebIdentity', params, callback); - }, - - assumeRoleWithSAML: function assumeRoleWithSAML(params, callback) { - return this.makeUnauthenticatedRequest('assumeRoleWithSAML', params, callback); - } -}); diff --git a/node_modules/aws-sdk/lib/services/swf.js b/node_modules/aws-sdk/lib/services/swf.js deleted file mode 100644 index d2520873..00000000 --- a/node_modules/aws-sdk/lib/services/swf.js +++ /dev/null @@ -1,10 +0,0 @@ -var AWS = require('../core'); - -AWS.util.hideProperties(AWS, ['SimpleWorkflow']); - -/** - * @constant - * @readonly - * Backwards compatibility for access to the {AWS.SWF} service class. - */ -AWS.SimpleWorkflow = AWS.SWF; diff --git a/node_modules/aws-sdk/lib/signers/request_signer.js b/node_modules/aws-sdk/lib/signers/request_signer.js deleted file mode 100644 index 96af93ff..00000000 --- a/node_modules/aws-sdk/lib/signers/request_signer.js +++ /dev/null @@ -1,28 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.RequestSigner = inherit({ - constructor: function RequestSigner(request) { - this.request = request; - } -}); - -AWS.Signers.RequestSigner.getVersion = function getVersion(version) { - switch (version) { - case 'v2': return AWS.Signers.V2; - case 'v3': return AWS.Signers.V3; - case 'v4': return AWS.Signers.V4; - case 's3': return AWS.Signers.S3; - case 'v3https': return AWS.Signers.V3Https; - } - throw new Error('Unknown signing version ' + version); -}; - -require('./v2'); -require('./v3'); -require('./v3https'); -require('./v4'); -require('./s3'); diff --git a/node_modules/aws-sdk/lib/signers/s3.js b/node_modules/aws-sdk/lib/signers/s3.js deleted file mode 100644 index 5396a018..00000000 --- a/node_modules/aws-sdk/lib/signers/s3.js +++ /dev/null @@ -1,166 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.S3 = inherit(AWS.Signers.RequestSigner, { - /** - * When building the stringToSign, these sub resource params should be - * part of the canonical resource string with their NON-decoded values - */ - subResources: { - 'acl': 1, - 'cors': 1, - 'lifecycle': 1, - 'delete': 1, - 'location': 1, - 'logging': 1, - 'notification': 1, - 'partNumber': 1, - 'policy': 1, - 'requestPayment': 1, - 'restore': 1, - 'tagging': 1, - 'torrent': 1, - 'uploadId': 1, - 'uploads': 1, - 'versionId': 1, - 'versioning': 1, - 'versions': 1, - 'website': 1 - }, - - // when building the stringToSign, these querystring params should be - // part of the canonical resource string with their NON-encoded values - responseHeaders: { - 'response-content-type': 1, - 'response-content-language': 1, - 'response-expires': 1, - 'response-cache-control': 1, - 'response-content-disposition': 1, - 'response-content-encoding': 1 - }, - - addAuthorization: function addAuthorization(credentials, date) { - if (!this.request.headers['presigned-expires']) { - this.request.headers['X-Amz-Date'] = AWS.util.date.rfc822(date); - } - - if (credentials.sessionToken) { - // presigned URLs require this header to be lowercased - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - var signature = this.sign(credentials.secretAccessKey, this.stringToSign()); - var auth = 'AWS ' + credentials.accessKeyId + ':' + signature; - - this.request.headers['Authorization'] = auth; - }, - - stringToSign: function stringToSign() { - var r = this.request; - - var parts = []; - parts.push(r.method); - parts.push(r.headers['Content-MD5'] || ''); - parts.push(r.headers['Content-Type'] || ''); - - // This is the "Date" header, but we use X-Amz-Date. - // The S3 signing mechanism requires us to pass an empty - // string for this Date header regardless. - parts.push(r.headers['presigned-expires'] || ''); - - var headers = this.canonicalizedAmzHeaders(); - if (headers) parts.push(headers); - parts.push(this.canonicalizedResource()); - - return parts.join('\n'); - - }, - - canonicalizedAmzHeaders: function canonicalizedAmzHeaders() { - - var amzHeaders = []; - - AWS.util.each(this.request.headers, function (name) { - if (name.match(/^x-amz-/i)) - amzHeaders.push(name); - }); - - amzHeaders.sort(function (a, b) { - return a.toLowerCase() < b.toLowerCase() ? -1 : 1; - }); - - var parts = []; - AWS.util.arrayEach.call(this, amzHeaders, function (name) { - parts.push(name.toLowerCase() + ':' + String(this.request.headers[name])); - }); - - return parts.join('\n'); - - }, - - canonicalizedResource: function canonicalizedResource() { - - var r = this.request; - - var parts = r.path.split('?'); - var path = parts[0]; - var querystring = parts[1]; - - var resource = ''; - - if (r.virtualHostedBucket) - resource += '/' + r.virtualHostedBucket; - - resource += path; - - if (querystring) { - - // collect a list of sub resources and query params that need to be signed - var resources = []; - - AWS.util.arrayEach.call(this, querystring.split('&'), function (param) { - var name = param.split('=')[0]; - var value = param.split('=')[1]; - if (this.subResources[name] || this.responseHeaders[name]) { - var subresource = { name: name }; - if (value !== undefined) { - if (this.subResources[name]) { - subresource.value = value; - } else { - subresource.value = decodeURIComponent(value); - } - } - resources.push(subresource); - } - }); - - resources.sort(function (a, b) { return a.name < b.name ? -1 : 1; }); - - if (resources.length) { - - querystring = []; - AWS.util.arrayEach(resources, function (resource) { - if (resource.value === undefined) - querystring.push(resource.name); - else - querystring.push(resource.name + '=' + resource.value); - }); - - resource += '?' + querystring.join('&'); - } - - } - - return resource; - - }, - - sign: function sign(secret, string) { - return AWS.util.crypto.hmac(secret, string, 'base64', 'sha1'); - } -}); - -module.exports = AWS.Signers.S3; diff --git a/node_modules/aws-sdk/lib/signers/v2.js b/node_modules/aws-sdk/lib/signers/v2.js deleted file mode 100644 index 9c7d03f4..00000000 --- a/node_modules/aws-sdk/lib/signers/v2.js +++ /dev/null @@ -1,45 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V2 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - if (!date) date = AWS.util.date.getDate(); - - var r = this.request; - - r.params.Timestamp = AWS.util.date.iso8601(date); - r.params.SignatureVersion = '2'; - r.params.SignatureMethod = 'HmacSHA256'; - r.params.AWSAccessKeyId = credentials.accessKeyId; - - if (credentials.sessionToken) { - r.params.SecurityToken = credentials.sessionToken; - } - - delete r.params.Signature; // delete old Signature for re-signing - r.params.Signature = this.signature(credentials); - - r.body = AWS.util.queryParamsToString(r.params); - r.headers['Content-Length'] = r.body.length; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push(this.request.endpoint.host.toLowerCase()); - parts.push(this.request.pathname()); - parts.push(AWS.util.queryParamsToString(this.request.params)); - return parts.join('\n'); - } - -}); - -module.exports = AWS.Signers.V2; diff --git a/node_modules/aws-sdk/lib/signers/v3.js b/node_modules/aws-sdk/lib/signers/v3.js deleted file mode 100644 index 40f342d5..00000000 --- a/node_modules/aws-sdk/lib/signers/v3.js +++ /dev/null @@ -1,74 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.Signers.V3 = inherit(AWS.Signers.RequestSigner, { - addAuthorization: function addAuthorization(credentials, date) { - - var datetime = AWS.util.date.rfc822(date); - - this.request.headers['X-Amz-Date'] = datetime; - - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - - this.request.headers['X-Amzn-Authorization'] = - this.authorization(credentials, datetime); - - }, - - authorization: function authorization(credentials) { - return 'AWS3 ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'SignedHeaders=' + this.signedHeaders() + ',' + - 'Signature=' + this.signature(credentials); - }, - - signedHeaders: function signedHeaders() { - var headers = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - headers.push(h.toLowerCase()); - }); - return headers.sort().join(';'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = this.request.headers; - var parts = []; - AWS.util.arrayEach(this.headersToSign(), function iterator(h) { - parts.push(h.toLowerCase().trim() + ':' + String(headers[h]).trim()); - }); - return parts.sort().join('\n') + '\n'; - }, - - headersToSign: function headersToSign() { - var headers = []; - AWS.util.each(this.request.headers, function iterator(k) { - if (k === 'Host' || k === 'Content-Encoding' || k.match(/^X-Amz/i)) { - headers.push(k); - } - }); - return headers; - }, - - signature: function signature(credentials) { - return AWS.util.crypto.hmac(credentials.secretAccessKey, this.stringToSign(), 'base64'); - }, - - stringToSign: function stringToSign() { - var parts = []; - parts.push(this.request.method); - parts.push('/'); - parts.push(''); - parts.push(this.canonicalHeaders()); - parts.push(this.request.body); - return AWS.util.crypto.sha256(parts.join('\n')); - } - -}); - -module.exports = AWS.Signers.V3; diff --git a/node_modules/aws-sdk/lib/signers/v3https.js b/node_modules/aws-sdk/lib/signers/v3https.js deleted file mode 100644 index b70a9305..00000000 --- a/node_modules/aws-sdk/lib/signers/v3https.js +++ /dev/null @@ -1,22 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -require('./v3'); - -/** - * @api private - */ -AWS.Signers.V3Https = inherit(AWS.Signers.V3, { - authorization: function authorization(credentials) { - return 'AWS3-HTTPS ' + - 'AWSAccessKeyId=' + credentials.accessKeyId + ',' + - 'Algorithm=HmacSHA256,' + - 'Signature=' + this.signature(credentials); - }, - - stringToSign: function stringToSign() { - return this.request.headers['X-Amz-Date']; - } -}); - -module.exports = AWS.Signers.V3Https; diff --git a/node_modules/aws-sdk/lib/signers/v4.js b/node_modules/aws-sdk/lib/signers/v4.js deleted file mode 100644 index 2f2a4e01..00000000 --- a/node_modules/aws-sdk/lib/signers/v4.js +++ /dev/null @@ -1,160 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -var cachedSecret = {}; - -/** - * @api private - */ -AWS.Signers.V4 = inherit(AWS.Signers.RequestSigner, { - constructor: function V4(request, serviceName) { - AWS.Signers.RequestSigner.call(this, request); - this.serviceName = serviceName; - }, - - addAuthorization: function addAuthorization(credentials, date) { - var datetime = AWS.util.date.iso8601(date).replace(/[:\-]|\.\d{3}/g, ''); - this.addHeaders(credentials, datetime); - this.updateBody(credentials); - this.request.headers['Authorization'] = - this.authorization(credentials, datetime); - }, - - addHeaders: function addHeaders(credentials, datetime) { - this.request.headers['X-Amz-Date'] = datetime; - if (credentials.sessionToken) { - this.request.headers['x-amz-security-token'] = credentials.sessionToken; - } - }, - - updateBody: function updateBody(credentials) { - if (this.request.params) { - this.request.params.AWSAccessKeyId = credentials.accessKeyId; - - if (credentials.sessionToken) { - this.request.params.SecurityToken = credentials.sessionToken; - } - - this.request.body = AWS.util.queryParamsToString(this.request.params); - this.request.headers['Content-Length'] = this.request.body.length; - } - }, - - authorization: function authorization(credentials, datetime) { - var parts = []; - var credString = this.credentialString(datetime); - parts.push('AWS4-HMAC-SHA256 Credential=' + - credentials.accessKeyId + '/' + credString); - parts.push('SignedHeaders=' + this.signedHeaders()); - parts.push('Signature=' + this.signature(credentials, datetime)); - return parts.join(', '); - }, - - signature: function signature(credentials, datetime) { - var cache = cachedSecret[this.serviceName]; - var date = datetime.substr(0, 8); - if (!cache || - cache.akid !== credentials.accessKeyId || - cache.region !== this.request.region || - cache.date !== date) { - var kSecret = credentials.secretAccessKey; - var kDate = AWS.util.crypto.hmac('AWS4' + kSecret, date, 'buffer'); - var kRegion = AWS.util.crypto.hmac(kDate, this.request.region, 'buffer'); - var kService = AWS.util.crypto.hmac(kRegion, this.serviceName, 'buffer'); - var kCredentials = AWS.util.crypto.hmac(kService, 'aws4_request', 'buffer'); - cachedSecret[this.serviceName] = { - region: this.request.region, date: date, - key: kCredentials, akid: credentials.accessKeyId - }; - } - - var key = cachedSecret[this.serviceName].key; - return AWS.util.crypto.hmac(key, this.stringToSign(datetime), 'hex'); - }, - - stringToSign: function stringToSign(datetime) { - var parts = []; - parts.push('AWS4-HMAC-SHA256'); - parts.push(datetime); - parts.push(this.credentialString(datetime)); - parts.push(this.hexEncodedHash(this.canonicalString())); - return parts.join('\n'); - }, - - canonicalString: function canonicalString() { - var parts = []; - parts.push(this.request.method); - parts.push(this.request.pathname()); - parts.push(this.request.search()); - parts.push(this.canonicalHeaders() + '\n'); - parts.push(this.signedHeaders()); - parts.push(this.hexEncodedBodyHash()); - return parts.join('\n'); - }, - - canonicalHeaders: function canonicalHeaders() { - var headers = []; - AWS.util.each.call(this, this.request.headers, function (key, item) { - headers.push([key, item]); - }); - headers.sort(function (a, b) { - return a[0].toLowerCase() < b[0].toLowerCase() ? -1 : 1; - }); - var parts = []; - AWS.util.arrayEach.call(this, headers, function (item) { - var key = item[0].toLowerCase(); - if (this.isSignableHeader(key)) { - parts.push(key + ':' + - this.canonicalHeaderValues(item[1].toString())); - } - }); - return parts.join('\n'); - }, - - canonicalHeaderValues: function canonicalHeaderValues(values) { - return values.replace(/\s+/g, ' ').replace(/^\s+|\s+$/g, ''); - }, - - signedHeaders: function signedHeaders() { - var keys = []; - AWS.util.each.call(this, this.request.headers, function (key) { - key = key.toLowerCase(); - if (this.isSignableHeader(key)) keys.push(key); - }); - return keys.sort().join(';'); - }, - - credentialString: function credentialString(datetime) { - var parts = []; - parts.push(datetime.substr(0, 8)); - parts.push(this.request.region); - parts.push(this.serviceName); - parts.push('aws4_request'); - return parts.join('/'); - }, - - hexEncodedHash: function hash(string) { - return AWS.util.crypto.sha256(string, 'hex'); - }, - - hexEncodedBodyHash: function hexEncodedBodyHash() { - if (this.request.headers['X-Amz-Content-Sha256']) { - return this.request.headers['X-Amz-Content-Sha256']; - } else { - return this.hexEncodedHash(this.request.body || ''); - } - }, - - unsignableHeaders: ['authorization', 'content-type', 'user-agent', - 'x-amz-user-agent', 'x-amz-content-sha256'], - - isSignableHeader: function isSignableHeader(key) { - return this.unsignableHeaders.indexOf(key) < 0; - } - -}); - -module.exports = AWS.Signers.V4; diff --git a/node_modules/aws-sdk/lib/state_machine.js b/node_modules/aws-sdk/lib/state_machine.js deleted file mode 100644 index 6e60b474..00000000 --- a/node_modules/aws-sdk/lib/state_machine.js +++ /dev/null @@ -1,42 +0,0 @@ -function AcceptorStateMachine(states, state) { - this.currentState = state || null; - this.states = states || {}; -} - -AcceptorStateMachine.prototype.runTo = function runTo(finalState, done, bindObject, inputError) { - if (typeof finalState === 'function') { - inputError = bindObject; bindObject = done; - done = finalState; finalState = null; - } - - var self = this; - var state = self.states[self.currentState]; - state.fn.call(bindObject || self, inputError, function(err) { - if (err) { - if (bindObject.logger) bindObject.logger.log(self.currentState, '->', state.fail, err); - if (state.fail) self.currentState = state.fail; - else return done ? done(err) : null; - } else { - if (bindObject.logger) bindObject.logger.log(self.currentState, '->', state.accept); - if (state.accept) self.currentState = state.accept; - else return done ? done() : null; - } - if (self.currentState === finalState) return done ? done(err) : null; - - self.runTo(finalState, done, bindObject, err); - }); -}; - -AcceptorStateMachine.prototype.addState = function addState(name, acceptState, failState, fn) { - if (typeof acceptState === 'function') { - fn = acceptState; acceptState = null; failState = null; - } else if (typeof failState === 'function') { - fn = failState; failState = null; - } - - if (!this.currentState) this.currentState = name; - this.states[name] = { accept: acceptState, fail: failState, fn: fn }; - return this; -}; - -module.exports = AcceptorStateMachine; diff --git a/node_modules/aws-sdk/lib/util.js b/node_modules/aws-sdk/lib/util.js deleted file mode 100644 index 3574e26b..00000000 --- a/node_modules/aws-sdk/lib/util.js +++ /dev/null @@ -1,561 +0,0 @@ -/* eslint guard-for-in:0 */ - -var AWS = require('./core'); -var cryptoLib = require('crypto'); - -var Buffer = require('buffer').Buffer; - -/** - * A set of utility methods for use with the AWS SDK. - * - * @!attribute abort - * Return this value from an iterator function {each} or {arrayEach} - * to break out of the iteration. - * @example Breaking out of an iterator function - * AWS.util.each({a: 1, b: 2, c: 3}, function(key, value) { - * if (key == 'b') return AWS.util.abort; - * }); - * @see each - * @see arrayEach - * @api private - */ -AWS.util = { - engine: function engine() { - if (AWS.util.isBrowser() && typeof navigator !== 'undefined') { - return navigator.userAgent; - } else { - return process.platform + '/' + process.version; - } - }, - - userAgent: function userAgent() { - var name = AWS.util.isBrowser() ? 'js' : 'nodejs'; - var agent = 'aws-sdk-' + name + '/' + AWS.VERSION; - if (name === 'nodejs') agent += ' ' + AWS.util.engine(); - return agent; - }, - - isBrowser: function isBrowser() { return process && process.browser; }, - isNode: function isNode() { return !AWS.util.isBrowser(); }, - nodeRequire: function nodeRequire(module) { - if (AWS.util.isNode()) return require(module); - }, - - uriEscape: function uriEscape(string) { - var output = encodeURIComponent(string); - output = output.replace(/[^A-Za-z0-9_.~\-%]+/g, escape); - - // AWS percent-encodes some extra non-standard characters in a URI - output = output.replace(/[*]/g, function(ch) { - return '%' + ch.charCodeAt(0).toString(16).toUpperCase(); - }); - - return output; - }, - - uriEscapePath: function uriEscapePath(string) { - var parts = []; - AWS.util.arrayEach(string.split('/'), function (part) { - parts.push(AWS.util.uriEscape(part)); - }); - return parts.join('/'); - }, - - urlParse: function urlParse(url) { - return require('url').parse(url); - }, - - urlFormat: function urlFormat(url) { - return require('url').format(url); - }, - - queryParamsToString: function queryParamsToString(params) { - var items = []; - var escape = AWS.util.uriEscape; - var sortedKeys = Object.keys(params).sort(); - - AWS.util.arrayEach(sortedKeys, function(name) { - var value = params[name]; - var ename = escape(name); - var result = ename; - if (Array.isArray(value)) { - var vals = []; - AWS.util.arrayEach(value, function(item) { vals.push(escape(item)); }); - result = ename + '=' + vals.sort().join('&' + ename + '='); - } else if (value !== undefined && value !== null) { - result = ename + '=' + escape(value); - } - items.push(result); - }); - - return items.join('&'); - }, - - readFileSync: function readFileSync(path) { - if (typeof window !== 'undefined') return null; - return require('fs').readFileSync(path, 'utf-8'); - }, - - base64: { - - encode: function encode64(string) { - return new Buffer(string).toString('base64'); - }, - - decode: function decode64(string) { - return new Buffer(string, 'base64').toString(); - } - - }, - - Buffer: Buffer, - - buffer: { - /** - * Concatenates a list of Buffer objects. - */ - concat: function(buffers) { - var length = 0, - offset = 0, - buffer = null, i; - - for (i = 0; i < buffers.length; i++) { - length += buffers[i].length; - } - - buffer = new Buffer(length); - - for (i = 0; i < buffers.length; i++) { - buffers[i].copy(buffer, offset); - offset += buffers[i].length; - } - - return buffer; - } - }, - - string: { - byteLength: function byteLength(string) { - if (string === null || string === undefined) return 0; - if (typeof string === 'string') string = new Buffer(string); - - if (typeof string.byteLength === 'number') { - return string.byteLength; - } else if (typeof string.length === 'number') { - return string.length; - } else if (typeof string.size === 'number') { - return string.size; - } else if (typeof string.path === 'string') { - return require('fs').lstatSync(string.path).size; - } else { - throw AWS.util.error(new Error('Cannot determine length of ' + string), - { object: string }); - } - }, - - upperFirst: function upperFirst(string) { - return string[0].toUpperCase() + string.substr(1); - }, - - lowerFirst: function lowerFirst(string) { - return string[0].toLowerCase() + string.substr(1); - } - }, - - jamespath: { - query: function query(expression, data) { - if (!data) return []; - - var results = []; - var expressions = expression.split(/\s+or\s+/); - AWS.util.arrayEach.call(this, expressions, function (expr) { - var objects = [data]; - var tokens = expr.split('.'); - AWS.util.arrayEach.call(this, tokens, function (token) { - var match = token.match('^(.+?)(?:\\[(-?\\d+|\\*|)\\])?$'); - var newObjects = []; - AWS.util.arrayEach.call(this, objects, function (obj) { - if (match[1] === '*') { - AWS.util.arrayEach.call(this, obj, function (value) { - newObjects.push(value); - }); - } else if (obj.hasOwnProperty(match[1])) { - newObjects.push(obj[match[1]]); - } - }); - objects = newObjects; - - // handle indexing (token[0], token[-1]) - if (match[2] !== undefined) { - newObjects = []; - AWS.util.arrayEach.call(this, objects, function (obj) { - if (Array.isArray(obj)) { - if (match[2] === '*' || match[2] === '') { - newObjects = newObjects.concat(obj); - } else { - var idx = parseInt(match[2], 10); - if (idx < 0) idx = obj.length + idx; // negative indexing - newObjects.push(obj[idx]); - } - } - }); - objects = newObjects; - } - - if (objects.length === 0) return AWS.util.abort; - }); - - if (objects.length > 0) { - results = objects; - return AWS.util.abort; - } - }); - - return results; - }, - - find: function find(expression, data) { - return AWS.util.jamespath.query(expression, data)[0]; - } - }, - - /** - * Date and time utility functions. - */ - date: { - - /** - * @return [Date] the current JavaScript date object. Since all - * AWS services rely on this date object, you can override - * this function to provide a special time value to AWS service - * requests. - */ - getDate: function getDate() { return new Date(); }, - - /** - * @return [String] the date in ISO-8601 format - */ - iso8601: function iso8601(date) { - if (date === undefined) { date = AWS.util.date.getDate(); } - return date.toISOString(); - }, - - /** - * @return [String] the date in RFC 822 format - */ - rfc822: function rfc822(date) { - if (date === undefined) { date = AWS.util.date.getDate(); } - return date.toUTCString(); - }, - - /** - * @return [Integer] the UNIX timestamp value for the current time - */ - unixTimestamp: function unixTimestamp(date) { - if (date === undefined) { date = AWS.util.date.getDate(); } - return date.getTime() / 1000; - }, - - /** - * @param [String,number,Date] date - * @return [Date] - */ - from: function format(date) { - if (typeof date === 'number') { - return new Date(date * 1000); // unix timestamp - } else { - return new Date(date); - } - }, - - /** - * Given a Date or date-like value, this function formats the - * date into a string of the requested value. - * @param [String,number,Date] date - * @param [String] formatter Valid formats are: - # * 'iso8601' - # * 'rfc822' - # * 'unixTimestamp' - * @return [String] - */ - format: function format(date, formatter) { - if (!formatter) formatter = 'iso8601'; - return AWS.util.date[formatter](AWS.util.date.from(date)); - }, - - parseTimestamp: function parseTimestamp(value) { - if (value.match(/^\d+$/)) { // unix timestamp - return new Date(value * 1000); - } else if (value.match(/^\d{4}/)) { // iso8601 - return new Date(value); - } else if (value.match(/^\w{3},/)) { // rfc822 - return new Date(value); - } else { - throw AWS.util.error( - new Error('unhandled timestamp format: ' + value), - {code: 'TimestampParserError'}); - } - } - - }, - - crypto: { - crc32Table: [ - 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, - 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, - 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, - 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, - 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, - 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, - 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, - 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, - 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, - 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, - 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, - 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, - 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, 0x76DC4190, - 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, - 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, - 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, - 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, - 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, - 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, - 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, - 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, - 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, - 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, - 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, - 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, - 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, 0xEDB88320, 0x9ABFB3B6, - 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, - 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, - 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, - 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, - 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, - 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, - 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, - 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, - 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, - 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, - 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, - 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, - 0x2CD99E8B, 0x5BDEAE1D, 0x9B64C2B0, 0xEC63F226, 0x756AA39C, - 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, - 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, - 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, - 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, - 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, - 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, - 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, - 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, - 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, - 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, - 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, - 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, - 0x2D02EF8D], - - crc32: function crc32(data) { - var tbl = AWS.util.crypto.crc32Table; - var crc = 0 ^ -1; - - if (typeof data === 'string') { - data = new Buffer(data); - } - - for (var i = 0; i < data.length; i++) { - var code = data.readUInt8(i); - crc = (crc >>> 8) ^ tbl[(crc ^ code) & 0xFF]; - } - return (crc ^ -1) >>> 0; - }, - - hmac: function hmac(key, string, digest, fn) { - if (!digest) digest = 'binary'; - if (digest === 'buffer') { digest = undefined; } - if (!fn) fn = 'sha256'; - if (typeof string === 'string') string = new Buffer(string); - return cryptoLib.createHmac(fn, key).update(string).digest(digest); - }, - - md5: function md5(data, digest) { - if (!digest) { digest = 'binary'; } - if (digest === 'buffer') { digest = undefined; } - if (typeof data === 'string') data = new Buffer(data); - return AWS.util.crypto.createHash('md5').update(data).digest(digest); - }, - - sha256: function sha256(string, digest) { - if (!digest) { digest = 'binary'; } - if (digest === 'buffer') { digest = undefined; } - if (typeof string === 'string') string = new Buffer(string); - return AWS.util.crypto.createHash('sha256').update(string).digest(digest); - }, - - toHex: function toHex(data) { - var out = []; - for (var i = 0; i < data.length; i++) { - out.push(('0' + data.charCodeAt(i).toString(16)).substr(-2, 2)); - } - return out.join(''); - }, - - createHash: function createHash(algorithm) { - return cryptoLib.createHash(algorithm); - } - - }, - - /** @!ignore */ - - /* Abort constant */ - abort: {}, - - each: function each(object, iterFunction) { - for (var key in object) { - if (object.hasOwnProperty(key)) { - var ret = iterFunction.call(this, key, object[key]); - if (ret === AWS.util.abort) break; - } - } - }, - - arrayEach: function arrayEach(array, iterFunction) { - for (var idx in array) { - if (array.hasOwnProperty(idx)) { - var ret = iterFunction.call(this, array[idx], parseInt(idx, 10)); - if (ret === AWS.util.abort) break; - } - } - }, - - update: function update(obj1, obj2) { - AWS.util.each(obj2, function iterator(key, item) { - obj1[key] = item; - }); - return obj1; - }, - - merge: function merge(obj1, obj2) { - return AWS.util.update(AWS.util.copy(obj1), obj2); - }, - - copy: function copy(object) { - if (object === null || object === undefined) return object; - var dupe = {}; - for (var key in object) { - dupe[key] = object[key]; - } - return dupe; - }, - - isEmpty: function isEmpty(obj) { - for (var prop in obj) { - if (obj.hasOwnProperty(prop)) { - return false; - } - } - return true; - }, - - isType: function isType(obj, type) { - // handle cross-"frame" objects - if (typeof type === 'function') type = AWS.util.typeName(type); - return Object.prototype.toString.call(obj) === '[object ' + type + ']'; - }, - - typeName: function typeName(type) { - if (type.hasOwnProperty('name')) return type.name; - var str = type.toString(); - var match = str.match(/^\s*function (.+)\(/); - return match ? match[1] : str; - }, - - error: function error(err, options) { - var originalError = null; - if (typeof err.message === 'string' && err.message !== '') { - if (typeof options === 'string' || (options && options.message)) { - originalError = AWS.util.copy(err); - originalError.message = err.message; - } - } - err.message = err.message || null; - - if (typeof options === 'string') { - err.message = options; - } else { - AWS.util.update(err, options); - } - - if (typeof Object.defineProperty === 'function') { - Object.defineProperty(err, 'name', {writable: true, enumerable: false}); - Object.defineProperty(err, 'message', {enumerable: true}); - } - - err.name = err.name || err.code || 'Error'; - err.time = new Date(); - - if (originalError) err.originalError = originalError; - - return err; - }, - - /** - * @api private - */ - inherit: function inherit(klass, features) { - var newObject = null; - if (features === undefined) { - features = klass; - klass = Object; - newObject = {}; - } else { - var ctor = function ConstructorWrapper() {}; - ctor.prototype = klass.prototype; - newObject = new ctor(); - } - - // constructor not supplied, create pass-through ctor - if (features.constructor === Object) { - features.constructor = function() { - if (klass !== Object) { - return klass.apply(this, arguments); - } - }; - } - - features.constructor.prototype = newObject; - AWS.util.update(features.constructor.prototype, features); - features.constructor.__super__ = klass; - return features.constructor; - }, - - /** - * @api private - */ - mixin: function mixin() { - var klass = arguments[0]; - for (var i = 1; i < arguments.length; i++) { - for (var prop in arguments[i].prototype) { - var fn = arguments[i].prototype[prop]; - if (prop !== 'constructor') { - klass.prototype[prop] = fn; - } - } - } - return klass; - }, - - /** - * @api private - */ - hideProperties: function hideProperties(obj, props) { - if (typeof Object.defineProperty !== 'function') return; - - AWS.util.arrayEach(props, function (key) { - Object.defineProperty(obj, key, { - enumerable: false, writable: true, configurable: true }); - }); - } -}; - -module.exports = AWS.util; diff --git a/node_modules/aws-sdk/lib/xml/browser_parser.js b/node_modules/aws-sdk/lib/xml/browser_parser.js deleted file mode 100644 index b2135d5b..00000000 --- a/node_modules/aws-sdk/lib/xml/browser_parser.js +++ /dev/null @@ -1,170 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.XML.Parser = inherit({ - constructor: function XMLParser(rules) { - this.rules = (rules || {}).members || {}; - }, - - parse: function parse(xml) { - if (xml.replace(/^\s+/, '') === '') return {}; - - var result, error; - try { - if (window.DOMParser) { - var parser = new DOMParser(); - result = parser.parseFromString(xml, 'text/xml'); - - if (result.documentElement === null) { - throw new Error('Cannot parse empty document.'); - } - - var isError = result.getElementsByTagName('parsererror')[0]; - if (isError && (isError.parentNode === result || - isError.parentNode.nodeName === 'body')) { - throw new Error(isError.getElementsByTagName('div')[0].textContent); - } - } else if (window.ActiveXObject) { - result = new window.ActiveXObject('Microsoft.XMLDOM'); - result.async = false; - - if (!result.loadXML(xml)) { - throw new Error('Parse error in document'); - } - } else { - throw new Error('Cannot load XML parser'); - } - } catch (e) { - error = e; - } - - if (result && result.documentElement && !error) { - return this.parseStructure(result.documentElement, this.rules); - } else if (error) { - throw AWS.util.error(error || new Error(), {code: 'XMLParserError'}); - } else { // empty xml document - return {}; - } - }, - - parseStructure: function parseStructure(structure, rules) { - var data = {}; - - // force array members to always be present - AWS.util.each.call(this, rules, function(memberName, memberRules) { - if (memberRules.type === 'list') { - data[memberRules.name || memberName] = []; - } - }); - - for (var j = 0; j < structure.attributes.length; j++) { - var attr = structure.attributes[j]; - var attrRule = rules[attr.name]; - if (attrRule) { - var value = this.parseMember({ textContent: attr.value }, attrRule); - data[attrRule.name || attr.name] = value; - } - } - - var child = structure.firstElementChild; - while (child) { - var rule = rules[child.nodeName] || {}; - var key = rule.name || child.nodeName; - var inData = rule.flattened ? data[key] : null; - data[key] = this.parseMember(child, rule, inData); - child = child.nextElementSibling; - } - - return data; - }, - - parseMap: function parseMap(map, rules, data) { - data = data || {}; - var keyRules = rules.keys || {}; - var valueRules = rules.members || {}; - var keyName = keyRules.name || 'key'; - var valueName = valueRules.name || 'value'; - - function run(item) { - var key = item.getElementsByTagName(keyName)[0].textContent; - var value = item.getElementsByTagName(valueName)[0]; - value = this.parseMember(value, valueRules); - data[key] = value; - } - - if (rules.flattened) { - run.call(this, map); - } else { - var child = map.firstElementChild; - while (child) { - run.call(this, child); - child = child.nextElementSibling; - } - } - return data; - }, - - parseList: function parseList(list, rules, data) { - data = data || []; - var memberRules = rules.members || {}; - var memberName = memberRules.name || 'member'; - if (rules.flattened) { - data.push(this.parseMember(list, memberRules)); - } else { - var child = list.firstElementChild; - while (child) { - if (child.nodeName === memberName) { - data.push(this.parseMember(child, memberRules)); - } - child = child.nextElementSibling; - } - } - return data; - }, - - parseMember: function parseMember(member, rules, data) { - if (!rules.type) { - if (member.childElementCount > 0) { - rules.type = 'structure'; - } else { - rules.type = 'string'; - } - } - - if (rules.type === 'structure') { - return this.parseStructure(member, rules.members || {}, data); - } else if (rules.type === 'list') { - return this.parseList(member, rules, data); - } else if (rules.type === 'map') { - return this.parseMap(member, rules, data); - } - - if (rules.type === 'string') { - if (member.attributes && member.attributes.encoding && - member.attributes.encoding.value === 'base64') { - return AWS.util.base64.decode(member.textContent); - } else { - return member.textContent; - } - } - - // return null for empty nodes of any other type - if (member.textContent === '') return null; - - if (rules.type === 'integer') { - return parseInt(member.textContent, 10); - } else if (rules.type === 'float') { - return parseFloat(member.textContent); - } else if (rules.type === 'timestamp') { - return AWS.util.date.parseTimestamp(member.textContent); - } else if (rules.type === 'boolean') { - return member.textContent === 'true'; - } else { - var msg = 'unhandled type: ' + rules.type; - throw AWS.util.error(new Error(msg), {code: 'XMLParserError'}); - } - } -}); diff --git a/node_modules/aws-sdk/lib/xml/builder.js b/node_modules/aws-sdk/lib/xml/builder.js deleted file mode 100644 index 99a8980f..00000000 --- a/node_modules/aws-sdk/lib/xml/builder.js +++ /dev/null @@ -1,79 +0,0 @@ -var AWS = require('../core'); -var builder = require('xmlbuilder'); -var inherit = AWS.util.inherit; - -/** - * @api private - */ -AWS.XML.Builder = inherit({ - - constructor: function XMLBuilder(root, rules, options) { - this.root = root; - this.rules = rules; - this.xmlns = options.xmlnamespace; - this.timestampFormat = options.timestampFormat; - }, - - toXML: function toXML(params) { - var xml = builder.create(this.root); - if (this.xmlns) xml.att('xmlns', this.xmlns); - this.serializeStructure(this.rules, params, xml); - return xml.root().toString(); - }, - - serializeStructure: function serializeStructure(rules, params, xml) { - AWS.util.each.call(this, rules || {}, function (memberName, memberRules) { - var value = params[memberName]; - if (value !== undefined) { - if (memberRules.attribute) { - xml.att(memberRules.name, value); - } else { - this.serializeMember(memberName, memberRules, value, xml); - } - } - }); - }, - - serializeList: function serializeList(name, rules, list, xml) { - if (rules.flattened) { - AWS.util.arrayEach.call(this, list, function (value) { - this.serializeMember(rules.name || name, rules.members, value, xml); - }); - } else { - xml = xml.ele(rules.name || name); - AWS.util.arrayEach.call(this, list, function (value) { - var memberName = rules.members.name || 'member'; - this.serializeMember(memberName, rules.members, value, xml); - }); - } - }, - - serializeMember: function serializeMember(memberName, rules, params, xml) { - if (params === null || params === undefined) return; - - var name = memberName; - if (rules.type === 'structure') { - xml = xml.ele(name); - this.serializeStructure(rules.members, params, xml); - } else if (rules.type === 'list') { - this.serializeList(name, rules, params, xml); - } else if (rules.type === 'timestamp') { - var timestampFormat = rules.format || this.timestampFormat; - var date = AWS.util.date.format(params, timestampFormat); - xml = xml.ele(name, String(date)); - } else { - xml = xml.ele(name, String(params)); - } - this.applyNamespaces(xml, rules); - }, - - applyNamespaces: function applyNamespaces(xml, rules) { - if (rules.xmlns) { - var attr = 'xmlns'; - if (rules.xmlns.prefix) attr += ':' + rules.xmlns.prefix; - xml.att(attr, rules.xmlns.uri); - } - } - - -}); diff --git a/node_modules/aws-sdk/lib/xml/node_parser.js b/node_modules/aws-sdk/lib/xml/node_parser.js deleted file mode 100644 index 9aaf3cc7..00000000 --- a/node_modules/aws-sdk/lib/xml/node_parser.js +++ /dev/null @@ -1,153 +0,0 @@ -var AWS = require('../core'); -var inherit = AWS.util.inherit; -var xml2js = require('xml2js'); - -/** - * @api private - */ -AWS.XML.Parser = inherit({ - constructor: function XMLParser(rules) { - this.rules = (rules || {}).members || {}; - }, - - // options passed to xml2js parser - options: { - explicitCharkey: false, // undocumented - trim: false, // trim the leading/trailing whitespace from text nodes - normalize: false, // trim interior whitespace inside text nodes - explicitRoot: false, // return the root node in the resulting object? - emptyTag: null, // the default value for empty nodes - explicitArray: true, // always put child nodes in an array - ignoreAttrs: false, // ignore attributes, only create text nodes - mergeAttrs: false, // merge attributes and child elements - validator: null // a callable validator - }, - - parse: function parse(xml) { - - var result = null; - var error = null; - var parser = new xml2js.Parser(this.options); - parser.parseString(xml, function (e, r) { - error = e; - result = r; - }); - - if (result) { - delete result.xmlns; - return this.parseStructure(result, this.rules); - } else if (error) { - throw AWS.util.error(error, {code: 'XMLParserError'}); - } else { // empty xml document - return this.parseStructure({}, this.rules); - } - }, - - parseStructure: function parseStructure(structure, rules) { - var data = {}; - - // force array members to always be present - AWS.util.each.call(this, rules, function(memberName, memberRules) { - if (memberRules.type === 'list') { - data[memberRules.name || memberName] = []; - } - }); - - AWS.util.each.call(this, structure, function (xmlName, value) { - var rule; - if (xmlName === '$') { - AWS.util.each.call(this, value, function (attrName, attrValue) { - if (rules[attrName]) { - rule = rules[attrName]; - data[rule.name || xmlName] = this.parseMember([attrValue], rule); - } - }); - } else { - rule = rules[xmlName] || {}; - data[rule.name || xmlName] = this.parseMember(value, rule); - } - }); - - return data; - }, - - parseMap: function parseMap(map, rules) { - var data = {}; - var keyRules = rules.keys || {}; - var valueRules = rules.members || {}; - var keyName = keyRules.name || 'key'; - var valueName = valueRules.name || 'value'; - if (!rules.flattened) { - map = map[0].entry; - } - AWS.util.arrayEach.call(this, map, function (entry) { - var value = this.parseMember(entry[valueName], valueRules); - data[entry[keyName][0]] = value; - }); - return data; - }, - - parseList: function parseList(list, rules) { - var data = []; - var memberRules = rules.members || {}; - var memberName = memberRules.name || 'member'; - if (rules.flattened) { - AWS.util.arrayEach.call(this, list, function (value) { - data.push(this.parseMember([value], memberRules)); - }); - } else { - AWS.util.arrayEach.call(this, list, function (member) { - AWS.util.arrayEach.call(this, member[memberName], function (value) { - data.push(this.parseMember([value], memberRules)); - }); - }); - } - return data; - }, - - parseMember: function parseMember(values, rules) { - if (values[0] === null) { - if (rules.type === 'structure') return {}; - if (rules.type === 'list') return []; - if (rules.type === 'map') return {}; - if (!rules.type || rules.type === 'string') return ''; - return null; - } - - if (values[0]['$'] && values[0]['$'].encoding === 'base64') { - return AWS.util.base64.decode(values[0]['_']); - } - - if (!rules.type) { - if (typeof values[0] === 'string') { - rules.type = 'string'; - } else if (values[0]['_']) { - rules.type = 'string'; - values = [values[0]['_']]; - } else { - rules.type = 'structure'; - } - } - - if (rules.type === 'string') { - return values[0] === null ? '' : values[0]; - } else if (rules.type === 'structure') { - return this.parseStructure(values[0], rules.members || {}); - } else if (rules.type === 'list') { - return this.parseList(values, rules); - } else if (rules.type === 'map') { - return this.parseMap(values, rules); - } else if (rules.type === 'integer') { - return parseInt(values[0], 10); - } else if (rules.type === 'float') { - return parseFloat(values[0]); - } else if (rules.type === 'timestamp') { - return AWS.util.date.parseTimestamp(values[0]); - } else if (rules.type === 'boolean') { - return values[0] === 'true'; - } else { - var msg = 'unhandled type: ' + rules.type; - throw AWS.util.error(new Error(msg), {code: 'XMLParserError'}); - } - } -}); diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/.npmignore b/node_modules/aws-sdk/node_modules/aws-sdk-apis/.npmignore deleted file mode 100644 index f1bfdd2c..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -apis/source -samus.json -scripts -vendor diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/LICENSE.txt b/node_modules/aws-sdk/node_modules/aws-sdk-apis/LICENSE.txt deleted file mode 100644 index ab7da479..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/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/node_modules/aws-sdk-apis/README.md b/node_modules/aws-sdk/node_modules/aws-sdk-apis/README.md deleted file mode 100644 index f2897a14..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# AWS SDK for JavaScript APIs Package - -This package contains all of the API definitions used by the -[aws-sdk](https://github.com/aws/aws-sdk-js) package. diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/AutoScaling-2011-01-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/AutoScaling-2011-01-01.json deleted file mode 100644 index 85b56a09..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/AutoScaling-2011-01-01.json +++ /dev/null @@ -1,1281 +0,0 @@ -{ - "format": "query", - "apiVersion": "2011-01-01", - "endpointPrefix": "autoscaling", - "resultWrapped": true, - "serviceFullName": "Auto Scaling", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "attachInstances": { - "name": "AttachInstances", - "input": { - "type": "structure", - "members": { - "InstanceIds": { - "type": "list", - "members": {} - }, - "AutoScalingGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createAutoScalingGroup": { - "name": "CreateAutoScalingGroup", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "LaunchConfigurationName": {}, - "InstanceId": {}, - "MinSize": { - "type": "integer", - "required": true - }, - "MaxSize": { - "type": "integer", - "required": true - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "LoadBalancerNames": { - "type": "list", - "members": {} - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "TerminationPolicies": { - "type": "list", - "members": {} - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": { - "required": true - }, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createLaunchConfiguration": { - "name": "CreateLaunchConfiguration", - "input": { - "type": "structure", - "members": { - "LaunchConfigurationName": { - "required": true - }, - "ImageId": {}, - "KeyName": {}, - "SecurityGroups": { - "type": "list", - "members": {} - }, - "UserData": {}, - "InstanceId": {}, - "InstanceType": {}, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": { - "required": true - }, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "VolumeType": {}, - "DeleteOnTermination": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": { - "type": "boolean" - } - } - } - }, - "InstanceMonitoring": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "SpotPrice": {}, - "IamInstanceProfile": {}, - "EbsOptimized": { - "type": "boolean" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createOrUpdateTags": { - "name": "CreateOrUpdateTags", - "input": { - "type": "structure", - "members": { - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": { - "required": true - }, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteAutoScalingGroup": { - "name": "DeleteAutoScalingGroup", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "ForceDelete": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLaunchConfiguration": { - "name": "DeleteLaunchConfiguration", - "input": { - "type": "structure", - "members": { - "LaunchConfigurationName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteNotificationConfiguration": { - "name": "DeleteNotificationConfiguration", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "TopicARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deletePolicy": { - "name": "DeletePolicy", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteScheduledAction": { - "name": "DeleteScheduledAction", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteTags": { - "name": "DeleteTags", - "input": { - "type": "structure", - "members": { - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": { - "required": true - }, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeAccountLimits": { - "name": "DescribeAccountLimits", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "MaxNumberOfAutoScalingGroups": { - "type": "integer" - }, - "MaxNumberOfLaunchConfigurations": { - "type": "integer" - } - } - } - }, - "describeAdjustmentTypes": { - "name": "DescribeAdjustmentTypes", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "AdjustmentTypes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AdjustmentType": {} - } - } - } - } - } - }, - "describeAutoScalingGroups": { - "name": "DescribeAutoScalingGroups", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupNames": { - "type": "list", - "members": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "AutoScalingGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "AutoScalingGroupARN": {}, - "LaunchConfigurationName": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "LoadBalancerNames": { - "type": "list", - "members": {} - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {}, - "AvailabilityZone": {}, - "LifecycleState": {}, - "HealthStatus": {}, - "LaunchConfigurationName": {} - } - } - }, - "CreatedTime": { - "type": "timestamp" - }, - "SuspendedProcesses": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ProcessName": {}, - "SuspensionReason": {} - } - } - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "EnabledMetrics": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Metric": {}, - "Granularity": {} - } - } - }, - "Status": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": {}, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - } - }, - "TerminationPolicies": { - "type": "list", - "members": {} - } - } - } - }, - "NextToken": {} - } - } - }, - "describeAutoScalingInstances": { - "name": "DescribeAutoScalingInstances", - "input": { - "type": "structure", - "members": { - "InstanceIds": { - "type": "list", - "members": {} - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "AutoScalingInstances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {}, - "AutoScalingGroupName": {}, - "AvailabilityZone": {}, - "LifecycleState": {}, - "HealthStatus": {}, - "LaunchConfigurationName": {} - } - } - }, - "NextToken": {} - } - } - }, - "describeAutoScalingNotificationTypes": { - "name": "DescribeAutoScalingNotificationTypes", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "AutoScalingNotificationTypes": { - "type": "list", - "members": {} - } - } - } - }, - "describeLaunchConfigurations": { - "name": "DescribeLaunchConfigurations", - "input": { - "type": "structure", - "members": { - "LaunchConfigurationNames": { - "type": "list", - "members": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "LaunchConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "LaunchConfigurationName": {}, - "LaunchConfigurationARN": {}, - "ImageId": {}, - "KeyName": {}, - "SecurityGroups": { - "type": "list", - "members": {} - }, - "UserData": {}, - "InstanceType": {}, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "VolumeType": {}, - "DeleteOnTermination": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": { - "type": "boolean" - } - } - } - }, - "InstanceMonitoring": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "SpotPrice": {}, - "IamInstanceProfile": {}, - "CreatedTime": { - "type": "timestamp" - }, - "EbsOptimized": { - "type": "boolean" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - } - } - } - }, - "NextToken": {} - } - } - }, - "describeMetricCollectionTypes": { - "name": "DescribeMetricCollectionTypes", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "Metrics": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Metric": {} - } - } - }, - "Granularities": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Granularity": {} - } - } - } - } - } - }, - "describeNotificationConfigurations": { - "name": "DescribeNotificationConfigurations", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupNames": { - "type": "list", - "members": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "NotificationConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "TopicARN": {}, - "NotificationType": {} - } - } - }, - "NextToken": {} - } - } - }, - "describePolicies": { - "name": "DescribePolicies", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyNames": { - "type": "list", - "members": {} - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ScalingPolicies": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyName": {}, - "ScalingAdjustment": { - "type": "integer" - }, - "AdjustmentType": {}, - "Cooldown": { - "type": "integer" - }, - "PolicyARN": {}, - "Alarms": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AlarmName": {}, - "AlarmARN": {} - } - } - }, - "MinAdjustmentStep": { - "type": "integer" - } - } - } - }, - "NextToken": {} - } - } - }, - "describeScalingActivities": { - "name": "DescribeScalingActivities", - "input": { - "type": "structure", - "members": { - "ActivityIds": { - "type": "list", - "members": {} - }, - "AutoScalingGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Activities": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ActivityId": {}, - "AutoScalingGroupName": {}, - "Description": {}, - "Cause": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "StatusCode": {}, - "StatusMessage": {}, - "Progress": { - "type": "integer" - }, - "Details": {} - } - } - }, - "NextToken": {} - } - } - }, - "describeScalingProcessTypes": { - "name": "DescribeScalingProcessTypes", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "Processes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ProcessName": {} - } - } - } - } - } - }, - "describeScheduledActions": { - "name": "DescribeScheduledActions", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionNames": { - "type": "list", - "members": {} - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ScheduledUpdateGroupActions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "ScheduledActionName": {}, - "ScheduledActionARN": {}, - "Time": { - "type": "timestamp" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Recurrence": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - } - } - } - }, - "NextToken": {} - } - } - }, - "describeTags": { - "name": "DescribeTags", - "input": { - "type": "structure", - "members": { - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": {} - } - } - } - }, - "NextToken": {}, - "MaxRecords": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ResourceId": {}, - "ResourceType": {}, - "Key": {}, - "Value": {}, - "PropagateAtLaunch": { - "type": "boolean" - } - } - } - }, - "NextToken": {} - } - } - }, - "describeTerminationPolicyTypes": { - "name": "DescribeTerminationPolicyTypes", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "TerminationPolicyTypes": { - "type": "list", - "members": {} - } - } - } - }, - "disableMetricsCollection": { - "name": "DisableMetricsCollection", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "Metrics": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "enableMetricsCollection": { - "name": "EnableMetricsCollection", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "Metrics": { - "type": "list", - "members": {} - }, - "Granularity": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "executePolicy": { - "name": "ExecutePolicy", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": {}, - "PolicyName": { - "required": true - }, - "HonorCooldown": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putNotificationConfiguration": { - "name": "PutNotificationConfiguration", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "TopicARN": { - "required": true - }, - "NotificationTypes": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putScalingPolicy": { - "name": "PutScalingPolicy", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "ScalingAdjustment": { - "type": "integer", - "required": true - }, - "AdjustmentType": { - "required": true - }, - "Cooldown": { - "type": "integer" - }, - "MinAdjustmentStep": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyARN": {} - } - } - }, - "putScheduledUpdateGroupAction": { - "name": "PutScheduledUpdateGroupAction", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "ScheduledActionName": { - "required": true - }, - "Time": { - "type": "timestamp" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Recurrence": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resumeProcesses": { - "name": "ResumeProcesses", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "ScalingProcesses": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setDesiredCapacity": { - "name": "SetDesiredCapacity", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "DesiredCapacity": { - "type": "integer", - "required": true - }, - "HonorCooldown": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setInstanceHealth": { - "name": "SetInstanceHealth", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - }, - "HealthStatus": { - "required": true - }, - "ShouldRespectGracePeriod": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "suspendProcesses": { - "name": "SuspendProcesses", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "ScalingProcesses": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "terminateInstanceInAutoScalingGroup": { - "name": "TerminateInstanceInAutoScalingGroup", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - }, - "ShouldDecrementDesiredCapacity": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Activity": { - "type": "structure", - "members": { - "ActivityId": {}, - "AutoScalingGroupName": {}, - "Description": {}, - "Cause": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "StatusCode": {}, - "StatusMessage": {}, - "Progress": { - "type": "integer" - }, - "Details": {} - } - } - } - } - }, - "updateAutoScalingGroup": { - "name": "UpdateAutoScalingGroup", - "input": { - "type": "structure", - "members": { - "AutoScalingGroupName": { - "required": true - }, - "LaunchConfigurationName": {}, - "MinSize": { - "type": "integer" - }, - "MaxSize": { - "type": "integer" - }, - "DesiredCapacity": { - "type": "integer" - }, - "DefaultCooldown": { - "type": "integer" - }, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "HealthCheckType": {}, - "HealthCheckGracePeriod": { - "type": "integer" - }, - "PlacementGroup": {}, - "VPCZoneIdentifier": {}, - "TerminationPolicies": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeAutoScalingGroups": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "AutoScalingGroups" - }, - "describeAutoScalingInstances": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "AutoScalingInstances" - }, - "describeLaunchConfigurations": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "LaunchConfigurations" - }, - "describeNotificationConfigurations": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "NotificationConfigurations" - }, - "describePolicies": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "ScalingPolicies" - }, - "describeScalingActivities": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "Activities" - }, - "describeScheduledActions": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "ScheduledUpdateGroupActions" - }, - "describeTags": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "Tags" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFormation-2010-05-15.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFormation-2010-05-15.json deleted file mode 100644 index ab9c4c92..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFormation-2010-05-15.json +++ /dev/null @@ -1,533 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-05-15", - "endpointPrefix": "cloudformation", - "resultWrapped": true, - "serviceFullName": "AWS CloudFormation", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "cancelUpdateStack": { - "name": "CancelUpdateStack", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createStack": { - "name": "CreateStack", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - }, - "TemplateBody": {}, - "TemplateURL": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterKey": {}, - "ParameterValue": {} - } - } - }, - "DisableRollback": { - "type": "boolean" - }, - "TimeoutInMinutes": { - "type": "integer" - }, - "NotificationARNs": { - "type": "list", - "members": {} - }, - "Capabilities": { - "type": "list", - "members": {} - }, - "OnFailure": {}, - "StackPolicyBody": {}, - "StackPolicyURL": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "deleteStack": { - "name": "DeleteStack", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeStackEvents": { - "name": "DescribeStackEvents", - "input": { - "type": "structure", - "members": { - "StackName": {}, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackEvents": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "EventId": {}, - "StackName": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "Timestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "ResourceProperties": {} - } - } - }, - "NextToken": {} - } - } - }, - "describeStackResource": { - "name": "DescribeStackResource", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - }, - "LogicalResourceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "StackResourceDetail": { - "type": "structure", - "members": { - "StackName": {}, - "StackId": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "LastUpdatedTimestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "Description": {}, - "Metadata": {} - } - } - } - } - }, - "describeStackResources": { - "name": "DescribeStackResources", - "input": { - "type": "structure", - "members": { - "StackName": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackResources": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackName": {}, - "StackId": {}, - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "Timestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {}, - "Description": {} - } - } - } - } - } - }, - "describeStacks": { - "name": "DescribeStacks", - "input": { - "type": "structure", - "members": { - "StackName": {}, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Stacks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "StackName": {}, - "Description": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterKey": {}, - "ParameterValue": {} - } - } - }, - "CreationTime": { - "type": "timestamp" - }, - "LastUpdatedTime": { - "type": "timestamp" - }, - "StackStatus": {}, - "StackStatusReason": {}, - "DisableRollback": { - "type": "boolean" - }, - "NotificationARNs": { - "type": "list", - "members": {} - }, - "TimeoutInMinutes": { - "type": "integer" - }, - "Capabilities": { - "type": "list", - "members": {} - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OutputKey": {}, - "OutputValue": {}, - "Description": {} - } - } - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - } - }, - "NextToken": {} - } - } - }, - "estimateTemplateCost": { - "name": "EstimateTemplateCost", - "input": { - "type": "structure", - "members": { - "TemplateBody": {}, - "TemplateURL": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterKey": {}, - "ParameterValue": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Url": {} - } - } - }, - "getStackPolicy": { - "name": "GetStackPolicy", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "StackPolicyBody": {} - } - } - }, - "getTemplate": { - "name": "GetTemplate", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TemplateBody": {} - } - } - }, - "listStackResources": { - "name": "ListStackResources", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackResourceSummaries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "LogicalResourceId": {}, - "PhysicalResourceId": {}, - "ResourceType": {}, - "LastUpdatedTimestamp": { - "type": "timestamp" - }, - "ResourceStatus": {}, - "ResourceStatusReason": {} - } - } - }, - "NextToken": {} - } - } - }, - "listStacks": { - "name": "ListStacks", - "input": { - "type": "structure", - "members": { - "NextToken": {}, - "StackStatusFilter": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "StackSummaries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "StackName": {}, - "TemplateDescription": {}, - "CreationTime": { - "type": "timestamp" - }, - "LastUpdatedTime": { - "type": "timestamp" - }, - "DeletionTime": { - "type": "timestamp" - }, - "StackStatus": {}, - "StackStatusReason": {} - } - } - }, - "NextToken": {} - } - } - }, - "setStackPolicy": { - "name": "SetStackPolicy", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - }, - "StackPolicyBody": {}, - "StackPolicyURL": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateStack": { - "name": "UpdateStack", - "input": { - "type": "structure", - "members": { - "StackName": { - "required": true - }, - "TemplateBody": {}, - "TemplateURL": {}, - "StackPolicyDuringUpdateBody": {}, - "StackPolicyDuringUpdateURL": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterKey": {}, - "ParameterValue": {} - } - } - }, - "Capabilities": { - "type": "list", - "members": {} - }, - "StackPolicyBody": {}, - "StackPolicyURL": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "validateTemplate": { - "name": "ValidateTemplate", - "input": { - "type": "structure", - "members": { - "TemplateBody": {}, - "TemplateURL": {} - } - }, - "output": { - "type": "structure", - "members": { - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterKey": {}, - "DefaultValue": {}, - "NoEcho": { - "type": "boolean" - }, - "Description": {} - } - } - }, - "Description": {}, - "Capabilities": { - "type": "list", - "members": {} - }, - "CapabilitiesReason": {} - } - } - } - }, - "pagination": { - "describeStackEvents": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "StackEvents" - }, - "describeStackResources": { - "resultKey": "StackResources" - }, - "describeStacks": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Stacks" - }, - "listStackResources": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "StackResourceSummaries" - }, - "listStacks": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "StackSummaries" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFront-2014-01-31.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFront-2014-01-31.json deleted file mode 100644 index 65a75957..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudFront-2014-01-31.json +++ /dev/null @@ -1,3653 +0,0 @@ -{ - "format": "rest-xml", - "apiVersion": "2014-01-31", - "endpointPrefix": "cloudfront", - "globalEndpoint": "cloudfront.amazonaws.com", - "serviceAbbreviation": "CloudFront", - "serviceFullName": "Amazon CloudFront", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "xmlnamespace": "http://cloudfront.amazonaws.com/doc/2014-01-31/", - "operations": { - "createCloudFrontOriginAccessIdentity": { - "name": "CreateCloudFrontOriginAccessIdentity2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront", - "method": "POST" - }, - "input": { - "payload": "CloudFrontOriginAccessIdentityConfig", - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentityConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "Comment": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "name": "Location" - }, - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "S3CanonicalUserId": {}, - "CloudFrontOriginAccessIdentityConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Comment": {} - } - } - } - } - }, - "createDistribution": { - "name": "CreateDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/distribution", - "method": "POST" - }, - "input": { - "payload": "DistributionConfig", - "type": "structure", - "members": { - "DistributionConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - }, - "required": true - }, - "DefaultRootObject": { - "required": true - }, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": { - "required": true - }, - "DomainName": { - "required": true - }, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": { - "required": true - } - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer", - "required": true - }, - "HTTPSPort": { - "type": "integer", - "required": true - }, - "OriginProtocolPolicy": { - "required": true - } - } - } - }, - "name": "Origin" - } - } - }, - "required": true - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": { - "required": true - }, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean", - "required": true - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": { - "required": true - }, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - }, - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "ViewerProtocolPolicy": { - "required": true - }, - "MinTTL": { - "type": "integer", - "required": true - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "required": true - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": { - "required": true - }, - "TargetOriginId": { - "required": true - }, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean", - "required": true - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": { - "required": true - }, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - }, - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "ViewerProtocolPolicy": { - "required": true - }, - "MinTTL": { - "type": "integer", - "required": true - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - }, - "required": true - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer", - "required": true - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": { - "required": true - }, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "IncludeCookies": { - "type": "boolean", - "required": true - }, - "Bucket": { - "required": true - }, - "Prefix": { - "required": true - } - }, - "required": true - }, - "PriceClass": { - "required": true - }, - "Enabled": { - "type": "boolean", - "required": true - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": { - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - }, - "required": true - } - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "name": "Location" - }, - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "InProgressInvalidationBatches": { - "type": "integer" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "DistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "DefaultRootObject": {}, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "DomainName": {}, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - }, - "name": "Origin" - } - } - } - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - } - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - } - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "IncludeCookies": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - } - } - } - } - } - } - } - } - }, - "createInvalidation": { - "name": "CreateInvalidation2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{DistributionId}/invalidation", - "method": "POST" - }, - "input": { - "payload": "InvalidationBatch", - "type": "structure", - "members": { - "DistributionId": { - "required": true, - "location": "uri" - }, - "InvalidationBatch": { - "type": "structure", - "members": { - "Paths": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Path" - } - } - }, - "required": true - }, - "CallerReference": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "name": "Location" - }, - "Id": {}, - "Status": {}, - "CreateTime": { - "type": "timestamp" - }, - "InvalidationBatch": { - "type": "structure", - "members": { - "Paths": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Path" - } - } - } - }, - "CallerReference": {} - } - } - } - } - }, - "createStreamingDistribution": { - "name": "CreateStreamingDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution", - "method": "POST" - }, - "input": { - "payload": "StreamingDistributionConfig", - "type": "structure", - "members": { - "StreamingDistributionConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "OriginAccessIdentity": { - "required": true - } - }, - "required": true - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - }, - "required": true - }, - "Comment": { - "required": true - }, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Bucket": { - "required": true - }, - "Prefix": { - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "PriceClass": { - "required": true - }, - "Enabled": { - "type": "boolean", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "name": "Location" - }, - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "StreamingDistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "deleteCloudFrontOriginAccessIdentity": { - "name": "DeleteCloudFrontOriginAccessIdentity2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront/{Id}", - "method": "DELETE" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteDistribution": { - "name": "DeleteDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{Id}", - "method": "DELETE" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteStreamingDistribution": { - "name": "DeleteStreamingDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution/{Id}", - "method": "DELETE" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getCloudFrontOriginAccessIdentity": { - "name": "GetCloudFrontOriginAccessIdentity2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront/{Id}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "S3CanonicalUserId": {}, - "CloudFrontOriginAccessIdentityConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Comment": {} - } - } - } - } - }, - "getCloudFrontOriginAccessIdentityConfig": { - "name": "GetCloudFrontOriginAccessIdentityConfig2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront/{Id}/config", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "CallerReference": {}, - "Comment": {} - } - } - }, - "getDistribution": { - "name": "GetDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{Id}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "InProgressInvalidationBatches": { - "type": "integer" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "DistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "DefaultRootObject": {}, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "DomainName": {}, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - }, - "name": "Origin" - } - } - } - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - } - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - } - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "IncludeCookies": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - } - } - } - } - } - } - } - } - }, - "getDistributionConfig": { - "name": "GetDistributionConfig2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{Id}/config", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "CallerReference": {}, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "DefaultRootObject": {}, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "DomainName": {}, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - }, - "name": "Origin" - } - } - } - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - } - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - } - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "IncludeCookies": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - } - } - } - } - } - } - }, - "getInvalidation": { - "name": "GetInvalidation2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{DistributionId}/invalidation/{Id}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "DistributionId": { - "required": true, - "location": "uri" - }, - "Id": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "CreateTime": { - "type": "timestamp" - }, - "InvalidationBatch": { - "type": "structure", - "members": { - "Paths": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Path" - } - } - } - }, - "CallerReference": {} - } - } - } - } - }, - "getStreamingDistribution": { - "name": "GetStreamingDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution/{Id}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "StreamingDistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "getStreamingDistributionConfig": { - "name": "GetStreamingDistributionConfig2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution/{Id}/config", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "CallerReference": {}, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - } - }, - "listCloudFrontOriginAccessIdentities": { - "name": "ListCloudFrontOriginAccessIdentities2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront?Marker={Marker}&MaxItems={MaxItems}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "S3CanonicalUserId": {}, - "Comment": {} - }, - "name": "CloudFrontOriginAccessIdentitySummary" - } - } - } - } - }, - "listDistributions": { - "name": "ListDistributions2014_01_31", - "http": { - "uri": "/2014-01-31/distribution?Marker={Marker}&MaxItems={MaxItems}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "DomainName": {}, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - }, - "name": "Origin" - } - } - } - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - } - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - } - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": {}, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - } - } - } - } - }, - "name": "DistributionSummary" - } - } - } - } - }, - "listInvalidations": { - "name": "ListInvalidations2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{DistributionId}/invalidation?Marker={Marker}&MaxItems={MaxItems}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "DistributionId": { - "required": true, - "location": "uri" - }, - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "CreateTime": { - "type": "timestamp" - }, - "Status": {} - }, - "name": "InvalidationSummary" - } - } - } - } - }, - "listStreamingDistributions": { - "name": "ListStreamingDistributions2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution?Marker={Marker}&MaxItems={MaxItems}", - "method": "GET" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "NextMarker": {}, - "MaxItems": { - "type": "integer" - }, - "IsTruncated": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "Comment": {}, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - }, - "name": "StreamingDistributionSummary" - } - } - } - } - }, - "updateCloudFrontOriginAccessIdentity": { - "name": "UpdateCloudFrontOriginAccessIdentity2014_01_31", - "http": { - "uri": "/2014-01-31/origin-access-identity/cloudfront/{Id}/config", - "method": "PUT" - }, - "input": { - "payload": "CloudFrontOriginAccessIdentityConfig", - "type": "structure", - "members": { - "CloudFrontOriginAccessIdentityConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "Comment": { - "required": true - } - }, - "required": true - }, - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "S3CanonicalUserId": {}, - "CloudFrontOriginAccessIdentityConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Comment": {} - } - } - } - } - }, - "updateDistribution": { - "name": "UpdateDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/distribution/{Id}/config", - "method": "PUT" - }, - "input": { - "payload": "DistributionConfig", - "type": "structure", - "members": { - "DistributionConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - }, - "required": true - }, - "DefaultRootObject": { - "required": true - }, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": { - "required": true - }, - "DomainName": { - "required": true - }, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": { - "required": true - } - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer", - "required": true - }, - "HTTPSPort": { - "type": "integer", - "required": true - }, - "OriginProtocolPolicy": { - "required": true - } - } - } - }, - "name": "Origin" - } - } - }, - "required": true - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": { - "required": true - }, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean", - "required": true - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": { - "required": true - }, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - }, - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "ViewerProtocolPolicy": { - "required": true - }, - "MinTTL": { - "type": "integer", - "required": true - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "required": true - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": { - "required": true - }, - "TargetOriginId": { - "required": true - }, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean", - "required": true - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": { - "required": true - }, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - }, - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "ViewerProtocolPolicy": { - "required": true - }, - "MinTTL": { - "type": "integer", - "required": true - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - }, - "required": true - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer", - "required": true - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": { - "required": true - }, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "IncludeCookies": { - "type": "boolean", - "required": true - }, - "Bucket": { - "required": true - }, - "Prefix": { - "required": true - } - }, - "required": true - }, - "PriceClass": { - "required": true - }, - "Enabled": { - "type": "boolean", - "required": true - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": { - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - }, - "required": true - } - } - } - }, - "required": true - }, - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "InProgressInvalidationBatches": { - "type": "integer" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "DistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "DefaultRootObject": {}, - "Origins": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "DomainName": {}, - "S3OriginConfig": { - "type": "structure", - "members": { - "OriginAccessIdentity": {} - } - }, - "CustomOriginConfig": { - "type": "structure", - "members": { - "HTTPPort": { - "type": "integer" - }, - "HTTPSPort": { - "type": "integer" - }, - "OriginProtocolPolicy": {} - } - } - }, - "name": "Origin" - } - } - } - }, - "DefaultCacheBehavior": { - "type": "structure", - "members": { - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - } - }, - "CacheBehaviors": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PathPattern": {}, - "TargetOriginId": {}, - "ForwardedValues": { - "type": "structure", - "members": { - "QueryString": { - "type": "boolean" - }, - "Cookies": { - "type": "structure", - "members": { - "Forward": {}, - "WhitelistedNames": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Name" - } - } - } - } - } - } - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "ViewerProtocolPolicy": {}, - "MinTTL": { - "type": "integer" - }, - "AllowedMethods": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Method" - } - } - } - }, - "SmoothStreaming": { - "type": "boolean" - } - }, - "name": "CacheBehavior" - } - } - } - }, - "CustomErrorResponses": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ErrorCode": { - "type": "integer" - }, - "ResponsePagePath": {}, - "ResponseCode": {}, - "ErrorCachingMinTTL": { - "type": "integer" - } - }, - "name": "CustomErrorResponse" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "IncludeCookies": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - }, - "ViewerCertificate": { - "type": "structure", - "members": { - "IAMCertificateId": {}, - "CloudFrontDefaultCertificate": { - "type": "boolean" - }, - "SSLSupportMethod": {} - } - }, - "Restrictions": { - "type": "structure", - "members": { - "GeoRestriction": { - "type": "structure", - "members": { - "RestrictionType": {}, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "Location" - } - } - } - } - } - } - } - } - } - } - }, - "updateStreamingDistribution": { - "name": "UpdateStreamingDistribution2014_01_31", - "http": { - "uri": "/2014-01-31/streaming-distribution/{Id}/config", - "method": "PUT" - }, - "input": { - "payload": "StreamingDistributionConfig", - "type": "structure", - "members": { - "StreamingDistributionConfig": { - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "OriginAccessIdentity": { - "required": true - } - }, - "required": true - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - }, - "required": true - }, - "Comment": { - "required": true - }, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Bucket": { - "required": true - }, - "Prefix": { - "required": true - } - }, - "required": true - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Quantity": { - "type": "integer", - "required": true - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - }, - "required": true - }, - "PriceClass": { - "required": true - }, - "Enabled": { - "type": "boolean", - "required": true - } - }, - "required": true - }, - "Id": { - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Id": {}, - "Status": {}, - "LastModifiedTime": { - "type": "timestamp" - }, - "DomainName": {}, - "ActiveTrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AwsAccountNumber": {}, - "KeyPairIds": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "KeyPairId" - } - } - } - } - }, - "name": "Signer" - } - } - } - }, - "StreamingDistributionConfig": { - "type": "structure", - "members": { - "CallerReference": {}, - "S3Origin": { - "type": "structure", - "members": { - "DomainName": {}, - "OriginAccessIdentity": {} - } - }, - "Aliases": { - "type": "structure", - "members": { - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "CNAME" - } - } - } - }, - "Comment": {}, - "Logging": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Bucket": {}, - "Prefix": {} - } - }, - "TrustedSigners": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Quantity": { - "type": "integer" - }, - "Items": { - "type": "list", - "members": { - "name": "AwsAccountNumber" - } - } - } - }, - "PriceClass": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - } - }, - "pagination": { - "listCloudFrontOriginAccessIdentities": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "limitKey": "MaxItems", - "moreResults": "IsTruncated", - "resultKey": "Items" - }, - "listDistributions": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "limitKey": "MaxItems", - "moreResults": "IsTruncated", - "resultKey": "Items" - }, - "listInvalidations": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "limitKey": "MaxItems", - "moreResults": "IsTruncated", - "resultKey": "Items" - }, - "listStreamingDistributions": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "limitKey": "MaxItems", - "moreResults": "IsTruncated", - "resultKey": "Items" - } - }, - "waiters": { - "__default__": { - "successType": "output", - "successPath": "Status" - }, - "streamingDistributionDeployed": { - "operation": "GetStreamingDistribution", - "description": "Wait until a streaming distribution is deployed.", - "interval": 60, - "maxAttempts": 25, - "successValue": "Deployed" - }, - "distributionDeployed": { - "operation": "GetDistribution", - "description": "Wait until a distribution is deployed.", - "interval": 60, - "maxAttempts": 25, - "successValue": "Deployed" - }, - "invalidationCompleted": { - "operation": "GetInvalidation", - "description": "Wait until an invalidation has completed.", - "interval": 20, - "maxAttempts": 30, - "successValue": "Completed" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2011-02-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2011-02-01.json deleted file mode 100644 index 1dc3771d..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2011-02-01.json +++ /dev/null @@ -1,1258 +0,0 @@ -{ - "format": "query", - "apiVersion": "2011-02-01", - "endpointPrefix": "cloudsearch", - "resultWrapped": true, - "serviceFullName": "Amazon CloudSearch", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "createDomain": { - "name": "CreateDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatus": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "NumSearchableDocs": { - "type": "integer" - }, - "DocService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - }, - "defineIndexField": { - "name": "DefineIndexField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "IndexField": { - "type": "structure", - "members": { - "IndexFieldName": { - "required": true - }, - "IndexFieldType": { - "required": true - }, - "UIntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SearchEnabled": { - "type": "boolean" - }, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - }, - "TextProcessor": {} - } - }, - "SourceAttributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceDataFunction": { - "required": true - }, - "SourceDataCopy": { - "type": "structure", - "members": { - "SourceName": { - "required": true - }, - "DefaultValue": {} - } - }, - "SourceDataTrimTitle": { - "type": "structure", - "members": { - "SourceName": { - "required": true - }, - "DefaultValue": {}, - "Separator": {}, - "Language": {} - } - }, - "SourceDataMap": { - "type": "structure", - "members": { - "SourceName": { - "required": true - }, - "DefaultValue": {}, - "Cases": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexField": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "UIntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SearchEnabled": { - "type": "boolean" - }, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - }, - "TextProcessor": {} - } - }, - "SourceAttributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceDataFunction": {}, - "SourceDataCopy": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {} - } - }, - "SourceDataTrimTitle": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Separator": {}, - "Language": {} - } - }, - "SourceDataMap": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Cases": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "defineRankExpression": { - "name": "DefineRankExpression", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "RankExpression": { - "type": "structure", - "members": { - "RankName": { - "required": true - }, - "RankExpression": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "RankExpression": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "RankName": {}, - "RankExpression": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteDomain": { - "name": "DeleteDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatus": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "NumSearchableDocs": { - "type": "integer" - }, - "DocService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - }, - "deleteIndexField": { - "name": "DeleteIndexField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "IndexFieldName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexField": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "UIntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SearchEnabled": { - "type": "boolean" - }, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - }, - "TextProcessor": {} - } - }, - "SourceAttributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceDataFunction": {}, - "SourceDataCopy": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {} - } - }, - "SourceDataTrimTitle": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Separator": {}, - "Language": {} - } - }, - "SourceDataMap": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Cases": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteRankExpression": { - "name": "DeleteRankExpression", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "RankName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "RankExpression": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "RankName": {}, - "RankExpression": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeDefaultSearchField": { - "name": "DescribeDefaultSearchField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DefaultSearchField": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeDomains": { - "name": "DescribeDomains", - "input": { - "type": "structure", - "members": { - "DomainNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatusList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "NumSearchableDocs": { - "type": "integer" - }, - "DocService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Arn": {}, - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - } - }, - "describeIndexFields": { - "name": "DescribeIndexFields", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "FieldNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexFields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "UIntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SearchEnabled": { - "type": "boolean" - }, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "FacetEnabled": { - "type": "boolean" - }, - "ResultEnabled": { - "type": "boolean" - }, - "TextProcessor": {} - } - }, - "SourceAttributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceDataFunction": {}, - "SourceDataCopy": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {} - } - }, - "SourceDataTrimTitle": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Separator": {}, - "Language": {} - } - }, - "SourceDataMap": { - "type": "structure", - "members": { - "SourceName": {}, - "DefaultValue": {}, - "Cases": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeRankExpressions": { - "name": "DescribeRankExpressions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "RankNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "RankExpressions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "RankName": {}, - "RankExpression": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeServiceAccessPolicies": { - "name": "DescribeServiceAccessPolicies", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessPolicies": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeStemmingOptions": { - "name": "DescribeStemmingOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Stems": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeStopwordOptions": { - "name": "DescribeStopwordOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Stopwords": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeSynonymOptions": { - "name": "DescribeSynonymOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Synonyms": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "indexDocuments": { - "name": "IndexDocuments", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "FieldNames": { - "type": "list", - "members": {} - } - } - } - }, - "updateDefaultSearchField": { - "name": "UpdateDefaultSearchField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "DefaultSearchField": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DefaultSearchField": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateServiceAccessPolicies": { - "name": "UpdateServiceAccessPolicies", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "AccessPolicies": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessPolicies": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateStemmingOptions": { - "name": "UpdateStemmingOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Stems": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Stems": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateStopwordOptions": { - "name": "UpdateStopwordOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Stopwords": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Stopwords": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateSynonymOptions": { - "name": "UpdateSynonymOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Synonyms": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Synonyms": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "pagination": { - "describeDomains": { - "resultKey": "DomainStatusList" - }, - "describeIndexFields": { - "resultKey": "IndexFields" - }, - "describeRankExpressions": { - "resultKey": "RankExpressions" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2013-01-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2013-01-01.json deleted file mode 100644 index dc1ac991..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudSearch-2013-01-01.json +++ /dev/null @@ -1,2046 +0,0 @@ -{ - "format": "query", - "apiVersion": "2013-01-01", - "endpointPrefix": "cloudsearch", - "resultWrapped": true, - "serviceFullName": "Amazon CloudSearch", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "buildSuggesters": { - "name": "BuildSuggesters", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "FieldNames": { - "type": "list", - "members": {} - } - } - } - }, - "createDomain": { - "name": "CreateDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatus": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "ARN": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "DocService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - }, - "defineAnalysisScheme": { - "name": "DefineAnalysisScheme", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "AnalysisScheme": { - "type": "structure", - "members": { - "AnalysisSchemeName": { - "required": true - }, - "AnalysisSchemeLanguage": { - "required": true - }, - "AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": {}, - "Stopwords": {}, - "StemmingDictionary": {}, - "AlgorithmicStemming": {} - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AnalysisScheme": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "AnalysisSchemeName": {}, - "AnalysisSchemeLanguage": {}, - "AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": {}, - "Stopwords": {}, - "StemmingDictionary": {}, - "AlgorithmicStemming": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "defineExpression": { - "name": "DefineExpression", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Expression": { - "type": "structure", - "members": { - "ExpressionName": { - "required": true - }, - "ExpressionValue": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Expression": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "ExpressionName": {}, - "ExpressionValue": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "defineIndexField": { - "name": "DefineIndexField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "IndexField": { - "type": "structure", - "members": { - "IndexFieldName": { - "required": true - }, - "IndexFieldType": { - "required": true - }, - "IntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "DoubleOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LatLonOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "IntArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "DoubleArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "LiteralArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "TextArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexField": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "IntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "DoubleOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LatLonOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "IntArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "DoubleArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "LiteralArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "TextArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "defineSuggester": { - "name": "DefineSuggester", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Suggester": { - "type": "structure", - "members": { - "SuggesterName": { - "required": true - }, - "DocumentSuggesterOptions": { - "type": "structure", - "members": { - "SourceField": { - "required": true - }, - "FuzzyMatching": {}, - "SortExpression": {} - }, - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Suggester": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "SuggesterName": {}, - "DocumentSuggesterOptions": { - "type": "structure", - "members": { - "SourceField": {}, - "FuzzyMatching": {}, - "SortExpression": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteAnalysisScheme": { - "name": "DeleteAnalysisScheme", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "AnalysisSchemeName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AnalysisScheme": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "AnalysisSchemeName": {}, - "AnalysisSchemeLanguage": {}, - "AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": {}, - "Stopwords": {}, - "StemmingDictionary": {}, - "AlgorithmicStemming": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteDomain": { - "name": "DeleteDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatus": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "ARN": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "DocService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - }, - "deleteExpression": { - "name": "DeleteExpression", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ExpressionName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Expression": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "ExpressionName": {}, - "ExpressionValue": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteIndexField": { - "name": "DeleteIndexField", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "IndexFieldName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexField": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "IntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "DoubleOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LatLonOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "IntArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "DoubleArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "LiteralArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "TextArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "deleteSuggester": { - "name": "DeleteSuggester", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "SuggesterName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Suggester": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "SuggesterName": {}, - "DocumentSuggesterOptions": { - "type": "structure", - "members": { - "SourceField": {}, - "FuzzyMatching": {}, - "SortExpression": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeAnalysisSchemes": { - "name": "DescribeAnalysisSchemes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "AnalysisSchemeNames": { - "type": "list", - "members": {} - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "AnalysisSchemes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "AnalysisSchemeName": {}, - "AnalysisSchemeLanguage": {}, - "AnalysisOptions": { - "type": "structure", - "members": { - "Synonyms": {}, - "Stopwords": {}, - "StemmingDictionary": {}, - "AlgorithmicStemming": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeAvailabilityOptions": { - "name": "DescribeAvailabilityOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "AvailabilityOptions": { - "type": "structure", - "members": { - "Options": { - "type": "boolean" - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeDomains": { - "name": "DescribeDomains", - "input": { - "type": "structure", - "members": { - "DomainNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "DomainStatusList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DomainId": {}, - "DomainName": {}, - "ARN": {}, - "Created": { - "type": "boolean" - }, - "Deleted": { - "type": "boolean" - }, - "DocService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "SearchService": { - "type": "structure", - "members": { - "Endpoint": {} - } - }, - "RequiresIndexDocuments": { - "type": "boolean" - }, - "Processing": { - "type": "boolean" - }, - "SearchInstanceType": {}, - "SearchPartitionCount": { - "type": "integer" - }, - "SearchInstanceCount": { - "type": "integer" - } - } - } - } - } - } - }, - "describeExpressions": { - "name": "DescribeExpressions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ExpressionNames": { - "type": "list", - "members": {} - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Expressions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "ExpressionName": {}, - "ExpressionValue": {} - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeIndexFields": { - "name": "DescribeIndexFields", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "FieldNames": { - "type": "list", - "members": {} - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "IndexFields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "IndexFieldName": {}, - "IndexFieldType": {}, - "IntOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "DoubleOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LiteralOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "TextOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "LatLonOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceField": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - }, - "SortEnabled": { - "type": "boolean" - } - } - }, - "IntArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "integer" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "DoubleArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": { - "type": "float" - }, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "LiteralArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - }, - "TextArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "ReturnEnabled": { - "type": "boolean" - }, - "HighlightEnabled": { - "type": "boolean" - }, - "AnalysisScheme": {} - } - }, - "DateArrayOptions": { - "type": "structure", - "members": { - "DefaultValue": {}, - "SourceFields": {}, - "FacetEnabled": { - "type": "boolean" - }, - "SearchEnabled": { - "type": "boolean" - }, - "ReturnEnabled": { - "type": "boolean" - } - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeScalingParameters": { - "name": "DescribeScalingParameters", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ScalingParameters": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "DesiredInstanceType": {}, - "DesiredReplicationCount": { - "type": "integer" - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeServiceAccessPolicies": { - "name": "DescribeServiceAccessPolicies", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessPolicies": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "describeSuggesters": { - "name": "DescribeSuggesters", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "SuggesterNames": { - "type": "list", - "members": {} - }, - "Deployed": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Suggesters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "SuggesterName": {}, - "DocumentSuggesterOptions": { - "type": "structure", - "members": { - "SourceField": {}, - "FuzzyMatching": {}, - "SortExpression": {} - } - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "indexDocuments": { - "name": "IndexDocuments", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "FieldNames": { - "type": "list", - "members": {} - } - } - } - }, - "listDomainNames": { - "name": "ListDomainNames", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "DomainNames": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "updateAvailabilityOptions": { - "name": "UpdateAvailabilityOptions", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "MultiAZ": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AvailabilityOptions": { - "type": "structure", - "members": { - "Options": { - "type": "boolean" - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateScalingParameters": { - "name": "UpdateScalingParameters", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ScalingParameters": { - "type": "structure", - "members": { - "DesiredInstanceType": {}, - "DesiredReplicationCount": { - "type": "integer" - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ScalingParameters": { - "type": "structure", - "members": { - "Options": { - "type": "structure", - "members": { - "DesiredInstanceType": {}, - "DesiredReplicationCount": { - "type": "integer" - } - } - }, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "updateServiceAccessPolicies": { - "name": "UpdateServiceAccessPolicies", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "AccessPolicies": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessPolicies": { - "type": "structure", - "members": { - "Options": {}, - "Status": { - "type": "structure", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "UpdateDate": { - "type": "timestamp" - }, - "UpdateVersion": { - "type": "integer" - }, - "State": {}, - "PendingDeletion": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "pagination": { - "describeAnalysisSchemes": { - "resultKey": "AnalysisSchemes" - }, - "describeDomains": { - "resultKey": "DomainStatusList" - }, - "describeExpressions": { - "resultKey": "Expressions" - }, - "describeIndexFields": { - "resultKey": "IndexFields" - }, - "describeSuggesters": { - "resultKey": "Suggesters" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudTrail-2013-11-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudTrail-2013-11-01.json deleted file mode 100644 index a322d290..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudTrail-2013-11-01.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "format": "json", - "apiVersion": "2013-11-01", - "endpointPrefix": "cloudtrail", - "jsonVersion": "1.1", - "serviceAbbreviation": "CloudTrail", - "serviceFullName": "AWS CloudTrail", - "signatureVersion": "v4", - "targetPrefix": "com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101", - "timestampFormat": "iso8601", - "operations": { - "createTrail": { - "name": "CreateTrail", - "input": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "trail": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "trail": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - } - } - } - } - } - }, - "deleteTrail": { - "name": "DeleteTrail", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeTrails": { - "name": "DescribeTrails", - "input": { - "type": "structure", - "members": { - "trailNameList": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "trailList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - } - } - } - } - } - } - }, - "getTrailStatus": { - "name": "GetTrailStatus", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "IsLogging": { - "type": "boolean" - }, - "LatestDeliveryError": {}, - "LatestNotificationError": {}, - "LatestDeliveryTime": { - "type": "timestamp" - }, - "LatestNotificationTime": { - "type": "timestamp" - }, - "StartLoggingTime": { - "type": "timestamp" - }, - "StopLoggingTime": { - "type": "timestamp" - }, - "LatestDeliveryAttemptTime": {}, - "LatestNotificationAttemptTime": {}, - "LatestNotificationAttemptSucceeded": {}, - "LatestDeliveryAttemptSucceeded": {}, - "TimeLoggingStarted": {}, - "TimeLoggingStopped": {} - } - } - }, - "startLogging": { - "name": "StartLogging", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "stopLogging": { - "name": "StopLogging", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateTrail": { - "name": "UpdateTrail", - "input": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "trail": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - }, - "trail": { - "type": "structure", - "members": { - "Name": {}, - "S3BucketName": {}, - "S3KeyPrefix": {}, - "SnsTopicName": {}, - "IncludeGlobalServiceEvents": { - "type": "boolean" - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudWatch-2010-08-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudWatch-2010-08-01.json deleted file mode 100644 index d3c1e2d6..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/CloudWatch-2010-08-01.json +++ /dev/null @@ -1,612 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-08-01", - "endpointPrefix": "monitoring", - "resultWrapped": true, - "serviceAbbreviation": "CloudWatch", - "serviceFullName": "Amazon CloudWatch", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "deleteAlarms": { - "name": "DeleteAlarms", - "input": { - "type": "structure", - "members": { - "AlarmNames": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeAlarmHistory": { - "name": "DescribeAlarmHistory", - "input": { - "type": "structure", - "members": { - "AlarmName": {}, - "HistoryItemType": {}, - "StartDate": { - "type": "timestamp" - }, - "EndDate": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "AlarmHistoryItems": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AlarmName": {}, - "Timestamp": { - "type": "timestamp" - }, - "HistoryItemType": {}, - "HistorySummary": {}, - "HistoryData": {} - } - } - }, - "NextToken": {} - } - } - }, - "describeAlarms": { - "name": "DescribeAlarms", - "input": { - "type": "structure", - "members": { - "AlarmNames": { - "type": "list", - "members": {} - }, - "AlarmNamePrefix": {}, - "StateValue": {}, - "ActionPrefix": {}, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "MetricAlarms": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AlarmName": {}, - "AlarmArn": {}, - "AlarmDescription": {}, - "AlarmConfigurationUpdatedTimestamp": { - "type": "timestamp" - }, - "ActionsEnabled": { - "type": "boolean" - }, - "OKActions": { - "type": "list", - "members": {} - }, - "AlarmActions": { - "type": "list", - "members": {} - }, - "InsufficientDataActions": { - "type": "list", - "members": {} - }, - "StateValue": {}, - "StateReason": {}, - "StateReasonData": {}, - "StateUpdatedTimestamp": { - "type": "timestamp" - }, - "MetricName": {}, - "Namespace": {}, - "Statistic": {}, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {} - } - } - }, - "Period": { - "type": "integer" - }, - "Unit": {}, - "EvaluationPeriods": { - "type": "integer" - }, - "Threshold": { - "type": "float" - }, - "ComparisonOperator": {} - } - } - }, - "NextToken": {} - } - } - }, - "describeAlarmsForMetric": { - "name": "DescribeAlarmsForMetric", - "input": { - "type": "structure", - "members": { - "MetricName": { - "required": true - }, - "Namespace": { - "required": true - }, - "Statistic": {}, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - } - }, - "order": [ - "Name", - "Value" - ] - } - }, - "Period": { - "type": "integer" - }, - "Unit": {} - } - }, - "output": { - "type": "structure", - "members": { - "MetricAlarms": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AlarmName": {}, - "AlarmArn": {}, - "AlarmDescription": {}, - "AlarmConfigurationUpdatedTimestamp": { - "type": "timestamp" - }, - "ActionsEnabled": { - "type": "boolean" - }, - "OKActions": { - "type": "list", - "members": {} - }, - "AlarmActions": { - "type": "list", - "members": {} - }, - "InsufficientDataActions": { - "type": "list", - "members": {} - }, - "StateValue": {}, - "StateReason": {}, - "StateReasonData": {}, - "StateUpdatedTimestamp": { - "type": "timestamp" - }, - "MetricName": {}, - "Namespace": {}, - "Statistic": {}, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {} - } - } - }, - "Period": { - "type": "integer" - }, - "Unit": {}, - "EvaluationPeriods": { - "type": "integer" - }, - "Threshold": { - "type": "float" - }, - "ComparisonOperator": {} - } - } - } - } - } - }, - "disableAlarmActions": { - "name": "DisableAlarmActions", - "input": { - "type": "structure", - "members": { - "AlarmNames": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "enableAlarmActions": { - "name": "EnableAlarmActions", - "input": { - "type": "structure", - "members": { - "AlarmNames": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getMetricStatistics": { - "name": "GetMetricStatistics", - "input": { - "type": "structure", - "members": { - "Namespace": { - "required": true - }, - "MetricName": { - "required": true - }, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - } - }, - "order": [ - "Name", - "Value" - ] - } - }, - "StartTime": { - "type": "timestamp", - "required": true - }, - "EndTime": { - "type": "timestamp", - "required": true - }, - "Period": { - "type": "integer", - "required": true - }, - "Statistics": { - "type": "list", - "members": {}, - "required": true - }, - "Unit": {} - } - }, - "output": { - "type": "structure", - "members": { - "Label": {}, - "Datapoints": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Timestamp": { - "type": "timestamp" - }, - "SampleCount": { - "type": "float" - }, - "Average": { - "type": "float" - }, - "Sum": { - "type": "float" - }, - "Minimum": { - "type": "float" - }, - "Maximum": { - "type": "float" - }, - "Unit": {} - } - } - } - } - } - }, - "listMetrics": { - "name": "ListMetrics", - "input": { - "type": "structure", - "members": { - "Namespace": {}, - "MetricName": {}, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": {} - } - } - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Metrics": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "MetricName": {}, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {} - } - } - } - } - } - }, - "NextToken": {} - } - } - }, - "putMetricAlarm": { - "name": "PutMetricAlarm", - "input": { - "type": "structure", - "members": { - "AlarmName": { - "required": true - }, - "AlarmDescription": {}, - "ActionsEnabled": { - "type": "boolean" - }, - "OKActions": { - "type": "list", - "members": {} - }, - "AlarmActions": { - "type": "list", - "members": {} - }, - "InsufficientDataActions": { - "type": "list", - "members": {} - }, - "MetricName": { - "required": true - }, - "Namespace": { - "required": true - }, - "Statistic": { - "required": true - }, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - } - }, - "order": [ - "Name", - "Value" - ] - } - }, - "Period": { - "type": "integer", - "required": true - }, - "Unit": {}, - "EvaluationPeriods": { - "type": "integer", - "required": true - }, - "Threshold": { - "type": "float", - "required": true - }, - "ComparisonOperator": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putMetricData": { - "name": "PutMetricData", - "input": { - "type": "structure", - "members": { - "Namespace": { - "required": true - }, - "MetricData": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MetricName": { - "required": true - }, - "Dimensions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - } - }, - "order": [ - "Name", - "Value" - ] - } - }, - "Timestamp": { - "type": "timestamp" - }, - "Value": { - "type": "float" - }, - "StatisticValues": { - "type": "structure", - "members": { - "SampleCount": { - "type": "float", - "required": true - }, - "Sum": { - "type": "float", - "required": true - }, - "Minimum": { - "type": "float", - "required": true - }, - "Maximum": { - "type": "float", - "required": true - } - } - }, - "Unit": {} - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setAlarmState": { - "name": "SetAlarmState", - "input": { - "type": "structure", - "members": { - "AlarmName": { - "required": true - }, - "StateValue": { - "required": true - }, - "StateReason": { - "required": true - }, - "StateReasonData": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeAlarmHistory": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "AlarmHistoryItems" - }, - "describeAlarms": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "MetricAlarms" - }, - "describeAlarmsForMetric": { - "resultKey": "MetricAlarms" - }, - "listMetrics": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Metrics" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DataPipeline-2012-10-29.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DataPipeline-2012-10-29.json deleted file mode 100644 index 0686c8a0..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DataPipeline-2012-10-29.json +++ /dev/null @@ -1,606 +0,0 @@ -{ - "format": "json", - "apiVersion": "2012-10-29", - "endpointPrefix": "datapipeline", - "jsonVersion": "1.1", - "serviceFullName": "AWS Data Pipeline", - "signatureVersion": "v4", - "targetPrefix": "DataPipeline", - "timestampFormat": "iso8601", - "operations": { - "activatePipeline": { - "name": "ActivatePipeline", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createPipeline": { - "name": "CreatePipeline", - "input": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "uniqueId": { - "required": true - }, - "description": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineId": {} - } - } - }, - "deletePipeline": { - "name": "DeletePipeline", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeObjects": { - "name": "DescribeObjects", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "objectIds": { - "type": "list", - "members": {}, - "required": true - }, - "evaluateExpressions": { - "type": "boolean" - }, - "marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineObjects": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "name": {}, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": {}, - "stringValue": {}, - "refValue": {} - } - } - } - } - } - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "describePipelines": { - "name": "DescribePipelines", - "input": { - "type": "structure", - "members": { - "pipelineIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "pipelineDescriptionList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "pipelineId": {}, - "name": {}, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": {}, - "stringValue": {}, - "refValue": {} - } - } - }, - "description": {} - } - } - } - } - } - }, - "evaluateExpression": { - "name": "EvaluateExpression", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "objectId": { - "required": true - }, - "expression": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "evaluatedExpression": {} - } - } - }, - "getPipelineDefinition": { - "name": "GetPipelineDefinition", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "version": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineObjects": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "name": {}, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": {}, - "stringValue": {}, - "refValue": {} - } - } - } - } - } - } - } - } - }, - "listPipelines": { - "name": "ListPipelines", - "input": { - "type": "structure", - "members": { - "marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "pipelineIdList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "name": {} - } - } - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "pollForTask": { - "name": "PollForTask", - "input": { - "type": "structure", - "members": { - "workerGroup": { - "required": true - }, - "hostname": {}, - "instanceIdentity": { - "type": "structure", - "members": { - "document": {}, - "signature": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "taskObject": { - "type": "structure", - "members": { - "taskId": {}, - "pipelineId": {}, - "attemptId": {}, - "objects": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "id": {}, - "name": {}, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": {}, - "stringValue": {}, - "refValue": {} - } - } - } - } - } - } - } - } - } - } - }, - "putPipelineDefinition": { - "name": "PutPipelineDefinition", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "pipelineObjects": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": { - "required": true - }, - "name": { - "required": true - }, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "required": true - }, - "stringValue": {}, - "refValue": {} - } - }, - "required": true - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "validationErrors": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "errors": { - "type": "list", - "members": {} - } - } - } - }, - "validationWarnings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "warnings": { - "type": "list", - "members": {} - } - } - } - }, - "errored": { - "type": "boolean" - } - } - } - }, - "queryObjects": { - "name": "QueryObjects", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "query": { - "type": "structure", - "members": { - "selectors": { - "type": "list", - "members": { - "type": "structure", - "members": { - "fieldName": {}, - "operator": { - "type": "structure", - "members": { - "type": {}, - "values": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - }, - "sphere": { - "required": true - }, - "marker": {}, - "limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ids": { - "type": "list", - "members": {} - }, - "marker": {}, - "hasMoreResults": { - "type": "boolean" - } - } - } - }, - "reportTaskProgress": { - "name": "ReportTaskProgress", - "input": { - "type": "structure", - "members": { - "taskId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "canceled": { - "type": "boolean" - } - } - } - }, - "reportTaskRunnerHeartbeat": { - "name": "ReportTaskRunnerHeartbeat", - "input": { - "type": "structure", - "members": { - "taskrunnerId": { - "required": true - }, - "workerGroup": {}, - "hostname": {} - } - }, - "output": { - "type": "structure", - "members": { - "terminate": { - "type": "boolean" - } - } - } - }, - "setStatus": { - "name": "SetStatus", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "objectIds": { - "type": "list", - "members": {}, - "required": true - }, - "status": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setTaskStatus": { - "name": "SetTaskStatus", - "input": { - "type": "structure", - "members": { - "taskId": { - "required": true - }, - "taskStatus": { - "required": true - }, - "errorId": {}, - "errorMessage": {}, - "errorStackTrace": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "validatePipelineDefinition": { - "name": "ValidatePipelineDefinition", - "input": { - "type": "structure", - "members": { - "pipelineId": { - "required": true - }, - "pipelineObjects": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": { - "required": true - }, - "name": { - "required": true - }, - "fields": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "required": true - }, - "stringValue": {}, - "refValue": {} - } - }, - "required": true - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "validationErrors": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "errors": { - "type": "list", - "members": {} - } - } - } - }, - "validationWarnings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "warnings": { - "type": "list", - "members": {} - } - } - } - }, - "errored": { - "type": "boolean" - } - } - } - } - }, - "pagination": { - "listPipelines": { - "inputToken": "marker", - "outputToken": "marker", - "moreResults": "hasMoreResults", - "limitKey": "limit", - "resultKey": "pipelineIdList" - }, - "describeObjects": { - "inputToken": "marker", - "outputToken": "marker", - "moreResults": "hasMoreResults", - "limitKey": "limit", - "resultKey": "pipelineObjects" - }, - "queryObjects": { - "inputToken": "marker", - "outputToken": "marker", - "moreResults": "hasMoreResults", - "limitKey": "limit", - "resultKey": "ids" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DirectConnect-2012-10-25.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DirectConnect-2012-10-25.json deleted file mode 100644 index 063e8394..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DirectConnect-2012-10-25.json +++ /dev/null @@ -1,721 +0,0 @@ -{ - "format": "json", - "apiVersion": "2012-10-25", - "endpointPrefix": "directconnect", - "jsonVersion": "1.1", - "serviceFullName": "AWS Direct Connect", - "signatureVersion": "v4", - "targetPrefix": "OvertureService", - "timestampFormat": "iso8601", - "operations": { - "allocateConnectionOnInterconnect": { - "name": "AllocateConnectionOnInterconnect", - "input": { - "type": "structure", - "members": { - "bandwidth": { - "required": true - }, - "connectionName": { - "required": true - }, - "ownerAccount": { - "required": true - }, - "interconnectId": { - "required": true - }, - "vlan": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - } - }, - "allocatePrivateVirtualInterface": { - "name": "AllocatePrivateVirtualInterface", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - }, - "ownerAccount": { - "required": true - }, - "newPrivateVirtualInterfaceAllocation": { - "type": "structure", - "members": { - "virtualInterfaceName": { - "required": true - }, - "vlan": { - "type": "integer", - "required": true - }, - "asn": { - "type": "integer", - "required": true - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {} - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - } - } - } - } - }, - "allocatePublicVirtualInterface": { - "name": "AllocatePublicVirtualInterface", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - }, - "ownerAccount": { - "required": true - }, - "newPublicVirtualInterfaceAllocation": { - "type": "structure", - "members": { - "virtualInterfaceName": { - "required": true - }, - "vlan": { - "type": "integer", - "required": true - }, - "asn": { - "type": "integer", - "required": true - }, - "authKey": {}, - "amazonAddress": { - "required": true - }, - "customerAddress": { - "required": true - }, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - }, - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - } - } - } - } - }, - "confirmConnection": { - "name": "ConfirmConnection", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "connectionState": {} - } - } - }, - "confirmPrivateVirtualInterface": { - "name": "ConfirmPrivateVirtualInterface", - "input": { - "type": "structure", - "members": { - "virtualInterfaceId": { - "required": true - }, - "virtualGatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "confirmPublicVirtualInterface": { - "name": "ConfirmPublicVirtualInterface", - "input": { - "type": "structure", - "members": { - "virtualInterfaceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "createConnection": { - "name": "CreateConnection", - "input": { - "type": "structure", - "members": { - "location": { - "required": true - }, - "bandwidth": { - "required": true - }, - "connectionName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - } - }, - "createInterconnect": { - "name": "CreateInterconnect", - "input": { - "type": "structure", - "members": { - "interconnectName": { - "required": true - }, - "bandwidth": { - "required": true - }, - "location": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "interconnectId": {}, - "interconnectName": {}, - "interconnectState": {}, - "region": {}, - "location": {}, - "bandwidth": {} - } - } - }, - "createPrivateVirtualInterface": { - "name": "CreatePrivateVirtualInterface", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - }, - "newPrivateVirtualInterface": { - "type": "structure", - "members": { - "virtualInterfaceName": { - "required": true - }, - "vlan": { - "type": "integer", - "required": true - }, - "asn": { - "type": "integer", - "required": true - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualGatewayId": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - } - } - } - } - }, - "createPublicVirtualInterface": { - "name": "CreatePublicVirtualInterface", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - }, - "newPublicVirtualInterface": { - "type": "structure", - "members": { - "virtualInterfaceName": { - "required": true - }, - "vlan": { - "type": "integer", - "required": true - }, - "asn": { - "type": "integer", - "required": true - }, - "authKey": {}, - "amazonAddress": { - "required": true - }, - "customerAddress": { - "required": true - }, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - }, - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - } - } - } - } - }, - "deleteConnection": { - "name": "DeleteConnection", - "input": { - "type": "structure", - "members": { - "connectionId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - } - }, - "deleteInterconnect": { - "name": "DeleteInterconnect", - "input": { - "type": "structure", - "members": { - "interconnectId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "interconnectState": {} - } - } - }, - "deleteVirtualInterface": { - "name": "DeleteVirtualInterface", - "input": { - "type": "structure", - "members": { - "virtualInterfaceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaceState": {} - } - } - }, - "describeConnections": { - "name": "DescribeConnections", - "input": { - "type": "structure", - "members": { - "connectionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "connections": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - } - } - } - } - }, - "describeConnectionsOnInterconnect": { - "name": "DescribeConnectionsOnInterconnect", - "input": { - "type": "structure", - "members": { - "interconnectId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "connections": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ownerAccount": {}, - "connectionId": {}, - "connectionName": {}, - "connectionState": {}, - "region": {}, - "location": {}, - "bandwidth": {}, - "vlan": { - "type": "integer" - }, - "partnerName": {} - } - } - } - } - } - }, - "describeInterconnects": { - "name": "DescribeInterconnects", - "input": { - "type": "structure", - "members": { - "interconnectId": {} - } - }, - "output": { - "type": "structure", - "members": { - "interconnects": { - "type": "list", - "members": { - "type": "structure", - "members": { - "interconnectId": {}, - "interconnectName": {}, - "interconnectState": {}, - "region": {}, - "location": {}, - "bandwidth": {} - } - } - } - } - } - }, - "describeLocations": { - "name": "DescribeLocations", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "locations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "locationCode": {}, - "locationName": {} - } - } - } - } - } - }, - "describeVirtualGateways": { - "name": "DescribeVirtualGateways", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "virtualGateways": { - "type": "list", - "members": { - "type": "structure", - "members": { - "virtualGatewayId": {}, - "virtualGatewayState": {} - } - } - } - } - } - }, - "describeVirtualInterfaces": { - "name": "DescribeVirtualInterfaces", - "input": { - "type": "structure", - "members": { - "connectionId": {}, - "virtualInterfaceId": {} - } - }, - "output": { - "type": "structure", - "members": { - "virtualInterfaces": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ownerAccount": {}, - "virtualInterfaceId": {}, - "location": {}, - "connectionId": {}, - "virtualInterfaceType": {}, - "virtualInterfaceName": {}, - "vlan": { - "type": "integer" - }, - "asn": { - "type": "integer" - }, - "authKey": {}, - "amazonAddress": {}, - "customerAddress": {}, - "virtualInterfaceState": {}, - "customerRouterConfig": {}, - "virtualGatewayId": {}, - "routeFilterPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidr": {} - } - } - } - } - } - } - } - } - } - }, - "pagination": { - "describeConnections": { - "resultKey": "connections" - }, - "describeOfferings": { - "resultKey": "offerings" - }, - "describeVirtualGateways": { - "resultKey": "virtualGateways" - }, - "describeVirtualInterfaces": { - "resultKey": "virtualInterfaces" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2011-12-05.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2011-12-05.json deleted file mode 100644 index db07d0fa..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2011-12-05.json +++ /dev/null @@ -1,1847 +0,0 @@ -{ - "format": "json", - "apiVersion": "2011-12-05", - "endpointPrefix": "dynamodb", - "jsonVersion": "1.0", - "serviceAbbreviation": "DynamoDB", - "serviceFullName": "Amazon DynamoDB", - "signatureVersion": "v4", - "targetPrefix": "DynamoDB_20111205", - "timestampFormat": "iso8601", - "operations": { - "batchGetItem": { - "name": "BatchGetItem", - "input": { - "type": "structure", - "members": { - "RequestItems": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Keys": { - "type": "list", - "members": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Items": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "UnprocessedKeys": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Keys": { - "type": "list", - "members": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - } - } - } - } - } - } - }, - "batchWriteItem": { - "name": "BatchWriteItem", - "input": { - "type": "structure", - "members": { - "RequestItems": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - } - } - }, - "DeleteRequest": { - "type": "structure", - "members": { - "Key": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "required": true - } - } - } - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "UnprocessedItems": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - }, - "DeleteRequest": { - "type": "structure", - "members": { - "Key": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "createTable": { - "name": "CreateTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "KeySchema": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "AttributeType": { - "required": true - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "AttributeType": { - "required": true - } - } - } - }, - "required": true - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "TableName": {}, - "KeySchema": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - }, - "deleteItem": { - "name": "DeleteItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "required": true - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "deleteTable": { - "name": "DeleteTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "TableName": {}, - "KeySchema": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - }, - "describeTable": { - "name": "DescribeTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Table": { - "type": "structure", - "members": { - "TableName": {}, - "KeySchema": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - }, - "getItem": { - "name": "GetItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "listTables": { - "name": "ListTables", - "input": { - "type": "structure", - "members": { - "ExclusiveStartTableName": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableNames": { - "type": "list", - "members": {} - }, - "LastEvaluatedTableName": {} - } - } - }, - "putItem": { - "name": "PutItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "query": { - "name": "Query", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "Limit": { - "type": "integer" - }, - "ConsistentRead": { - "type": "boolean" - }, - "Count": { - "type": "boolean" - }, - "HashKeyValue": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyCondition": { - "type": "structure", - "members": { - "AttributeValueList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ComparisonOperator": { - "required": true - } - } - }, - "ScanIndexForward": { - "type": "boolean" - }, - "ExclusiveStartKey": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "Count": { - "type": "integer" - }, - "LastEvaluatedKey": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "scan": { - "name": "Scan", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "Limit": { - "type": "integer" - }, - "Count": { - "type": "boolean" - }, - "ScanFilter": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "AttributeValueList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ComparisonOperator": { - "required": true - } - } - } - }, - "ExclusiveStartKey": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "Count": { - "type": "integer" - }, - "ScannedCount": { - "type": "integer" - }, - "LastEvaluatedKey": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "updateItem": { - "name": "UpdateItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - }, - "required": true - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "required": true - }, - "AttributeUpdates": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Action": {} - } - }, - "required": true - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacityUnits": { - "type": "float" - } - } - } - }, - "updateTable": { - "name": "UpdateTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "TableName": {}, - "KeySchema": { - "type": "structure", - "members": { - "HashKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - }, - "RangeKeyElement": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - } - }, - "pagination": { - "batchGetItem": { - "inputToken": "RequestItems", - "outputToken": "UnprocessedKeys", - "resultKey": "Responses[]" - }, - "listTables": { - "inputToken": "ExclusiveStartTableName", - "outputToken": "LastEvaluatedTableName", - "limitKey": "Limit", - "resultKey": "TableNames" - }, - "query": { - "inputToken": "ExclusiveStartKey", - "outputToken": "LastEvaluatedKey", - "limitKey": "Limit", - "resultKey": "Items" - }, - "scan": { - "inputToken": "ExclusiveStartKey", - "outputToken": "LastEvaluatedKey", - "limitKey": "Limit", - "resultKey": "Items" - } - }, - "waiters": { - "__default__": { - "interval": 20, - "maxAttempts": 25 - }, - "__TableState": { - "operation": "DescribeTable" - }, - "tableExists": { - "extends": "__TableState", - "description": "Wait until a table exists and can be accessed", - "ignoreErrors": [ - "ResourceNotFoundException" - ], - "successType": "output", - "successPath": "Table.TableStatus", - "successValue": "ACTIVE" - }, - "tableNotExists": { - "extends": "__TableState", - "description": "Wait until a table is deleted", - "successType": "error", - "successValue": "ResourceNotFoundException" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2012-08-10.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2012-08-10.json deleted file mode 100644 index 5111e73c..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/DynamoDB-2012-08-10.json +++ /dev/null @@ -1,2501 +0,0 @@ -{ - "format": "json", - "apiVersion": "2012-08-10", - "endpointPrefix": "dynamodb", - "jsonVersion": "1.0", - "serviceAbbreviation": "DynamoDB", - "serviceFullName": "Amazon DynamoDB", - "signatureVersion": "v4", - "targetPrefix": "DynamoDB_20120810", - "timestampFormat": "iso8601", - "operations": { - "batchGetItem": { - "name": "BatchGetItem", - "input": { - "type": "structure", - "members": { - "RequestItems": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Keys": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "required": true - }, - "ReturnConsumedCapacity": {} - } - }, - "output": { - "type": "structure", - "members": { - "Responses": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - }, - "UnprocessedKeys": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Keys": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - } - } - } - }, - "ConsumedCapacity": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - } - } - } - } - }, - "batchWriteItem": { - "name": "BatchWriteItem", - "input": { - "type": "structure", - "members": { - "RequestItems": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - } - } - }, - "DeleteRequest": { - "type": "structure", - "members": { - "Key": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - } - } - } - } - } - }, - "required": true - }, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {} - } - }, - "output": { - "type": "structure", - "members": { - "UnprocessedItems": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PutRequest": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - }, - "DeleteRequest": { - "type": "structure", - "members": { - "Key": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - } - } - } - } - } - }, - "ItemCollectionMetrics": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ItemCollectionKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "SizeEstimateRangeGB": { - "type": "list", - "members": { - "type": "float" - } - } - } - } - } - }, - "ConsumedCapacity": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - } - } - } - } - }, - "createTable": { - "name": "CreateTable", - "input": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "AttributeType": { - "required": true - } - } - }, - "required": true - }, - "TableName": { - "required": true - }, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "KeyType": { - "required": true - } - } - }, - "required": true - }, - "LocalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": { - "required": true - }, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "KeyType": { - "required": true - } - } - }, - "required": true - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - }, - "required": true - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": { - "required": true - }, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": { - "required": true - }, - "KeyType": { - "required": true - } - } - }, - "required": true - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - }, - "required": true - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - } - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - }, - "TableName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - }, - "LocalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexStatus": {}, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - } - } - } - }, - "deleteItem": { - "name": "DeleteItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - }, - "ItemCollectionMetrics": { - "type": "structure", - "members": { - "ItemCollectionKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "SizeEstimateRangeGB": { - "type": "list", - "members": { - "type": "float" - } - } - } - } - } - } - }, - "deleteTable": { - "name": "DeleteTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - }, - "TableName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - }, - "LocalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexStatus": {}, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - } - } - } - }, - "describeTable": { - "name": "DescribeTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Table": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - }, - "TableName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - }, - "LocalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexStatus": {}, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - } - } - } - }, - "getItem": { - "name": "GetItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "ConsistentRead": { - "type": "boolean" - }, - "ReturnConsumedCapacity": {} - } - }, - "output": { - "type": "structure", - "members": { - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - } - } - } - }, - "listTables": { - "name": "ListTables", - "input": { - "type": "structure", - "members": { - "ExclusiveStartTableName": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TableNames": { - "type": "list", - "members": {} - }, - "LastEvaluatedTableName": {} - } - } - }, - "putItem": { - "name": "PutItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Item": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - }, - "ItemCollectionMetrics": { - "type": "structure", - "members": { - "ItemCollectionKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "SizeEstimateRangeGB": { - "type": "list", - "members": { - "type": "float" - } - } - } - } - } - } - }, - "query": { - "name": "Query", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "IndexName": {}, - "Select": {}, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "Limit": { - "type": "integer" - }, - "ConsistentRead": { - "type": "boolean" - }, - "KeyConditions": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "AttributeValueList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ComparisonOperator": { - "required": true - } - } - } - }, - "ScanIndexForward": { - "type": "boolean" - }, - "ExclusiveStartKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ReturnConsumedCapacity": {} - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "Count": { - "type": "integer" - }, - "LastEvaluatedKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - } - } - } - }, - "scan": { - "name": "Scan", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "AttributesToGet": { - "type": "list", - "members": {} - }, - "Limit": { - "type": "integer" - }, - "Select": {}, - "ScanFilter": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "AttributeValueList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ComparisonOperator": { - "required": true - } - } - } - }, - "ExclusiveStartKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ReturnConsumedCapacity": {}, - "TotalSegments": { - "type": "integer" - }, - "Segment": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Items": { - "type": "list", - "members": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - } - }, - "Count": { - "type": "integer" - }, - "ScannedCount": { - "type": "integer" - }, - "LastEvaluatedKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - } - } - } - }, - "updateItem": { - "name": "UpdateItem", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "Key": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "required": true - }, - "AttributeUpdates": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Action": {} - } - } - }, - "Expected": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "Value": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - }, - "Exists": { - "type": "boolean" - } - } - } - }, - "ReturnValues": {}, - "ReturnConsumedCapacity": {}, - "ReturnItemCollectionMetrics": {} - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "ConsumedCapacity": { - "type": "structure", - "members": { - "TableName": {}, - "CapacityUnits": { - "type": "float" - }, - "Table": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - }, - "LocalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "CapacityUnits": { - "type": "float" - } - } - } - } - } - }, - "ItemCollectionMetrics": { - "type": "structure", - "members": { - "ItemCollectionKey": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "S": {}, - "N": {}, - "B": { - "type": "base64" - }, - "SS": { - "type": "list", - "members": {} - }, - "NS": { - "type": "list", - "members": {} - }, - "BS": { - "type": "list", - "members": { - "type": "base64" - } - } - } - } - }, - "SizeEstimateRangeGB": { - "type": "list", - "members": { - "type": "float" - } - } - } - } - } - } - }, - "updateTable": { - "name": "UpdateTable", - "input": { - "type": "structure", - "members": { - "TableName": { - "required": true - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - } - }, - "GlobalSecondaryIndexUpdates": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Update": { - "type": "structure", - "members": { - "IndexName": { - "required": true - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "ReadCapacityUnits": { - "type": "integer", - "required": true - }, - "WriteCapacityUnits": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "TableDescription": { - "type": "structure", - "members": { - "AttributeDefinitions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {} - } - } - }, - "TableName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "TableStatus": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "TableSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - }, - "LocalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - }, - "GlobalSecondaryIndexes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IndexName": {}, - "KeySchema": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "KeyType": {} - } - } - }, - "Projection": { - "type": "structure", - "members": { - "ProjectionType": {}, - "NonKeyAttributes": { - "type": "list", - "members": {} - } - } - }, - "IndexStatus": {}, - "ProvisionedThroughput": { - "type": "structure", - "members": { - "LastIncreaseDateTime": { - "type": "timestamp" - }, - "LastDecreaseDateTime": { - "type": "timestamp" - }, - "NumberOfDecreasesToday": { - "type": "integer" - }, - "ReadCapacityUnits": { - "type": "integer" - }, - "WriteCapacityUnits": { - "type": "integer" - } - } - }, - "IndexSizeBytes": { - "type": "integer" - }, - "ItemCount": { - "type": "integer" - } - } - } - } - } - } - } - } - } - }, - "pagination": { - "batchGetItem": { - "inputToken": "RequestItems", - "outputToken": "UnprocessedKeys", - "resultKey": "Responses[]" - }, - "listTables": { - "inputToken": "ExclusiveStartTableName", - "outputToken": "LastEvaluatedTableName", - "limitKey": "Limit", - "resultKey": "TableNames" - }, - "query": { - "inputToken": "ExclusiveStartKey", - "outputToken": "LastEvaluatedKey", - "limitKey": "Limit", - "resultKey": "Items" - }, - "scan": { - "inputToken": "ExclusiveStartKey", - "outputToken": "LastEvaluatedKey", - "limitKey": "Limit", - "resultKey": "Items" - } - }, - "waiters": { - "__default__": { - "interval": 20, - "maxAttempts": 25 - }, - "__TableState": { - "operation": "DescribeTable" - }, - "tableExists": { - "extends": "__TableState", - "ignoreErrors": [ - "ResourceNotFoundException" - ], - "successType": "output", - "successPath": "Table.TableStatus", - "successValue": "ACTIVE" - }, - "tableNotExists": { - "extends": "__TableState", - "successType": "error", - "successValue": "ResourceNotFoundException" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EC2-2014-02-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EC2-2014-02-01.json deleted file mode 100644 index f2500e98..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EC2-2014-02-01.json +++ /dev/null @@ -1,11328 +0,0 @@ -{ - "format": "query", - "apiVersion": "2014-02-01", - "endpointPrefix": "ec2", - "serviceAbbreviation": "Amazon EC2", - "serviceFullName": "Amazon Elastic Compute Cloud", - "signatureVersion": "v2", - "timestampFormat": "iso8601", - "operations": { - "acceptVpcPeeringConnection": { - "name": "AcceptVpcPeeringConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcPeeringConnectionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "vpcPeeringConnection": { - "type": "structure", - "members": { - "accepterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "AccepterVpcInfo" - }, - "expirationTime": { - "type": "timestamp", - "name": "ExpirationTime" - }, - "requesterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "RequesterVpcInfo" - }, - "status": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Status" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "vpcPeeringConnectionId": { - "name": "VpcPeeringConnectionId" - } - }, - "name": "VpcPeeringConnection" - } - } - } - }, - "allocateAddress": { - "name": "AllocateAddress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Domain": {} - } - }, - "output": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "domain": { - "name": "Domain" - }, - "allocationId": { - "name": "AllocationId" - } - } - } - }, - "assignPrivateIpAddresses": { - "name": "AssignPrivateIpAddresses", - "input": { - "type": "structure", - "members": { - "NetworkInterfaceId": { - "required": true - }, - "PrivateIpAddresses": { - "type": "list", - "members": { - "name": "PrivateIpAddress" - }, - "flattened": true - }, - "SecondaryPrivateIpAddressCount": { - "type": "integer" - }, - "AllowReassignment": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "associateAddress": { - "name": "AssociateAddress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": {}, - "PublicIp": {}, - "AllocationId": {}, - "NetworkInterfaceId": {}, - "PrivateIpAddress": {}, - "AllowReassociation": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "associationId": { - "name": "AssociationId" - } - } - } - }, - "associateDhcpOptions": { - "name": "AssociateDhcpOptions", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "DhcpOptionsId": { - "required": true - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "associateRouteTable": { - "name": "AssociateRouteTable", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SubnetId": { - "required": true - }, - "RouteTableId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "associationId": { - "name": "AssociationId" - } - } - } - }, - "attachInternetGateway": { - "name": "AttachInternetGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InternetGatewayId": { - "required": true - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "attachNetworkInterface": { - "name": "AttachNetworkInterface", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceId": { - "required": true - }, - "InstanceId": { - "required": true - }, - "DeviceIndex": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - } - } - } - }, - "attachVolume": { - "name": "AttachVolume", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - }, - "InstanceId": { - "required": true - }, - "Device": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "instanceId": { - "name": "InstanceId" - }, - "device": { - "name": "Device" - }, - "status": { - "name": "State" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "attachment" - } - }, - "attachVpnGateway": { - "name": "AttachVpnGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnGatewayId": { - "required": true - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "attachment": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - } - }, - "name": "VpcAttachment" - } - } - } - }, - "authorizeSecurityGroupEgress": { - "name": "AuthorizeSecurityGroupEgress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupId": { - "required": true - }, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "UserIdGroupPairs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "GroupName": {}, - "GroupId": {} - }, - "name": "Groups" - }, - "flattened": true - }, - "IpRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CidrIp": {} - } - }, - "flattened": true - } - } - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "authorizeSecurityGroupIngress": { - "name": "AuthorizeSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {}, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "UserIdGroupPairs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "GroupName": {}, - "GroupId": {} - }, - "name": "Groups" - }, - "flattened": true - }, - "IpRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CidrIp": {} - } - }, - "flattened": true - } - } - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "bundleInstance": { - "name": "BundleInstance", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - }, - "Storage": { - "type": "structure", - "members": { - "S3": { - "type": "structure", - "members": { - "Bucket": {}, - "Prefix": {}, - "AWSAccessKeyId": {}, - "UploadPolicy": { - "type": "base64" - }, - "UploadPolicySignature": {} - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "bundleInstanceTask": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "bundleId": { - "name": "BundleId" - }, - "state": { - "name": "State" - }, - "startTime": { - "type": "timestamp", - "name": "StartTime" - }, - "updateTime": { - "type": "timestamp", - "name": "UpdateTime" - }, - "storage": { - "type": "structure", - "members": { - "S3": { - "type": "structure", - "members": { - "bucket": { - "name": "Bucket" - }, - "prefix": { - "name": "Prefix" - }, - "AWSAccessKeyId": {}, - "uploadPolicy": { - "name": "UploadPolicy" - }, - "uploadPolicySignature": { - "name": "UploadPolicySignature" - } - } - } - }, - "name": "Storage" - }, - "progress": { - "name": "Progress" - }, - "error": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "BundleTaskError" - } - }, - "name": "BundleTask" - } - } - } - }, - "cancelBundleTask": { - "name": "CancelBundleTask", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "BundleId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "bundleInstanceTask": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "bundleId": { - "name": "BundleId" - }, - "state": { - "name": "State" - }, - "startTime": { - "type": "timestamp", - "name": "StartTime" - }, - "updateTime": { - "type": "timestamp", - "name": "UpdateTime" - }, - "storage": { - "type": "structure", - "members": { - "S3": { - "type": "structure", - "members": { - "bucket": { - "name": "Bucket" - }, - "prefix": { - "name": "Prefix" - }, - "AWSAccessKeyId": {}, - "uploadPolicy": { - "name": "UploadPolicy" - }, - "uploadPolicySignature": { - "name": "UploadPolicySignature" - } - } - } - }, - "name": "Storage" - }, - "progress": { - "name": "Progress" - }, - "error": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "BundleTaskError" - } - }, - "name": "BundleTask" - } - } - } - }, - "cancelConversionTask": { - "name": "CancelConversionTask", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ConversionTaskId": { - "required": true - }, - "ReasonMessage": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "cancelExportTask": { - "name": "CancelExportTask", - "input": { - "type": "structure", - "members": { - "ExportTaskId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "cancelReservedInstancesListing": { - "name": "CancelReservedInstancesListing", - "input": { - "type": "structure", - "members": { - "ReservedInstancesListingId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesListingsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesListingId": { - "name": "ReservedInstancesListingId" - }, - "reservedInstancesId": { - "name": "ReservedInstancesId" - }, - "createDate": { - "type": "timestamp", - "name": "CreateDate" - }, - "updateDate": { - "type": "timestamp", - "name": "UpdateDate" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "instanceCounts": { - "type": "list", - "members": { - "type": "structure", - "members": { - "state": { - "name": "State" - }, - "instanceCount": { - "type": "integer", - "name": "InstanceCount" - } - }, - "name": "item" - }, - "name": "InstanceCounts" - }, - "priceSchedules": { - "type": "list", - "members": { - "type": "structure", - "members": { - "term": { - "type": "integer", - "name": "Term" - }, - "price": { - "type": "float", - "name": "Price" - }, - "currencyCode": { - "name": "CurrencyCode" - }, - "active": { - "type": "boolean", - "name": "Active" - } - }, - "name": "item" - }, - "name": "PriceSchedules" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "clientToken": { - "name": "ClientToken" - } - }, - "name": "item" - }, - "name": "ReservedInstancesListings" - } - } - } - }, - "cancelSpotInstanceRequests": { - "name": "CancelSpotInstanceRequests", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SpotInstanceRequestIds": { - "type": "list", - "members": { - "name": "SpotInstanceRequestId" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "spotInstanceRequestSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "spotInstanceRequestId": { - "name": "SpotInstanceRequestId" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "CancelledSpotInstanceRequests" - } - } - } - }, - "confirmProductInstance": { - "name": "ConfirmProductInstance", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ProductCode": { - "required": true - }, - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ownerId": { - "name": "OwnerId" - } - } - } - }, - "copyImage": { - "name": "CopyImage", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SourceRegion": { - "required": true - }, - "SourceImageId": { - "required": true - }, - "Name": { - "required": true - }, - "Description": {}, - "ClientToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - } - } - } - }, - "copySnapshot": { - "name": "CopySnapshot", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SourceRegion": { - "required": true - }, - "SourceSnapshotId": { - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - } - } - } - }, - "createCustomerGateway": { - "name": "CreateCustomerGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Type": { - "required": true - }, - "PublicIp": { - "required": true, - "name": "IpAddress" - }, - "BgpAsn": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "customerGateway": { - "type": "structure", - "members": { - "customerGatewayId": { - "name": "CustomerGatewayId" - }, - "state": { - "name": "State" - }, - "type": { - "name": "Type" - }, - "ipAddress": { - "name": "IpAddress" - }, - "bgpAsn": { - "name": "BgpAsn" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "CustomerGateway" - } - } - } - }, - "createDhcpOptions": { - "name": "CreateDhcpOptions", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "DhcpConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "DhcpConfiguration" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "dhcpOptions": { - "type": "structure", - "members": { - "dhcpOptionsId": { - "name": "DhcpOptionsId" - }, - "dhcpConfigurationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "valueSet": { - "type": "list", - "members": { - "name": "item" - }, - "name": "Values" - } - }, - "name": "item" - }, - "name": "DhcpConfigurations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "DhcpOptions" - } - } - } - }, - "createImage": { - "name": "CreateImage", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - }, - "Name": { - "required": true - }, - "Description": {}, - "NoReboot": { - "type": "boolean" - }, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": {} - }, - "name": "BlockDeviceMapping" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - } - } - } - }, - "createInstanceExportTask": { - "name": "CreateInstanceExportTask", - "input": { - "type": "structure", - "members": { - "Description": {}, - "InstanceId": { - "required": true - }, - "TargetEnvironment": {}, - "ExportToS3Task": { - "type": "structure", - "members": { - "DiskImageFormat": {}, - "ContainerFormat": {}, - "S3Bucket": {}, - "S3Prefix": {} - }, - "name": "ExportToS3" - } - } - }, - "output": { - "type": "structure", - "members": { - "exportTask": { - "type": "structure", - "members": { - "exportTaskId": { - "name": "ExportTaskId" - }, - "description": { - "name": "Description" - }, - "state": { - "name": "State" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "instanceExport": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "targetEnvironment": { - "name": "TargetEnvironment" - } - }, - "name": "InstanceExportDetails" - }, - "exportToS3": { - "type": "structure", - "members": { - "diskImageFormat": { - "name": "DiskImageFormat" - }, - "containerFormat": { - "name": "ContainerFormat" - }, - "s3Bucket": { - "name": "S3Bucket" - }, - "s3Key": { - "name": "S3Key" - } - }, - "name": "ExportToS3Task" - } - }, - "name": "ExportTask" - } - } - } - }, - "createInternetGateway": { - "name": "CreateInternetGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "internetGateway": { - "type": "structure", - "members": { - "internetGatewayId": { - "name": "InternetGatewayId" - }, - "attachmentSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "Attachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "InternetGateway" - } - } - } - }, - "createKeyPair": { - "name": "CreateKeyPair", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "KeyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "keyName": { - "name": "KeyName" - }, - "keyFingerprint": { - "name": "KeyFingerprint" - }, - "keyMaterial": { - "name": "KeyMaterial" - } - } - } - }, - "createNetworkAcl": { - "name": "CreateNetworkAcl", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "networkAcl": { - "type": "structure", - "members": { - "networkAclId": { - "name": "NetworkAclId" - }, - "vpcId": { - "name": "VpcId" - }, - "default": { - "type": "boolean", - "name": "IsDefault" - }, - "entrySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ruleNumber": { - "type": "integer", - "name": "RuleNumber" - }, - "protocol": { - "name": "Protocol" - }, - "ruleAction": { - "name": "RuleAction" - }, - "egress": { - "type": "boolean", - "name": "Egress" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "icmpTypeCode": { - "type": "structure", - "members": { - "type": { - "type": "integer", - "name": "Type" - }, - "code": { - "type": "integer", - "name": "Code" - } - }, - "name": "IcmpTypeCode" - }, - "portRange": { - "type": "structure", - "members": { - "from": { - "type": "integer", - "name": "From" - }, - "to": { - "type": "integer", - "name": "To" - } - }, - "name": "PortRange" - } - }, - "name": "item" - }, - "name": "Entries" - }, - "associationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkAclAssociationId": { - "name": "NetworkAclAssociationId" - }, - "networkAclId": { - "name": "NetworkAclId" - }, - "subnetId": { - "name": "SubnetId" - } - }, - "name": "item" - }, - "name": "Associations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "NetworkAcl" - } - } - } - }, - "createNetworkAclEntry": { - "name": "CreateNetworkAclEntry", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkAclId": { - "required": true - }, - "RuleNumber": { - "type": "integer", - "required": true - }, - "Protocol": { - "required": true - }, - "RuleAction": { - "required": true - }, - "Egress": { - "type": "boolean", - "required": true - }, - "CidrBlock": { - "required": true - }, - "IcmpTypeCode": { - "type": "structure", - "members": { - "Type": { - "type": "integer" - }, - "Code": { - "type": "integer" - } - }, - "name": "Icmp" - }, - "PortRange": { - "type": "structure", - "members": { - "From": { - "type": "integer" - }, - "To": { - "type": "integer" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createNetworkInterface": { - "name": "CreateNetworkInterface", - "input": { - "type": "structure", - "members": { - "SubnetId": { - "required": true - }, - "Description": {}, - "PrivateIpAddress": {}, - "Groups": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "PrivateIpAddresses": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PrivateIpAddress": { - "required": true - }, - "Primary": { - "type": "boolean" - } - } - }, - "flattened": true - }, - "SecondaryPrivateIpAddressCount": { - "type": "integer" - }, - "DryRun": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "networkInterface": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "description": { - "name": "Description" - }, - "ownerId": { - "name": "OwnerId" - }, - "requesterId": { - "name": "RequesterId" - }, - "requesterManaged": { - "type": "boolean", - "name": "RequesterManaged" - }, - "status": { - "name": "Status" - }, - "macAddress": { - "name": "MacAddress" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "attachment": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - }, - "instanceId": { - "name": "InstanceId" - }, - "instanceOwnerId": { - "name": "InstanceOwnerId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Attachment" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "ipOwnerId": { - "name": "IpOwnerId" - }, - "allocationId": { - "name": "AllocationId" - }, - "associationId": { - "name": "AssociationId" - } - }, - "name": "Association" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "TagSet" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "primary": { - "type": "boolean", - "name": "Primary" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "ipOwnerId": { - "name": "IpOwnerId" - }, - "allocationId": { - "name": "AllocationId" - }, - "associationId": { - "name": "AssociationId" - } - }, - "name": "Association" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - } - }, - "name": "NetworkInterface" - } - } - } - }, - "createPlacementGroup": { - "name": "CreatePlacementGroup", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": { - "required": true - }, - "Strategy": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createReservedInstancesListing": { - "name": "CreateReservedInstancesListing", - "input": { - "type": "structure", - "members": { - "ReservedInstancesId": { - "required": true - }, - "InstanceCount": { - "type": "integer", - "required": true - }, - "PriceSchedules": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Term": { - "type": "integer" - }, - "Price": { - "type": "float" - }, - "CurrencyCode": {} - } - }, - "required": true, - "flattened": true - }, - "ClientToken": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesListingsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesListingId": { - "name": "ReservedInstancesListingId" - }, - "reservedInstancesId": { - "name": "ReservedInstancesId" - }, - "createDate": { - "type": "timestamp", - "name": "CreateDate" - }, - "updateDate": { - "type": "timestamp", - "name": "UpdateDate" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "instanceCounts": { - "type": "list", - "members": { - "type": "structure", - "members": { - "state": { - "name": "State" - }, - "instanceCount": { - "type": "integer", - "name": "InstanceCount" - } - }, - "name": "item" - }, - "name": "InstanceCounts" - }, - "priceSchedules": { - "type": "list", - "members": { - "type": "structure", - "members": { - "term": { - "type": "integer", - "name": "Term" - }, - "price": { - "type": "float", - "name": "Price" - }, - "currencyCode": { - "name": "CurrencyCode" - }, - "active": { - "type": "boolean", - "name": "Active" - } - }, - "name": "item" - }, - "name": "PriceSchedules" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "clientToken": { - "name": "ClientToken" - } - }, - "name": "item" - }, - "name": "ReservedInstancesListings" - } - } - } - }, - "createRoute": { - "name": "CreateRoute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RouteTableId": { - "required": true - }, - "DestinationCidrBlock": { - "required": true - }, - "GatewayId": {}, - "InstanceId": {}, - "NetworkInterfaceId": {}, - "VpcPeeringConnectionId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createRouteTable": { - "name": "CreateRouteTable", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "routeTable": { - "type": "structure", - "members": { - "routeTableId": { - "name": "RouteTableId" - }, - "vpcId": { - "name": "VpcId" - }, - "routeSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "destinationCidrBlock": { - "name": "DestinationCidrBlock" - }, - "gatewayId": { - "name": "GatewayId" - }, - "instanceId": { - "name": "InstanceId" - }, - "instanceOwnerId": { - "name": "InstanceOwnerId" - }, - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "vpcPeeringConnectionId": { - "name": "VpcPeeringConnectionId" - }, - "state": { - "name": "State" - }, - "origin": { - "name": "Origin" - } - }, - "name": "item" - }, - "name": "Routes" - }, - "associationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "routeTableAssociationId": { - "name": "RouteTableAssociationId" - }, - "routeTableId": { - "name": "RouteTableId" - }, - "subnetId": { - "name": "SubnetId" - }, - "main": { - "type": "boolean", - "name": "Main" - } - }, - "name": "item" - }, - "name": "Associations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "propagatingVgwSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "gatewayId": { - "name": "GatewayId" - } - }, - "name": "item" - }, - "name": "PropagatingVgws" - } - }, - "name": "RouteTable" - } - } - } - }, - "createSecurityGroup": { - "name": "CreateSecurityGroup", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": { - "required": true - }, - "Description": { - "required": true, - "name": "GroupDescription" - }, - "VpcId": {} - } - }, - "output": { - "type": "structure", - "members": { - "groupId": { - "name": "GroupId" - } - } - } - }, - "createSnapshot": { - "name": "CreateSnapshot", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeId": { - "name": "VolumeId" - }, - "status": { - "name": "State" - }, - "startTime": { - "type": "timestamp", - "name": "StartTime" - }, - "progress": { - "name": "Progress" - }, - "ownerId": { - "name": "OwnerId" - }, - "description": { - "name": "Description" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "ownerAlias": { - "name": "OwnerAlias" - } - }, - "name": "snapshot" - } - }, - "createSpotDatafeedSubscription": { - "name": "CreateSpotDatafeedSubscription", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Bucket": { - "required": true - }, - "Prefix": {} - } - }, - "output": { - "type": "structure", - "members": { - "spotDatafeedSubscription": { - "type": "structure", - "members": { - "ownerId": { - "name": "OwnerId" - }, - "bucket": { - "name": "Bucket" - }, - "prefix": { - "name": "Prefix" - }, - "state": { - "name": "State" - }, - "fault": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Fault" - } - }, - "name": "SpotDatafeedSubscription" - } - } - } - }, - "createSubnet": { - "name": "CreateSubnet", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": { - "required": true - }, - "CidrBlock": { - "required": true - }, - "AvailabilityZone": {} - } - }, - "output": { - "type": "structure", - "members": { - "subnet": { - "type": "structure", - "members": { - "subnetId": { - "name": "SubnetId" - }, - "state": { - "name": "State" - }, - "vpcId": { - "name": "VpcId" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "availableIpAddressCount": { - "type": "integer", - "name": "AvailableIpAddressCount" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "defaultForAz": { - "type": "boolean", - "name": "DefaultForAz" - }, - "mapPublicIpOnLaunch": { - "type": "boolean", - "name": "MapPublicIpOnLaunch" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "Subnet" - } - } - } - }, - "createTags": { - "name": "CreateTags", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Resources": { - "type": "list", - "members": { - "name": "ResourceId" - }, - "required": true, - "flattened": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createVolume": { - "name": "CreateVolume", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Size": { - "type": "integer" - }, - "SnapshotId": {}, - "AvailabilityZone": { - "required": true - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "snapshotId": { - "name": "SnapshotId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "status": { - "name": "State" - }, - "createTime": { - "type": "timestamp", - "name": "CreateTime" - }, - "attachmentSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "instanceId": { - "name": "InstanceId" - }, - "device": { - "name": "Device" - }, - "status": { - "name": "State" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "item" - }, - "name": "Attachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "volume" - } - }, - "createVpc": { - "name": "CreateVpc", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "CidrBlock": { - "required": true - }, - "InstanceTenancy": {} - } - }, - "output": { - "type": "structure", - "members": { - "vpc": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "dhcpOptionsId": { - "name": "DhcpOptionsId" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "instanceTenancy": { - "name": "InstanceTenancy" - }, - "isDefault": { - "type": "boolean", - "name": "IsDefault" - } - }, - "name": "Vpc" - } - } - } - }, - "createVpcPeeringConnection": { - "name": "CreateVpcPeeringConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": {}, - "PeerVpcId": {}, - "PeerOwnerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "vpcPeeringConnection": { - "type": "structure", - "members": { - "accepterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "AccepterVpcInfo" - }, - "expirationTime": { - "type": "timestamp", - "name": "ExpirationTime" - }, - "requesterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "RequesterVpcInfo" - }, - "status": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Status" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "vpcPeeringConnectionId": { - "name": "VpcPeeringConnectionId" - } - }, - "name": "VpcPeeringConnection" - } - } - } - }, - "createVpnConnection": { - "name": "CreateVpnConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Type": { - "required": true - }, - "CustomerGatewayId": { - "required": true - }, - "VpnGatewayId": { - "required": true - }, - "Options": { - "type": "structure", - "members": { - "StaticRoutesOnly": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "vpnConnection": { - "type": "structure", - "members": { - "vpnConnectionId": { - "name": "VpnConnectionId" - }, - "state": { - "name": "State" - }, - "customerGatewayConfiguration": { - "name": "CustomerGatewayConfiguration" - }, - "type": { - "name": "Type" - }, - "customerGatewayId": { - "name": "CustomerGatewayId" - }, - "vpnGatewayId": { - "name": "VpnGatewayId" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "vgwTelemetry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "outsideIpAddress": { - "name": "OutsideIpAddress" - }, - "status": { - "name": "Status" - }, - "lastStatusChange": { - "type": "timestamp", - "name": "LastStatusChange" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "acceptedRouteCount": { - "type": "integer", - "name": "AcceptedRouteCount" - } - }, - "name": "item" - }, - "name": "VgwTelemetry" - }, - "options": { - "type": "structure", - "members": { - "staticRoutesOnly": { - "type": "boolean", - "name": "StaticRoutesOnly" - } - }, - "name": "Options" - }, - "routes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "destinationCidrBlock": { - "name": "DestinationCidrBlock" - }, - "source": { - "name": "Source" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "Routes" - } - }, - "name": "VpnConnection" - } - } - } - }, - "createVpnConnectionRoute": { - "name": "CreateVpnConnectionRoute", - "input": { - "type": "structure", - "members": { - "VpnConnectionId": { - "required": true - }, - "DestinationCidrBlock": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createVpnGateway": { - "name": "CreateVpnGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Type": { - "required": true - }, - "AvailabilityZone": {} - } - }, - "output": { - "type": "structure", - "members": { - "vpnGateway": { - "type": "structure", - "members": { - "vpnGatewayId": { - "name": "VpnGatewayId" - }, - "state": { - "name": "State" - }, - "type": { - "name": "Type" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "attachments": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "VpcAttachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "VpnGateway" - } - } - } - }, - "deleteCustomerGateway": { - "name": "DeleteCustomerGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "CustomerGatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteDhcpOptions": { - "name": "DeleteDhcpOptions", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "DhcpOptionsId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteInternetGateway": { - "name": "DeleteInternetGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InternetGatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteKeyPair": { - "name": "DeleteKeyPair", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "KeyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteNetworkAcl": { - "name": "DeleteNetworkAcl", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkAclId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteNetworkAclEntry": { - "name": "DeleteNetworkAclEntry", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkAclId": { - "required": true - }, - "RuleNumber": { - "type": "integer", - "required": true - }, - "Egress": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteNetworkInterface": { - "name": "DeleteNetworkInterface", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deletePlacementGroup": { - "name": "DeletePlacementGroup", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteRoute": { - "name": "DeleteRoute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RouteTableId": { - "required": true - }, - "DestinationCidrBlock": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteRouteTable": { - "name": "DeleteRouteTable", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RouteTableId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSecurityGroup": { - "name": "DeleteSecurityGroup", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSnapshot": { - "name": "DeleteSnapshot", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SnapshotId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSpotDatafeedSubscription": { - "name": "DeleteSpotDatafeedSubscription", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSubnet": { - "name": "DeleteSubnet", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SubnetId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteTags": { - "name": "DeleteTags", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Resources": { - "type": "list", - "members": { - "name": "ResourceId" - }, - "required": true, - "flattened": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVolume": { - "name": "DeleteVolume", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVpc": { - "name": "DeleteVpc", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVpcPeeringConnection": { - "name": "DeleteVpcPeeringConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcPeeringConnectionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "return": { - "type": "boolean", - "name": "Return" - } - } - } - }, - "deleteVpnConnection": { - "name": "DeleteVpnConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnConnectionId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVpnConnectionRoute": { - "name": "DeleteVpnConnectionRoute", - "input": { - "type": "structure", - "members": { - "VpnConnectionId": { - "required": true - }, - "DestinationCidrBlock": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVpnGateway": { - "name": "DeleteVpnGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnGatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deregisterImage": { - "name": "DeregisterImage", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeAccountAttributes": { - "name": "DescribeAccountAttributes", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AttributeNames": { - "type": "list", - "members": { - "name": "AttributeName" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "accountAttributeSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "attributeName": { - "name": "AttributeName" - }, - "attributeValueSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "attributeValue": { - "name": "AttributeValue" - } - }, - "name": "item" - }, - "name": "AttributeValues" - } - }, - "name": "item" - }, - "name": "AccountAttributes" - } - } - } - }, - "describeAddresses": { - "name": "DescribeAddresses", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "PublicIps": { - "type": "list", - "members": { - "name": "PublicIp" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "AllocationIds": { - "type": "list", - "members": { - "name": "AllocationId" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "addressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "publicIp": { - "name": "PublicIp" - }, - "allocationId": { - "name": "AllocationId" - }, - "associationId": { - "name": "AssociationId" - }, - "domain": { - "name": "Domain" - }, - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "networkInterfaceOwnerId": { - "name": "NetworkInterfaceOwnerId" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - } - }, - "name": "item" - }, - "name": "Addresses" - } - } - } - }, - "describeAvailabilityZones": { - "name": "DescribeAvailabilityZones", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ZoneNames": { - "type": "list", - "members": { - "name": "ZoneName" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "availabilityZoneInfo": { - "type": "list", - "members": { - "type": "structure", - "members": { - "zoneName": { - "name": "ZoneName" - }, - "zoneState": { - "name": "State" - }, - "regionName": { - "name": "RegionName" - }, - "messageSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "message": { - "name": "Message" - } - }, - "name": "item" - }, - "name": "Messages" - } - }, - "name": "item" - }, - "name": "AvailabilityZones" - } - } - } - }, - "describeBundleTasks": { - "name": "DescribeBundleTasks", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "BundleIds": { - "type": "list", - "members": { - "name": "BundleId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "bundleInstanceTasksSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "bundleId": { - "name": "BundleId" - }, - "state": { - "name": "State" - }, - "startTime": { - "type": "timestamp", - "name": "StartTime" - }, - "updateTime": { - "type": "timestamp", - "name": "UpdateTime" - }, - "storage": { - "type": "structure", - "members": { - "S3": { - "type": "structure", - "members": { - "bucket": { - "name": "Bucket" - }, - "prefix": { - "name": "Prefix" - }, - "AWSAccessKeyId": {}, - "uploadPolicy": { - "name": "UploadPolicy" - }, - "uploadPolicySignature": { - "name": "UploadPolicySignature" - } - } - } - }, - "name": "Storage" - }, - "progress": { - "name": "Progress" - }, - "error": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "BundleTaskError" - } - }, - "name": "item" - }, - "name": "BundleTasks" - } - } - } - }, - "describeConversionTasks": { - "name": "DescribeConversionTasks", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "ConversionTaskIds": { - "type": "list", - "members": { - "name": "ConversionTaskId" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "conversionTasks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "conversionTaskId": { - "name": "ConversionTaskId" - }, - "expirationTime": { - "name": "ExpirationTime" - }, - "importInstance": { - "type": "structure", - "members": { - "volumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "description": { - "name": "Description" - } - }, - "name": "item" - }, - "name": "Volumes" - }, - "instanceId": { - "name": "InstanceId" - }, - "platform": { - "name": "Platform" - }, - "description": { - "name": "Description" - } - }, - "name": "ImportInstance" - }, - "importVolume": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "description": { - "name": "Description" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - } - }, - "name": "ImportVolume" - }, - "state": { - "name": "State" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "ConversionTasks" - } - } - } - }, - "describeCustomerGateways": { - "name": "DescribeCustomerGateways", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "CustomerGatewayIds": { - "type": "list", - "members": { - "name": "CustomerGatewayId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "customerGatewaySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "customerGatewayId": { - "name": "CustomerGatewayId" - }, - "state": { - "name": "State" - }, - "type": { - "name": "Type" - }, - "ipAddress": { - "name": "IpAddress" - }, - "bgpAsn": { - "name": "BgpAsn" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "CustomerGateways" - } - } - } - }, - "describeDhcpOptions": { - "name": "DescribeDhcpOptions", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "DhcpOptionsIds": { - "type": "list", - "members": { - "name": "DhcpOptionsId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "dhcpOptionsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "dhcpOptionsId": { - "name": "DhcpOptionsId" - }, - "dhcpConfigurationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "valueSet": { - "type": "list", - "members": { - "name": "item" - }, - "name": "Values" - } - }, - "name": "item" - }, - "name": "DhcpConfigurations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "DhcpOptions" - } - } - } - }, - "describeExportTasks": { - "name": "DescribeExportTasks", - "input": { - "type": "structure", - "members": { - "ExportTaskIds": { - "type": "list", - "members": { - "name": "ExportTaskId" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "exportTaskSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "exportTaskId": { - "name": "ExportTaskId" - }, - "description": { - "name": "Description" - }, - "state": { - "name": "State" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "instanceExport": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "targetEnvironment": { - "name": "TargetEnvironment" - } - }, - "name": "InstanceExportDetails" - }, - "exportToS3": { - "type": "structure", - "members": { - "diskImageFormat": { - "name": "DiskImageFormat" - }, - "containerFormat": { - "name": "ContainerFormat" - }, - "s3Bucket": { - "name": "S3Bucket" - }, - "s3Key": { - "name": "S3Key" - } - }, - "name": "ExportToS3Task" - } - }, - "name": "item" - }, - "name": "ExportTasks" - } - } - } - }, - "describeImageAttribute": { - "name": "DescribeImageAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - }, - "launchPermission": { - "type": "list", - "members": { - "type": "structure", - "members": { - "userId": { - "name": "UserId" - }, - "group": { - "name": "Group" - } - }, - "name": "item" - }, - "name": "LaunchPermissions" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - }, - "kernel": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "KernelId" - }, - "ramdisk": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "RamdiskId" - }, - "description": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "Description" - }, - "sriovNetSupport": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "SriovNetSupport" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "virtualName": { - "name": "VirtualName" - }, - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "Ebs" - }, - "noDevice": { - "name": "NoDevice" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - } - }, - "name": "imageAttribute" - } - }, - "describeImages": { - "name": "DescribeImages", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageIds": { - "type": "list", - "members": { - "name": "ImageId" - }, - "flattened": true - }, - "Owners": { - "type": "list", - "members": { - "name": "Owner" - }, - "flattened": true - }, - "ExecutableUsers": { - "type": "list", - "members": { - "name": "ExecutableBy" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "imagesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - }, - "imageLocation": { - "name": "ImageLocation" - }, - "imageState": { - "name": "State" - }, - "imageOwnerId": { - "name": "OwnerId" - }, - "isPublic": { - "type": "boolean", - "name": "Public" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - }, - "architecture": { - "name": "Architecture" - }, - "imageType": { - "name": "ImageType" - }, - "kernelId": { - "name": "KernelId" - }, - "ramdiskId": { - "name": "RamdiskId" - }, - "platform": { - "name": "Platform" - }, - "sriovNetSupport": { - "name": "SriovNetSupport" - }, - "stateReason": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "StateReason" - }, - "imageOwnerAlias": { - "name": "ImageOwnerAlias" - }, - "name": { - "name": "Name" - }, - "description": { - "name": "Description" - }, - "rootDeviceType": { - "name": "RootDeviceType" - }, - "rootDeviceName": { - "name": "RootDeviceName" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "virtualName": { - "name": "VirtualName" - }, - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "Ebs" - }, - "noDevice": { - "name": "NoDevice" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "virtualizationType": { - "name": "VirtualizationType" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "hypervisor": { - "name": "Hypervisor" - } - }, - "name": "item" - }, - "name": "Images" - } - } - } - }, - "describeInstanceAttribute": { - "name": "DescribeInstanceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "instanceType": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "InstanceType" - }, - "kernel": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "KernelId" - }, - "ramdisk": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "RamdiskId" - }, - "userData": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "UserData" - }, - "disableApiTermination": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "DisableApiTermination" - }, - "instanceInitiatedShutdownBehavior": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "InstanceInitiatedShutdownBehavior" - }, - "rootDeviceName": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "RootDeviceName" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Ebs" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - }, - "ebsOptimized": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "EbsOptimized" - }, - "sriovNetSupport": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "SriovNetSupport" - } - } - } - }, - "describeInstanceStatus": { - "name": "DescribeInstanceStatus", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - }, - "IncludeAllInstances": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "instanceStatusSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "eventsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "description": { - "name": "Description" - }, - "notBefore": { - "type": "timestamp", - "name": "NotBefore" - }, - "notAfter": { - "type": "timestamp", - "name": "NotAfter" - } - }, - "name": "item" - }, - "name": "Events" - }, - "instanceState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "InstanceState" - }, - "systemStatus": { - "type": "structure", - "members": { - "status": { - "name": "Status" - }, - "details": { - "type": "list", - "members": { - "type": "structure", - "members": { - "name": { - "name": "Name" - }, - "status": { - "name": "Status" - }, - "impairedSince": { - "type": "timestamp", - "name": "ImpairedSince" - } - }, - "name": "item" - }, - "name": "Details" - } - }, - "name": "SystemStatus" - }, - "instanceStatus": { - "type": "structure", - "members": { - "status": { - "name": "Status" - }, - "details": { - "type": "list", - "members": { - "type": "structure", - "members": { - "name": { - "name": "Name" - }, - "status": { - "name": "Status" - }, - "impairedSince": { - "type": "timestamp", - "name": "ImpairedSince" - } - }, - "name": "item" - }, - "name": "Details" - } - }, - "name": "InstanceStatus" - } - }, - "name": "item" - }, - "name": "InstanceStatuses" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeInstances": { - "name": "DescribeInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "reservationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservationId": { - "name": "ReservationId" - }, - "ownerId": { - "name": "OwnerId" - }, - "requesterId": { - "name": "RequesterId" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "imageId": { - "name": "ImageId" - }, - "instanceState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "State" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "dnsName": { - "name": "PublicDnsName" - }, - "reason": { - "name": "StateTransitionReason" - }, - "keyName": { - "name": "KeyName" - }, - "amiLaunchIndex": { - "type": "integer", - "name": "AmiLaunchIndex" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - }, - "instanceType": { - "name": "InstanceType" - }, - "launchTime": { - "type": "timestamp", - "name": "LaunchTime" - }, - "placement": { - "type": "structure", - "members": { - "availabilityZone": { - "name": "AvailabilityZone" - }, - "groupName": { - "name": "GroupName" - }, - "tenancy": { - "name": "Tenancy" - } - }, - "name": "Placement" - }, - "kernelId": { - "name": "KernelId" - }, - "ramdiskId": { - "name": "RamdiskId" - }, - "platform": { - "name": "Platform" - }, - "monitoring": { - "type": "structure", - "members": { - "state": { - "name": "State" - } - }, - "name": "Monitoring" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "ipAddress": { - "name": "PublicIpAddress" - }, - "stateReason": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "StateReason" - }, - "architecture": { - "name": "Architecture" - }, - "rootDeviceType": { - "name": "RootDeviceType" - }, - "rootDeviceName": { - "name": "RootDeviceName" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Ebs" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "virtualizationType": { - "name": "VirtualizationType" - }, - "instanceLifecycle": { - "name": "InstanceLifecycle" - }, - "spotInstanceRequestId": { - "name": "SpotInstanceRequestId" - }, - "clientToken": { - "name": "ClientToken" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "SecurityGroups" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "hypervisor": { - "name": "Hypervisor" - }, - "networkInterfaceSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "description": { - "name": "Description" - }, - "ownerId": { - "name": "OwnerId" - }, - "status": { - "name": "Status" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "attachment": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Attachment" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "publicDnsName": { - "name": "PublicDnsName" - }, - "ipOwnerId": { - "name": "IpOwnerId" - } - }, - "name": "Association" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "primary": { - "type": "boolean", - "name": "Primary" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "publicDnsName": { - "name": "PublicDnsName" - }, - "ipOwnerId": { - "name": "IpOwnerId" - } - }, - "name": "Association" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - } - }, - "name": "item" - }, - "name": "NetworkInterfaces" - }, - "iamInstanceProfile": { - "type": "structure", - "members": { - "arn": { - "name": "Arn" - }, - "id": { - "name": "Id" - } - }, - "name": "IamInstanceProfile" - }, - "ebsOptimized": { - "type": "boolean", - "name": "EbsOptimized" - }, - "sriovNetSupport": { - "name": "SriovNetSupport" - } - }, - "name": "item" - }, - "name": "Instances" - } - }, - "name": "item" - }, - "name": "Reservations" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeInternetGateways": { - "name": "DescribeInternetGateways", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InternetGatewayIds": { - "type": "list", - "members": { - "name": "InternetGatewayId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "internetGatewaySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "internetGatewayId": { - "name": "InternetGatewayId" - }, - "attachmentSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "Attachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "InternetGateways" - } - } - } - }, - "describeKeyPairs": { - "name": "DescribeKeyPairs", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "KeyNames": { - "type": "list", - "members": { - "name": "KeyName" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "keySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "keyName": { - "name": "KeyName" - }, - "keyFingerprint": { - "name": "KeyFingerprint" - } - }, - "name": "item" - }, - "name": "KeyPairs" - } - } - } - }, - "describeNetworkAcls": { - "name": "DescribeNetworkAcls", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkAclIds": { - "type": "list", - "members": { - "name": "NetworkAclId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "networkAclSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkAclId": { - "name": "NetworkAclId" - }, - "vpcId": { - "name": "VpcId" - }, - "default": { - "type": "boolean", - "name": "IsDefault" - }, - "entrySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ruleNumber": { - "type": "integer", - "name": "RuleNumber" - }, - "protocol": { - "name": "Protocol" - }, - "ruleAction": { - "name": "RuleAction" - }, - "egress": { - "type": "boolean", - "name": "Egress" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "icmpTypeCode": { - "type": "structure", - "members": { - "type": { - "type": "integer", - "name": "Type" - }, - "code": { - "type": "integer", - "name": "Code" - } - }, - "name": "IcmpTypeCode" - }, - "portRange": { - "type": "structure", - "members": { - "from": { - "type": "integer", - "name": "From" - }, - "to": { - "type": "integer", - "name": "To" - } - }, - "name": "PortRange" - } - }, - "name": "item" - }, - "name": "Entries" - }, - "associationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkAclAssociationId": { - "name": "NetworkAclAssociationId" - }, - "networkAclId": { - "name": "NetworkAclId" - }, - "subnetId": { - "name": "SubnetId" - } - }, - "name": "item" - }, - "name": "Associations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "NetworkAcls" - } - } - } - }, - "describeNetworkInterfaceAttribute": { - "name": "DescribeNetworkInterfaceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceId": { - "required": true - }, - "Description": {}, - "SourceDestCheck": {}, - "Groups": { - "name": "GroupSet" - }, - "Attachment": {} - } - }, - "output": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "description": { - "type": "structure", - "members": { - "value": { - "name": "Value" - } - }, - "name": "Description" - }, - "sourceDestCheck": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "SourceDestCheck" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "attachment": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - }, - "instanceId": { - "name": "InstanceId" - }, - "instanceOwnerId": { - "name": "InstanceOwnerId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Attachment" - } - } - } - }, - "describeNetworkInterfaces": { - "name": "DescribeNetworkInterfaces", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceIds": { - "type": "list", - "members": { - "name": "NetworkInterfaceId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "networkInterfaceSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "description": { - "name": "Description" - }, - "ownerId": { - "name": "OwnerId" - }, - "requesterId": { - "name": "RequesterId" - }, - "requesterManaged": { - "type": "boolean", - "name": "RequesterManaged" - }, - "status": { - "name": "Status" - }, - "macAddress": { - "name": "MacAddress" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "attachment": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - }, - "instanceId": { - "name": "InstanceId" - }, - "instanceOwnerId": { - "name": "InstanceOwnerId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Attachment" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "ipOwnerId": { - "name": "IpOwnerId" - }, - "allocationId": { - "name": "AllocationId" - }, - "associationId": { - "name": "AssociationId" - } - }, - "name": "Association" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "TagSet" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "primary": { - "type": "boolean", - "name": "Primary" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "ipOwnerId": { - "name": "IpOwnerId" - }, - "allocationId": { - "name": "AllocationId" - }, - "associationId": { - "name": "AssociationId" - } - }, - "name": "Association" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - } - }, - "name": "item" - }, - "name": "NetworkInterfaces" - } - } - } - }, - "describePlacementGroups": { - "name": "DescribePlacementGroups", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupNames": { - "type": "list", - "members": { - "name": "GroupName" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "placementGroupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "strategy": { - "name": "Strategy" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "PlacementGroups" - } - } - } - }, - "describeRegions": { - "name": "DescribeRegions", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RegionNames": { - "type": "list", - "members": { - "name": "RegionName" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "regionInfo": { - "type": "list", - "members": { - "type": "structure", - "members": { - "regionName": { - "name": "RegionName" - }, - "regionEndpoint": { - "name": "Endpoint" - } - }, - "name": "item" - }, - "name": "Regions" - } - } - } - }, - "describeReservedInstances": { - "name": "DescribeReservedInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ReservedInstancesIds": { - "type": "list", - "members": { - "name": "ReservedInstancesId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "OfferingType": {} - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesId": { - "name": "ReservedInstancesId" - }, - "instanceType": { - "name": "InstanceType" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "start": { - "type": "timestamp", - "name": "Start" - }, - "end": { - "type": "timestamp", - "name": "End" - }, - "duration": { - "type": "integer", - "name": "Duration" - }, - "usagePrice": { - "type": "float", - "name": "UsagePrice" - }, - "fixedPrice": { - "type": "float", - "name": "FixedPrice" - }, - "instanceCount": { - "type": "integer", - "name": "InstanceCount" - }, - "productDescription": { - "name": "ProductDescription" - }, - "state": { - "name": "State" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "instanceTenancy": { - "name": "InstanceTenancy" - }, - "currencyCode": { - "name": "CurrencyCode" - }, - "offeringType": { - "name": "OfferingType" - }, - "recurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "frequency": { - "name": "Frequency" - }, - "amount": { - "type": "float", - "name": "Amount" - } - }, - "name": "item" - }, - "name": "RecurringCharges" - } - }, - "name": "item" - }, - "name": "ReservedInstances" - } - } - } - }, - "describeReservedInstancesListings": { - "name": "DescribeReservedInstancesListings", - "input": { - "type": "structure", - "members": { - "ReservedInstancesId": {}, - "ReservedInstancesListingId": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - } - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesListingsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesListingId": { - "name": "ReservedInstancesListingId" - }, - "reservedInstancesId": { - "name": "ReservedInstancesId" - }, - "createDate": { - "type": "timestamp", - "name": "CreateDate" - }, - "updateDate": { - "type": "timestamp", - "name": "UpdateDate" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "instanceCounts": { - "type": "list", - "members": { - "type": "structure", - "members": { - "state": { - "name": "State" - }, - "instanceCount": { - "type": "integer", - "name": "InstanceCount" - } - }, - "name": "item" - }, - "name": "InstanceCounts" - }, - "priceSchedules": { - "type": "list", - "members": { - "type": "structure", - "members": { - "term": { - "type": "integer", - "name": "Term" - }, - "price": { - "type": "float", - "name": "Price" - }, - "currencyCode": { - "name": "CurrencyCode" - }, - "active": { - "type": "boolean", - "name": "Active" - } - }, - "name": "item" - }, - "name": "PriceSchedules" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "clientToken": { - "name": "ClientToken" - } - }, - "name": "item" - }, - "name": "ReservedInstancesListings" - } - } - } - }, - "describeReservedInstancesModifications": { - "name": "DescribeReservedInstancesModifications", - "input": { - "type": "structure", - "members": { - "ReservedInstancesModificationIds": { - "type": "list", - "members": { - "name": "ReservedInstancesModificationId" - }, - "flattened": true - }, - "NextToken": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesModificationsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesModificationId": { - "name": "ReservedInstancesModificationId" - }, - "reservedInstancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesId": { - "name": "ReservedInstancesId" - } - }, - "name": "item" - }, - "name": "ReservedInstancesIds" - }, - "modificationResultSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesId": { - "name": "ReservedInstancesId" - }, - "targetConfiguration": { - "type": "structure", - "members": { - "availabilityZone": { - "name": "AvailabilityZone" - }, - "platform": { - "name": "Platform" - }, - "instanceCount": { - "type": "integer", - "name": "InstanceCount" - }, - "instanceType": { - "name": "InstanceType" - } - }, - "name": "TargetConfiguration" - } - }, - "name": "item" - }, - "name": "ModificationResults" - }, - "createDate": { - "type": "timestamp", - "name": "CreateDate" - }, - "updateDate": { - "type": "timestamp", - "name": "UpdateDate" - }, - "effectiveDate": { - "type": "timestamp", - "name": "EffectiveDate" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "clientToken": { - "name": "ClientToken" - } - }, - "name": "item" - }, - "name": "ReservedInstancesModifications" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeReservedInstancesOfferings": { - "name": "DescribeReservedInstancesOfferings", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ReservedInstancesOfferingIds": { - "type": "list", - "members": { - "name": "ReservedInstancesOfferingId" - }, - "flattened": true - }, - "InstanceType": {}, - "AvailabilityZone": {}, - "ProductDescription": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "InstanceTenancy": {}, - "OfferingType": {}, - "NextToken": {}, - "MaxResults": { - "type": "integer" - }, - "IncludeMarketplace": { - "type": "boolean" - }, - "MinDuration": { - "type": "integer" - }, - "MaxDuration": { - "type": "integer" - }, - "MaxInstanceCount": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesOfferingsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "reservedInstancesOfferingId": { - "name": "ReservedInstancesOfferingId" - }, - "instanceType": { - "name": "InstanceType" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "duration": { - "type": "integer", - "name": "Duration" - }, - "usagePrice": { - "type": "float", - "name": "UsagePrice" - }, - "fixedPrice": { - "type": "float", - "name": "FixedPrice" - }, - "productDescription": { - "name": "ProductDescription" - }, - "instanceTenancy": { - "name": "InstanceTenancy" - }, - "currencyCode": { - "name": "CurrencyCode" - }, - "offeringType": { - "name": "OfferingType" - }, - "recurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "frequency": { - "name": "Frequency" - }, - "amount": { - "type": "float", - "name": "Amount" - } - }, - "name": "item" - }, - "name": "RecurringCharges" - }, - "marketplace": { - "type": "boolean", - "name": "Marketplace" - }, - "pricingDetailsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "price": { - "type": "float", - "name": "Price" - }, - "count": { - "type": "integer", - "name": "Count" - } - }, - "name": "item" - }, - "name": "PricingDetails" - } - }, - "name": "item" - }, - "name": "ReservedInstancesOfferings" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeRouteTables": { - "name": "DescribeRouteTables", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RouteTableIds": { - "type": "list", - "members": { - "name": "RouteTableId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "routeTableSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "routeTableId": { - "name": "RouteTableId" - }, - "vpcId": { - "name": "VpcId" - }, - "routeSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "destinationCidrBlock": { - "name": "DestinationCidrBlock" - }, - "gatewayId": { - "name": "GatewayId" - }, - "instanceId": { - "name": "InstanceId" - }, - "instanceOwnerId": { - "name": "InstanceOwnerId" - }, - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "vpcPeeringConnectionId": { - "name": "VpcPeeringConnectionId" - }, - "state": { - "name": "State" - }, - "origin": { - "name": "Origin" - } - }, - "name": "item" - }, - "name": "Routes" - }, - "associationSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "routeTableAssociationId": { - "name": "RouteTableAssociationId" - }, - "routeTableId": { - "name": "RouteTableId" - }, - "subnetId": { - "name": "SubnetId" - }, - "main": { - "type": "boolean", - "name": "Main" - } - }, - "name": "item" - }, - "name": "Associations" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "propagatingVgwSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "gatewayId": { - "name": "GatewayId" - } - }, - "name": "item" - }, - "name": "PropagatingVgws" - } - }, - "name": "item" - }, - "name": "RouteTables" - } - } - } - }, - "describeSecurityGroups": { - "name": "DescribeSecurityGroups", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupNames": { - "type": "list", - "members": { - "name": "GroupName" - }, - "flattened": true - }, - "GroupIds": { - "type": "list", - "members": { - "name": "GroupId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "securityGroupInfo": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ownerId": { - "name": "OwnerId" - }, - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - }, - "groupDescription": { - "name": "Description" - }, - "ipPermissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ipProtocol": { - "name": "IpProtocol" - }, - "fromPort": { - "type": "integer", - "name": "FromPort" - }, - "toPort": { - "type": "integer", - "name": "ToPort" - }, - "groups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "userId": { - "name": "UserId" - }, - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "UserIdGroupPairs" - }, - "ipRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidrIp": { - "name": "CidrIp" - } - }, - "name": "item" - }, - "name": "IpRanges" - } - }, - "name": "item" - }, - "name": "IpPermissions" - }, - "ipPermissionsEgress": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ipProtocol": { - "name": "IpProtocol" - }, - "fromPort": { - "type": "integer", - "name": "FromPort" - }, - "toPort": { - "type": "integer", - "name": "ToPort" - }, - "groups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "userId": { - "name": "UserId" - }, - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "UserIdGroupPairs" - }, - "ipRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "cidrIp": { - "name": "CidrIp" - } - }, - "name": "item" - }, - "name": "IpRanges" - } - }, - "name": "item" - }, - "name": "IpPermissionsEgress" - }, - "vpcId": { - "name": "VpcId" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "SecurityGroups" - } - } - } - }, - "describeSnapshotAttribute": { - "name": "DescribeSnapshotAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SnapshotId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "createVolumePermission": { - "type": "list", - "members": { - "type": "structure", - "members": { - "userId": { - "name": "UserId" - }, - "group": { - "name": "Group" - } - }, - "name": "item" - }, - "name": "CreateVolumePermissions" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - } - } - } - }, - "describeSnapshots": { - "name": "DescribeSnapshots", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SnapshotIds": { - "type": "list", - "members": { - "name": "SnapshotId" - }, - "flattened": true - }, - "OwnerIds": { - "type": "list", - "members": { - "name": "Owner" - }, - "flattened": true - }, - "RestorableByUserIds": { - "type": "list", - "members": { - "name": "RestorableBy" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "snapshotSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeId": { - "name": "VolumeId" - }, - "status": { - "name": "State" - }, - "startTime": { - "type": "timestamp", - "name": "StartTime" - }, - "progress": { - "name": "Progress" - }, - "ownerId": { - "name": "OwnerId" - }, - "description": { - "name": "Description" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "ownerAlias": { - "name": "OwnerAlias" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "Snapshots" - } - } - } - }, - "describeSpotDatafeedSubscription": { - "name": "DescribeSpotDatafeedSubscription", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "spotDatafeedSubscription": { - "type": "structure", - "members": { - "ownerId": { - "name": "OwnerId" - }, - "bucket": { - "name": "Bucket" - }, - "prefix": { - "name": "Prefix" - }, - "state": { - "name": "State" - }, - "fault": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Fault" - } - }, - "name": "SpotDatafeedSubscription" - } - } - } - }, - "describeSpotInstanceRequests": { - "name": "DescribeSpotInstanceRequests", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SpotInstanceRequestIds": { - "type": "list", - "members": { - "name": "SpotInstanceRequestId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "spotInstanceRequestSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "spotInstanceRequestId": { - "name": "SpotInstanceRequestId" - }, - "spotPrice": { - "name": "SpotPrice" - }, - "type": { - "name": "Type" - }, - "state": { - "name": "State" - }, - "fault": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Fault" - }, - "status": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "updateTime": { - "type": "timestamp", - "name": "UpdateTime" - }, - "message": { - "name": "Message" - } - }, - "name": "Status" - }, - "validFrom": { - "type": "timestamp", - "name": "ValidFrom" - }, - "validUntil": { - "type": "timestamp", - "name": "ValidUntil" - }, - "launchGroup": { - "name": "LaunchGroup" - }, - "availabilityZoneGroup": { - "name": "AvailabilityZoneGroup" - }, - "launchSpecification": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - }, - "keyName": { - "name": "KeyName" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "SecurityGroups" - }, - "userData": { - "name": "UserData" - }, - "addressingType": { - "name": "AddressingType" - }, - "instanceType": { - "name": "InstanceType" - }, - "placement": { - "type": "structure", - "members": { - "availabilityZone": { - "name": "AvailabilityZone" - }, - "groupName": { - "name": "GroupName" - } - }, - "name": "Placement" - }, - "kernelId": { - "name": "KernelId" - }, - "ramdiskId": { - "name": "RamdiskId" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "virtualName": { - "name": "VirtualName" - }, - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "Ebs" - }, - "noDevice": { - "name": "NoDevice" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "monitoringEnabled": { - "type": "boolean", - "name": "MonitoringEnabled" - }, - "subnetId": { - "name": "SubnetId" - }, - "networkInterfaceSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "subnetId": { - "name": "SubnetId" - }, - "description": { - "name": "Description" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "SecurityGroupId": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "name": "Groups" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "primary": { - "type": "boolean", - "name": "Primary" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - }, - "secondaryPrivateIpAddressCount": { - "type": "integer", - "name": "SecondaryPrivateIpAddressCount" - }, - "associatePublicIpAddress": { - "type": "boolean", - "name": "AssociatePublicIpAddress" - } - }, - "name": "item" - }, - "name": "NetworkInterfaces" - }, - "iamInstanceProfile": { - "type": "structure", - "members": { - "arn": { - "name": "Arn" - }, - "name": { - "name": "Name" - } - }, - "name": "IamInstanceProfile" - }, - "ebsOptimized": { - "type": "boolean", - "name": "EbsOptimized" - } - }, - "name": "LaunchSpecification" - }, - "instanceId": { - "name": "InstanceId" - }, - "createTime": { - "type": "timestamp", - "name": "CreateTime" - }, - "productDescription": { - "name": "ProductDescription" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "launchedAvailabilityZone": { - "name": "LaunchedAvailabilityZone" - } - }, - "name": "item" - }, - "name": "SpotInstanceRequests" - } - } - } - }, - "describeSpotPriceHistory": { - "name": "DescribeSpotPriceHistory", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "InstanceTypes": { - "type": "list", - "members": { - "name": "InstanceType" - }, - "flattened": true - }, - "ProductDescriptions": { - "type": "list", - "members": { - "name": "ProductDescription" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "AvailabilityZone": {}, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "spotPriceHistorySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceType": { - "name": "InstanceType" - }, - "productDescription": { - "name": "ProductDescription" - }, - "spotPrice": { - "name": "SpotPrice" - }, - "timestamp": { - "type": "timestamp", - "name": "Timestamp" - }, - "availabilityZone": { - "name": "AvailabilityZone" - } - }, - "name": "item" - }, - "name": "SpotPriceHistory" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeSubnets": { - "name": "DescribeSubnets", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "subnetSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "subnetId": { - "name": "SubnetId" - }, - "state": { - "name": "State" - }, - "vpcId": { - "name": "VpcId" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "availableIpAddressCount": { - "type": "integer", - "name": "AvailableIpAddressCount" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "defaultForAz": { - "type": "boolean", - "name": "DefaultForAz" - }, - "mapPublicIpOnLaunch": { - "type": "boolean", - "name": "MapPublicIpOnLaunch" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "Subnets" - } - } - } - }, - "describeTags": { - "name": "DescribeTags", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "MaxResults": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "resourceId": { - "name": "ResourceId" - }, - "resourceType": { - "name": "ResourceType" - }, - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeVolumeAttribute": { - "name": "DescribeVolumeAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - }, - "Attribute": {} - } - }, - "output": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "autoEnableIO": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "AutoEnableIO" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - } - } - } - }, - "describeVolumeStatus": { - "name": "DescribeVolumeStatus", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeIds": { - "type": "list", - "members": { - "name": "VolumeId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - }, - "NextToken": {}, - "MaxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "volumeStatusSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "volumeStatus": { - "type": "structure", - "members": { - "status": { - "name": "Status" - }, - "details": { - "type": "list", - "members": { - "type": "structure", - "members": { - "name": { - "name": "Name" - }, - "status": { - "name": "Status" - } - }, - "name": "item" - }, - "name": "Details" - } - }, - "name": "VolumeStatus" - }, - "eventsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "eventType": { - "name": "EventType" - }, - "description": { - "name": "Description" - }, - "notBefore": { - "type": "timestamp", - "name": "NotBefore" - }, - "notAfter": { - "type": "timestamp", - "name": "NotAfter" - }, - "eventId": { - "name": "EventId" - } - }, - "name": "item" - }, - "name": "Events" - }, - "actionsSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "description": { - "name": "Description" - }, - "eventType": { - "name": "EventType" - }, - "eventId": { - "name": "EventId" - } - }, - "name": "item" - }, - "name": "Actions" - } - }, - "name": "item" - }, - "name": "VolumeStatuses" - }, - "nextToken": { - "name": "NextToken" - } - } - } - }, - "describeVolumes": { - "name": "DescribeVolumes", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeIds": { - "type": "list", - "members": { - "name": "VolumeId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "volumeSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "snapshotId": { - "name": "SnapshotId" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "status": { - "name": "State" - }, - "createTime": { - "type": "timestamp", - "name": "CreateTime" - }, - "attachmentSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "instanceId": { - "name": "InstanceId" - }, - "device": { - "name": "Device" - }, - "status": { - "name": "State" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "item" - }, - "name": "Attachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "item" - }, - "name": "Volumes" - } - } - } - }, - "describeVpcAttribute": { - "name": "DescribeVpcAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcId": { - "required": true - }, - "Attribute": {} - } - }, - "output": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "enableDnsSupport": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "EnableDnsSupport" - }, - "enableDnsHostnames": { - "type": "structure", - "members": { - "value": { - "type": "boolean", - "name": "Value" - } - }, - "name": "EnableDnsHostnames" - } - } - } - }, - "describeVpcPeeringConnections": { - "name": "DescribeVpcPeeringConnections", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcPeeringConnectionIds": { - "type": "list", - "members": { - "name": "VpcPeeringConnectionId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "vpcPeeringConnectionSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "accepterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "AccepterVpcInfo" - }, - "expirationTime": { - "type": "timestamp", - "name": "ExpirationTime" - }, - "requesterVpcInfo": { - "type": "structure", - "members": { - "cidrBlock": { - "name": "CidrBlock" - }, - "ownerId": { - "name": "OwnerId" - }, - "vpcId": { - "name": "VpcId" - } - }, - "name": "RequesterVpcInfo" - }, - "status": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Status" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "vpcPeeringConnectionId": { - "name": "VpcPeeringConnectionId" - } - }, - "name": "item" - }, - "name": "VpcPeeringConnections" - } - } - } - }, - "describeVpcs": { - "name": "DescribeVpcs", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcIds": { - "type": "list", - "members": { - "name": "VpcId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "vpcSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - }, - "cidrBlock": { - "name": "CidrBlock" - }, - "dhcpOptionsId": { - "name": "DhcpOptionsId" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "instanceTenancy": { - "name": "InstanceTenancy" - }, - "isDefault": { - "type": "boolean", - "name": "IsDefault" - } - }, - "name": "item" - }, - "name": "Vpcs" - } - } - } - }, - "describeVpnConnections": { - "name": "DescribeVpnConnections", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnConnectionIds": { - "type": "list", - "members": { - "name": "VpnConnectionId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "vpnConnectionSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpnConnectionId": { - "name": "VpnConnectionId" - }, - "state": { - "name": "State" - }, - "customerGatewayConfiguration": { - "name": "CustomerGatewayConfiguration" - }, - "type": { - "name": "Type" - }, - "customerGatewayId": { - "name": "CustomerGatewayId" - }, - "vpnGatewayId": { - "name": "VpnGatewayId" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "vgwTelemetry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "outsideIpAddress": { - "name": "OutsideIpAddress" - }, - "status": { - "name": "Status" - }, - "lastStatusChange": { - "type": "timestamp", - "name": "LastStatusChange" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "acceptedRouteCount": { - "type": "integer", - "name": "AcceptedRouteCount" - } - }, - "name": "item" - }, - "name": "VgwTelemetry" - }, - "options": { - "type": "structure", - "members": { - "staticRoutesOnly": { - "type": "boolean", - "name": "StaticRoutesOnly" - } - }, - "name": "Options" - }, - "routes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "destinationCidrBlock": { - "name": "DestinationCidrBlock" - }, - "source": { - "name": "Source" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "Routes" - } - }, - "name": "item" - }, - "name": "VpnConnections" - } - } - } - }, - "describeVpnGateways": { - "name": "DescribeVpnGateways", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnGatewayIds": { - "type": "list", - "members": { - "name": "VpnGatewayId" - }, - "flattened": true - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Values": { - "type": "list", - "members": { - "name": "Value" - }, - "flattened": true - } - }, - "name": "Filter" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "vpnGatewaySet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpnGatewayId": { - "name": "VpnGatewayId" - }, - "state": { - "name": "State" - }, - "type": { - "name": "Type" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "attachments": { - "type": "list", - "members": { - "type": "structure", - "members": { - "vpcId": { - "name": "VpcId" - }, - "state": { - "name": "State" - } - }, - "name": "item" - }, - "name": "VpcAttachments" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "item" - }, - "name": "VpnGateways" - } - } - } - }, - "detachInternetGateway": { - "name": "DetachInternetGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InternetGatewayId": { - "required": true - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "detachNetworkInterface": { - "name": "DetachNetworkInterface", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AttachmentId": { - "required": true - }, - "Force": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "detachVolume": { - "name": "DetachVolume", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - }, - "InstanceId": {}, - "Device": {}, - "Force": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "instanceId": { - "name": "InstanceId" - }, - "device": { - "name": "Device" - }, - "status": { - "name": "State" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "attachment" - } - }, - "detachVpnGateway": { - "name": "DetachVpnGateway", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpnGatewayId": { - "required": true - }, - "VpcId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "disableVgwRoutePropagation": { - "name": "DisableVgwRoutePropagation", - "input": { - "type": "structure", - "members": { - "RouteTableId": { - "required": true - }, - "GatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "disassociateAddress": { - "name": "DisassociateAddress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "PublicIp": {}, - "AssociationId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "disassociateRouteTable": { - "name": "DisassociateRouteTable", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AssociationId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "enableVgwRoutePropagation": { - "name": "EnableVgwRoutePropagation", - "input": { - "type": "structure", - "members": { - "RouteTableId": { - "required": true - }, - "GatewayId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "enableVolumeIO": { - "name": "EnableVolumeIO", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getConsoleOutput": { - "name": "GetConsoleOutput", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "timestamp": { - "type": "timestamp", - "name": "Timestamp" - }, - "output": { - "name": "Output" - } - } - } - }, - "getPasswordData": { - "name": "GetPasswordData", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "timestamp": { - "type": "timestamp", - "name": "Timestamp" - }, - "passwordData": { - "name": "PasswordData" - } - } - } - }, - "importInstance": { - "name": "ImportInstance", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Description": {}, - "LaunchSpecification": { - "type": "structure", - "members": { - "Architecture": {}, - "GroupNames": { - "type": "list", - "members": { - "name": "GroupName" - }, - "flattened": true - }, - "AdditionalInfo": {}, - "UserData": {}, - "InstanceType": {}, - "Placement": { - "type": "structure", - "members": { - "AvailabilityZone": {}, - "GroupName": {}, - "Tenancy": {} - } - }, - "Monitoring": { - "type": "boolean" - }, - "SubnetId": {}, - "InstanceInitiatedShutdownBehavior": {}, - "PrivateIpAddress": {} - } - }, - "DiskImages": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Image": { - "type": "structure", - "members": { - "Format": { - "required": true - }, - "Bytes": { - "type": "integer", - "required": true - }, - "ImportManifestUrl": { - "required": true - } - } - }, - "Description": {}, - "Volume": { - "type": "structure", - "members": { - "Size": { - "type": "integer", - "required": true - } - } - } - }, - "name": "DiskImage" - }, - "flattened": true - }, - "Platform": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "conversionTask": { - "type": "structure", - "members": { - "conversionTaskId": { - "name": "ConversionTaskId" - }, - "expirationTime": { - "name": "ExpirationTime" - }, - "importInstance": { - "type": "structure", - "members": { - "volumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "description": { - "name": "Description" - } - }, - "name": "item" - }, - "name": "Volumes" - }, - "instanceId": { - "name": "InstanceId" - }, - "platform": { - "name": "Platform" - }, - "description": { - "name": "Description" - } - }, - "name": "ImportInstance" - }, - "importVolume": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "description": { - "name": "Description" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - } - }, - "name": "ImportVolume" - }, - "state": { - "name": "State" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "ConversionTask" - } - } - } - }, - "importKeyPair": { - "name": "ImportKeyPair", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "KeyName": { - "required": true - }, - "PublicKeyMaterial": { - "type": "base64", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "keyName": { - "name": "KeyName" - }, - "keyFingerprint": { - "name": "KeyFingerprint" - } - } - } - }, - "importVolume": { - "name": "ImportVolume", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AvailabilityZone": {}, - "Image": { - "type": "structure", - "members": { - "Format": { - "required": true - }, - "Bytes": { - "type": "integer", - "required": true - }, - "ImportManifestUrl": { - "required": true - } - } - }, - "Description": {}, - "Volume": { - "type": "structure", - "members": { - "Size": { - "type": "integer", - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "conversionTask": { - "type": "structure", - "members": { - "conversionTaskId": { - "name": "ConversionTaskId" - }, - "expirationTime": { - "name": "ExpirationTime" - }, - "importInstance": { - "type": "structure", - "members": { - "volumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - }, - "status": { - "name": "Status" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "description": { - "name": "Description" - } - }, - "name": "item" - }, - "name": "Volumes" - }, - "instanceId": { - "name": "InstanceId" - }, - "platform": { - "name": "Platform" - }, - "description": { - "name": "Description" - } - }, - "name": "ImportInstance" - }, - "importVolume": { - "type": "structure", - "members": { - "bytesConverted": { - "type": "integer", - "name": "BytesConverted" - }, - "availabilityZone": { - "name": "AvailabilityZone" - }, - "description": { - "name": "Description" - }, - "image": { - "type": "structure", - "members": { - "format": { - "name": "Format" - }, - "size": { - "type": "integer", - "name": "Size" - }, - "importManifestUrl": { - "name": "ImportManifestUrl" - }, - "checksum": { - "name": "Checksum" - } - }, - "name": "Image" - }, - "volume": { - "type": "structure", - "members": { - "size": { - "type": "integer", - "name": "Size" - }, - "id": { - "name": "Id" - } - }, - "name": "Volume" - } - }, - "name": "ImportVolume" - }, - "state": { - "name": "State" - }, - "statusMessage": { - "name": "StatusMessage" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - } - }, - "name": "ConversionTask" - } - } - } - }, - "modifyImageAttribute": { - "name": "ModifyImageAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageId": { - "required": true - }, - "Attribute": {}, - "OperationType": {}, - "UserIds": { - "type": "list", - "members": { - "name": "UserId" - }, - "flattened": true - }, - "UserGroups": { - "type": "list", - "members": { - "name": "UserGroup" - }, - "flattened": true - }, - "ProductCodes": { - "type": "list", - "members": { - "name": "ProductCode" - }, - "flattened": true - }, - "Value": {}, - "LaunchPermission": { - "type": "structure", - "members": { - "Add": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "Group": {} - } - }, - "flattened": true - }, - "Remove": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "Group": {} - } - }, - "flattened": true - } - } - }, - "Description": { - "type": "structure", - "members": { - "Value": {} - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "modifyInstanceAttribute": { - "name": "ModifyInstanceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - }, - "Attribute": {}, - "Value": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "VolumeId": {}, - "DeleteOnTermination": { - "type": "boolean" - } - } - }, - "VirtualName": {}, - "NoDevice": {} - }, - "name": "BlockDeviceMapping" - }, - "flattened": true - }, - "SourceDestCheck": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - }, - "DisableApiTermination": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - }, - "InstanceType": { - "type": "structure", - "members": { - "Value": {} - } - }, - "Kernel": { - "type": "structure", - "members": { - "Value": {} - } - }, - "Ramdisk": { - "type": "structure", - "members": { - "Value": {} - } - }, - "UserData": { - "type": "structure", - "members": { - "Value": { - "type": "base64" - } - } - }, - "InstanceInitiatedShutdownBehavior": { - "type": "structure", - "members": { - "Value": {} - } - }, - "Groups": { - "type": "list", - "members": { - "name": "GroupId" - }, - "flattened": true - }, - "EbsOptimized": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - }, - "SriovNetSupport": { - "type": "structure", - "members": { - "Value": {} - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "modifyNetworkInterfaceAttribute": { - "name": "ModifyNetworkInterfaceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceId": { - "required": true - }, - "Description": { - "type": "structure", - "members": { - "Value": {} - } - }, - "SourceDestCheck": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - }, - "Groups": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "Attachment": { - "type": "structure", - "members": { - "AttachmentId": {}, - "DeleteOnTermination": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "modifyReservedInstances": { - "name": "ModifyReservedInstances", - "input": { - "type": "structure", - "members": { - "ClientToken": {}, - "ReservedInstancesIds": { - "type": "list", - "members": { - "name": "ReservedInstancesId" - }, - "required": true, - "flattened": true - }, - "TargetConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AvailabilityZone": {}, - "Platform": {}, - "InstanceCount": { - "type": "integer" - }, - "InstanceType": {} - }, - "name": "ReservedInstancesConfigurationSetItemType" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesModificationId": { - "name": "ReservedInstancesModificationId" - } - } - } - }, - "modifySnapshotAttribute": { - "name": "ModifySnapshotAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SnapshotId": { - "required": true - }, - "Attribute": {}, - "OperationType": {}, - "UserIds": { - "type": "list", - "members": { - "name": "UserId" - }, - "flattened": true - }, - "GroupNames": { - "type": "list", - "members": { - "name": "UserGroup" - }, - "flattened": true - }, - "CreateVolumePermission": { - "type": "structure", - "members": { - "Add": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "Group": {} - } - }, - "flattened": true - }, - "Remove": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "Group": {} - } - }, - "flattened": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "modifyVolumeAttribute": { - "name": "ModifyVolumeAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VolumeId": { - "required": true - }, - "AutoEnableIO": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "modifyVpcAttribute": { - "name": "ModifyVpcAttribute", - "input": { - "type": "structure", - "members": { - "VpcId": { - "required": true - }, - "EnableDnsSupport": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - }, - "EnableDnsHostnames": { - "type": "structure", - "members": { - "Value": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "monitorInstances": { - "name": "MonitorInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "monitoring": { - "type": "structure", - "members": { - "state": { - "name": "State" - } - }, - "name": "Monitoring" - } - }, - "name": "item" - }, - "name": "InstanceMonitorings" - } - } - } - }, - "purchaseReservedInstancesOffering": { - "name": "PurchaseReservedInstancesOffering", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ReservedInstancesOfferingId": { - "required": true - }, - "InstanceCount": { - "type": "integer", - "required": true - }, - "LimitPrice": { - "type": "structure", - "members": { - "Amount": { - "type": "float" - }, - "CurrencyCode": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "reservedInstancesId": { - "name": "ReservedInstancesId" - } - } - } - }, - "rebootInstances": { - "name": "RebootInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "registerImage": { - "name": "RegisterImage", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageLocation": {}, - "Name": {}, - "Description": {}, - "Architecture": {}, - "KernelId": {}, - "RamdiskId": {}, - "RootDeviceName": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": {} - }, - "name": "BlockDeviceMapping" - }, - "flattened": true - }, - "VirtualizationType": {}, - "SriovNetSupport": {} - } - }, - "output": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - } - } - } - }, - "rejectVpcPeeringConnection": { - "name": "RejectVpcPeeringConnection", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "VpcPeeringConnectionId": {} - } - }, - "output": { - "type": "structure", - "members": { - "return": { - "type": "boolean", - "name": "Return" - } - } - } - }, - "releaseAddress": { - "name": "ReleaseAddress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "PublicIp": {}, - "AllocationId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "replaceNetworkAclAssociation": { - "name": "ReplaceNetworkAclAssociation", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AssociationId": { - "required": true - }, - "NetworkAclId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "newAssociationId": { - "name": "NewAssociationId" - } - } - } - }, - "replaceNetworkAclEntry": { - "name": "ReplaceNetworkAclEntry", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkAclId": { - "required": true - }, - "RuleNumber": { - "type": "integer", - "required": true - }, - "Protocol": { - "required": true - }, - "RuleAction": { - "required": true - }, - "Egress": { - "type": "boolean", - "required": true - }, - "CidrBlock": { - "required": true - }, - "IcmpTypeCode": { - "type": "structure", - "members": { - "Type": { - "type": "integer" - }, - "Code": { - "type": "integer" - } - }, - "name": "Icmp" - }, - "PortRange": { - "type": "structure", - "members": { - "From": { - "type": "integer" - }, - "To": { - "type": "integer" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "replaceRoute": { - "name": "ReplaceRoute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "RouteTableId": { - "required": true - }, - "DestinationCidrBlock": { - "required": true - }, - "GatewayId": {}, - "InstanceId": {}, - "NetworkInterfaceId": {}, - "VpcPeeringConnectionId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "replaceRouteTableAssociation": { - "name": "ReplaceRouteTableAssociation", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "AssociationId": { - "required": true - }, - "RouteTableId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "newAssociationId": { - "name": "NewAssociationId" - } - } - } - }, - "reportInstanceStatus": { - "name": "ReportInstanceStatus", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "Instances": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "flattened": true - }, - "Status": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "ReasonCodes": { - "type": "list", - "members": { - "name": "ReasonCode" - }, - "flattened": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "requestSpotInstances": { - "name": "RequestSpotInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SpotPrice": { - "required": true - }, - "InstanceCount": { - "type": "integer" - }, - "Type": {}, - "ValidFrom": { - "type": "timestamp" - }, - "ValidUntil": { - "type": "timestamp" - }, - "LaunchGroup": {}, - "AvailabilityZoneGroup": {}, - "LaunchSpecification": { - "type": "structure", - "members": { - "ImageId": {}, - "KeyName": {}, - "UserData": {}, - "AddressingType": {}, - "InstanceType": {}, - "Placement": { - "type": "structure", - "members": { - "AvailabilityZone": {}, - "GroupName": {} - } - }, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": {} - }, - "name": "BlockDeviceMapping" - }, - "flattened": true - }, - "Monitoring": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - } - } - }, - "SubnetId": {}, - "NetworkInterfaces": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NetworkInterfaceId": {}, - "DeviceIndex": { - "type": "integer" - }, - "SubnetId": {}, - "Description": {}, - "PrivateIpAddress": {}, - "Groups": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "PrivateIpAddresses": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PrivateIpAddress": { - "required": true - }, - "Primary": { - "type": "boolean" - } - } - }, - "flattened": true - }, - "SecondaryPrivateIpAddressCount": { - "type": "integer" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - } - }, - "name": "NetworkInterface" - }, - "flattened": true - }, - "IamInstanceProfile": { - "type": "structure", - "members": { - "Arn": {}, - "Name": {} - } - }, - "EbsOptimized": { - "type": "boolean" - }, - "SecurityGroupIds": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "SecurityGroups": { - "type": "list", - "members": { - "name": "SecurityGroup" - }, - "flattened": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "spotInstanceRequestSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "spotInstanceRequestId": { - "name": "SpotInstanceRequestId" - }, - "spotPrice": { - "name": "SpotPrice" - }, - "type": { - "name": "Type" - }, - "state": { - "name": "State" - }, - "fault": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "Fault" - }, - "status": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "updateTime": { - "type": "timestamp", - "name": "UpdateTime" - }, - "message": { - "name": "Message" - } - }, - "name": "Status" - }, - "validFrom": { - "type": "timestamp", - "name": "ValidFrom" - }, - "validUntil": { - "type": "timestamp", - "name": "ValidUntil" - }, - "launchGroup": { - "name": "LaunchGroup" - }, - "availabilityZoneGroup": { - "name": "AvailabilityZoneGroup" - }, - "launchSpecification": { - "type": "structure", - "members": { - "imageId": { - "name": "ImageId" - }, - "keyName": { - "name": "KeyName" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "SecurityGroups" - }, - "userData": { - "name": "UserData" - }, - "addressingType": { - "name": "AddressingType" - }, - "instanceType": { - "name": "InstanceType" - }, - "placement": { - "type": "structure", - "members": { - "availabilityZone": { - "name": "AvailabilityZone" - }, - "groupName": { - "name": "GroupName" - } - }, - "name": "Placement" - }, - "kernelId": { - "name": "KernelId" - }, - "ramdiskId": { - "name": "RamdiskId" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "virtualName": { - "name": "VirtualName" - }, - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "snapshotId": { - "name": "SnapshotId" - }, - "volumeSize": { - "type": "integer", - "name": "VolumeSize" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "volumeType": { - "name": "VolumeType" - }, - "iops": { - "type": "integer", - "name": "Iops" - } - }, - "name": "Ebs" - }, - "noDevice": { - "name": "NoDevice" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "monitoringEnabled": { - "type": "boolean", - "name": "MonitoringEnabled" - }, - "subnetId": { - "name": "SubnetId" - }, - "networkInterfaceSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "subnetId": { - "name": "SubnetId" - }, - "description": { - "name": "Description" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "SecurityGroupId": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "name": "Groups" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "primary": { - "type": "boolean", - "name": "Primary" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - }, - "secondaryPrivateIpAddressCount": { - "type": "integer", - "name": "SecondaryPrivateIpAddressCount" - }, - "associatePublicIpAddress": { - "type": "boolean", - "name": "AssociatePublicIpAddress" - } - }, - "name": "item" - }, - "name": "NetworkInterfaces" - }, - "iamInstanceProfile": { - "type": "structure", - "members": { - "arn": { - "name": "Arn" - }, - "name": { - "name": "Name" - } - }, - "name": "IamInstanceProfile" - }, - "ebsOptimized": { - "type": "boolean", - "name": "EbsOptimized" - } - }, - "name": "LaunchSpecification" - }, - "instanceId": { - "name": "InstanceId" - }, - "createTime": { - "type": "timestamp", - "name": "CreateTime" - }, - "productDescription": { - "name": "ProductDescription" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "launchedAvailabilityZone": { - "name": "LaunchedAvailabilityZone" - } - }, - "name": "item" - }, - "name": "SpotInstanceRequests" - } - } - } - }, - "resetImageAttribute": { - "name": "ResetImageAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resetInstanceAttribute": { - "name": "ResetInstanceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resetNetworkInterfaceAttribute": { - "name": "ResetNetworkInterfaceAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "NetworkInterfaceId": { - "required": true - }, - "SourceDestCheck": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resetSnapshotAttribute": { - "name": "ResetSnapshotAttribute", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "SnapshotId": { - "required": true - }, - "Attribute": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "revokeSecurityGroupEgress": { - "name": "RevokeSecurityGroupEgress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupId": { - "required": true - }, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "UserIdGroupPairs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "GroupName": {}, - "GroupId": {} - }, - "name": "Groups" - }, - "flattened": true - }, - "IpRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CidrIp": {} - } - }, - "flattened": true - } - } - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "revokeSecurityGroupIngress": { - "name": "RevokeSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "GroupName": {}, - "GroupId": {}, - "SourceSecurityGroupName": {}, - "SourceSecurityGroupOwnerId": {}, - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "CidrIp": {}, - "IpPermissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IpProtocol": {}, - "FromPort": { - "type": "integer" - }, - "ToPort": { - "type": "integer" - }, - "UserIdGroupPairs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserId": {}, - "GroupName": {}, - "GroupId": {} - }, - "name": "Groups" - }, - "flattened": true - }, - "IpRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CidrIp": {} - } - }, - "flattened": true - } - } - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "runInstances": { - "name": "RunInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "ImageId": { - "required": true - }, - "MinCount": { - "type": "integer", - "required": true - }, - "MaxCount": { - "type": "integer", - "required": true - }, - "KeyName": {}, - "SecurityGroups": { - "type": "list", - "members": { - "name": "SecurityGroup" - }, - "flattened": true - }, - "SecurityGroupIds": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "UserData": {}, - "InstanceType": {}, - "Placement": { - "type": "structure", - "members": { - "AvailabilityZone": {}, - "GroupName": {}, - "Tenancy": {} - } - }, - "KernelId": {}, - "RamdiskId": {}, - "BlockDeviceMappings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VirtualName": {}, - "DeviceName": {}, - "Ebs": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeSize": { - "type": "integer" - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - }, - "NoDevice": {} - }, - "name": "BlockDeviceMapping" - }, - "flattened": true - }, - "Monitoring": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - } - } - }, - "SubnetId": {}, - "DisableApiTermination": { - "type": "boolean" - }, - "InstanceInitiatedShutdownBehavior": {}, - "PrivateIpAddress": {}, - "ClientToken": {}, - "AdditionalInfo": {}, - "NetworkInterfaces": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NetworkInterfaceId": {}, - "DeviceIndex": { - "type": "integer" - }, - "SubnetId": {}, - "Description": {}, - "PrivateIpAddress": {}, - "Groups": { - "type": "list", - "members": { - "name": "SecurityGroupId" - }, - "flattened": true - }, - "DeleteOnTermination": { - "type": "boolean" - }, - "PrivateIpAddresses": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PrivateIpAddress": { - "required": true - }, - "Primary": { - "type": "boolean" - } - } - }, - "flattened": true - }, - "SecondaryPrivateIpAddressCount": { - "type": "integer" - }, - "AssociatePublicIpAddress": { - "type": "boolean" - } - }, - "name": "NetworkInterface" - }, - "flattened": true - }, - "IamInstanceProfile": { - "type": "structure", - "members": { - "Arn": {}, - "Name": {} - } - }, - "EbsOptimized": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "reservationId": { - "name": "ReservationId" - }, - "ownerId": { - "name": "OwnerId" - }, - "requesterId": { - "name": "RequesterId" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "imageId": { - "name": "ImageId" - }, - "instanceState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "State" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "dnsName": { - "name": "PublicDnsName" - }, - "reason": { - "name": "StateTransitionReason" - }, - "keyName": { - "name": "KeyName" - }, - "amiLaunchIndex": { - "type": "integer", - "name": "AmiLaunchIndex" - }, - "productCodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "productCode": { - "name": "ProductCodeId" - }, - "type": { - "name": "ProductCodeType" - } - }, - "name": "item" - }, - "name": "ProductCodes" - }, - "instanceType": { - "name": "InstanceType" - }, - "launchTime": { - "type": "timestamp", - "name": "LaunchTime" - }, - "placement": { - "type": "structure", - "members": { - "availabilityZone": { - "name": "AvailabilityZone" - }, - "groupName": { - "name": "GroupName" - }, - "tenancy": { - "name": "Tenancy" - } - }, - "name": "Placement" - }, - "kernelId": { - "name": "KernelId" - }, - "ramdiskId": { - "name": "RamdiskId" - }, - "platform": { - "name": "Platform" - }, - "monitoring": { - "type": "structure", - "members": { - "state": { - "name": "State" - } - }, - "name": "Monitoring" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "ipAddress": { - "name": "PublicIpAddress" - }, - "stateReason": { - "type": "structure", - "members": { - "code": { - "name": "Code" - }, - "message": { - "name": "Message" - } - }, - "name": "StateReason" - }, - "architecture": { - "name": "Architecture" - }, - "rootDeviceType": { - "name": "RootDeviceType" - }, - "rootDeviceName": { - "name": "RootDeviceName" - }, - "blockDeviceMapping": { - "type": "list", - "members": { - "type": "structure", - "members": { - "deviceName": { - "name": "DeviceName" - }, - "ebs": { - "type": "structure", - "members": { - "volumeId": { - "name": "VolumeId" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Ebs" - } - }, - "name": "item" - }, - "name": "BlockDeviceMappings" - }, - "virtualizationType": { - "name": "VirtualizationType" - }, - "instanceLifecycle": { - "name": "InstanceLifecycle" - }, - "spotInstanceRequestId": { - "name": "SpotInstanceRequestId" - }, - "clientToken": { - "name": "ClientToken" - }, - "tagSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "key": { - "name": "Key" - }, - "value": { - "name": "Value" - } - }, - "name": "item" - }, - "name": "Tags" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "SecurityGroups" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "hypervisor": { - "name": "Hypervisor" - }, - "networkInterfaceSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "networkInterfaceId": { - "name": "NetworkInterfaceId" - }, - "subnetId": { - "name": "SubnetId" - }, - "vpcId": { - "name": "VpcId" - }, - "description": { - "name": "Description" - }, - "ownerId": { - "name": "OwnerId" - }, - "status": { - "name": "Status" - }, - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "sourceDestCheck": { - "type": "boolean", - "name": "SourceDestCheck" - }, - "groupSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "groupName": { - "name": "GroupName" - }, - "groupId": { - "name": "GroupId" - } - }, - "name": "item" - }, - "name": "Groups" - }, - "attachment": { - "type": "structure", - "members": { - "attachmentId": { - "name": "AttachmentId" - }, - "deviceIndex": { - "type": "integer", - "name": "DeviceIndex" - }, - "status": { - "name": "Status" - }, - "attachTime": { - "type": "timestamp", - "name": "AttachTime" - }, - "deleteOnTermination": { - "type": "boolean", - "name": "DeleteOnTermination" - } - }, - "name": "Attachment" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "publicDnsName": { - "name": "PublicDnsName" - }, - "ipOwnerId": { - "name": "IpOwnerId" - } - }, - "name": "Association" - }, - "privateIpAddressesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "privateIpAddress": { - "name": "PrivateIpAddress" - }, - "privateDnsName": { - "name": "PrivateDnsName" - }, - "primary": { - "type": "boolean", - "name": "Primary" - }, - "association": { - "type": "structure", - "members": { - "publicIp": { - "name": "PublicIp" - }, - "publicDnsName": { - "name": "PublicDnsName" - }, - "ipOwnerId": { - "name": "IpOwnerId" - } - }, - "name": "Association" - } - }, - "name": "item" - }, - "name": "PrivateIpAddresses" - } - }, - "name": "item" - }, - "name": "NetworkInterfaces" - }, - "iamInstanceProfile": { - "type": "structure", - "members": { - "arn": { - "name": "Arn" - }, - "id": { - "name": "Id" - } - }, - "name": "IamInstanceProfile" - }, - "ebsOptimized": { - "type": "boolean", - "name": "EbsOptimized" - }, - "sriovNetSupport": { - "name": "SriovNetSupport" - } - }, - "name": "item" - }, - "name": "Instances" - } - }, - "name": "reservation" - } - }, - "startInstances": { - "name": "StartInstances", - "input": { - "type": "structure", - "members": { - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - }, - "AdditionalInfo": {}, - "DryRun": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "currentState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "CurrentState" - }, - "previousState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "PreviousState" - } - }, - "name": "item" - }, - "name": "StartingInstances" - } - } - } - }, - "stopInstances": { - "name": "StopInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - }, - "Force": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "currentState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "CurrentState" - }, - "previousState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "PreviousState" - } - }, - "name": "item" - }, - "name": "StoppingInstances" - } - } - } - }, - "terminateInstances": { - "name": "TerminateInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "currentState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "CurrentState" - }, - "previousState": { - "type": "structure", - "members": { - "code": { - "type": "integer", - "name": "Code" - }, - "name": { - "name": "Name" - } - }, - "name": "PreviousState" - } - }, - "name": "item" - }, - "name": "TerminatingInstances" - } - } - } - }, - "unassignPrivateIpAddresses": { - "name": "UnassignPrivateIpAddresses", - "input": { - "type": "structure", - "members": { - "NetworkInterfaceId": { - "required": true - }, - "PrivateIpAddresses": { - "type": "list", - "members": { - "name": "PrivateIpAddress" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "unmonitorInstances": { - "name": "UnmonitorInstances", - "input": { - "type": "structure", - "members": { - "DryRun": { - "type": "boolean" - }, - "InstanceIds": { - "type": "list", - "members": { - "name": "InstanceId" - }, - "required": true, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "instancesSet": { - "type": "list", - "members": { - "type": "structure", - "members": { - "instanceId": { - "name": "InstanceId" - }, - "monitoring": { - "type": "structure", - "members": { - "state": { - "name": "State" - } - }, - "name": "Monitoring" - } - }, - "name": "item" - }, - "name": "InstanceMonitorings" - } - } - } - } - }, - "pagination": { - "describeAccountAttributes": { - "resultKey": "AccountAttributes" - }, - "describeAddresses": { - "resultKey": "Addresses" - }, - "describeAvailabilityZones": { - "resultKey": "AvailabilityZones" - }, - "describeBundleTasks": { - "resultKey": "BundleTasks" - }, - "describeConversionTasks": { - "resultKey": "ConversionTasks" - }, - "describeCustomerGateways": { - "resultKey": "CustomerGateways" - }, - "describeDhcpOptions": { - "resultKey": "DhcpOptions" - }, - "describeExportTasks": { - "resultKey": "ExportTasks" - }, - "describeImages": { - "resultKey": "Images" - }, - "describeInstanceStatus": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "InstanceStatuses" - }, - "describeInstances": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "Reservations" - }, - "describeInternetGateways": { - "resultKey": "InternetGateways" - }, - "describeKeyPairs": { - "resultKey": "KeyPairs" - }, - "describeNetworkAcls": { - "resultKey": "NetworkAcls" - }, - "describeNetworkInterfaces": { - "resultKey": "NetworkInterfaces" - }, - "describePlacementGroups": { - "resultKey": "PlacementGroups" - }, - "describeRegions": { - "resultKey": "Regions" - }, - "describeReservedInstances": { - "resultKey": "ReservedInstances" - }, - "describeReservedInstancesListings": { - "resultKey": "ReservedInstancesListings" - }, - "describeReservedInstancesModifications": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "ReservedInstancesModifications" - }, - "describeReservedInstancesOfferings": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "ReservedInstancesOfferings" - }, - "describeRouteTables": { - "resultKey": "RouteTables" - }, - "describeSecurityGroups": { - "resultKey": "SecurityGroups" - }, - "describeSnapshots": { - "resultKey": "Snapshots" - }, - "describeSpotInstanceRequests": { - "resultKey": "SpotInstanceRequests" - }, - "describeSpotPriceHistory": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "SpotPriceHistory" - }, - "describeSubnets": { - "resultKey": "Subnets" - }, - "describeTags": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "Tags" - }, - "describeVolumeStatus": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxResults", - "resultKey": "VolumeStatuses" - }, - "describeVolumes": { - "resultKey": "Volumes" - }, - "describeVpcPeeringConnections": { - "resultKey": "VpcPeeringConnections" - }, - "describeVpcs": { - "resultKey": "Vpcs" - }, - "describeVpnConnections": { - "resultKey": "VpnConnections" - }, - "describeVpnGateways": { - "resultKey": "VpnGateways" - } - }, - "waiters": { - "__default__": { - "interval": 15, - "maxAttempts": 40, - "acceptorType": "output" - }, - "__InstanceState": { - "operation": "DescribeInstances", - "acceptorPath": "Reservations[].Instances[].State.Name" - }, - "instanceRunning": { - "extends": "__InstanceState", - "successValue": "running", - "failureValue": [ - "shutting-down", - "terminated", - "stopping" - ] - }, - "instanceStopped": { - "extends": "__InstanceState", - "successValue": "stopped", - "failureValue": [ - "pending", - "terminated" - ] - }, - "instanceTerminated": { - "extends": "__InstanceState", - "successValue": "terminated", - "failureValue": [ - "pending", - "stopping" - ] - }, - "__ExportTaskState": { - "operation": "DescribeExportTasks", - "acceptorPath": "ExportTasks[].State" - }, - "exportTaskCompleted": { - "extends": "__ExportTaskState", - "successValue": "completed" - }, - "exportTaskCancelled": { - "extends": "__ExportTaskState", - "successValue": "cancelled" - }, - "snapshotCompleted": { - "operation": "DescribeSnapshots", - "successPath": "Snapshots[].State", - "successValue": "completed" - }, - "subnetAvailable": { - "operation": "DescribeSubnets", - "successPath": "Subnets[].State", - "successValue": "available" - }, - "__VolumeStatus": { - "operation": "DescribeVolumes", - "acceptorPath": "VolumeStatuses[].VolumeStatus.Status" - }, - "volumeAvailable": { - "extends": "__VolumeStatus", - "successValue": "available", - "failureValue": [ - "deleted" - ] - }, - "volumeInUse": { - "extends": "__VolumeStatus", - "successValue": "in-use", - "failureValue": [ - "deleted" - ] - }, - "volumeDeleted": { - "extends": "__VolumeStatus", - "successValue": "deleted" - }, - "vpcAvailable": { - "operation": "DescribeVpcs", - "successPath": "Vpcs[].State", - "successValue": "available" - }, - "__VpnConnectionState": { - "operation": "DescribeVpnConnections", - "acceptorPath": "VpnConnections[].State" - }, - "vpnConnectionAvailable": { - "extends": "__VpnConnectionState", - "successValue": "available", - "failureValue": [ - "deleting", - "deleted" - ] - }, - "vpnConnectionDeleted": { - "extends": "__VpnConnectionState", - "successValue": "deleted", - "failureValue": [ - "pending" - ] - }, - "bundleTaskComplete": { - "operation": "DescribeBundleTasks", - "acceptorPath": "BundleTasks[].State", - "successValue": "complete", - "failureValue": [ - "failed" - ] - }, - "__ConversionTaskState": { - "operation": "DescribeConversionTasks", - "acceptorPath": "ConversionTasks[].State" - }, - "conversionTaskCompleted": { - "extends": "__ConversionTaskState", - "successValue": "completed", - "failureValue": [ - "cancelled", - "cancelling" - ] - }, - "conversionTaskCancelled": { - "extends": "__ConversionTaskState", - "successValue": "cancelled" - }, - "__CustomerGatewayState": { - "operation": "DescribeCustomerGateways", - "acceptorPath": "CustomerGateways[].State" - }, - "customerGatewayAvailable": { - "extends": "__CustomerGatewayState", - "successValue": "available", - "failureValue": [ - "deleted", - "deleting" - ] - }, - "conversionTaskDeleted": { - "extends": "__CustomerGatewayState", - "successValue": "deleted" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ELB-2012-06-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ELB-2012-06-01.json deleted file mode 100644 index 7f8c71b7..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ELB-2012-06-01.json +++ /dev/null @@ -1,985 +0,0 @@ -{ - "format": "query", - "apiVersion": "2012-06-01", - "endpointPrefix": "elasticloadbalancing", - "resultWrapped": true, - "serviceFullName": "Elastic Load Balancing", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "applySecurityGroupsToLoadBalancer": { - "name": "ApplySecurityGroupsToLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "SecurityGroups": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SecurityGroups": { - "type": "list", - "members": {} - } - } - } - }, - "attachLoadBalancerToSubnets": { - "name": "AttachLoadBalancerToSubnets", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Subnets": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Subnets": { - "type": "list", - "members": {} - } - } - } - }, - "configureHealthCheck": { - "name": "ConfigureHealthCheck", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "HealthCheck": { - "type": "structure", - "members": { - "Target": { - "required": true - }, - "Interval": { - "type": "integer", - "required": true - }, - "Timeout": { - "type": "integer", - "required": true - }, - "UnhealthyThreshold": { - "type": "integer", - "required": true - }, - "HealthyThreshold": { - "type": "integer", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "HealthCheck": { - "type": "structure", - "members": { - "Target": {}, - "Interval": { - "type": "integer" - }, - "Timeout": { - "type": "integer" - }, - "UnhealthyThreshold": { - "type": "integer" - }, - "HealthyThreshold": { - "type": "integer" - } - } - } - } - } - }, - "createAppCookieStickinessPolicy": { - "name": "CreateAppCookieStickinessPolicy", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "CookieName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createLBCookieStickinessPolicy": { - "name": "CreateLBCookieStickinessPolicy", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "CookieExpirationPeriod": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createLoadBalancer": { - "name": "CreateLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": { - "required": true - }, - "LoadBalancerPort": { - "type": "integer", - "required": true - }, - "InstanceProtocol": {}, - "InstancePort": { - "type": "integer", - "required": true - }, - "SSLCertificateId": {} - } - }, - "required": true - }, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "Subnets": { - "type": "list", - "members": {} - }, - "SecurityGroups": { - "type": "list", - "members": {} - }, - "Scheme": {} - } - }, - "output": { - "type": "structure", - "members": { - "DNSName": {} - } - } - }, - "createLoadBalancerListeners": { - "name": "CreateLoadBalancerListeners", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": { - "required": true - }, - "LoadBalancerPort": { - "type": "integer", - "required": true - }, - "InstanceProtocol": {}, - "InstancePort": { - "type": "integer", - "required": true - }, - "SSLCertificateId": {} - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createLoadBalancerPolicy": { - "name": "CreateLoadBalancerPolicy", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "PolicyTypeName": { - "required": true - }, - "PolicyAttributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeValue": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLoadBalancer": { - "name": "DeleteLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLoadBalancerListeners": { - "name": "DeleteLoadBalancerListeners", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "LoadBalancerPorts": { - "type": "list", - "members": { - "type": "integer" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLoadBalancerPolicy": { - "name": "DeleteLoadBalancerPolicy", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deregisterInstancesFromLoadBalancer": { - "name": "DeregisterInstancesFromLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - } - } - } - }, - "describeInstanceHealth": { - "name": "DescribeInstanceHealth", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceStates": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {}, - "State": {}, - "ReasonCode": {}, - "Description": {} - } - } - } - } - } - }, - "describeLoadBalancerAttributes": { - "name": "DescribeLoadBalancerAttributes", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoadBalancerAttributes": { - "type": "structure", - "members": { - "CrossZoneLoadBalancing": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "AccessLog": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "S3BucketName": {}, - "EmitInterval": { - "type": "integer" - }, - "S3BucketPrefix": {} - } - }, - "ConnectionDraining": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Timeout": { - "type": "integer" - } - } - } - } - } - } - } - }, - "describeLoadBalancerPolicies": { - "name": "DescribeLoadBalancerPolicies", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "PolicyNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PolicyName": {}, - "PolicyTypeName": {}, - "PolicyAttributeDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeValue": {} - } - } - } - } - } - } - } - } - }, - "describeLoadBalancerPolicyTypes": { - "name": "DescribeLoadBalancerPolicyTypes", - "input": { - "type": "structure", - "members": { - "PolicyTypeNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyTypeDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PolicyTypeName": {}, - "Description": {}, - "PolicyAttributeTypeDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AttributeName": {}, - "AttributeType": {}, - "Description": {}, - "DefaultValue": {}, - "Cardinality": {} - } - } - } - } - } - } - } - } - }, - "describeLoadBalancers": { - "name": "DescribeLoadBalancers", - "input": { - "type": "structure", - "members": { - "LoadBalancerNames": { - "type": "list", - "members": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "LoadBalancerDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "DNSName": {}, - "CanonicalHostedZoneName": {}, - "CanonicalHostedZoneNameID": {}, - "ListenerDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Listener": { - "type": "structure", - "members": { - "Protocol": {}, - "LoadBalancerPort": { - "type": "integer" - }, - "InstanceProtocol": {}, - "InstancePort": { - "type": "integer" - }, - "SSLCertificateId": {} - } - }, - "PolicyNames": { - "type": "list", - "members": {} - } - } - } - }, - "Policies": { - "type": "structure", - "members": { - "AppCookieStickinessPolicies": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PolicyName": {}, - "CookieName": {} - } - } - }, - "LBCookieStickinessPolicies": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PolicyName": {}, - "CookieExpirationPeriod": { - "type": "integer" - } - } - } - }, - "OtherPolicies": { - "type": "list", - "members": {} - } - } - }, - "BackendServerDescriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstancePort": { - "type": "integer" - }, - "PolicyNames": { - "type": "list", - "members": {} - } - } - } - }, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "Subnets": { - "type": "list", - "members": {} - }, - "VPCId": {}, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - }, - "HealthCheck": { - "type": "structure", - "members": { - "Target": {}, - "Interval": { - "type": "integer" - }, - "Timeout": { - "type": "integer" - }, - "UnhealthyThreshold": { - "type": "integer" - }, - "HealthyThreshold": { - "type": "integer" - } - } - }, - "SourceSecurityGroup": { - "type": "structure", - "members": { - "OwnerAlias": {}, - "GroupName": {} - } - }, - "SecurityGroups": { - "type": "list", - "members": {} - }, - "CreatedTime": { - "type": "timestamp" - }, - "Scheme": {} - } - } - }, - "NextMarker": {} - } - } - }, - "detachLoadBalancerFromSubnets": { - "name": "DetachLoadBalancerFromSubnets", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Subnets": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Subnets": { - "type": "list", - "members": {} - } - } - } - }, - "disableAvailabilityZonesForLoadBalancer": { - "name": "DisableAvailabilityZonesForLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "AvailabilityZones": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AvailabilityZones": { - "type": "list", - "members": {} - } - } - } - }, - "enableAvailabilityZonesForLoadBalancer": { - "name": "EnableAvailabilityZonesForLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "AvailabilityZones": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "AvailabilityZones": { - "type": "list", - "members": {} - } - } - } - }, - "modifyLoadBalancerAttributes": { - "name": "ModifyLoadBalancerAttributes", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "LoadBalancerAttributes": { - "type": "structure", - "members": { - "CrossZoneLoadBalancing": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - } - } - }, - "AccessLog": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "S3BucketName": {}, - "EmitInterval": { - "type": "integer" - }, - "S3BucketPrefix": {} - } - }, - "ConnectionDraining": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean", - "required": true - }, - "Timeout": { - "type": "integer" - } - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "LoadBalancerAttributes": { - "type": "structure", - "members": { - "CrossZoneLoadBalancing": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - } - } - }, - "AccessLog": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "S3BucketName": {}, - "EmitInterval": { - "type": "integer" - }, - "S3BucketPrefix": {} - } - }, - "ConnectionDraining": { - "type": "structure", - "members": { - "Enabled": { - "type": "boolean" - }, - "Timeout": { - "type": "integer" - } - } - } - } - } - } - } - }, - "registerInstancesWithLoadBalancer": { - "name": "RegisterInstancesWithLoadBalancer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - } - } - } - }, - "setLoadBalancerListenerSSLCertificate": { - "name": "SetLoadBalancerListenerSSLCertificate", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "LoadBalancerPort": { - "type": "integer", - "required": true - }, - "SSLCertificateId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setLoadBalancerPoliciesForBackendServer": { - "name": "SetLoadBalancerPoliciesForBackendServer", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "InstancePort": { - "type": "integer", - "required": true - }, - "PolicyNames": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setLoadBalancerPoliciesOfListener": { - "name": "SetLoadBalancerPoliciesOfListener", - "input": { - "type": "structure", - "members": { - "LoadBalancerName": { - "required": true - }, - "LoadBalancerPort": { - "type": "integer", - "required": true - }, - "PolicyNames": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeInstanceHealth": { - "resultKey": "InstanceStates" - }, - "describeLoadBalancerPolicies": { - "resultKey": "PolicyDescriptions" - }, - "describeLoadBalancerPolicyTypes": { - "resultKey": "PolicyTypeDescriptions" - }, - "describeLoadBalancers": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "resultKey": "LoadBalancerDescriptions" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EMR-2009-03-31.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EMR-2009-03-31.json deleted file mode 100644 index 7bf50f62..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/EMR-2009-03-31.json +++ /dev/null @@ -1,1076 +0,0 @@ -{ - "format": "json", - "apiVersion": "2009-03-31", - "endpointPrefix": "elasticmapreduce", - "jsonVersion": "1.1", - "serviceAbbreviation": "Amazon EMR", - "serviceFullName": "Amazon Elastic MapReduce", - "signatureVersion": "v4", - "targetPrefix": "ElasticMapReduce", - "timestampFormat": "unixTimestamp", - "operations": { - "addInstanceGroups": { - "name": "AddInstanceGroups", - "input": { - "type": "structure", - "members": { - "InstanceGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Market": {}, - "InstanceRole": { - "required": true - }, - "BidPrice": {}, - "InstanceType": { - "required": true - }, - "InstanceCount": { - "type": "integer", - "required": true - } - } - }, - "required": true - }, - "JobFlowId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "JobFlowId": {}, - "InstanceGroupIds": { - "type": "list", - "members": {} - } - } - } - }, - "addJobFlowSteps": { - "name": "AddJobFlowSteps", - "input": { - "type": "structure", - "members": { - "JobFlowId": { - "required": true - }, - "Steps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "ActionOnFailure": {}, - "HadoopJarStep": { - "type": "structure", - "members": { - "Properties": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Jar": { - "required": true - }, - "MainClass": {}, - "Args": { - "type": "list", - "members": {} - } - }, - "required": true - } - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "StepIds": { - "type": "list", - "members": {} - } - } - } - }, - "addTags": { - "name": "AddTags", - "input": { - "type": "structure", - "members": { - "ResourceId": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeCluster": { - "name": "DescribeCluster", - "input": { - "type": "structure", - "members": { - "ClusterId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - }, - "Ec2InstanceAttributes": { - "type": "structure", - "members": { - "Ec2KeyName": {}, - "Ec2SubnetId": {}, - "Ec2AvailabilityZone": {}, - "IamInstanceProfile": {} - } - }, - "LogUri": {}, - "RequestedAmiVersion": {}, - "RunningAmiVersion": {}, - "AutoTerminate": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "Applications": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Version": {}, - "Args": { - "type": "list", - "members": {} - }, - "AdditionalInfo": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - } - } - } - }, - "describeJobFlows": { - "name": "DescribeJobFlows", - "input": { - "type": "structure", - "members": { - "CreatedAfter": { - "type": "timestamp" - }, - "CreatedBefore": { - "type": "timestamp" - }, - "JobFlowIds": { - "type": "list", - "members": {} - }, - "JobFlowStates": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "JobFlows": { - "type": "list", - "members": { - "type": "structure", - "members": { - "JobFlowId": {}, - "Name": {}, - "LogUri": {}, - "AmiVersion": {}, - "ExecutionStatusDetail": { - "type": "structure", - "members": { - "State": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - }, - "LastStateChangeReason": {} - } - }, - "Instances": { - "type": "structure", - "members": { - "MasterInstanceType": {}, - "MasterPublicDnsName": {}, - "MasterInstanceId": {}, - "SlaveInstanceType": {}, - "InstanceCount": { - "type": "integer" - }, - "InstanceGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceGroupId": {}, - "Name": {}, - "Market": {}, - "InstanceRole": {}, - "BidPrice": {}, - "InstanceType": {}, - "InstanceRequestCount": { - "type": "integer" - }, - "InstanceRunningCount": { - "type": "integer" - }, - "State": {}, - "LastStateChangeReason": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - }, - "NormalizedInstanceHours": { - "type": "integer" - }, - "Ec2KeyName": {}, - "Ec2SubnetId": {}, - "Placement": { - "type": "structure", - "members": { - "AvailabilityZone": {} - } - }, - "KeepJobFlowAliveWhenNoSteps": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "HadoopVersion": {} - } - }, - "Steps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StepConfig": { - "type": "structure", - "members": { - "Name": {}, - "ActionOnFailure": {}, - "HadoopJarStep": { - "type": "structure", - "members": { - "Properties": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Jar": {}, - "MainClass": {}, - "Args": { - "type": "list", - "members": {} - } - } - } - } - }, - "ExecutionStatusDetail": { - "type": "structure", - "members": { - "State": {}, - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - }, - "LastStateChangeReason": {} - } - } - } - } - }, - "BootstrapActions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "BootstrapActionConfig": { - "type": "structure", - "members": { - "Name": {}, - "ScriptBootstrapAction": { - "type": "structure", - "members": { - "Path": {}, - "Args": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - }, - "SupportedProducts": { - "type": "list", - "members": {} - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "JobFlowRole": {} - } - } - } - } - } - }, - "describeStep": { - "name": "DescribeStep", - "input": { - "type": "structure", - "members": { - "ClusterId": {}, - "StepId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Step": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Config": { - "type": "structure", - "members": { - "Jar": {}, - "Properties": { - "type": "map", - "keys": {}, - "members": {} - }, - "MainClass": {}, - "Args": { - "type": "list", - "members": {} - } - } - }, - "ActionOnFailure": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - } - } - }, - "listBootstrapActions": { - "name": "ListBootstrapActions", - "input": { - "type": "structure", - "members": { - "ClusterId": {}, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "BootstrapActions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "ScriptPath": {}, - "Args": { - "type": "list", - "members": {} - } - } - } - }, - "Marker": {} - } - } - }, - "listClusters": { - "name": "ListClusters", - "input": { - "type": "structure", - "members": { - "CreatedAfter": { - "type": "timestamp" - }, - "CreatedBefore": { - "type": "timestamp" - }, - "ClusterStates": { - "type": "list", - "members": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Clusters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "listInstanceGroups": { - "name": "ListInstanceGroups", - "input": { - "type": "structure", - "members": { - "ClusterId": {}, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Market": {}, - "InstanceGroupType": {}, - "BidPrice": {}, - "InstanceType": {}, - "RequestedInstanceCount": { - "type": "integer" - }, - "RunningInstanceCount": { - "type": "integer" - }, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "listInstances": { - "name": "ListInstances", - "input": { - "type": "structure", - "members": { - "ClusterId": {}, - "InstanceGroupId": {}, - "InstanceGroupTypes": { - "type": "list", - "members": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Ec2InstanceId": {}, - "PublicDnsName": {}, - "PublicIpAddress": {}, - "PrivateDnsName": {}, - "PrivateIpAddress": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "ReadyDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "listSteps": { - "name": "ListSteps", - "input": { - "type": "structure", - "members": { - "ClusterId": {}, - "StepStates": { - "type": "list", - "members": {} - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Steps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "Status": { - "type": "structure", - "members": { - "State": {}, - "StateChangeReason": { - "type": "structure", - "members": { - "Code": {}, - "Message": {} - } - }, - "Timeline": { - "type": "structure", - "members": { - "CreationDateTime": { - "type": "timestamp" - }, - "StartDateTime": { - "type": "timestamp" - }, - "EndDateTime": { - "type": "timestamp" - } - } - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "modifyInstanceGroups": { - "name": "ModifyInstanceGroups", - "input": { - "type": "structure", - "members": { - "InstanceGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceGroupId": { - "required": true - }, - "InstanceCount": { - "type": "integer" - }, - "EC2InstanceIdsToTerminate": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "removeTags": { - "name": "RemoveTags", - "input": { - "type": "structure", - "members": { - "ResourceId": {}, - "TagKeys": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "runJobFlow": { - "name": "RunJobFlow", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "LogUri": {}, - "AdditionalInfo": {}, - "AmiVersion": {}, - "Instances": { - "type": "structure", - "members": { - "MasterInstanceType": {}, - "SlaveInstanceType": {}, - "InstanceCount": { - "type": "integer" - }, - "InstanceGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Market": {}, - "InstanceRole": { - "required": true - }, - "BidPrice": {}, - "InstanceType": { - "required": true - }, - "InstanceCount": { - "type": "integer", - "required": true - } - } - } - }, - "Ec2KeyName": {}, - "Placement": { - "type": "structure", - "members": { - "AvailabilityZone": { - "required": true - } - } - }, - "KeepJobFlowAliveWhenNoSteps": { - "type": "boolean" - }, - "TerminationProtected": { - "type": "boolean" - }, - "HadoopVersion": {}, - "Ec2SubnetId": {} - }, - "required": true - }, - "Steps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "ActionOnFailure": {}, - "HadoopJarStep": { - "type": "structure", - "members": { - "Properties": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - }, - "Jar": { - "required": true - }, - "MainClass": {}, - "Args": { - "type": "list", - "members": {} - } - }, - "required": true - } - } - } - }, - "BootstrapActions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "ScriptBootstrapAction": { - "type": "structure", - "members": { - "Path": { - "required": true - }, - "Args": { - "type": "list", - "members": {} - } - }, - "required": true - } - } - } - }, - "SupportedProducts": { - "type": "list", - "members": {} - }, - "NewSupportedProducts": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Args": { - "type": "list", - "members": {} - } - } - } - }, - "VisibleToAllUsers": { - "type": "boolean" - }, - "JobFlowRole": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "JobFlowId": {} - } - } - }, - "setTerminationProtection": { - "name": "SetTerminationProtection", - "input": { - "type": "structure", - "members": { - "JobFlowIds": { - "type": "list", - "members": {}, - "required": true - }, - "TerminationProtected": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setVisibleToAllUsers": { - "name": "SetVisibleToAllUsers", - "input": { - "type": "structure", - "members": { - "JobFlowIds": { - "type": "list", - "members": {}, - "required": true - }, - "VisibleToAllUsers": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "terminateJobFlows": { - "name": "TerminateJobFlows", - "input": { - "type": "structure", - "members": { - "JobFlowIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeJobFlows": { - "resultKey": "JobFlows" - }, - "listBootstrapActions": { - "inputToken": "Marker", - "outputToken": "Marker", - "resultKey": "BootstrapActions" - }, - "listClusters": { - "inputToken": "Marker", - "outputToken": "Marker", - "resultKey": "Clusters" - }, - "listInstanceGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "resultKey": "InstanceGroups" - }, - "listInstances": { - "inputToken": "Marker", - "outputToken": "Marker", - "resultKey": "Instances" - }, - "listSteps": { - "inputToken": "Marker", - "outputToken": "Marker", - "resultKey": "Steps" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElastiCache-2013-06-15.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElastiCache-2013-06-15.json deleted file mode 100644 index 57363750..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElastiCache-2013-06-15.json +++ /dev/null @@ -1,2055 +0,0 @@ -{ - "format": "query", - "apiVersion": "2013-06-15", - "endpointPrefix": "elasticache", - "resultWrapped": true, - "serviceFullName": "Amazon ElastiCache", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "authorizeCacheSecurityGroupIngress": { - "name": "AuthorizeCacheSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": { - "required": true - }, - "EC2SecurityGroupName": { - "required": true - }, - "EC2SecurityGroupOwnerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "CacheSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - } - } - } - } - } - }, - "createCacheCluster": { - "name": "CreateCacheCluster", - "input": { - "type": "structure", - "members": { - "CacheClusterId": { - "required": true - }, - "ReplicationGroupId": {}, - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupName": {}, - "CacheSubnetGroupName": {}, - "CacheSecurityGroupNames": { - "type": "list", - "members": { - "name": "CacheSecurityGroupName" - } - }, - "SecurityGroupIds": { - "type": "list", - "members": { - "name": "SecurityGroupId" - } - }, - "SnapshotArns": { - "type": "list", - "members": { - "name": "SnapshotArn" - } - }, - "PreferredAvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "Port": { - "type": "integer" - }, - "NotificationTopicArn": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheCluster": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - }, - "name": "CacheSecurityGroup" - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {} - }, - "name": "CacheNode" - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {} - } - } - } - } - }, - "createCacheParameterGroup": { - "name": "CreateCacheParameterGroup", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": { - "required": true - }, - "CacheParameterGroupFamily": { - "required": true - }, - "Description": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "CacheParameterGroupFamily": {}, - "Description": {} - } - } - } - } - }, - "createCacheSecurityGroup": { - "name": "CreateCacheSecurityGroup", - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": { - "required": true - }, - "Description": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "CacheSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - } - } - } - } - } - }, - "createCacheSubnetGroup": { - "name": "CreateCacheSubnetGroup", - "input": { - "type": "structure", - "members": { - "CacheSubnetGroupName": { - "required": true - }, - "CacheSubnetGroupDescription": { - "required": true - }, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheSubnetGroup": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "VpcId": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "createReplicationGroup": { - "name": "CreateReplicationGroup", - "input": { - "type": "structure", - "members": { - "ReplicationGroupId": { - "required": true - }, - "PrimaryClusterId": { - "required": true - }, - "ReplicationGroupDescription": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ReplicationGroup": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "Description": {}, - "Status": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "PrimaryClusterId": {} - } - }, - "MemberClusters": { - "type": "list", - "members": { - "name": "ClusterId" - } - }, - "NodeGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeGroupId": {}, - "Status": {}, - "PrimaryEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "NodeGroupMembers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "CacheNodeId": {}, - "ReadEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "PreferredAvailabilityZone": {}, - "CurrentRole": {} - }, - "name": "NodeGroupMember" - } - } - }, - "name": "NodeGroup" - } - } - } - } - } - } - }, - "deleteCacheCluster": { - "name": "DeleteCacheCluster", - "input": { - "type": "structure", - "members": { - "CacheClusterId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheCluster": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - }, - "name": "CacheSecurityGroup" - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {} - }, - "name": "CacheNode" - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {} - } - } - } - } - }, - "deleteCacheParameterGroup": { - "name": "DeleteCacheParameterGroup", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteCacheSecurityGroup": { - "name": "DeleteCacheSecurityGroup", - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteCacheSubnetGroup": { - "name": "DeleteCacheSubnetGroup", - "input": { - "type": "structure", - "members": { - "CacheSubnetGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteReplicationGroup": { - "name": "DeleteReplicationGroup", - "input": { - "type": "structure", - "members": { - "ReplicationGroupId": { - "required": true - }, - "RetainPrimaryCluster": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReplicationGroup": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "Description": {}, - "Status": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "PrimaryClusterId": {} - } - }, - "MemberClusters": { - "type": "list", - "members": { - "name": "ClusterId" - } - }, - "NodeGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeGroupId": {}, - "Status": {}, - "PrimaryEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "NodeGroupMembers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "CacheNodeId": {}, - "ReadEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "PreferredAvailabilityZone": {}, - "CurrentRole": {} - }, - "name": "NodeGroupMember" - } - } - }, - "name": "NodeGroup" - } - } - } - } - } - } - }, - "describeCacheClusters": { - "name": "DescribeCacheClusters", - "input": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "ShowCacheNodeInfo": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "CacheClusters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - }, - "name": "CacheSecurityGroup" - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {} - }, - "name": "CacheNode" - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {} - }, - "name": "CacheCluster" - } - } - } - } - }, - "describeCacheEngineVersions": { - "name": "DescribeCacheEngineVersions", - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "CacheEngineVersions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "CacheParameterGroupFamily": {}, - "CacheEngineDescription": {}, - "CacheEngineVersionDescription": {} - }, - "name": "CacheEngineVersion" - } - } - } - } - }, - "describeCacheParameterGroups": { - "name": "DescribeCacheParameterGroups", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "CacheParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "CacheParameterGroupFamily": {}, - "Description": {} - }, - "name": "CacheParameterGroup" - } - } - } - } - }, - "describeCacheParameters": { - "name": "DescribeCacheParameters", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": { - "required": true - }, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - } - }, - "CacheNodeTypeSpecificParameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "CacheNodeTypeSpecificValues": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeType": {}, - "Value": {} - }, - "name": "CacheNodeTypeSpecificValue" - } - } - }, - "name": "CacheNodeTypeSpecificParameter" - } - } - } - } - }, - "describeCacheSecurityGroups": { - "name": "DescribeCacheSecurityGroups", - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OwnerId": {}, - "CacheSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - } - }, - "name": "CacheSecurityGroup" - } - } - } - } - }, - "describeCacheSubnetGroups": { - "name": "DescribeCacheSubnetGroups", - "input": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "CacheSubnetGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "VpcId": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "name": "Subnet" - } - } - }, - "name": "CacheSubnetGroup" - } - } - } - } - }, - "describeEngineDefaultParameters": { - "name": "DescribeEngineDefaultParameters", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupFamily": { - "required": true - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "CacheParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - } - }, - "CacheNodeTypeSpecificParameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "CacheNodeTypeSpecificValues": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeType": {}, - "Value": {} - }, - "name": "CacheNodeTypeSpecificValue" - } - } - }, - "name": "CacheNodeTypeSpecificParameter" - } - } - } - } - } - } - }, - "describeEvents": { - "name": "DescribeEvents", - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "Date": { - "type": "timestamp" - } - }, - "name": "Event" - } - } - } - } - }, - "describeReplicationGroups": { - "name": "DescribeReplicationGroups", - "input": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReplicationGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "Description": {}, - "Status": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "PrimaryClusterId": {} - } - }, - "MemberClusters": { - "type": "list", - "members": { - "name": "ClusterId" - } - }, - "NodeGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeGroupId": {}, - "Status": {}, - "PrimaryEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "NodeGroupMembers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "CacheNodeId": {}, - "ReadEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "PreferredAvailabilityZone": {}, - "CurrentRole": {} - }, - "name": "NodeGroupMember" - } - } - }, - "name": "NodeGroup" - } - } - }, - "name": "ReplicationGroup" - } - } - } - } - }, - "describeReservedCacheNodes": { - "name": "DescribeReservedCacheNodes", - "input": { - "type": "structure", - "members": { - "ReservedCacheNodeId": {}, - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedCacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedCacheNodeId": {}, - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CacheNodeCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "State": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedCacheNode" - } - } - } - } - }, - "describeReservedCacheNodesOfferings": { - "name": "DescribeReservedCacheNodesOfferings", - "input": { - "type": "structure", - "members": { - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedCacheNodesOfferings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "ProductDescription": {}, - "OfferingType": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedCacheNodesOffering" - } - } - } - } - }, - "modifyCacheCluster": { - "name": "ModifyCacheCluster", - "input": { - "type": "structure", - "members": { - "CacheClusterId": { - "required": true - }, - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "CacheSecurityGroupNames": { - "type": "list", - "members": { - "name": "CacheSecurityGroupName" - } - }, - "SecurityGroupIds": { - "type": "list", - "members": { - "name": "SecurityGroupId" - } - }, - "PreferredMaintenanceWindow": {}, - "NotificationTopicArn": {}, - "CacheParameterGroupName": {}, - "NotificationTopicStatus": {}, - "ApplyImmediately": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheCluster": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - }, - "name": "CacheSecurityGroup" - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {} - }, - "name": "CacheNode" - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {} - } - } - } - } - }, - "modifyCacheParameterGroup": { - "name": "ModifyCacheParameterGroup", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": { - "required": true - }, - "ParameterNameValues": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {} - }, - "name": "ParameterNameValue" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheParameterGroupName": {} - } - } - }, - "modifyCacheSubnetGroup": { - "name": "ModifyCacheSubnetGroup", - "input": { - "type": "structure", - "members": { - "CacheSubnetGroupName": { - "required": true - }, - "CacheSubnetGroupDescription": {}, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheSubnetGroup": { - "type": "structure", - "members": { - "CacheSubnetGroupName": {}, - "CacheSubnetGroupDescription": {}, - "VpcId": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "modifyReplicationGroup": { - "name": "ModifyReplicationGroup", - "input": { - "type": "structure", - "members": { - "ReplicationGroupId": { - "required": true - }, - "ReplicationGroupDescription": {}, - "CacheSecurityGroupNames": { - "type": "list", - "members": { - "name": "CacheSecurityGroupName" - } - }, - "SecurityGroupIds": { - "type": "list", - "members": { - "name": "SecurityGroupId" - } - }, - "PreferredMaintenanceWindow": {}, - "NotificationTopicArn": {}, - "CacheParameterGroupName": {}, - "NotificationTopicStatus": {}, - "ApplyImmediately": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "PrimaryClusterId": {} - } - }, - "output": { - "type": "structure", - "members": { - "ReplicationGroup": { - "type": "structure", - "members": { - "ReplicationGroupId": {}, - "Description": {}, - "Status": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "PrimaryClusterId": {} - } - }, - "MemberClusters": { - "type": "list", - "members": { - "name": "ClusterId" - } - }, - "NodeGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeGroupId": {}, - "Status": {}, - "PrimaryEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "NodeGroupMembers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "CacheNodeId": {}, - "ReadEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "PreferredAvailabilityZone": {}, - "CurrentRole": {} - }, - "name": "NodeGroupMember" - } - } - }, - "name": "NodeGroup" - } - } - } - } - } - } - }, - "purchaseReservedCacheNodesOffering": { - "name": "PurchaseReservedCacheNodesOffering", - "input": { - "type": "structure", - "members": { - "ReservedCacheNodesOfferingId": { - "required": true - }, - "ReservedCacheNodeId": {}, - "CacheNodeCount": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedCacheNode": { - "type": "structure", - "members": { - "ReservedCacheNodeId": {}, - "ReservedCacheNodesOfferingId": {}, - "CacheNodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CacheNodeCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "State": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - } - } - } - } - }, - "rebootCacheCluster": { - "name": "RebootCacheCluster", - "input": { - "type": "structure", - "members": { - "CacheClusterId": { - "required": true - }, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheCluster": { - "type": "structure", - "members": { - "CacheClusterId": {}, - "ConfigurationEndpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClientDownloadLandingPage": {}, - "CacheNodeType": {}, - "Engine": {}, - "EngineVersion": {}, - "CacheClusterStatus": {}, - "NumCacheNodes": { - "type": "integer" - }, - "PreferredAvailabilityZone": {}, - "CacheClusterCreateTime": { - "type": "timestamp" - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "NumCacheNodes": { - "type": "integer" - }, - "CacheNodeIdsToRemove": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - }, - "EngineVersion": {} - } - }, - "NotificationConfiguration": { - "type": "structure", - "members": { - "TopicArn": {}, - "TopicStatus": {} - } - }, - "CacheSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheSecurityGroupName": {}, - "Status": {} - }, - "name": "CacheSecurityGroup" - } - }, - "CacheParameterGroup": { - "type": "structure", - "members": { - "CacheParameterGroupName": {}, - "ParameterApplyStatus": {}, - "CacheNodeIdsToReboot": { - "type": "list", - "members": { - "name": "CacheNodeId" - } - } - } - }, - "CacheSubnetGroupName": {}, - "CacheNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CacheNodeId": {}, - "CacheNodeStatus": {}, - "CacheNodeCreateTime": { - "type": "timestamp" - }, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ParameterGroupStatus": {}, - "SourceCacheNodeId": {} - }, - "name": "CacheNode" - } - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SecurityGroupId": {}, - "Status": {} - } - } - }, - "ReplicationGroupId": {} - } - } - } - } - }, - "resetCacheParameterGroup": { - "name": "ResetCacheParameterGroup", - "input": { - "type": "structure", - "members": { - "CacheParameterGroupName": { - "required": true - }, - "ResetAllParameters": { - "type": "boolean" - }, - "ParameterNameValues": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {} - }, - "name": "ParameterNameValue" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheParameterGroupName": {} - } - } - }, - "revokeCacheSecurityGroupIngress": { - "name": "RevokeCacheSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "CacheSecurityGroupName": { - "required": true - }, - "EC2SecurityGroupName": { - "required": true - }, - "EC2SecurityGroupOwnerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CacheSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "CacheSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - } - } - } - } - } - } - }, - "pagination": { - "describeCacheClusters": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "CacheClusters" - }, - "describeCacheEngineVersions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "CacheEngineVersions" - }, - "describeCacheParameterGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "CacheParameterGroups" - }, - "describeCacheParameters": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Parameters" - }, - "describeCacheSecurityGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "CacheSecurityGroups" - }, - "describeCacheSubnetGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "CacheSubnetGroups" - }, - "describeEngineDefaultParameters": { - "inputToken": "Marker", - "outputToken": "EngineDefaults.Marker", - "limitKey": "MaxRecords", - "resultKey": "EngineDefaults.Parameters" - }, - "describeEvents": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Events" - }, - "describeReservedCacheNodes": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedCacheNodes" - }, - "describeReservedCacheNodesOfferings": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedCacheNodesOfferings" - }, - "describeReplicationGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReplicationGroups" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticBeanstalk-2010-12-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticBeanstalk-2010-12-01.json deleted file mode 100644 index 0f9bca9f..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticBeanstalk-2010-12-01.json +++ /dev/null @@ -1,1274 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-12-01", - "endpointPrefix": "elasticbeanstalk", - "resultWrapped": true, - "serviceAbbreviation": "Elastic Beanstalk", - "serviceFullName": "AWS Elastic Beanstalk", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "checkDNSAvailability": { - "name": "CheckDNSAvailability", - "input": { - "type": "structure", - "members": { - "CNAMEPrefix": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Available": { - "type": "boolean" - }, - "FullyQualifiedCNAME": {} - } - } - }, - "createApplication": { - "name": "CreateApplication", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "Application": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Versions": { - "type": "list", - "members": {} - }, - "ConfigurationTemplates": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "createApplicationVersion": { - "name": "CreateApplicationVersion", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "VersionLabel": { - "required": true - }, - "Description": {}, - "SourceBundle": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "AutoCreateApplication": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "ApplicationVersion": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "VersionLabel": {}, - "SourceBundle": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - } - } - } - } - } - }, - "createConfigurationTemplate": { - "name": "CreateConfigurationTemplate", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TemplateName": { - "required": true - }, - "SolutionStackName": {}, - "SourceConfiguration": { - "type": "structure", - "members": { - "ApplicationName": {}, - "TemplateName": {} - } - }, - "EnvironmentId": {}, - "Description": {}, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "ApplicationName": {}, - "TemplateName": {}, - "Description": {}, - "EnvironmentName": {}, - "DeploymentStatus": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - } - } - } - }, - "createEnvironment": { - "name": "CreateEnvironment", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "EnvironmentName": { - "required": true - }, - "Description": {}, - "CNAMEPrefix": {}, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - }, - "VersionLabel": {}, - "TemplateName": {}, - "SolutionStackName": {}, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - }, - "OptionsToRemove": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "EnvironmentId": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "SolutionStackName": {}, - "TemplateName": {}, - "Description": {}, - "EndpointURL": {}, - "CNAME": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Status": {}, - "Health": {}, - "Resources": { - "type": "structure", - "members": { - "LoadBalancer": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Domain": {}, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": {}, - "Port": { - "type": "integer" - } - } - } - } - } - } - } - }, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - } - } - } - }, - "createStorageLocation": { - "name": "CreateStorageLocation", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "S3Bucket": {} - } - } - }, - "deleteApplication": { - "name": "DeleteApplication", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TerminateEnvByForce": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteApplicationVersion": { - "name": "DeleteApplicationVersion", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "VersionLabel": { - "required": true - }, - "DeleteSourceBundle": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteConfigurationTemplate": { - "name": "DeleteConfigurationTemplate", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TemplateName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteEnvironmentConfiguration": { - "name": "DeleteEnvironmentConfiguration", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "EnvironmentName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeApplicationVersions": { - "name": "DescribeApplicationVersions", - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabels": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "ApplicationVersions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "VersionLabel": {}, - "SourceBundle": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - } - } - } - } - } - } - }, - "describeApplications": { - "name": "DescribeApplications", - "input": { - "type": "structure", - "members": { - "ApplicationNames": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Applications": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Versions": { - "type": "list", - "members": {} - }, - "ConfigurationTemplates": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "describeConfigurationOptions": { - "name": "DescribeConfigurationOptions", - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "TemplateName": {}, - "EnvironmentName": {}, - "SolutionStackName": {}, - "Options": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "Options": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "Name": {}, - "DefaultValue": {}, - "ChangeSeverity": {}, - "UserDefined": { - "type": "boolean" - }, - "ValueType": {}, - "ValueOptions": { - "type": "list", - "members": {} - }, - "MinValue": { - "type": "integer" - }, - "MaxValue": { - "type": "integer" - }, - "MaxLength": { - "type": "integer" - }, - "Regex": { - "type": "structure", - "members": { - "Pattern": {}, - "Label": {} - } - } - } - } - } - } - } - }, - "describeConfigurationSettings": { - "name": "DescribeConfigurationSettings", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TemplateName": {}, - "EnvironmentName": {} - } - }, - "output": { - "type": "structure", - "members": { - "ConfigurationSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "ApplicationName": {}, - "TemplateName": {}, - "Description": {}, - "EnvironmentName": {}, - "DeploymentStatus": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - } - } - } - } - } - } - }, - "describeEnvironmentResources": { - "name": "DescribeEnvironmentResources", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - }, - "output": { - "type": "structure", - "members": { - "EnvironmentResources": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "AutoScalingGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {} - } - } - }, - "LaunchConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "LoadBalancers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Triggers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {} - } - } - }, - "Queues": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "URL": {} - } - } - } - } - } - } - } - }, - "describeEnvironments": { - "name": "DescribeEnvironments", - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "EnvironmentIds": { - "type": "list", - "members": {} - }, - "EnvironmentNames": { - "type": "list", - "members": {} - }, - "IncludeDeleted": { - "type": "boolean" - }, - "IncludedDeletedBackTo": { - "type": "timestamp" - } - } - }, - "output": { - "type": "structure", - "members": { - "Environments": { - "type": "list", - "members": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "EnvironmentId": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "SolutionStackName": {}, - "TemplateName": {}, - "Description": {}, - "EndpointURL": {}, - "CNAME": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Status": {}, - "Health": {}, - "Resources": { - "type": "structure", - "members": { - "LoadBalancer": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Domain": {}, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": {}, - "Port": { - "type": "integer" - } - } - } - } - } - } - } - }, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - } - } - } - } - } - } - }, - "describeEvents": { - "name": "DescribeEvents", - "input": { - "type": "structure", - "members": { - "ApplicationName": {}, - "VersionLabel": {}, - "TemplateName": {}, - "EnvironmentId": {}, - "EnvironmentName": {}, - "RequestId": {}, - "Severity": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "EventDate": { - "type": "timestamp" - }, - "Message": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "TemplateName": {}, - "EnvironmentName": {}, - "RequestId": {}, - "Severity": {} - } - } - }, - "NextToken": {} - } - } - }, - "listAvailableSolutionStacks": { - "name": "ListAvailableSolutionStacks", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "SolutionStacks": { - "type": "list", - "members": {} - }, - "SolutionStackDetails": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "PermittedFileTypes": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "rebuildEnvironment": { - "name": "RebuildEnvironment", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "requestEnvironmentInfo": { - "name": "RequestEnvironmentInfo", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "InfoType": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "restartAppServer": { - "name": "RestartAppServer", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "retrieveEnvironmentInfo": { - "name": "RetrieveEnvironmentInfo", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "InfoType": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "EnvironmentInfo": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InfoType": {}, - "Ec2InstanceId": {}, - "SampleTimestamp": { - "type": "timestamp" - }, - "Message": {} - } - } - } - } - } - }, - "swapEnvironmentCNAMEs": { - "name": "SwapEnvironmentCNAMEs", - "input": { - "type": "structure", - "members": { - "SourceEnvironmentId": {}, - "SourceEnvironmentName": {}, - "DestinationEnvironmentId": {}, - "DestinationEnvironmentName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "terminateEnvironment": { - "name": "TerminateEnvironment", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "TerminateResources": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "EnvironmentId": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "SolutionStackName": {}, - "TemplateName": {}, - "Description": {}, - "EndpointURL": {}, - "CNAME": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Status": {}, - "Health": {}, - "Resources": { - "type": "structure", - "members": { - "LoadBalancer": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Domain": {}, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": {}, - "Port": { - "type": "integer" - } - } - } - } - } - } - } - }, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - } - } - } - }, - "updateApplication": { - "name": "UpdateApplication", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "Application": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Versions": { - "type": "list", - "members": {} - }, - "ConfigurationTemplates": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "updateApplicationVersion": { - "name": "UpdateApplicationVersion", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "VersionLabel": { - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "ApplicationVersion": { - "type": "structure", - "members": { - "ApplicationName": {}, - "Description": {}, - "VersionLabel": {}, - "SourceBundle": { - "type": "structure", - "members": { - "S3Bucket": {}, - "S3Key": {} - } - }, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - } - } - } - } - } - }, - "updateConfigurationTemplate": { - "name": "UpdateConfigurationTemplate", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TemplateName": { - "required": true - }, - "Description": {}, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - }, - "OptionsToRemove": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "SolutionStackName": {}, - "ApplicationName": {}, - "TemplateName": {}, - "Description": {}, - "EnvironmentName": {}, - "DeploymentStatus": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - } - } - } - }, - "updateEnvironment": { - "name": "UpdateEnvironment", - "input": { - "type": "structure", - "members": { - "EnvironmentId": {}, - "EnvironmentName": {}, - "Description": {}, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - }, - "VersionLabel": {}, - "TemplateName": {}, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - } - }, - "OptionsToRemove": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "EnvironmentName": {}, - "EnvironmentId": {}, - "ApplicationName": {}, - "VersionLabel": {}, - "SolutionStackName": {}, - "TemplateName": {}, - "Description": {}, - "EndpointURL": {}, - "CNAME": {}, - "DateCreated": { - "type": "timestamp" - }, - "DateUpdated": { - "type": "timestamp" - }, - "Status": {}, - "Health": {}, - "Resources": { - "type": "structure", - "members": { - "LoadBalancer": { - "type": "structure", - "members": { - "LoadBalancerName": {}, - "Domain": {}, - "Listeners": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Protocol": {}, - "Port": { - "type": "integer" - } - } - } - } - } - } - } - }, - "Tier": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "Version": {} - } - } - } - } - }, - "validateConfigurationSettings": { - "name": "ValidateConfigurationSettings", - "input": { - "type": "structure", - "members": { - "ApplicationName": { - "required": true - }, - "TemplateName": {}, - "EnvironmentName": {}, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Namespace": {}, - "OptionName": {}, - "Value": {} - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Messages": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Message": {}, - "Severity": {}, - "Namespace": {}, - "OptionName": {} - } - } - } - } - } - } - }, - "pagination": { - "describeApplicationVersions": { - "resultKey": "ApplicationVersions" - }, - "describeApplications": { - "resultKey": "Applications" - }, - "describeConfigurationOptions": { - "resultKey": "Options" - }, - "describeEnvironments": { - "resultKey": "Environments" - }, - "describeEvents": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxRecords", - "resultKey": "Events" - }, - "listAvailableSolutionStacks": { - "resultKey": "SolutionStacks" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticTranscoder-2012-09-25.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticTranscoder-2012-09-25.json deleted file mode 100644 index 6af9de56..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ElasticTranscoder-2012-09-25.json +++ /dev/null @@ -1,2095 +0,0 @@ -{ - "format": "rest-json", - "apiVersion": "2012-09-25", - "endpointPrefix": "elastictranscoder", - "serviceFullName": "Amazon Elastic Transcoder", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "cancelJob": { - "name": "CancelJob", - "http": { - "method": "DELETE", - "uri": "/2012-09-25/jobs/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createJob": { - "name": "CreateJob", - "http": { - "method": "POST", - "uri": "/2012-09-25/jobs" - }, - "input": { - "payload": [ - "PipelineId", - "Input", - "Output", - "Outputs", - "OutputKeyPrefix", - "Playlists" - ], - "type": "structure", - "members": { - "PipelineId": {}, - "Input": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {} - } - }, - "Output": { - "type": "structure", - "members": { - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Job": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "PipelineId": {}, - "Input": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {} - } - }, - "Output": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "type": "list", - "members": {} - }, - "Status": {}, - "StatusDetail": {} - } - } - }, - "Status": {} - } - } - } - } - }, - "createPipeline": { - "name": "CreatePipeline", - "http": { - "method": "POST", - "uri": "/2012-09-25/pipelines" - }, - "input": { - "payload": [ - "Name", - "InputBucket", - "OutputBucket", - "Role", - "Notifications", - "ContentConfig", - "ThumbnailConfig" - ], - "type": "structure", - "members": { - "Name": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - } - } - }, - "createPreset": { - "name": "CreatePreset", - "http": { - "method": "POST", - "uri": "/2012-09-25/presets" - }, - "input": { - "payload": [ - "Name", - "Description", - "Container", - "Video", - "Audio", - "Thumbnails" - ], - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "Container": {}, - "Video": { - "type": "structure", - "members": { - "Codec": {}, - "CodecOptions": { - "type": "map", - "keys": {}, - "members": {} - }, - "KeyframesMaxDist": {}, - "FixedGOP": {}, - "BitRate": {}, - "FrameRate": {}, - "MaxFrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "DisplayAspectRatio": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "HorizontalAlign": {}, - "HorizontalOffset": {}, - "VerticalAlign": {}, - "VerticalOffset": {}, - "Opacity": {}, - "Target": {} - } - } - } - } - }, - "Audio": { - "type": "structure", - "members": { - "Codec": {}, - "SampleRate": {}, - "BitRate": {}, - "Channels": {}, - "CodecOptions": { - "type": "structure", - "members": { - "Profile": {} - } - } - } - }, - "Thumbnails": { - "type": "structure", - "members": { - "Format": {}, - "Interval": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Preset": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Description": {}, - "Container": {}, - "Audio": { - "type": "structure", - "members": { - "Codec": {}, - "SampleRate": {}, - "BitRate": {}, - "Channels": {}, - "CodecOptions": { - "type": "structure", - "members": { - "Profile": {} - } - } - } - }, - "Video": { - "type": "structure", - "members": { - "Codec": {}, - "CodecOptions": { - "type": "map", - "keys": {}, - "members": {} - }, - "KeyframesMaxDist": {}, - "FixedGOP": {}, - "BitRate": {}, - "FrameRate": {}, - "MaxFrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "DisplayAspectRatio": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "HorizontalAlign": {}, - "HorizontalOffset": {}, - "VerticalAlign": {}, - "VerticalOffset": {}, - "Opacity": {}, - "Target": {} - } - } - } - } - }, - "Thumbnails": { - "type": "structure", - "members": { - "Format": {}, - "Interval": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {} - } - }, - "Type": {} - } - }, - "Warning": {} - } - } - }, - "deletePipeline": { - "name": "DeletePipeline", - "http": { - "method": "DELETE", - "uri": "/2012-09-25/pipelines/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deletePreset": { - "name": "DeletePreset", - "http": { - "method": "DELETE", - "uri": "/2012-09-25/presets/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "listJobsByPipeline": { - "name": "ListJobsByPipeline", - "http": { - "method": "GET", - "uri": "/2012-09-25/jobsByPipeline/{PipelineId}?Ascending={Ascending}&PageToken={PageToken}" - }, - "input": { - "type": "structure", - "members": { - "PipelineId": { - "location": "uri" - }, - "Ascending": { - "location": "uri" - }, - "PageToken": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Jobs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "PipelineId": {}, - "Input": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {} - } - }, - "Output": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "type": "list", - "members": {} - }, - "Status": {}, - "StatusDetail": {} - } - } - }, - "Status": {} - } - } - }, - "NextPageToken": {} - } - } - }, - "listJobsByStatus": { - "name": "ListJobsByStatus", - "http": { - "method": "GET", - "uri": "/2012-09-25/jobsByStatus/{Status}?Ascending={Ascending}&PageToken={PageToken}" - }, - "input": { - "type": "structure", - "members": { - "Status": { - "location": "uri" - }, - "Ascending": { - "location": "uri" - }, - "PageToken": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Jobs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "PipelineId": {}, - "Input": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {} - } - }, - "Output": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "type": "list", - "members": {} - }, - "Status": {}, - "StatusDetail": {} - } - } - }, - "Status": {} - } - } - }, - "NextPageToken": {} - } - } - }, - "listPipelines": { - "name": "ListPipelines", - "http": { - "method": "GET", - "uri": "/2012-09-25/pipelines?Ascending={Ascending}&PageToken={PageToken}" - }, - "input": { - "type": "structure", - "members": { - "Ascending": { - "location": "uri" - }, - "PageToken": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipelines": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - }, - "NextPageToken": {} - } - } - }, - "listPresets": { - "name": "ListPresets", - "http": { - "method": "GET", - "uri": "/2012-09-25/presets?Ascending={Ascending}&PageToken={PageToken}" - }, - "input": { - "type": "structure", - "members": { - "Ascending": { - "location": "uri" - }, - "PageToken": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Presets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Description": {}, - "Container": {}, - "Audio": { - "type": "structure", - "members": { - "Codec": {}, - "SampleRate": {}, - "BitRate": {}, - "Channels": {}, - "CodecOptions": { - "type": "structure", - "members": { - "Profile": {} - } - } - } - }, - "Video": { - "type": "structure", - "members": { - "Codec": {}, - "CodecOptions": { - "type": "map", - "keys": {}, - "members": {} - }, - "KeyframesMaxDist": {}, - "FixedGOP": {}, - "BitRate": {}, - "FrameRate": {}, - "MaxFrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "DisplayAspectRatio": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "HorizontalAlign": {}, - "HorizontalOffset": {}, - "VerticalAlign": {}, - "VerticalOffset": {}, - "Opacity": {}, - "Target": {} - } - } - } - } - }, - "Thumbnails": { - "type": "structure", - "members": { - "Format": {}, - "Interval": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {} - } - }, - "Type": {} - } - } - }, - "NextPageToken": {} - } - } - }, - "readJob": { - "name": "ReadJob", - "http": { - "method": "GET", - "uri": "/2012-09-25/jobs/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Job": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "PipelineId": {}, - "Input": { - "type": "structure", - "members": { - "Key": {}, - "FrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "Interlaced": {}, - "Container": {} - } - }, - "Output": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - }, - "Outputs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Key": {}, - "ThumbnailPattern": {}, - "Rotate": {}, - "PresetId": {}, - "SegmentDuration": {}, - "Status": {}, - "StatusDetail": {}, - "Duration": { - "type": "integer" - }, - "Width": { - "type": "integer" - }, - "Height": { - "type": "integer" - }, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PresetWatermarkId": {}, - "InputKey": {} - } - } - }, - "AlbumArt": { - "type": "structure", - "members": { - "MergePolicy": {}, - "Artwork": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InputKey": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "AlbumArtFormat": {} - } - } - } - } - }, - "Composition": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TimeSpan": { - "type": "structure", - "members": { - "StartTime": {}, - "Duration": {} - } - } - } - } - } - } - } - }, - "OutputKeyPrefix": {}, - "Playlists": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Format": {}, - "OutputKeys": { - "type": "list", - "members": {} - }, - "Status": {}, - "StatusDetail": {} - } - } - }, - "Status": {} - } - } - } - } - }, - "readPipeline": { - "name": "ReadPipeline", - "http": { - "method": "GET", - "uri": "/2012-09-25/pipelines/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - } - } - }, - "readPreset": { - "name": "ReadPreset", - "http": { - "method": "GET", - "uri": "/2012-09-25/presets/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Preset": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Description": {}, - "Container": {}, - "Audio": { - "type": "structure", - "members": { - "Codec": {}, - "SampleRate": {}, - "BitRate": {}, - "Channels": {}, - "CodecOptions": { - "type": "structure", - "members": { - "Profile": {} - } - } - } - }, - "Video": { - "type": "structure", - "members": { - "Codec": {}, - "CodecOptions": { - "type": "map", - "keys": {}, - "members": {} - }, - "KeyframesMaxDist": {}, - "FixedGOP": {}, - "BitRate": {}, - "FrameRate": {}, - "MaxFrameRate": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "DisplayAspectRatio": {}, - "SizingPolicy": {}, - "PaddingPolicy": {}, - "Watermarks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "HorizontalAlign": {}, - "HorizontalOffset": {}, - "VerticalAlign": {}, - "VerticalOffset": {}, - "Opacity": {}, - "Target": {} - } - } - } - } - }, - "Thumbnails": { - "type": "structure", - "members": { - "Format": {}, - "Interval": {}, - "Resolution": {}, - "AspectRatio": {}, - "MaxWidth": {}, - "MaxHeight": {}, - "SizingPolicy": {}, - "PaddingPolicy": {} - } - }, - "Type": {} - } - } - } - } - }, - "testRole": { - "name": "TestRole", - "http": { - "method": "POST", - "uri": "/2012-09-25/roleTests" - }, - "input": { - "payload": [ - "Role", - "InputBucket", - "OutputBucket", - "Topics" - ], - "type": "structure", - "members": { - "Role": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Topics": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Success": {}, - "Messages": { - "type": "list", - "members": {} - } - } - } - }, - "updatePipeline": { - "name": "UpdatePipeline", - "http": { - "method": "PUT", - "uri": "/2012-09-25/pipelines/{Id}" - }, - "input": { - "payload": [ - "Name", - "InputBucket", - "Role", - "Notifications", - "ContentConfig", - "ThumbnailConfig" - ], - "type": "structure", - "members": { - "Id": { - "required": true, - "location": "uri" - }, - "Name": {}, - "InputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatePipelineNotifications": { - "name": "UpdatePipelineNotifications", - "http": { - "method": "POST", - "uri": "/2012-09-25/pipelines/{Id}/notifications" - }, - "input": { - "payload": [ - "Notifications" - ], - "type": "structure", - "members": { - "Id": { - "location": "uri" - }, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - } - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - } - } - }, - "updatePipelineStatus": { - "name": "UpdatePipelineStatus", - "http": { - "method": "POST", - "uri": "/2012-09-25/pipelines/{Id}/status" - }, - "input": { - "payload": [ - "Status" - ], - "type": "structure", - "members": { - "Id": { - "location": "uri" - }, - "Status": {} - } - }, - "output": { - "type": "structure", - "members": { - "Pipeline": { - "type": "structure", - "members": { - "Id": {}, - "Arn": {}, - "Name": {}, - "Status": {}, - "InputBucket": {}, - "OutputBucket": {}, - "Role": {}, - "Notifications": { - "type": "structure", - "members": { - "Progressing": {}, - "Completed": {}, - "Warning": {}, - "Error": {} - } - }, - "ContentConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "ThumbnailConfig": { - "type": "structure", - "members": { - "Bucket": {}, - "StorageClass": {}, - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GranteeType": {}, - "Grantee": {}, - "Access": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - } - } - } - }, - "pagination": { - "listJobsByPipeline": { - "inputToken": "PageToken", - "outputToken": "NextPageToken", - "resultKey": "Jobs" - }, - "listJobsByStatus": { - "inputToken": "PageToken", - "outputToken": "NextPageToken", - "resultKey": "Jobs" - }, - "listPipelines": { - "inputToken": "PageToken", - "outputToken": "NextPageToken", - "resultKey": "Pipelines" - }, - "listPresets": { - "inputToken": "PageToken", - "outputToken": "NextPageToken", - "resultKey": "Presets" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Glacier-2012-06-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Glacier-2012-06-01.json deleted file mode 100644 index a11a0e60..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Glacier-2012-06-01.json +++ /dev/null @@ -1,834 +0,0 @@ -{ - "format": "rest-json", - "apiVersion": "2012-06-01", - "checksumFormat": "sha256", - "endpointPrefix": "glacier", - "serviceFullName": "Amazon Glacier", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "abortMultipartUpload": { - "name": "AbortMultipartUpload", - "http": { - "method": "DELETE", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "uploadId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "completeMultipartUpload": { - "name": "CompleteMultipartUpload", - "http": { - "method": "POST", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "uploadId": { - "location": "uri" - }, - "archiveSize": { - "location": "header", - "name": "x-amz-archive-size" - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - } - } - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "name": "Location" - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - }, - "archiveId": { - "location": "header", - "name": "x-amz-archive-id" - } - } - } - }, - "createVault": { - "name": "CreateVault", - "http": { - "method": "PUT", - "uri": "/{accountId}/vaults/{vaultName}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "name": "Location" - } - } - } - }, - "deleteArchive": { - "name": "DeleteArchive", - "http": { - "method": "DELETE", - "uri": "/{accountId}/vaults/{vaultName}/archives/{archiveId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "archiveId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVault": { - "name": "DeleteVault", - "http": { - "method": "DELETE", - "uri": "/{accountId}/vaults/{vaultName}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVaultNotifications": { - "name": "DeleteVaultNotifications", - "http": { - "method": "DELETE", - "uri": "/{accountId}/vaults/{vaultName}/notification-configuration" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeJob": { - "name": "DescribeJob", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/jobs/{jobId}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "jobId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "JobId": {}, - "JobDescription": {}, - "Action": {}, - "ArchiveId": {}, - "VaultARN": {}, - "CreationDate": {}, - "Completed": { - "type": "boolean" - }, - "StatusCode": {}, - "StatusMessage": {}, - "ArchiveSizeInBytes": { - "type": "integer" - }, - "InventorySizeInBytes": { - "type": "integer" - }, - "SNSTopic": {}, - "CompletionDate": {}, - "SHA256TreeHash": {}, - "ArchiveSHA256TreeHash": {}, - "RetrievalByteRange": {}, - "InventoryRetrievalParameters": { - "type": "structure", - "members": { - "Format": {}, - "StartDate": {}, - "EndDate": {}, - "Limit": {}, - "Marker": {} - } - } - } - } - }, - "describeVault": { - "name": "DescribeVault", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "VaultARN": {}, - "VaultName": {}, - "CreationDate": {}, - "LastInventoryDate": {}, - "NumberOfArchives": { - "type": "integer" - }, - "SizeInBytes": { - "type": "integer" - } - } - } - }, - "getJobOutput": { - "name": "GetJobOutput", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/jobs/{jobId}/output" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "jobId": { - "location": "uri" - }, - "range": { - "location": "header", - "name": "Range" - } - } - }, - "output": { - "type": "structure", - "members": { - "body": { - "type": "binary", - "streaming": true - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - }, - "status": { - "type": "integer", - "location": "status" - }, - "contentRange": { - "location": "header", - "name": "Content-Range" - }, - "acceptRanges": { - "location": "header", - "name": "Accept-Ranges" - }, - "contentType": { - "location": "header", - "name": "Content-Type" - }, - "archiveDescription": { - "location": "header", - "name": "x-amz-archive-description" - } - }, - "payload": "body" - } - }, - "getVaultNotifications": { - "name": "GetVaultNotifications", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/notification-configuration" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "SNSTopic": {}, - "Events": { - "type": "list", - "members": {} - } - } - } - }, - "initiateJob": { - "name": "InitiateJob", - "http": { - "method": "POST", - "uri": "/{accountId}/vaults/{vaultName}/jobs" - }, - "input": { - "payload": "jobParameters", - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "jobParameters": { - "type": "structure", - "members": { - "Format": {}, - "Type": {}, - "ArchiveId": {}, - "Description": {}, - "SNSTopic": {}, - "RetrievalByteRange": {}, - "InventoryRetrievalParameters": { - "type": "structure", - "members": { - "StartDate": {}, - "EndDate": {}, - "Limit": {}, - "Marker": {} - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "name": "Location" - }, - "jobId": { - "location": "header", - "name": "x-amz-job-id" - } - } - } - }, - "initiateMultipartUpload": { - "name": "InitiateMultipartUpload", - "http": { - "method": "POST", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "archiveDescription": { - "location": "header", - "name": "x-amz-archive-description" - }, - "partSize": { - "location": "header", - "name": "x-amz-part-size" - } - } - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "name": "Location" - }, - "uploadId": { - "location": "header", - "name": "x-amz-multipart-upload-id" - } - } - } - }, - "listJobs": { - "name": "ListJobs", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/jobs?marker={marker}&limit={limit}&completed={completed}&statuscode={statuscode}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "limit": { - "location": "uri" - }, - "marker": { - "location": "uri" - }, - "statuscode": { - "location": "uri" - }, - "completed": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "JobList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "JobId": {}, - "JobDescription": {}, - "Action": {}, - "ArchiveId": {}, - "VaultARN": {}, - "CreationDate": {}, - "Completed": { - "type": "boolean" - }, - "StatusCode": {}, - "StatusMessage": {}, - "ArchiveSizeInBytes": { - "type": "integer" - }, - "InventorySizeInBytes": { - "type": "integer" - }, - "SNSTopic": {}, - "CompletionDate": {}, - "SHA256TreeHash": {}, - "ArchiveSHA256TreeHash": {}, - "RetrievalByteRange": {}, - "InventoryRetrievalParameters": { - "type": "structure", - "members": { - "Format": {}, - "StartDate": {}, - "EndDate": {}, - "Limit": {}, - "Marker": {} - } - } - } - } - }, - "Marker": {} - } - } - }, - "listMultipartUploads": { - "name": "ListMultipartUploads", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads?marker={marker}&limit={limit}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "limit": { - "location": "uri" - }, - "marker": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "UploadsList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MultipartUploadId": {}, - "VaultARN": {}, - "ArchiveDescription": {}, - "PartSizeInBytes": { - "type": "integer" - }, - "CreationDate": {} - } - } - }, - "Marker": {} - } - } - }, - "listParts": { - "name": "ListParts", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}?marker={marker}&limit={limit}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "uploadId": { - "location": "uri" - }, - "marker": { - "location": "uri" - }, - "limit": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "MultipartUploadId": {}, - "VaultARN": {}, - "ArchiveDescription": {}, - "PartSizeInBytes": { - "type": "integer" - }, - "CreationDate": {}, - "Parts": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RangeInBytes": {}, - "SHA256TreeHash": {} - } - } - }, - "Marker": {} - } - } - }, - "listVaults": { - "name": "ListVaults", - "http": { - "method": "GET", - "uri": "/{accountId}/vaults?marker={marker}&limit={limit}" - }, - "input": { - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "marker": { - "location": "uri" - }, - "limit": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "VaultList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VaultARN": {}, - "VaultName": {}, - "CreationDate": {}, - "LastInventoryDate": {}, - "NumberOfArchives": { - "type": "integer" - }, - "SizeInBytes": { - "type": "integer" - } - } - } - }, - "Marker": {} - } - } - }, - "setVaultNotifications": { - "name": "SetVaultNotifications", - "http": { - "method": "PUT", - "uri": "/{accountId}/vaults/{vaultName}/notification-configuration" - }, - "input": { - "payload": "vaultNotificationConfig", - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "vaultNotificationConfig": { - "type": "structure", - "members": { - "SNSTopic": {}, - "Events": { - "type": "list", - "members": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "uploadArchive": { - "name": "UploadArchive", - "http": { - "method": "POST", - "uri": "/{accountId}/vaults/{vaultName}/archives" - }, - "input": { - "payload": "body", - "type": "structure", - "members": { - "vaultName": { - "location": "uri" - }, - "accountId": { - "location": "uri" - }, - "archiveDescription": { - "location": "header", - "name": "x-amz-archive-description" - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - }, - "body": { - "type": "binary", - "streaming": true - } - } - }, - "output": { - "type": "structure", - "members": { - "location": { - "location": "header", - "name": "Location" - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - }, - "archiveId": { - "location": "header", - "name": "x-amz-archive-id" - } - } - } - }, - "uploadMultipartPart": { - "name": "UploadMultipartPart", - "http": { - "method": "PUT", - "uri": "/{accountId}/vaults/{vaultName}/multipart-uploads/{uploadId}" - }, - "input": { - "payload": "body", - "type": "structure", - "members": { - "accountId": { - "location": "uri" - }, - "vaultName": { - "location": "uri" - }, - "uploadId": { - "location": "uri" - }, - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - }, - "range": { - "location": "header", - "name": "Content-Range" - }, - "body": { - "type": "binary", - "streaming": true - } - } - }, - "output": { - "type": "structure", - "members": { - "checksum": { - "location": "header", - "name": "x-amz-sha256-tree-hash" - } - } - } - } - }, - "pagination": { - "listJobs": { - "inputToken": "marker", - "outputToken": "Marker", - "limitKey": "limit", - "resultKey": "JobList" - }, - "listMultipartUploads": { - "inputToken": "marker", - "outputToken": "Marker", - "limitKey": "limit", - "resultKey": "UploadsList" - }, - "listParts": { - "inputToken": "marker", - "outputToken": "Marker", - "limitKey": "limit", - "resultKey": "Parts" - }, - "listVaults": { - "inputToken": "marker", - "outputToken": "Marker", - "limitKey": "limit", - "resultKey": "VaultList" - } - }, - "waiters": { - "__default__": { - "interval": 3, - "maxAttempts": 15 - }, - "__VaultState": { - "operation": "DescribeVault" - }, - "vaultExists": { - "extends": "__VaultState", - "ignoreErrors": [ - "ResourceNotFoundException" - ], - "successType": "output" - }, - "vaultNotExists": { - "extends": "__VaultState", - "successType": "error", - "successValue": "ResourceNotFoundException" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/IAM-2010-05-08.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/IAM-2010-05-08.json deleted file mode 100644 index 19163811..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/IAM-2010-05-08.json +++ /dev/null @@ -1,2041 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-05-08", - "endpointPrefix": "iam", - "globalEndpoint": "iam.amazonaws.com", - "resultWrapped": true, - "serviceAbbreviation": "IAM", - "serviceFullName": "AWS Identity and Access Management", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "addRoleToInstanceProfile": { - "name": "AddRoleToInstanceProfile", - "input": { - "type": "structure", - "members": { - "InstanceProfileName": { - "required": true - }, - "RoleName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "addUserToGroup": { - "name": "AddUserToGroup", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "changePassword": { - "name": "ChangePassword", - "input": { - "type": "structure", - "members": { - "OldPassword": { - "required": true - }, - "NewPassword": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createAccessKey": { - "name": "CreateAccessKey", - "input": { - "type": "structure", - "members": { - "UserName": {} - } - }, - "output": { - "type": "structure", - "members": { - "AccessKey": { - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyId": {}, - "Status": {}, - "SecretAccessKey": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "createAccountAlias": { - "name": "CreateAccountAlias", - "input": { - "type": "structure", - "members": { - "AccountAlias": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createGroup": { - "name": "CreateGroup", - "input": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Group": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "createInstanceProfile": { - "name": "CreateInstanceProfile", - "input": { - "type": "structure", - "members": { - "InstanceProfileName": { - "required": true - }, - "Path": {} - } - }, - "output": { - "type": "structure", - "members": { - "InstanceProfile": { - "type": "structure", - "members": { - "Path": {}, - "InstanceProfileName": {}, - "InstanceProfileId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "Roles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - } - } - } - }, - "createLoginProfile": { - "name": "CreateLoginProfile", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "Password": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoginProfile": { - "type": "structure", - "members": { - "UserName": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "createRole": { - "name": "CreateRole", - "input": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": { - "required": true - }, - "AssumeRolePolicyDocument": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Role": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - }, - "createSAMLProvider": { - "name": "CreateSAMLProvider", - "input": { - "type": "structure", - "members": { - "SAMLMetadataDocument": { - "required": true - }, - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SAMLProviderArn": {} - } - } - }, - "createUser": { - "name": "CreateUser", - "input": { - "type": "structure", - "members": { - "Path": {}, - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "User": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "createVirtualMFADevice": { - "name": "CreateVirtualMFADevice", - "input": { - "type": "structure", - "members": { - "Path": {}, - "VirtualMFADeviceName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VirtualMFADevice": { - "type": "structure", - "members": { - "SerialNumber": {}, - "Base32StringSeed": { - "type": "base64" - }, - "QRCodePNG": { - "type": "base64" - }, - "User": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - }, - "EnableDate": { - "type": "timestamp" - } - } - } - } - } - }, - "deactivateMFADevice": { - "name": "DeactivateMFADevice", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "SerialNumber": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteAccessKey": { - "name": "DeleteAccessKey", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteAccountAlias": { - "name": "DeleteAccountAlias", - "input": { - "type": "structure", - "members": { - "AccountAlias": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteAccountPasswordPolicy": { - "name": "DeleteAccountPasswordPolicy", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteGroup": { - "name": "DeleteGroup", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteGroupPolicy": { - "name": "DeleteGroupPolicy", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteInstanceProfile": { - "name": "DeleteInstanceProfile", - "input": { - "type": "structure", - "members": { - "InstanceProfileName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLoginProfile": { - "name": "DeleteLoginProfile", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteRole": { - "name": "DeleteRole", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteRolePolicy": { - "name": "DeleteRolePolicy", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSAMLProvider": { - "name": "DeleteSAMLProvider", - "input": { - "type": "structure", - "members": { - "SAMLProviderArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteServerCertificate": { - "name": "DeleteServerCertificate", - "input": { - "type": "structure", - "members": { - "ServerCertificateName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteSigningCertificate": { - "name": "DeleteSigningCertificate", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "CertificateId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteUser": { - "name": "DeleteUser", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteUserPolicy": { - "name": "DeleteUserPolicy", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVirtualMFADevice": { - "name": "DeleteVirtualMFADevice", - "input": { - "type": "structure", - "members": { - "SerialNumber": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "enableMFADevice": { - "name": "EnableMFADevice", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "SerialNumber": { - "required": true - }, - "AuthenticationCode1": { - "required": true - }, - "AuthenticationCode2": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getAccountPasswordPolicy": { - "name": "GetAccountPasswordPolicy", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "PasswordPolicy": { - "type": "structure", - "members": { - "MinimumPasswordLength": { - "type": "integer" - }, - "RequireSymbols": { - "type": "boolean" - }, - "RequireNumbers": { - "type": "boolean" - }, - "RequireUppercaseCharacters": { - "type": "boolean" - }, - "RequireLowercaseCharacters": { - "type": "boolean" - }, - "AllowUsersToChangePassword": { - "type": "boolean" - }, - "ExpirePasswords": { - "type": "boolean" - }, - "MaxPasswordAge": { - "type": "integer" - } - } - } - } - } - }, - "getAccountSummary": { - "name": "GetAccountSummary", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "SummaryMap": { - "type": "map", - "keys": {}, - "members": { - "type": "integer" - } - } - } - } - }, - "getGroup": { - "name": "GetGroup", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Group": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - }, - "Users": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "getGroupPolicy": { - "name": "GetGroupPolicy", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GroupName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "getInstanceProfile": { - "name": "GetInstanceProfile", - "input": { - "type": "structure", - "members": { - "InstanceProfileName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceProfile": { - "type": "structure", - "members": { - "Path": {}, - "InstanceProfileName": {}, - "InstanceProfileId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "Roles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - } - } - } - }, - "getLoginProfile": { - "name": "GetLoginProfile", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoginProfile": { - "type": "structure", - "members": { - "UserName": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "getRole": { - "name": "GetRole", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Role": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - }, - "getRolePolicy": { - "name": "GetRolePolicy", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "RoleName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "getSAMLProvider": { - "name": "GetSAMLProvider", - "input": { - "type": "structure", - "members": { - "SAMLProviderArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SAMLMetadataDocument": {}, - "CreateDate": { - "type": "timestamp" - }, - "ValidUntil": { - "type": "timestamp" - } - } - } - }, - "getServerCertificate": { - "name": "GetServerCertificate", - "input": { - "type": "structure", - "members": { - "ServerCertificateName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ServerCertificate": { - "type": "structure", - "members": { - "ServerCertificateMetadata": { - "type": "structure", - "members": { - "Path": {}, - "ServerCertificateName": {}, - "ServerCertificateId": {}, - "Arn": {}, - "UploadDate": { - "type": "timestamp" - } - } - }, - "CertificateBody": {}, - "CertificateChain": {} - } - } - } - } - }, - "getUser": { - "name": "GetUser", - "input": { - "type": "structure", - "members": { - "UserName": {} - } - }, - "output": { - "type": "structure", - "members": { - "User": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - }, - "getUserPolicy": { - "name": "GetUserPolicy", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "PolicyName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "UserName": {}, - "PolicyName": {}, - "PolicyDocument": {} - } - } - }, - "listAccessKeys": { - "name": "ListAccessKeys", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessKeyMetadata": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyId": {}, - "Status": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listAccountAliases": { - "name": "ListAccountAliases", - "input": { - "type": "structure", - "members": { - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "AccountAliases": { - "type": "list", - "members": {} - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listGroupPolicies": { - "name": "ListGroupPolicies", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyNames": { - "type": "list", - "members": {} - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listGroups": { - "name": "ListGroups", - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Groups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listGroupsForUser": { - "name": "ListGroupsForUser", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Groups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "GroupName": {}, - "GroupId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listInstanceProfiles": { - "name": "ListInstanceProfiles", - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceProfiles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "InstanceProfileName": {}, - "InstanceProfileId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "Roles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listInstanceProfilesForRole": { - "name": "ListInstanceProfilesForRole", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceProfiles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "InstanceProfileName": {}, - "InstanceProfileId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "Roles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listMFADevices": { - "name": "ListMFADevices", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "MFADevices": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserName": {}, - "SerialNumber": {}, - "EnableDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listRolePolicies": { - "name": "ListRolePolicies", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyNames": { - "type": "list", - "members": {} - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listRoles": { - "name": "ListRoles", - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Roles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "RoleName": {}, - "RoleId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - }, - "AssumeRolePolicyDocument": {} - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listSAMLProviders": { - "name": "ListSAMLProviders", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "SAMLProviderList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Arn": {}, - "ValidUntil": { - "type": "timestamp" - }, - "CreateDate": { - "type": "timestamp" - } - } - } - } - } - } - }, - "listServerCertificates": { - "name": "ListServerCertificates", - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ServerCertificateMetadataList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "ServerCertificateName": {}, - "ServerCertificateId": {}, - "Arn": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listSigningCertificates": { - "name": "ListSigningCertificates", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Certificates": { - "type": "list", - "members": { - "type": "structure", - "members": { - "UserName": {}, - "CertificateId": {}, - "CertificateBody": {}, - "Status": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listUserPolicies": { - "name": "ListUserPolicies", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "PolicyNames": { - "type": "list", - "members": {} - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listUsers": { - "name": "ListUsers", - "input": { - "type": "structure", - "members": { - "PathPrefix": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Users": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "listVirtualMFADevices": { - "name": "ListVirtualMFADevices", - "input": { - "type": "structure", - "members": { - "AssignmentStatus": {}, - "Marker": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "VirtualMFADevices": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SerialNumber": {}, - "Base32StringSeed": { - "type": "base64" - }, - "QRCodePNG": { - "type": "base64" - }, - "User": { - "type": "structure", - "members": { - "Path": {}, - "UserName": {}, - "UserId": {}, - "Arn": {}, - "CreateDate": { - "type": "timestamp" - } - } - }, - "EnableDate": { - "type": "timestamp" - } - } - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {} - } - } - }, - "putGroupPolicy": { - "name": "PutGroupPolicy", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "PolicyDocument": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putRolePolicy": { - "name": "PutRolePolicy", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "PolicyDocument": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putUserPolicy": { - "name": "PutUserPolicy", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "PolicyName": { - "required": true - }, - "PolicyDocument": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "removeRoleFromInstanceProfile": { - "name": "RemoveRoleFromInstanceProfile", - "input": { - "type": "structure", - "members": { - "InstanceProfileName": { - "required": true - }, - "RoleName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "removeUserFromGroup": { - "name": "RemoveUserFromGroup", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "UserName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resyncMFADevice": { - "name": "ResyncMFADevice", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "SerialNumber": { - "required": true - }, - "AuthenticationCode1": { - "required": true - }, - "AuthenticationCode2": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateAccessKey": { - "name": "UpdateAccessKey", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "AccessKeyId": { - "required": true - }, - "Status": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateAccountPasswordPolicy": { - "name": "UpdateAccountPasswordPolicy", - "input": { - "type": "structure", - "members": { - "MinimumPasswordLength": { - "type": "integer" - }, - "RequireSymbols": { - "type": "boolean" - }, - "RequireNumbers": { - "type": "boolean" - }, - "RequireUppercaseCharacters": { - "type": "boolean" - }, - "RequireLowercaseCharacters": { - "type": "boolean" - }, - "AllowUsersToChangePassword": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateAssumeRolePolicy": { - "name": "UpdateAssumeRolePolicy", - "input": { - "type": "structure", - "members": { - "RoleName": { - "required": true - }, - "PolicyDocument": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateGroup": { - "name": "UpdateGroup", - "input": { - "type": "structure", - "members": { - "GroupName": { - "required": true - }, - "NewPath": {}, - "NewGroupName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateLoginProfile": { - "name": "UpdateLoginProfile", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "Password": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateSAMLProvider": { - "name": "UpdateSAMLProvider", - "input": { - "type": "structure", - "members": { - "SAMLMetadataDocument": { - "required": true - }, - "SAMLProviderArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SAMLProviderArn": {} - } - } - }, - "updateServerCertificate": { - "name": "UpdateServerCertificate", - "input": { - "type": "structure", - "members": { - "ServerCertificateName": { - "required": true - }, - "NewPath": {}, - "NewServerCertificateName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateSigningCertificate": { - "name": "UpdateSigningCertificate", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "CertificateId": { - "required": true - }, - "Status": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateUser": { - "name": "UpdateUser", - "input": { - "type": "structure", - "members": { - "UserName": { - "required": true - }, - "NewPath": {}, - "NewUserName": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "uploadServerCertificate": { - "name": "UploadServerCertificate", - "input": { - "type": "structure", - "members": { - "Path": {}, - "ServerCertificateName": { - "required": true - }, - "CertificateBody": { - "required": true - }, - "PrivateKey": { - "required": true - }, - "CertificateChain": {} - } - }, - "output": { - "type": "structure", - "members": { - "ServerCertificateMetadata": { - "type": "structure", - "members": { - "Path": {}, - "ServerCertificateName": {}, - "ServerCertificateId": {}, - "Arn": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - } - } - }, - "uploadSigningCertificate": { - "name": "UploadSigningCertificate", - "input": { - "type": "structure", - "members": { - "UserName": {}, - "CertificateBody": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Certificate": { - "type": "structure", - "members": { - "UserName": {}, - "CertificateId": {}, - "CertificateBody": {}, - "Status": {}, - "UploadDate": { - "type": "timestamp" - } - } - } - } - } - } - }, - "pagination": { - "getGroup": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Users" - }, - "listAccessKeys": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "AccessKeyMetadata" - }, - "listAccountAliases": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "AccountAliases" - }, - "listGroupPolicies": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "PolicyNames" - }, - "listGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Groups" - }, - "listGroupsForUser": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Groups" - }, - "listInstanceProfiles": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "InstanceProfiles" - }, - "listInstanceProfilesForRole": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "InstanceProfiles" - }, - "listMFADevices": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "MFADevices" - }, - "listRolePolicies": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "PolicyNames" - }, - "listRoles": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Roles" - }, - "listSAMLProviders": { - "resultKey": "SAMLProviderList" - }, - "listServerCertificates": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "ServerCertificateMetadataList" - }, - "listSigningCertificates": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Certificates" - }, - "listUserPolicies": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "PolicyNames" - }, - "listUsers": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "Users" - }, - "listVirtualMFADevices": { - "inputToken": "Marker", - "outputToken": "Marker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "VirtualMFADevices" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ImportExport-2010-06-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ImportExport-2010-06-01.json deleted file mode 100644 index 1bf7a194..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/ImportExport-2010-06-01.json +++ /dev/null @@ -1,192 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-06-01", - "endpointPrefix": "importexport", - "globalEndpoint": "importexport.amazonaws.com", - "resultWrapped": true, - "serviceFullName": "AWS Import/Export", - "signatureVersion": "v2", - "timestampFormat": "iso8601", - "operations": { - "cancelJob": { - "name": "CancelJob", - "http": { - "method": "POST", - "uri": "/?Operation=CancelJob" - }, - "input": { - "type": "structure", - "members": { - "JobId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Success": { - "type": "boolean" - } - } - } - }, - "createJob": { - "name": "CreateJob", - "http": { - "method": "POST", - "uri": "/?Operation=CreateJob" - }, - "input": { - "type": "structure", - "members": { - "JobType": { - "required": true - }, - "Manifest": { - "required": true - }, - "ManifestAddendum": {}, - "ValidateOnly": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "JobId": {}, - "JobType": {}, - "AwsShippingAddress": {}, - "Signature": {}, - "SignatureFileContents": {}, - "WarningMessage": {} - } - } - }, - "getStatus": { - "name": "GetStatus", - "http": { - "method": "POST", - "uri": "/?Operation=GetStatus" - }, - "input": { - "type": "structure", - "members": { - "JobId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "JobId": {}, - "JobType": {}, - "AwsShippingAddress": {}, - "LocationCode": {}, - "LocationMessage": {}, - "ProgressCode": {}, - "ProgressMessage": {}, - "Carrier": {}, - "TrackingNumber": {}, - "LogBucket": {}, - "LogKey": {}, - "ErrorCount": { - "type": "integer" - }, - "Signature": {}, - "SignatureFileContents": {}, - "CurrentManifest": {}, - "CreationDate": { - "type": "timestamp" - } - } - } - }, - "listJobs": { - "name": "ListJobs", - "http": { - "method": "POST", - "uri": "/?Operation=ListJobs" - }, - "input": { - "type": "structure", - "members": { - "MaxJobs": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Jobs": { - "type": "list", - "members": { - "type": "structure", - "members": { - "JobId": {}, - "CreationDate": { - "type": "timestamp" - }, - "IsCanceled": { - "type": "boolean" - }, - "JobType": {} - } - } - }, - "IsTruncated": { - "type": "boolean" - } - } - } - }, - "updateJob": { - "name": "UpdateJob", - "http": { - "method": "POST", - "uri": "/?Operation=UpdateJob" - }, - "input": { - "type": "structure", - "members": { - "JobId": { - "required": true - }, - "Manifest": { - "required": true - }, - "JobType": { - "required": true - }, - "ValidateOnly": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Success": { - "type": "boolean" - }, - "WarningMessage": {} - } - } - } - }, - "pagination": { - "listJobs": { - "inputToken": "Marker", - "outputToken": "Jobs[-1].JobId", - "moreResults": "IsTruncated", - "limitKey": "MaxJobs", - "resultKey": "Jobs" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Kinesis-2013-12-02.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Kinesis-2013-12-02.json deleted file mode 100644 index 8ad0c5c3..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Kinesis-2013-12-02.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "format": "json", - "apiVersion": "2013-12-02", - "endpointPrefix": "kinesis", - "jsonVersion": "1.1", - "serviceAbbreviation": "Kinesis", - "serviceFullName": "Amazon Kinesis", - "signatureVersion": "v4", - "targetPrefix": "Kinesis_20131202", - "timestampFormat": "iso8601", - "operations": { - "createStream": { - "name": "CreateStream", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "ShardCount": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteStream": { - "name": "DeleteStream", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeStream": { - "name": "DescribeStream", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "Limit": { - "type": "integer" - }, - "ExclusiveStartShardId": {} - } - }, - "output": { - "type": "structure", - "members": { - "StreamDescription": { - "type": "structure", - "members": { - "StreamName": {}, - "StreamARN": {}, - "StreamStatus": {}, - "Shards": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ShardId": {}, - "ParentShardId": {}, - "AdjacentParentShardId": {}, - "HashKeyRange": { - "type": "structure", - "members": { - "StartingHashKey": {}, - "EndingHashKey": {} - } - }, - "SequenceNumberRange": { - "type": "structure", - "members": { - "StartingSequenceNumber": {}, - "EndingSequenceNumber": {} - } - } - } - } - }, - "HasMoreShards": { - "type": "boolean" - } - } - } - } - } - }, - "getRecords": { - "name": "GetRecords", - "input": { - "type": "structure", - "members": { - "ShardIterator": { - "required": true - }, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Records": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SequenceNumber": {}, - "Data": { - "type": "base64" - }, - "PartitionKey": {} - } - } - }, - "NextShardIterator": {} - } - } - }, - "getShardIterator": { - "name": "GetShardIterator", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "ShardId": { - "required": true - }, - "ShardIteratorType": { - "required": true - }, - "StartingSequenceNumber": {} - } - }, - "output": { - "type": "structure", - "members": { - "ShardIterator": {} - } - } - }, - "listStreams": { - "name": "ListStreams", - "input": { - "type": "structure", - "members": { - "Limit": { - "type": "integer" - }, - "ExclusiveStartStreamName": {} - } - }, - "output": { - "type": "structure", - "members": { - "StreamNames": { - "type": "list", - "members": {} - }, - "HasMoreStreams": { - "type": "boolean" - } - } - } - }, - "mergeShards": { - "name": "MergeShards", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "ShardToMerge": { - "required": true - }, - "AdjacentShardToMerge": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putRecord": { - "name": "PutRecord", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "Data": { - "type": "base64", - "required": true - }, - "PartitionKey": { - "required": true - }, - "ExplicitHashKey": {}, - "SequenceNumberForOrdering": {} - } - }, - "output": { - "type": "structure", - "members": { - "ShardId": {}, - "SequenceNumber": {} - } - } - }, - "splitShard": { - "name": "SplitShard", - "input": { - "type": "structure", - "members": { - "StreamName": { - "required": true - }, - "ShardToSplit": { - "required": true - }, - "NewStartingHashKey": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeStream": { - "inputToken": "ExclusiveStartShardId", - "limitKey": "Limit", - "moreResults": "StreamDescription.HasMoreShards", - "outputToken": "StreamDescription.Shards[-1].ShardId", - "resultKey": "StreamDescription.Shards" - }, - "getRecords": { - "inputToken": "ShardIterator", - "limitKey": "Limit", - "outputToken": "NextShardIterator", - "resultKey": "Records" - }, - "listStreams": { - "inputToken": "ExclusiveStartStreamName", - "limitKey": "Limit", - "moreResults": "HasMoreStreams", - "outputToken": "StreamNames[-1]", - "resultKey": "StreamNames" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/OpsWorks-2013-02-18.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/OpsWorks-2013-02-18.json deleted file mode 100644 index cf917891..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/OpsWorks-2013-02-18.json +++ /dev/null @@ -1,2178 +0,0 @@ -{ - "format": "json", - "apiVersion": "2013-02-18", - "endpointPrefix": "opsworks", - "jsonVersion": "1.1", - "serviceFullName": "AWS OpsWorks", - "signatureVersion": "v4", - "targetPrefix": "OpsWorks_20130218", - "timestampFormat": "iso8601", - "operations": { - "assignVolume": { - "name": "AssignVolume", - "input": { - "type": "structure", - "members": { - "VolumeId": { - "required": true - }, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "associateElasticIp": { - "name": "AssociateElasticIp", - "input": { - "type": "structure", - "members": { - "ElasticIp": { - "required": true - }, - "InstanceId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "attachElasticLoadBalancer": { - "name": "AttachElasticLoadBalancer", - "input": { - "type": "structure", - "members": { - "ElasticLoadBalancerName": { - "required": true - }, - "LayerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "cloneStack": { - "name": "CloneStack", - "input": { - "type": "structure", - "members": { - "SourceStackId": { - "required": true - }, - "Name": {}, - "Region": {}, - "VpcId": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "ServiceRoleArn": { - "required": true - }, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "type": "structure", - "members": { - "Name": {}, - "Version": {} - } - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "DefaultSshKeyName": {}, - "ClonePermissions": { - "type": "boolean" - }, - "CloneAppIds": { - "type": "list", - "members": {} - }, - "DefaultRootDeviceType": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "createApp": { - "name": "CreateApp", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "Shortname": {}, - "Name": { - "required": true - }, - "Description": {}, - "Type": { - "required": true - }, - "AppSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "Domains": { - "type": "list", - "members": {} - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "type": "structure", - "members": { - "Certificate": { - "required": true - }, - "PrivateKey": { - "required": true - }, - "Chain": {} - } - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "AppId": {} - } - } - }, - "createDeployment": { - "name": "CreateDeployment", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "AppId": {}, - "InstanceIds": { - "type": "list", - "members": {} - }, - "Command": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Args": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": {} - } - } - }, - "required": true - }, - "Comment": {}, - "CustomJson": {} - } - }, - "output": { - "type": "structure", - "members": { - "DeploymentId": {} - } - } - }, - "createInstance": { - "name": "CreateInstance", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "LayerIds": { - "type": "list", - "members": {}, - "required": true - }, - "InstanceType": { - "required": true - }, - "AutoScalingType": {}, - "Hostname": {}, - "Os": {}, - "AmiId": {}, - "SshKeyName": {}, - "AvailabilityZone": {}, - "SubnetId": {}, - "Architecture": {}, - "RootDeviceType": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "EbsOptimized": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "InstanceId": {} - } - } - }, - "createLayer": { - "name": "CreateLayer", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "Type": { - "required": true - }, - "Name": { - "required": true - }, - "Shortname": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "type": "list", - "members": {} - }, - "Packages": { - "type": "list", - "members": {} - }, - "VolumeConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MountPoint": { - "required": true - }, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer", - "required": true - }, - "Size": { - "type": "integer", - "required": true - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "CustomRecipes": { - "type": "structure", - "members": { - "Setup": { - "type": "list", - "members": {} - }, - "Configure": { - "type": "list", - "members": {} - }, - "Deploy": { - "type": "list", - "members": {} - }, - "Undeploy": { - "type": "list", - "members": {} - }, - "Shutdown": { - "type": "list", - "members": {} - } - } - }, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "LayerId": {} - } - } - }, - "createStack": { - "name": "CreateStack", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Region": { - "required": true - }, - "VpcId": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "ServiceRoleArn": { - "required": true - }, - "DefaultInstanceProfileArn": { - "required": true - }, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "type": "structure", - "members": { - "Name": {}, - "Version": {} - } - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "DefaultSshKeyName": {}, - "DefaultRootDeviceType": {} - } - }, - "output": { - "type": "structure", - "members": { - "StackId": {} - } - } - }, - "createUserProfile": { - "name": "CreateUserProfile", - "input": { - "type": "structure", - "members": { - "IamUserArn": { - "required": true - }, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "IamUserArn": {} - } - } - }, - "deleteApp": { - "name": "DeleteApp", - "input": { - "type": "structure", - "members": { - "AppId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteInstance": { - "name": "DeleteInstance", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - }, - "DeleteElasticIp": { - "type": "boolean" - }, - "DeleteVolumes": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteLayer": { - "name": "DeleteLayer", - "input": { - "type": "structure", - "members": { - "LayerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteStack": { - "name": "DeleteStack", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteUserProfile": { - "name": "DeleteUserProfile", - "input": { - "type": "structure", - "members": { - "IamUserArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deregisterElasticIp": { - "name": "DeregisterElasticIp", - "input": { - "type": "structure", - "members": { - "ElasticIp": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deregisterVolume": { - "name": "DeregisterVolume", - "input": { - "type": "structure", - "members": { - "VolumeId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeApps": { - "name": "DescribeApps", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "AppIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Apps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AppId": {}, - "StackId": {}, - "Shortname": {}, - "Name": {}, - "Description": {}, - "Type": {}, - "AppSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "Domains": { - "type": "list", - "members": {} - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "type": "structure", - "members": { - "Certificate": {}, - "PrivateKey": {}, - "Chain": {} - } - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "CreatedAt": {} - } - } - } - } - } - }, - "describeCommands": { - "name": "DescribeCommands", - "input": { - "type": "structure", - "members": { - "DeploymentId": {}, - "InstanceId": {}, - "CommandIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Commands": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CommandId": {}, - "InstanceId": {}, - "DeploymentId": {}, - "CreatedAt": {}, - "AcknowledgedAt": {}, - "CompletedAt": {}, - "Status": {}, - "ExitCode": { - "type": "integer" - }, - "LogUrl": {}, - "Type": {} - } - } - } - } - } - }, - "describeDeployments": { - "name": "DescribeDeployments", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "AppId": {}, - "DeploymentIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Deployments": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DeploymentId": {}, - "StackId": {}, - "AppId": {}, - "CreatedAt": {}, - "CompletedAt": {}, - "Duration": { - "type": "integer" - }, - "IamUserArn": {}, - "Comment": {}, - "Command": { - "type": "structure", - "members": { - "Name": {}, - "Args": { - "type": "map", - "keys": {}, - "members": { - "type": "list", - "members": {} - } - } - } - }, - "Status": {}, - "CustomJson": {}, - "InstanceIds": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "describeElasticIps": { - "name": "DescribeElasticIps", - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "StackId": {}, - "Ips": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "ElasticIps": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Ip": {}, - "Name": {}, - "Domain": {}, - "Region": {}, - "InstanceId": {} - } - } - } - } - } - }, - "describeElasticLoadBalancers": { - "name": "DescribeElasticLoadBalancers", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "ElasticLoadBalancers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ElasticLoadBalancerName": {}, - "Region": {}, - "DnsName": {}, - "StackId": {}, - "LayerId": {}, - "VpcId": {}, - "AvailabilityZones": { - "type": "list", - "members": {} - }, - "SubnetIds": { - "type": "list", - "members": {} - }, - "Ec2InstanceIds": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "describeInstances": { - "name": "DescribeInstances", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerId": {}, - "InstanceIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Instances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {}, - "Ec2InstanceId": {}, - "Hostname": {}, - "StackId": {}, - "LayerIds": { - "type": "list", - "members": {} - }, - "SecurityGroupIds": { - "type": "list", - "members": {} - }, - "InstanceType": {}, - "InstanceProfileArn": {}, - "Status": {}, - "Os": {}, - "AmiId": {}, - "AvailabilityZone": {}, - "SubnetId": {}, - "PublicDns": {}, - "PrivateDns": {}, - "PublicIp": {}, - "PrivateIp": {}, - "ElasticIp": {}, - "AutoScalingType": {}, - "SshKeyName": {}, - "SshHostRsaKeyFingerprint": {}, - "SshHostDsaKeyFingerprint": {}, - "CreatedAt": {}, - "LastServiceErrorId": {}, - "Architecture": {}, - "RootDeviceType": {}, - "RootDeviceVolumeId": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "EbsOptimized": { - "type": "boolean" - } - } - } - } - } - } - }, - "describeLayers": { - "name": "DescribeLayers", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "LayerIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Layers": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "LayerId": {}, - "Type": {}, - "Name": {}, - "Shortname": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "type": "list", - "members": {} - }, - "DefaultSecurityGroupNames": { - "type": "list", - "members": {} - }, - "Packages": { - "type": "list", - "members": {} - }, - "VolumeConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MountPoint": {}, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "DefaultRecipes": { - "type": "structure", - "members": { - "Setup": { - "type": "list", - "members": {} - }, - "Configure": { - "type": "list", - "members": {} - }, - "Deploy": { - "type": "list", - "members": {} - }, - "Undeploy": { - "type": "list", - "members": {} - }, - "Shutdown": { - "type": "list", - "members": {} - } - } - }, - "CustomRecipes": { - "type": "structure", - "members": { - "Setup": { - "type": "list", - "members": {} - }, - "Configure": { - "type": "list", - "members": {} - }, - "Deploy": { - "type": "list", - "members": {} - }, - "Undeploy": { - "type": "list", - "members": {} - }, - "Shutdown": { - "type": "list", - "members": {} - } - } - }, - "CreatedAt": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - } - } - } - } - } - } - }, - "describeLoadBasedAutoScaling": { - "name": "DescribeLoadBasedAutoScaling", - "input": { - "type": "structure", - "members": { - "LayerIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoadBasedAutoScalingConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "LayerId": {}, - "Enable": { - "type": "boolean" - }, - "UpScaling": { - "type": "structure", - "members": { - "InstanceCount": { - "type": "integer" - }, - "ThresholdsWaitTime": { - "type": "integer" - }, - "IgnoreMetricsTime": { - "type": "integer" - }, - "CpuThreshold": { - "type": "float" - }, - "MemoryThreshold": { - "type": "float" - }, - "LoadThreshold": { - "type": "float" - } - } - }, - "DownScaling": { - "type": "structure", - "members": { - "InstanceCount": { - "type": "integer" - }, - "ThresholdsWaitTime": { - "type": "integer" - }, - "IgnoreMetricsTime": { - "type": "integer" - }, - "CpuThreshold": { - "type": "float" - }, - "MemoryThreshold": { - "type": "float" - }, - "LoadThreshold": { - "type": "float" - } - } - } - } - } - } - } - } - }, - "describeMyUserProfile": { - "name": "DescribeMyUserProfile", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "UserProfile": { - "type": "structure", - "members": { - "IamUserArn": {}, - "Name": {}, - "SshUsername": {}, - "SshPublicKey": {} - } - } - } - } - }, - "describePermissions": { - "name": "DescribePermissions", - "input": { - "type": "structure", - "members": { - "IamUserArn": {}, - "StackId": {} - } - }, - "output": { - "type": "structure", - "members": { - "Permissions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "IamUserArn": {}, - "AllowSsh": { - "type": "boolean" - }, - "AllowSudo": { - "type": "boolean" - }, - "Level": {} - } - } - } - } - } - }, - "describeRaidArrays": { - "name": "DescribeRaidArrays", - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "RaidArrayIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "RaidArrays": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RaidArrayId": {}, - "InstanceId": {}, - "Name": {}, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer" - }, - "Size": { - "type": "integer" - }, - "Device": {}, - "MountPoint": {}, - "AvailabilityZone": {}, - "CreatedAt": {}, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - } - } - } - }, - "describeServiceErrors": { - "name": "DescribeServiceErrors", - "input": { - "type": "structure", - "members": { - "StackId": {}, - "InstanceId": {}, - "ServiceErrorIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "ServiceErrors": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ServiceErrorId": {}, - "StackId": {}, - "InstanceId": {}, - "Type": {}, - "Message": {}, - "CreatedAt": {} - } - } - } - } - } - }, - "describeStackSummary": { - "name": "DescribeStackSummary", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "StackSummary": { - "type": "structure", - "members": { - "StackId": {}, - "Name": {}, - "Arn": {}, - "LayersCount": { - "type": "integer" - }, - "AppsCount": { - "type": "integer" - }, - "InstancesCount": { - "type": "structure", - "members": { - "Booting": { - "type": "integer" - }, - "ConnectionLost": { - "type": "integer" - }, - "Online": { - "type": "integer" - }, - "Pending": { - "type": "integer" - }, - "Rebooting": { - "type": "integer" - }, - "Requested": { - "type": "integer" - }, - "RunningSetup": { - "type": "integer" - }, - "SetupFailed": { - "type": "integer" - }, - "ShuttingDown": { - "type": "integer" - }, - "StartFailed": { - "type": "integer" - }, - "Stopped": { - "type": "integer" - }, - "Stopping": { - "type": "integer" - }, - "Terminated": { - "type": "integer" - }, - "Terminating": { - "type": "integer" - } - } - } - } - } - } - } - }, - "describeStacks": { - "name": "DescribeStacks", - "input": { - "type": "structure", - "members": { - "StackIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Stacks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StackId": {}, - "Name": {}, - "Arn": {}, - "Region": {}, - "VpcId": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "type": "structure", - "members": { - "Name": {}, - "Version": {} - } - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "UseOpsworksSecurityGroups": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "DefaultSshKeyName": {}, - "CreatedAt": {}, - "DefaultRootDeviceType": {} - } - } - } - } - } - }, - "describeTimeBasedAutoScaling": { - "name": "DescribeTimeBasedAutoScaling", - "input": { - "type": "structure", - "members": { - "InstanceIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TimeBasedAutoScalingConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "InstanceId": {}, - "AutoScalingSchedule": { - "type": "structure", - "members": { - "Monday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Tuesday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Wednesday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Thursday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Friday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Saturday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Sunday": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - } - } - } - } - }, - "describeUserProfiles": { - "name": "DescribeUserProfiles", - "input": { - "type": "structure", - "members": { - "IamUserArns": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "UserProfiles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "IamUserArn": {}, - "Name": {}, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - } - } - } - } - }, - "describeVolumes": { - "name": "DescribeVolumes", - "input": { - "type": "structure", - "members": { - "InstanceId": {}, - "StackId": {}, - "RaidArrayId": {}, - "VolumeIds": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "Volumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VolumeId": {}, - "Ec2VolumeId": {}, - "Name": {}, - "RaidArrayId": {}, - "InstanceId": {}, - "Status": {}, - "Size": { - "type": "integer" - }, - "Device": {}, - "MountPoint": {}, - "Region": {}, - "AvailabilityZone": {}, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - } - } - } - }, - "detachElasticLoadBalancer": { - "name": "DetachElasticLoadBalancer", - "input": { - "type": "structure", - "members": { - "ElasticLoadBalancerName": { - "required": true - }, - "LayerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "disassociateElasticIp": { - "name": "DisassociateElasticIp", - "input": { - "type": "structure", - "members": { - "ElasticIp": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getHostnameSuggestion": { - "name": "GetHostnameSuggestion", - "input": { - "type": "structure", - "members": { - "LayerId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LayerId": {}, - "Hostname": {} - } - } - }, - "rebootInstance": { - "name": "RebootInstance", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "registerElasticIp": { - "name": "RegisterElasticIp", - "input": { - "type": "structure", - "members": { - "ElasticIp": { - "required": true - }, - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ElasticIp": {} - } - } - }, - "registerVolume": { - "name": "RegisterVolume", - "input": { - "type": "structure", - "members": { - "Ec2VolumeId": {}, - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeId": {} - } - } - }, - "setLoadBasedAutoScaling": { - "name": "SetLoadBasedAutoScaling", - "input": { - "type": "structure", - "members": { - "LayerId": { - "required": true - }, - "Enable": { - "type": "boolean" - }, - "UpScaling": { - "type": "structure", - "members": { - "InstanceCount": { - "type": "integer" - }, - "ThresholdsWaitTime": { - "type": "integer" - }, - "IgnoreMetricsTime": { - "type": "integer" - }, - "CpuThreshold": { - "type": "float" - }, - "MemoryThreshold": { - "type": "float" - }, - "LoadThreshold": { - "type": "float" - } - } - }, - "DownScaling": { - "type": "structure", - "members": { - "InstanceCount": { - "type": "integer" - }, - "ThresholdsWaitTime": { - "type": "integer" - }, - "IgnoreMetricsTime": { - "type": "integer" - }, - "CpuThreshold": { - "type": "float" - }, - "MemoryThreshold": { - "type": "float" - }, - "LoadThreshold": { - "type": "float" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setPermission": { - "name": "SetPermission", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "IamUserArn": { - "required": true - }, - "AllowSsh": { - "type": "boolean" - }, - "AllowSudo": { - "type": "boolean" - }, - "Level": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setTimeBasedAutoScaling": { - "name": "SetTimeBasedAutoScaling", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - }, - "AutoScalingSchedule": { - "type": "structure", - "members": { - "Monday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Tuesday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Wednesday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Thursday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Friday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Saturday": { - "type": "map", - "keys": {}, - "members": {} - }, - "Sunday": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "startInstance": { - "name": "StartInstance", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "startStack": { - "name": "StartStack", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "stopInstance": { - "name": "StopInstance", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "stopStack": { - "name": "StopStack", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "unassignVolume": { - "name": "UnassignVolume", - "input": { - "type": "structure", - "members": { - "VolumeId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateApp": { - "name": "UpdateApp", - "input": { - "type": "structure", - "members": { - "AppId": { - "required": true - }, - "Name": {}, - "Description": {}, - "Type": {}, - "AppSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "Domains": { - "type": "list", - "members": {} - }, - "EnableSsl": { - "type": "boolean" - }, - "SslConfiguration": { - "type": "structure", - "members": { - "Certificate": { - "required": true - }, - "PrivateKey": { - "required": true - }, - "Chain": {} - } - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateElasticIp": { - "name": "UpdateElasticIp", - "input": { - "type": "structure", - "members": { - "ElasticIp": { - "required": true - }, - "Name": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateInstance": { - "name": "UpdateInstance", - "input": { - "type": "structure", - "members": { - "InstanceId": { - "required": true - }, - "LayerIds": { - "type": "list", - "members": {} - }, - "InstanceType": {}, - "AutoScalingType": {}, - "Hostname": {}, - "Os": {}, - "AmiId": {}, - "SshKeyName": {}, - "Architecture": {}, - "InstallUpdatesOnBoot": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateLayer": { - "name": "UpdateLayer", - "input": { - "type": "structure", - "members": { - "LayerId": { - "required": true - }, - "Name": {}, - "Shortname": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "CustomInstanceProfileArn": {}, - "CustomSecurityGroupIds": { - "type": "list", - "members": {} - }, - "Packages": { - "type": "list", - "members": {} - }, - "VolumeConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MountPoint": { - "required": true - }, - "RaidLevel": { - "type": "integer" - }, - "NumberOfDisks": { - "type": "integer", - "required": true - }, - "Size": { - "type": "integer", - "required": true - }, - "VolumeType": {}, - "Iops": { - "type": "integer" - } - } - } - }, - "EnableAutoHealing": { - "type": "boolean" - }, - "AutoAssignElasticIps": { - "type": "boolean" - }, - "AutoAssignPublicIps": { - "type": "boolean" - }, - "CustomRecipes": { - "type": "structure", - "members": { - "Setup": { - "type": "list", - "members": {} - }, - "Configure": { - "type": "list", - "members": {} - }, - "Deploy": { - "type": "list", - "members": {} - }, - "Undeploy": { - "type": "list", - "members": {} - }, - "Shutdown": { - "type": "list", - "members": {} - } - } - }, - "InstallUpdatesOnBoot": { - "type": "boolean" - }, - "UseEbsOptimizedInstances": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateMyUserProfile": { - "name": "UpdateMyUserProfile", - "input": { - "type": "structure", - "members": { - "SshPublicKey": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateStack": { - "name": "UpdateStack", - "input": { - "type": "structure", - "members": { - "StackId": { - "required": true - }, - "Name": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - }, - "ServiceRoleArn": {}, - "DefaultInstanceProfileArn": {}, - "DefaultOs": {}, - "HostnameTheme": {}, - "DefaultAvailabilityZone": {}, - "DefaultSubnetId": {}, - "CustomJson": {}, - "ConfigurationManager": { - "type": "structure", - "members": { - "Name": {}, - "Version": {} - } - }, - "UseCustomCookbooks": { - "type": "boolean" - }, - "CustomCookbooksSource": { - "type": "structure", - "members": { - "Type": {}, - "Url": {}, - "Username": {}, - "Password": {}, - "SshKey": {}, - "Revision": {} - } - }, - "DefaultSshKeyName": {}, - "DefaultRootDeviceType": {}, - "UseOpsworksSecurityGroups": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateUserProfile": { - "name": "UpdateUserProfile", - "input": { - "type": "structure", - "members": { - "IamUserArn": { - "required": true - }, - "SshUsername": {}, - "SshPublicKey": {}, - "AllowSelfManagement": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "updateVolume": { - "name": "UpdateVolume", - "input": { - "type": "structure", - "members": { - "VolumeId": { - "required": true - }, - "Name": {}, - "MountPoint": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "describeApps": { - "resultKey": "Apps" - }, - "describeCommands": { - "resultKey": "Commands" - }, - "describeDeployments": { - "resultKey": "Deployments" - }, - "describeElasticIps": { - "resultKey": "ElasticIps" - }, - "describeElasticLoadBalancers": { - "resultKey": "ElasticLoadBalancers" - }, - "describeInstances": { - "resultKey": "Instances" - }, - "describeLayers": { - "resultKey": "Layers" - }, - "describeLoadBasedAutoScaling": { - "resultKey": "LoadBasedAutoScalingConfigurations" - }, - "describePermissions": { - "resultKey": "Permissions" - }, - "describeRaidArrays": { - "resultKey": "RaidArrays" - }, - "describeServiceErrors": { - "resultKey": "ServiceErrors" - }, - "describeStacks": { - "resultKey": "Stacks" - }, - "describeTimeBasedAutoScaling": { - "resultKey": "TimeBasedAutoScalingConfigurations" - }, - "describeUserProfiles": { - "resultKey": "UserProfiles" - }, - "describeVolumes": { - "resultKey": "Volumes" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/RDS-2013-09-09.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/RDS-2013-09-09.json deleted file mode 100644 index f56e6e3c..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/RDS-2013-09-09.json +++ /dev/null @@ -1,4457 +0,0 @@ -{ - "format": "query", - "apiVersion": "2013-09-09", - "endpointPrefix": "rds", - "resultWrapped": true, - "serviceAbbreviation": "Amazon RDS", - "serviceFullName": "Amazon Relational Database Service", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "addSourceIdentifierToSubscription": { - "name": "AddSourceIdentifierToSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SourceIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "addTagsToResource": { - "name": "AddTagsToResource", - "input": { - "type": "structure", - "members": { - "ResourceName": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "authorizeDBSecurityGroupIngress": { - "name": "AuthorizeDBSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": { - "required": true - }, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - }, - "copyDBSnapshot": { - "name": "CopyDBSnapshot", - "input": { - "type": "structure", - "members": { - "SourceDBSnapshotIdentifier": { - "required": true - }, - "TargetDBSnapshotIdentifier": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSnapshot": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "createDBInstance": { - "name": "CreateDBInstance", - "input": { - "type": "structure", - "members": { - "DBName": {}, - "DBInstanceIdentifier": { - "required": true - }, - "AllocatedStorage": { - "type": "integer", - "required": true - }, - "DBInstanceClass": { - "required": true - }, - "Engine": { - "required": true - }, - "MasterUsername": { - "required": true - }, - "MasterUserPassword": { - "required": true - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "name": "DBSecurityGroupName" - } - }, - "VpcSecurityGroupIds": { - "type": "list", - "members": { - "name": "VpcSecurityGroupId" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "PreferredMaintenanceWindow": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "Port": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "CharacterSetName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "createDBInstanceReadReplica": { - "name": "CreateDBInstanceReadReplica", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "SourceDBInstanceIdentifier": { - "required": true - }, - "DBInstanceClass": {}, - "AvailabilityZone": {}, - "Port": { - "type": "integer" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - }, - "DBSubnetGroupName": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "createDBParameterGroup": { - "name": "CreateDBParameterGroup", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": { - "required": true - }, - "DBParameterGroupFamily": { - "required": true - }, - "Description": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBParameterGroup": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - } - } - } - } - }, - "createDBSecurityGroup": { - "name": "CreateDBSecurityGroup", - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": { - "required": true - }, - "DBSecurityGroupDescription": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - }, - "createDBSnapshot": { - "name": "CreateDBSnapshot", - "input": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": { - "required": true - }, - "DBInstanceIdentifier": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSnapshot": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "createDBSubnetGroup": { - "name": "CreateDBSubnetGroup", - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": { - "required": true - }, - "DBSubnetGroupDescription": { - "required": true - }, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - }, - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "createEventSubscription": { - "name": "CreateEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SnsTopicArn": { - "required": true - }, - "SourceType": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "SourceIds": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "Enabled": { - "type": "boolean" - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "createOptionGroup": { - "name": "CreateOptionGroup", - "input": { - "type": "structure", - "members": { - "OptionGroupName": { - "required": true - }, - "EngineName": { - "required": true - }, - "MajorEngineVersion": { - "required": true - }, - "OptionGroupDescription": { - "required": true - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "OptionGroup": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - }, - "name": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - } - }, - "name": "Option" - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - } - } - } - } - }, - "deleteDBInstance": { - "name": "DeleteDBInstance", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "SkipFinalSnapshot": { - "type": "boolean" - }, - "FinalDBSnapshotIdentifier": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "deleteDBParameterGroup": { - "name": "DeleteDBParameterGroup", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteDBSecurityGroup": { - "name": "DeleteDBSecurityGroup", - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteDBSnapshot": { - "name": "DeleteDBSnapshot", - "input": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSnapshot": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "deleteDBSubnetGroup": { - "name": "DeleteDBSubnetGroup", - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteEventSubscription": { - "name": "DeleteEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "deleteOptionGroup": { - "name": "DeleteOptionGroup", - "input": { - "type": "structure", - "members": { - "OptionGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeDBEngineVersions": { - "name": "DescribeDBEngineVersions", - "input": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "DefaultOnly": { - "type": "boolean" - }, - "ListSupportedCharacterSets": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBEngineVersions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBParameterGroupFamily": {}, - "DBEngineDescription": {}, - "DBEngineVersionDescription": {}, - "DefaultCharacterSet": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - } - }, - "SupportedCharacterSets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CharacterSetName": {}, - "CharacterSetDescription": {} - }, - "name": "CharacterSet" - } - } - }, - "name": "DBEngineVersion" - } - } - } - } - }, - "describeDBInstances": { - "name": "DescribeDBInstances", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBInstances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - }, - "name": "DBInstance" - } - } - } - } - }, - "describeDBLogFiles": { - "name": "DescribeDBLogFiles", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "FilenameContains": {}, - "FileLastWritten": { - "type": "integer" - }, - "FileSize": { - "type": "integer" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "DescribeDBLogFiles": { - "type": "list", - "members": { - "type": "structure", - "members": { - "LogFileName": {}, - "LastWritten": { - "type": "integer" - }, - "Size": { - "type": "integer" - } - }, - "name": "DescribeDBLogFilesDetails" - } - }, - "Marker": {} - } - } - }, - "describeDBParameterGroups": { - "name": "DescribeDBParameterGroups", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "DBParameterGroupFamily": {}, - "Description": {} - }, - "name": "DBParameterGroup" - } - } - } - } - }, - "describeDBParameters": { - "name": "DescribeDBParameters", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": { - "required": true - }, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - }, - "name": "Parameter" - } - }, - "Marker": {} - } - } - }, - "describeDBSecurityGroups": { - "name": "DescribeDBSecurityGroups", - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - }, - "name": "DBSecurityGroup" - } - } - } - } - }, - "describeDBSnapshots": { - "name": "DescribeDBSnapshots", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBSnapshotIdentifier": {}, - "SnapshotType": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBSnapshots": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSnapshotIdentifier": {}, - "DBInstanceIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Engine": {}, - "AllocatedStorage": { - "type": "integer" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "VpcId": {}, - "InstanceCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "EngineVersion": {}, - "LicenseModel": {}, - "SnapshotType": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "PercentProgress": { - "type": "integer" - }, - "SourceRegion": {} - }, - "name": "DBSnapshot" - } - } - } - } - }, - "describeDBSubnetGroups": { - "name": "DescribeDBSubnetGroups", - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "DBSubnetGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - }, - "name": "DBSubnetGroup" - } - } - } - } - }, - "describeEngineDefaultParameters": { - "name": "DescribeEngineDefaultParameters", - "input": { - "type": "structure", - "members": { - "DBParameterGroupFamily": { - "required": true - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "EngineDefaults": { - "type": "structure", - "members": { - "DBParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - }, - "name": "Parameter" - } - } - } - } - } - } - }, - "describeEventCategories": { - "name": "DescribeEventCategories", - "input": { - "type": "structure", - "members": { - "SourceType": {} - } - }, - "output": { - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceType": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - } - }, - "name": "EventCategoriesMap" - } - } - } - } - }, - "describeEventSubscriptions": { - "name": "DescribeEventSubscriptions", - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - }, - "name": "EventSubscription" - } - } - } - } - }, - "describeEvents": { - "name": "DescribeEvents", - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Date": { - "type": "timestamp" - } - }, - "name": "Event" - } - } - } - } - }, - "describeOptionGroupOptions": { - "name": "DescribeOptionGroupOptions", - "input": { - "type": "structure", - "members": { - "EngineName": { - "required": true - }, - "MajorEngineVersion": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "OptionGroupOptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Description": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "MinimumRequiredMinorEngineVersion": {}, - "PortRequired": { - "type": "boolean" - }, - "DefaultPort": { - "type": "integer" - }, - "OptionsDependedOn": { - "type": "list", - "members": { - "name": "OptionName" - } - }, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "OptionGroupOptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SettingName": {}, - "SettingDescription": {}, - "DefaultValue": {}, - "ApplyType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - } - }, - "name": "OptionGroupOptionSetting" - } - } - }, - "name": "OptionGroupOption" - } - }, - "Marker": {} - } - } - }, - "describeOptionGroups": { - "name": "DescribeOptionGroups", - "input": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "Marker": {}, - "MaxRecords": { - "type": "integer" - }, - "EngineName": {}, - "MajorEngineVersion": {} - } - }, - "output": { - "type": "structure", - "members": { - "OptionGroupsList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - }, - "name": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - } - }, - "name": "Option" - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - }, - "name": "OptionGroup" - } - }, - "Marker": {} - } - } - }, - "describeOrderableDBInstanceOptions": { - "name": "DescribeOrderableDBInstanceOptions", - "input": { - "type": "structure", - "members": { - "Engine": { - "required": true - }, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "Vpc": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "OrderableDBInstanceOptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Engine": {}, - "EngineVersion": {}, - "DBInstanceClass": {}, - "LicenseModel": {}, - "AvailabilityZones": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - }, - "name": "AvailabilityZone" - } - }, - "MultiAZCapable": { - "type": "boolean" - }, - "ReadReplicaCapable": { - "type": "boolean" - }, - "Vpc": { - "type": "boolean" - } - }, - "name": "OrderableDBInstanceOption" - } - }, - "Marker": {} - } - } - }, - "describeReservedDBInstances": { - "name": "DescribeReservedDBInstances", - "input": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "Filters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "FilterName": { - "required": true - }, - "FilterValue": { - "type": "list", - "members": { - "name": "Value" - }, - "required": true - } - }, - "name": "Filter" - } - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstances": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedDBInstance" - } - } - } - } - }, - "describeReservedDBInstancesOfferings": { - "name": "DescribeReservedDBInstancesOfferings", - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedDBInstancesOfferings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedDBInstancesOffering" - } - } - } - } - }, - "downloadDBLogFilePortion": { - "name": "DownloadDBLogFilePortion", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "LogFileName": { - "required": true - }, - "Marker": {}, - "NumberOfLines": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "LogFileData": {}, - "Marker": {}, - "AdditionalDataPending": { - "type": "boolean" - } - } - } - }, - "listTagsForResource": { - "name": "ListTagsForResource", - "input": { - "type": "structure", - "members": { - "ResourceName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TagList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - } - }, - "modifyDBInstance": { - "name": "ModifyDBInstance", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "AllocatedStorage": { - "type": "integer" - }, - "DBInstanceClass": {}, - "DBSecurityGroups": { - "type": "list", - "members": { - "name": "DBSecurityGroupName" - } - }, - "VpcSecurityGroupIds": { - "type": "list", - "members": { - "name": "VpcSecurityGroupId" - } - }, - "ApplyImmediately": { - "type": "boolean" - }, - "MasterUserPassword": {}, - "DBParameterGroupName": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {}, - "PreferredMaintenanceWindow": {}, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AllowMajorVersionUpgrade": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "NewDBInstanceIdentifier": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "modifyDBParameterGroup": { - "name": "ModifyDBParameterGroup", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": { - "required": true - }, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - }, - "name": "Parameter" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - }, - "modifyDBSubnetGroup": { - "name": "ModifyDBSubnetGroup", - "input": { - "type": "structure", - "members": { - "DBSubnetGroupName": { - "required": true - }, - "DBSubnetGroupDescription": {}, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "modifyEventSubscription": { - "name": "ModifyEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SnsTopicArn": {}, - "SourceType": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "modifyOptionGroup": { - "name": "ModifyOptionGroup", - "input": { - "type": "structure", - "members": { - "OptionGroupName": { - "required": true - }, - "OptionsToInclude": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionName": { - "required": true - }, - "Port": { - "type": "integer" - }, - "DBSecurityGroupMemberships": { - "type": "list", - "members": { - "name": "DBSecurityGroupName" - } - }, - "VpcSecurityGroupMemberships": { - "type": "list", - "members": { - "name": "VpcSecurityGroupId" - } - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - }, - "name": "OptionSetting" - } - } - }, - "name": "OptionConfiguration" - } - }, - "OptionsToRemove": { - "type": "list", - "members": {} - }, - "ApplyImmediately": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "OptionGroup": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "OptionGroupDescription": {}, - "EngineName": {}, - "MajorEngineVersion": {}, - "Options": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionName": {}, - "OptionDescription": {}, - "Persistent": { - "type": "boolean" - }, - "Permanent": { - "type": "boolean" - }, - "Port": { - "type": "integer" - }, - "OptionSettings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "DefaultValue": {}, - "Description": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "IsCollection": { - "type": "boolean" - } - }, - "name": "OptionSetting" - } - }, - "DBSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - } - }, - "name": "Option" - } - }, - "AllowsVpcAndNonVpcInstanceMemberships": { - "type": "boolean" - }, - "VpcId": {} - } - } - } - } - }, - "promoteReadReplica": { - "name": "PromoteReadReplica", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "PreferredBackupWindow": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "purchaseReservedDBInstancesOffering": { - "name": "PurchaseReservedDBInstancesOffering", - "input": { - "type": "structure", - "members": { - "ReservedDBInstancesOfferingId": { - "required": true - }, - "ReservedDBInstanceId": {}, - "DBInstanceCount": { - "type": "integer" - }, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedDBInstance": { - "type": "structure", - "members": { - "ReservedDBInstanceId": {}, - "ReservedDBInstancesOfferingId": {}, - "DBInstanceClass": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "DBInstanceCount": { - "type": "integer" - }, - "ProductDescription": {}, - "OfferingType": {}, - "MultiAZ": { - "type": "boolean" - }, - "State": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - } - } - } - } - }, - "rebootDBInstance": { - "name": "RebootDBInstance", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "ForceFailover": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "removeSourceIdentifierFromSubscription": { - "name": "RemoveSourceIdentifierFromSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SourceIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": {}, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "removeTagsFromResource": { - "name": "RemoveTagsFromResource", - "input": { - "type": "structure", - "members": { - "ResourceName": { - "required": true - }, - "TagKeys": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "resetDBParameterGroup": { - "name": "ResetDBParameterGroup", - "input": { - "type": "structure", - "members": { - "DBParameterGroupName": { - "required": true - }, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "ApplyType": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {}, - "ApplyMethod": {} - }, - "name": "Parameter" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBParameterGroupName": {} - } - } - }, - "restoreDBInstanceFromDBSnapshot": { - "name": "RestoreDBInstanceFromDBSnapshot", - "input": { - "type": "structure", - "members": { - "DBInstanceIdentifier": { - "required": true - }, - "DBSnapshotIdentifier": { - "required": true - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "restoreDBInstanceToPointInTime": { - "name": "RestoreDBInstanceToPointInTime", - "input": { - "type": "structure", - "members": { - "SourceDBInstanceIdentifier": { - "required": true - }, - "TargetDBInstanceIdentifier": { - "required": true - }, - "RestoreTime": { - "type": "timestamp" - }, - "UseLatestRestorableTime": { - "type": "boolean" - }, - "DBInstanceClass": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "DBSubnetGroupName": {}, - "MultiAZ": { - "type": "boolean" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "LicenseModel": {}, - "DBName": {}, - "Engine": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupName": {}, - "Tags": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Key": {}, - "Value": {} - }, - "name": "Tag" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "DBInstance": { - "type": "structure", - "members": { - "DBInstanceIdentifier": {}, - "DBInstanceClass": {}, - "Engine": {}, - "DBInstanceStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "AllocatedStorage": { - "type": "integer" - }, - "InstanceCreateTime": { - "type": "timestamp" - }, - "PreferredBackupWindow": {}, - "BackupRetentionPeriod": { - "type": "integer" - }, - "DBSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBSecurityGroupName": {}, - "Status": {} - }, - "name": "DBSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroupMembership" - } - }, - "DBParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DBParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "DBParameterGroup" - } - }, - "AvailabilityZone": {}, - "DBSubnetGroup": { - "type": "structure", - "members": { - "DBSubnetGroupName": {}, - "DBSubnetGroupDescription": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {}, - "ProvisionedIopsCapable": { - "type": "boolean" - } - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - }, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "DBInstanceClass": {}, - "AllocatedStorage": { - "type": "integer" - }, - "MasterUserPassword": {}, - "Port": { - "type": "integer" - }, - "BackupRetentionPeriod": { - "type": "integer" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "Iops": { - "type": "integer" - }, - "DBInstanceIdentifier": {} - } - }, - "LatestRestorableTime": { - "type": "timestamp" - }, - "MultiAZ": { - "type": "boolean" - }, - "EngineVersion": {}, - "AutoMinorVersionUpgrade": { - "type": "boolean" - }, - "ReadReplicaSourceDBInstanceIdentifier": {}, - "ReadReplicaDBInstanceIdentifiers": { - "type": "list", - "members": { - "name": "ReadReplicaDBInstanceIdentifier" - } - }, - "LicenseModel": {}, - "Iops": { - "type": "integer" - }, - "OptionGroupMemberships": { - "type": "list", - "members": { - "type": "structure", - "members": { - "OptionGroupName": {}, - "Status": {} - }, - "name": "OptionGroupMembership" - } - }, - "CharacterSetName": {}, - "SecondaryAvailabilityZone": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "StatusInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "StatusType": {}, - "Normal": { - "type": "boolean" - }, - "Status": {}, - "Message": {} - }, - "name": "DBInstanceStatusInfo" - } - } - } - } - } - } - }, - "revokeDBSecurityGroupIngress": { - "name": "RevokeDBSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "DBSecurityGroupName": { - "required": true - }, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "DBSecurityGroup": { - "type": "structure", - "members": { - "OwnerId": {}, - "DBSecurityGroupName": {}, - "DBSecurityGroupDescription": {}, - "VpcId": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupId": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - } - }, - "pagination": { - "describeDBEngineVersions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBEngineVersions" - }, - "describeDBInstances": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBInstances" - }, - "describeDBLogFiles": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DescribeDBLogFiles" - }, - "describeDBParameterGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBParameterGroups" - }, - "describeDBParameters": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Parameters" - }, - "describeDBSecurityGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBSecurityGroups" - }, - "describeDBSnapshots": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBSnapshots" - }, - "describeDBSubnetGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "DBSubnetGroups" - }, - "describeEngineDefaultParameters": { - "inputToken": "Marker", - "outputToken": "EngineDefaults.Marker", - "limitKey": "MaxRecords" - }, - "describeEventSubscriptions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "EventSubscriptionsList" - }, - "describeEvents": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Events" - }, - "describeOptionGroupOptions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "OptionGroupOptions" - }, - "describeOptionGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "OptionGroupsList" - }, - "describeOrderableDBInstanceOptions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "OrderableDBInstanceOptions" - }, - "describeReservedDBInstances": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedDBInstances" - }, - "describeReservedDBInstancesOfferings": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedDBInstancesOfferings" - }, - "downloadDBLogFilePortion": { - "inputToken": "Marker", - "outputToken": "Marker" - }, - "listTagsForResource": { - "resultKey": "TagList" - } - }, - "waiters": { - "__default__": { - "interval": 30, - "maxAttempts": 60 - }, - "__DBInstanceState": { - "operation": "DescribeDBInstances", - "acceptorPath": "DBInstances[].DBInstanceStatus", - "acceptorType": "output" - }, - "dBInstanceAvailable": { - "extends": "__DBInstanceState", - "successValue": "available", - "failureValue": [ - "deleted", - "deleting", - "failed", - "incompatible-restore", - "incompatible-parameters", - "incompatible-parameters", - "incompatible-restore" - ] - }, - "dBInstanceDeleted": { - "extends": "__DBInstanceState", - "successValue": "deleted", - "failureValue": [ - "creating", - "modifying", - "rebooting", - "resetting-master-credentials" - ] - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Redshift-2012-12-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Redshift-2012-12-01.json deleted file mode 100644 index 7ad62509..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Redshift-2012-12-01.json +++ /dev/null @@ -1,3869 +0,0 @@ -{ - "format": "query", - "apiVersion": "2012-12-01", - "endpointPrefix": "redshift", - "resultWrapped": true, - "serviceFullName": "Amazon Redshift", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "authorizeClusterSecurityGroupIngress": { - "name": "AuthorizeClusterSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": { - "required": true - }, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - }, - "authorizeSnapshotAccess": { - "name": "AuthorizeSnapshotAccess", - "input": { - "type": "structure", - "members": { - "SnapshotIdentifier": { - "required": true - }, - "SnapshotClusterIdentifier": {}, - "AccountWithRestoreAccess": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshot": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "copyClusterSnapshot": { - "name": "CopyClusterSnapshot", - "input": { - "type": "structure", - "members": { - "SourceSnapshotIdentifier": { - "required": true - }, - "SourceSnapshotClusterIdentifier": {}, - "TargetSnapshotIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshot": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "createCluster": { - "name": "CreateCluster", - "input": { - "type": "structure", - "members": { - "DBName": {}, - "ClusterIdentifier": { - "required": true - }, - "ClusterType": {}, - "NodeType": { - "required": true - }, - "MasterUsername": { - "required": true - }, - "MasterUserPassword": { - "required": true - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "name": "ClusterSecurityGroupName" - } - }, - "VpcSecurityGroupIds": { - "type": "list", - "members": { - "name": "VpcSecurityGroupId" - } - }, - "ClusterSubnetGroupName": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "ClusterParameterGroupName": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "Port": { - "type": "integer" - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "ElasticIp": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "createClusterParameterGroup": { - "name": "CreateClusterParameterGroup", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": { - "required": true - }, - "ParameterGroupFamily": { - "required": true - }, - "Description": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ClusterParameterGroup": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupFamily": {}, - "Description": {} - } - } - } - } - }, - "createClusterSecurityGroup": { - "name": "CreateClusterSecurityGroup", - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": { - "required": true - }, - "Description": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - }, - "createClusterSnapshot": { - "name": "CreateClusterSnapshot", - "input": { - "type": "structure", - "members": { - "SnapshotIdentifier": { - "required": true - }, - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshot": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "createClusterSubnetGroup": { - "name": "CreateClusterSubnetGroup", - "input": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": { - "required": true - }, - "Description": { - "required": true - }, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ClusterSubnetGroup": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "createEventSubscription": { - "name": "CreateEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SnsTopicArn": { - "required": true - }, - "SourceType": {}, - "SourceIds": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": { - "type": "timestamp" - }, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "createHsmClientCertificate": { - "name": "CreateHsmClientCertificate", - "input": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "HsmClientCertificate": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmClientCertificatePublicKey": {} - } - } - } - } - }, - "createHsmConfiguration": { - "name": "CreateHsmConfiguration", - "input": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": { - "required": true - }, - "Description": { - "required": true - }, - "HsmIpAddress": { - "required": true - }, - "HsmPartitionName": { - "required": true - }, - "HsmPartitionPassword": { - "required": true - }, - "HsmServerPublicCertificate": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "HsmConfiguration": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": {}, - "Description": {}, - "HsmIpAddress": {}, - "HsmPartitionName": {} - } - } - } - } - }, - "deleteCluster": { - "name": "DeleteCluster", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "SkipFinalClusterSnapshot": { - "type": "boolean" - }, - "FinalClusterSnapshotIdentifier": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "deleteClusterParameterGroup": { - "name": "DeleteClusterParameterGroup", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteClusterSecurityGroup": { - "name": "DeleteClusterSecurityGroup", - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteClusterSnapshot": { - "name": "DeleteClusterSnapshot", - "input": { - "type": "structure", - "members": { - "SnapshotIdentifier": { - "required": true - }, - "SnapshotClusterIdentifier": {} - } - }, - "output": { - "type": "structure", - "members": { - "Snapshot": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "deleteClusterSubnetGroup": { - "name": "DeleteClusterSubnetGroup", - "input": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteEventSubscription": { - "name": "DeleteEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteHsmClientCertificate": { - "name": "DeleteHsmClientCertificate", - "input": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteHsmConfiguration": { - "name": "DeleteHsmConfiguration", - "input": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeClusterParameterGroups": { - "name": "DescribeClusterParameterGroups", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupFamily": {}, - "Description": {} - }, - "name": "ClusterParameterGroup" - } - } - } - } - }, - "describeClusterParameters": { - "name": "DescribeClusterParameters", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": { - "required": true - }, - "Source": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - } - }, - "Marker": {} - } - } - }, - "describeClusterSecurityGroups": { - "name": "DescribeClusterSecurityGroups", - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - }, - "name": "ClusterSecurityGroup" - } - } - } - } - }, - "describeClusterSnapshots": { - "name": "DescribeClusterSnapshots", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "SnapshotIdentifier": {}, - "SnapshotType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {}, - "OwnerAccount": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Snapshots": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - }, - "name": "Snapshot" - } - } - } - } - }, - "describeClusterSubnetGroups": { - "name": "DescribeClusterSubnetGroups", - "input": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ClusterSubnetGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - }, - "name": "ClusterSubnetGroup" - } - } - } - } - }, - "describeClusterVersions": { - "name": "DescribeClusterVersions", - "input": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterParameterGroupFamily": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ClusterVersions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterParameterGroupFamily": {}, - "Description": {} - }, - "name": "ClusterVersion" - } - } - } - } - }, - "describeClusters": { - "name": "DescribeClusters", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Clusters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - }, - "name": "Cluster" - } - } - } - } - }, - "describeDefaultClusterParameters": { - "name": "DescribeDefaultClusterParameters", - "input": { - "type": "structure", - "members": { - "ParameterGroupFamily": { - "required": true - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "DefaultClusterParameters": { - "type": "structure", - "members": { - "ParameterGroupFamily": {}, - "Marker": {}, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - } - } - } - } - } - } - }, - "describeEventCategories": { - "name": "DescribeEventCategories", - "input": { - "type": "structure", - "members": { - "SourceType": {} - } - }, - "output": { - "type": "structure", - "members": { - "EventCategoriesMapList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceType": {}, - "Events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "EventId": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "EventDescription": {}, - "Severity": {} - }, - "name": "EventInfoMap" - } - } - }, - "name": "EventCategoriesMap" - } - } - } - } - }, - "describeEventSubscriptions": { - "name": "DescribeEventSubscriptions", - "input": { - "type": "structure", - "members": { - "SubscriptionName": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "EventSubscriptionsList": { - "type": "list", - "members": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": { - "type": "timestamp" - }, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - }, - "name": "EventSubscription" - } - } - } - } - }, - "describeEvents": { - "name": "DescribeEvents", - "input": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "StartTime": { - "type": "timestamp" - }, - "EndTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "Events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SourceIdentifier": {}, - "SourceType": {}, - "Message": {}, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Date": { - "type": "timestamp" - }, - "EventId": {} - }, - "name": "Event" - } - } - } - } - }, - "describeHsmClientCertificates": { - "name": "DescribeHsmClientCertificates", - "input": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "HsmClientCertificates": { - "type": "list", - "members": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmClientCertificatePublicKey": {} - }, - "name": "HsmClientCertificate" - } - } - } - } - }, - "describeHsmConfigurations": { - "name": "DescribeHsmConfigurations", - "input": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "HsmConfigurations": { - "type": "list", - "members": { - "type": "structure", - "members": { - "HsmConfigurationIdentifier": {}, - "Description": {}, - "HsmIpAddress": {}, - "HsmPartitionName": {} - }, - "name": "HsmConfiguration" - } - } - } - } - }, - "describeLoggingStatus": { - "name": "DescribeLoggingStatus", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoggingEnabled": { - "type": "boolean" - }, - "BucketName": {}, - "S3KeyPrefix": {}, - "LastSuccessfulDeliveryTime": { - "type": "timestamp" - }, - "LastFailureTime": { - "type": "timestamp" - }, - "LastFailureMessage": {} - } - } - }, - "describeOrderableClusterOptions": { - "name": "DescribeOrderableClusterOptions", - "input": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "NodeType": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "OrderableClusterOptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterVersion": {}, - "ClusterType": {}, - "NodeType": {}, - "AvailabilityZones": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {} - }, - "name": "AvailabilityZone" - } - } - }, - "name": "OrderableClusterOption" - } - }, - "Marker": {} - } - } - }, - "describeReservedNodeOfferings": { - "name": "DescribeReservedNodeOfferings", - "input": { - "type": "structure", - "members": { - "ReservedNodeOfferingId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedNodeOfferings": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedNodeOfferingId": {}, - "NodeType": {}, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "OfferingType": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedNodeOffering" - } - } - } - } - }, - "describeReservedNodes": { - "name": "DescribeReservedNodes", - "input": { - "type": "structure", - "members": { - "ReservedNodeId": {}, - "MaxRecords": { - "type": "integer" - }, - "Marker": {} - } - }, - "output": { - "type": "structure", - "members": { - "Marker": {}, - "ReservedNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ReservedNodeId": {}, - "ReservedNodeOfferingId": {}, - "NodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "NodeCount": { - "type": "integer" - }, - "State": {}, - "OfferingType": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - }, - "name": "ReservedNode" - } - } - } - } - }, - "describeResize": { - "name": "DescribeResize", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TargetNodeType": {}, - "TargetNumberOfNodes": { - "type": "integer" - }, - "TargetClusterType": {}, - "Status": {}, - "ImportTablesCompleted": { - "type": "list", - "members": {} - }, - "ImportTablesInProgress": { - "type": "list", - "members": {} - }, - "ImportTablesNotStarted": { - "type": "list", - "members": {} - }, - "AvgResizeRateInMegaBytesPerSecond": { - "type": "float" - }, - "TotalResizeDataInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - } - }, - "disableLogging": { - "name": "DisableLogging", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "LoggingEnabled": { - "type": "boolean" - }, - "BucketName": {}, - "S3KeyPrefix": {}, - "LastSuccessfulDeliveryTime": { - "type": "timestamp" - }, - "LastFailureTime": { - "type": "timestamp" - }, - "LastFailureMessage": {} - } - } - }, - "disableSnapshotCopy": { - "name": "DisableSnapshotCopy", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "enableLogging": { - "name": "EnableLogging", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "BucketName": { - "required": true - }, - "S3KeyPrefix": {} - } - }, - "output": { - "type": "structure", - "members": { - "LoggingEnabled": { - "type": "boolean" - }, - "BucketName": {}, - "S3KeyPrefix": {}, - "LastSuccessfulDeliveryTime": { - "type": "timestamp" - }, - "LastFailureTime": { - "type": "timestamp" - }, - "LastFailureMessage": {} - } - } - }, - "enableSnapshotCopy": { - "name": "EnableSnapshotCopy", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "DestinationRegion": { - "required": true - }, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "modifyCluster": { - "name": "ModifyCluster", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "ClusterType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "name": "ClusterSecurityGroupName" - } - }, - "VpcSecurityGroupIds": { - "type": "list", - "members": { - "name": "VpcSecurityGroupId" - } - }, - "MasterUserPassword": {}, - "ClusterParameterGroupName": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "PreferredMaintenanceWindow": {}, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "modifyClusterParameterGroup": { - "name": "ModifyClusterParameterGroup", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": { - "required": true - }, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupStatus": {} - } - } - }, - "modifyClusterSubnetGroup": { - "name": "ModifyClusterSubnetGroup", - "input": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": { - "required": true - }, - "Description": {}, - "SubnetIds": { - "type": "list", - "members": { - "name": "SubnetIdentifier" - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ClusterSubnetGroup": { - "type": "structure", - "members": { - "ClusterSubnetGroupName": {}, - "Description": {}, - "VpcId": {}, - "SubnetGroupStatus": {}, - "Subnets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubnetIdentifier": {}, - "SubnetAvailabilityZone": { - "type": "structure", - "members": { - "Name": {} - } - }, - "SubnetStatus": {} - }, - "name": "Subnet" - } - } - } - } - } - } - }, - "modifyEventSubscription": { - "name": "ModifyEventSubscription", - "input": { - "type": "structure", - "members": { - "SubscriptionName": { - "required": true - }, - "SnsTopicArn": {}, - "SourceType": {}, - "SourceIds": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategories": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "EventSubscription": { - "type": "structure", - "members": { - "CustomerAwsId": {}, - "CustSubscriptionId": {}, - "SnsTopicArn": {}, - "Status": {}, - "SubscriptionCreationTime": { - "type": "timestamp" - }, - "SourceType": {}, - "SourceIdsList": { - "type": "list", - "members": { - "name": "SourceId" - } - }, - "EventCategoriesList": { - "type": "list", - "members": { - "name": "EventCategory" - } - }, - "Severity": {}, - "Enabled": { - "type": "boolean" - } - } - } - } - } - }, - "modifySnapshotCopyRetentionPeriod": { - "name": "ModifySnapshotCopyRetentionPeriod", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "RetentionPeriod": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "purchaseReservedNodeOffering": { - "name": "PurchaseReservedNodeOffering", - "input": { - "type": "structure", - "members": { - "ReservedNodeOfferingId": { - "required": true - }, - "NodeCount": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "ReservedNode": { - "type": "structure", - "members": { - "ReservedNodeId": {}, - "ReservedNodeOfferingId": {}, - "NodeType": {}, - "StartTime": { - "type": "timestamp" - }, - "Duration": { - "type": "integer" - }, - "FixedPrice": { - "type": "float" - }, - "UsagePrice": { - "type": "float" - }, - "CurrencyCode": {}, - "NodeCount": { - "type": "integer" - }, - "State": {}, - "OfferingType": {}, - "RecurringCharges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "RecurringChargeAmount": { - "type": "float" - }, - "RecurringChargeFrequency": {} - }, - "name": "RecurringCharge" - } - } - } - } - } - } - }, - "rebootCluster": { - "name": "RebootCluster", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "resetClusterParameterGroup": { - "name": "ResetClusterParameterGroup", - "input": { - "type": "structure", - "members": { - "ParameterGroupName": { - "required": true - }, - "ResetAllParameters": { - "type": "boolean" - }, - "Parameters": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterName": {}, - "ParameterValue": {}, - "Description": {}, - "Source": {}, - "DataType": {}, - "AllowedValues": {}, - "IsModifiable": { - "type": "boolean" - }, - "MinimumEngineVersion": {} - }, - "name": "Parameter" - } - } - } - }, - "output": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterGroupStatus": {} - } - } - }, - "restoreFromClusterSnapshot": { - "name": "RestoreFromClusterSnapshot", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - }, - "SnapshotIdentifier": { - "required": true - }, - "SnapshotClusterIdentifier": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "ClusterSubnetGroupName": {}, - "PubliclyAccessible": { - "type": "boolean" - }, - "OwnerAccount": {}, - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "ElasticIp": {} - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - }, - "revokeClusterSecurityGroupIngress": { - "name": "RevokeClusterSecurityGroupIngress", - "input": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": { - "required": true - }, - "CIDRIP": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - } - }, - "output": { - "type": "structure", - "members": { - "ClusterSecurityGroup": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Description": {}, - "EC2SecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "EC2SecurityGroupName": {}, - "EC2SecurityGroupOwnerId": {} - }, - "name": "EC2SecurityGroup" - } - }, - "IPRanges": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Status": {}, - "CIDRIP": {} - }, - "name": "IPRange" - } - } - } - } - } - } - }, - "revokeSnapshotAccess": { - "name": "RevokeSnapshotAccess", - "input": { - "type": "structure", - "members": { - "SnapshotIdentifier": { - "required": true - }, - "SnapshotClusterIdentifier": {}, - "AccountWithRestoreAccess": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Snapshot": { - "type": "structure", - "members": { - "SnapshotIdentifier": {}, - "ClusterIdentifier": {}, - "SnapshotCreateTime": { - "type": "timestamp" - }, - "Status": {}, - "Port": { - "type": "integer" - }, - "AvailabilityZone": {}, - "ClusterCreateTime": { - "type": "timestamp" - }, - "MasterUsername": {}, - "ClusterVersion": {}, - "SnapshotType": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "DBName": {}, - "VpcId": {}, - "Encrypted": { - "type": "boolean" - }, - "EncryptedWithHSM": { - "type": "boolean" - }, - "AccountsWithRestoreAccess": { - "type": "list", - "members": { - "type": "structure", - "members": { - "AccountId": {} - }, - "name": "AccountWithRestoreAccess" - } - }, - "OwnerAccount": {}, - "TotalBackupSizeInMegaBytes": { - "type": "float" - }, - "ActualIncrementalBackupSizeInMegaBytes": { - "type": "float" - }, - "BackupProgressInMegaBytes": { - "type": "float" - }, - "CurrentBackupRateInMegaBytesPerSecond": { - "type": "float" - }, - "EstimatedSecondsToCompletion": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "SourceRegion": {} - } - } - } - } - }, - "rotateEncryptionKey": { - "name": "RotateEncryptionKey", - "input": { - "type": "structure", - "members": { - "ClusterIdentifier": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Cluster": { - "type": "structure", - "members": { - "ClusterIdentifier": {}, - "NodeType": {}, - "ClusterStatus": {}, - "ModifyStatus": {}, - "MasterUsername": {}, - "DBName": {}, - "Endpoint": { - "type": "structure", - "members": { - "Address": {}, - "Port": { - "type": "integer" - } - } - }, - "ClusterCreateTime": { - "type": "timestamp" - }, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - }, - "ClusterSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ClusterSecurityGroupName": {}, - "Status": {} - }, - "name": "ClusterSecurityGroup" - } - }, - "VpcSecurityGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VpcSecurityGroupId": {}, - "Status": {} - }, - "name": "VpcSecurityGroup" - } - }, - "ClusterParameterGroups": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ParameterGroupName": {}, - "ParameterApplyStatus": {} - }, - "name": "ClusterParameterGroup" - } - }, - "ClusterSubnetGroupName": {}, - "VpcId": {}, - "AvailabilityZone": {}, - "PreferredMaintenanceWindow": {}, - "PendingModifiedValues": { - "type": "structure", - "members": { - "MasterUserPassword": {}, - "NodeType": {}, - "NumberOfNodes": { - "type": "integer" - }, - "ClusterType": {}, - "ClusterVersion": {}, - "AutomatedSnapshotRetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterVersion": {}, - "AllowVersionUpgrade": { - "type": "boolean" - }, - "NumberOfNodes": { - "type": "integer" - }, - "PubliclyAccessible": { - "type": "boolean" - }, - "Encrypted": { - "type": "boolean" - }, - "RestoreStatus": { - "type": "structure", - "members": { - "Status": {}, - "CurrentRestoreRateInMegaBytesPerSecond": { - "type": "float" - }, - "SnapshotSizeInMegaBytes": { - "type": "integer" - }, - "ProgressInMegaBytes": { - "type": "integer" - }, - "ElapsedTimeInSeconds": { - "type": "integer" - }, - "EstimatedTimeToCompletionInSeconds": { - "type": "integer" - } - } - }, - "HsmStatus": { - "type": "structure", - "members": { - "HsmClientCertificateIdentifier": {}, - "HsmConfigurationIdentifier": {}, - "Status": {} - } - }, - "ClusterSnapshotCopyStatus": { - "type": "structure", - "members": { - "DestinationRegion": {}, - "RetentionPeriod": { - "type": "integer" - } - } - }, - "ClusterPublicKey": {}, - "ClusterNodes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "NodeRole": {}, - "PrivateIPAddress": {}, - "PublicIPAddress": {} - } - } - }, - "ElasticIpStatus": { - "type": "structure", - "members": { - "ElasticIp": {}, - "Status": {} - } - }, - "ClusterRevisionNumber": {} - } - } - } - } - } - }, - "pagination": { - "describeClusterParameterGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ParameterGroups" - }, - "describeClusterParameters": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Parameters" - }, - "describeClusterSecurityGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ClusterSecurityGroups" - }, - "describeClusterSnapshots": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Snapshots" - }, - "describeClusterSubnetGroups": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ClusterSubnetGroups" - }, - "describeClusterVersions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ClusterVersions" - }, - "describeClusters": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Clusters" - }, - "describeDefaultClusterParameters": { - "inputToken": "Marker", - "outputToken": "DefaultClusterParameters.Marker", - "limitKey": "MaxRecords", - "resultKey": "DefaultClusterParameters.Parameters" - }, - "describeEventSubscriptions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "EventSubscriptionsList" - }, - "describeEvents": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "Events" - }, - "describeHsmClientCertificates": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "HsmClientCertificates" - }, - "describeHsmConfigurations": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "HsmConfigurations" - }, - "describeOrderableClusterOptions": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "OrderableClusterOptions" - }, - "describeReservedNodeOfferings": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedNodeOfferings" - }, - "describeReservedNodes": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "MaxRecords", - "resultKey": "ReservedNodes" - } - }, - "waiters": { - "__default__": { - "acceptorType": "output" - }, - "__ClusterState": { - "interval": 60, - "maxAttempts": 30, - "operation": "DescribeClusters", - "acceptorPath": "Clusters[].ClusterStatus" - }, - "clusterAvailable": { - "extends": "__ClusterState", - "ignoreErrors": [ - "ClusterNotFound" - ], - "successValue": "available", - "failureValue": [ - "deleting" - ] - }, - "clusterDeleted": { - "extends": "__ClusterState", - "successType": "error", - "successValue": "ClusterNotFound", - "failureValue": [ - "creating", - "rebooting" - ] - }, - "snapshotAvailable": { - "interval": 15, - "maxAttempts": 20, - "operation": "DescribeClusterSnapshots", - "acceptorPath": "Snapshots[].Status", - "successValue": "available", - "failureValue": [ - "failed", - "deleted" - ] - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Route53-2013-04-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Route53-2013-04-01.json deleted file mode 100644 index 0121416d..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Route53-2013-04-01.json +++ /dev/null @@ -1,760 +0,0 @@ -{ - "format": "rest-xml", - "apiVersion": "2013-04-01", - "endpointPrefix": "route53", - "globalEndpoint": "route53.amazonaws.com", - "serviceAbbreviation": "Route 53", - "serviceFullName": "Amazon Route 53", - "signatureVersion": "v3https", - "timestampFormat": "iso8601", - "xmlnamespace": "https://route53.amazonaws.com/doc/2013-04-01/", - "operations": { - "changeResourceRecordSets": { - "name": "ChangeResourceRecordSets", - "http": { - "method": "POST", - "uri": "/2013-04-01/hostedzone/{HostedZoneId}/rrset/" - }, - "input": { - "payload": [ - "ChangeBatch" - ], - "wrapper": "ChangeResourceRecordSetsRequest", - "type": "structure", - "members": { - "HostedZoneId": { - "required": true, - "location": "uri" - }, - "ChangeBatch": { - "type": "structure", - "members": { - "Comment": {}, - "Changes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Action": { - "required": true - }, - "ResourceRecordSet": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Type": { - "required": true - }, - "SetIdentifier": {}, - "Weight": { - "type": "integer" - }, - "Region": {}, - "Failover": {}, - "TTL": { - "type": "integer" - }, - "ResourceRecords": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Value": { - "required": true - } - }, - "order": [ - "Value" - ], - "name": "ResourceRecord" - } - }, - "AliasTarget": { - "type": "structure", - "members": { - "HostedZoneId": { - "required": true - }, - "DNSName": { - "required": true - }, - "EvaluateTargetHealth": { - "type": "boolean", - "required": true - } - }, - "order": [ - "HostedZoneId", - "DNSName", - "EvaluateTargetHealth" - ] - }, - "HealthCheckId": {} - }, - "order": [ - "Name", - "Type", - "SetIdentifier", - "Weight", - "Region", - "Failover", - "TTL", - "ResourceRecords", - "AliasTarget", - "HealthCheckId" - ], - "required": true - } - }, - "order": [ - "Action", - "ResourceRecordSet" - ], - "name": "Change" - }, - "required": true - } - }, - "order": [ - "Comment", - "Changes" - ], - "required": true - } - }, - "order": [ - "HostedZoneId", - "ChangeBatch" - ] - }, - "output": { - "type": "structure", - "members": { - "ChangeInfo": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "SubmittedAt": { - "type": "timestamp" - }, - "Comment": {} - } - } - } - } - }, - "createHealthCheck": { - "name": "CreateHealthCheck", - "http": { - "method": "POST", - "uri": "/2013-04-01/healthcheck" - }, - "input": { - "payload": [ - "CallerReference", - "HealthCheckConfig" - ], - "wrapper": "CreateHealthCheckRequest", - "type": "structure", - "members": { - "CallerReference": { - "required": true - }, - "HealthCheckConfig": { - "type": "structure", - "members": { - "IPAddress": { - "required": true - }, - "Port": { - "type": "integer" - }, - "Type": { - "required": true - }, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "RequestInterval": { - "type": "integer" - }, - "FailureThreshold": { - "type": "integer" - } - }, - "order": [ - "IPAddress", - "Port", - "Type", - "ResourcePath", - "FullyQualifiedDomainName", - "SearchString", - "RequestInterval", - "FailureThreshold" - ], - "required": true - } - }, - "order": [ - "CallerReference", - "HealthCheckConfig" - ] - }, - "output": { - "type": "structure", - "members": { - "HealthCheck": { - "type": "structure", - "members": { - "Id": {}, - "CallerReference": {}, - "HealthCheckConfig": { - "type": "structure", - "members": { - "IPAddress": {}, - "Port": { - "type": "integer" - }, - "Type": {}, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "RequestInterval": { - "type": "integer" - }, - "FailureThreshold": { - "type": "integer" - } - } - } - } - }, - "Location": { - "location": "header", - "name": "Location" - } - } - } - }, - "createHostedZone": { - "name": "CreateHostedZone", - "http": { - "method": "POST", - "uri": "/2013-04-01/hostedzone" - }, - "input": { - "payload": [ - "Name", - "CallerReference", - "HostedZoneConfig" - ], - "wrapper": "CreateHostedZoneRequest", - "type": "structure", - "members": { - "Name": { - "required": true - }, - "CallerReference": { - "required": true - }, - "HostedZoneConfig": { - "type": "structure", - "members": { - "Comment": {} - }, - "order": [ - "Comment" - ] - } - }, - "order": [ - "Name", - "CallerReference", - "HostedZoneConfig" - ] - }, - "output": { - "type": "structure", - "members": { - "HostedZone": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "CallerReference": {}, - "Config": { - "type": "structure", - "members": { - "Comment": {} - } - }, - "ResourceRecordSetCount": { - "type": "integer" - } - } - }, - "ChangeInfo": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "SubmittedAt": { - "type": "timestamp" - }, - "Comment": {} - } - }, - "DelegationSet": { - "type": "structure", - "members": { - "NameServers": { - "type": "list", - "members": { - "name": "NameServer" - } - } - } - }, - "Location": { - "location": "header", - "name": "Location" - } - } - } - }, - "deleteHealthCheck": { - "name": "DeleteHealthCheck", - "http": { - "method": "DELETE", - "uri": "/2013-04-01/healthcheck/{HealthCheckId}" - }, - "input": { - "type": "structure", - "members": { - "HealthCheckId": { - "required": true, - "location": "uri" - } - }, - "order": [ - "HealthCheckId" - ] - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteHostedZone": { - "name": "DeleteHostedZone", - "http": { - "method": "DELETE", - "uri": "/2013-04-01/hostedzone/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "required": true, - "location": "uri" - } - }, - "order": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "ChangeInfo": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "SubmittedAt": { - "type": "timestamp" - }, - "Comment": {} - } - } - } - } - }, - "getChange": { - "name": "GetChange", - "http": { - "method": "GET", - "uri": "/2013-04-01/change/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "required": true, - "location": "uri" - } - }, - "order": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "ChangeInfo": { - "type": "structure", - "members": { - "Id": {}, - "Status": {}, - "SubmittedAt": { - "type": "timestamp" - }, - "Comment": {} - } - } - } - } - }, - "getHealthCheck": { - "name": "GetHealthCheck", - "http": { - "method": "GET", - "uri": "/2013-04-01/healthcheck/{HealthCheckId}" - }, - "input": { - "type": "structure", - "members": { - "HealthCheckId": { - "required": true, - "location": "uri" - } - }, - "order": [ - "HealthCheckId" - ] - }, - "output": { - "type": "structure", - "members": { - "HealthCheck": { - "type": "structure", - "members": { - "Id": {}, - "CallerReference": {}, - "HealthCheckConfig": { - "type": "structure", - "members": { - "IPAddress": {}, - "Port": { - "type": "integer" - }, - "Type": {}, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "RequestInterval": { - "type": "integer" - }, - "FailureThreshold": { - "type": "integer" - } - } - } - } - } - } - } - }, - "getHostedZone": { - "name": "GetHostedZone", - "http": { - "method": "GET", - "uri": "/2013-04-01/hostedzone/{Id}" - }, - "input": { - "type": "structure", - "members": { - "Id": { - "required": true, - "location": "uri" - } - }, - "order": [ - "Id" - ] - }, - "output": { - "type": "structure", - "members": { - "HostedZone": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "CallerReference": {}, - "Config": { - "type": "structure", - "members": { - "Comment": {} - } - }, - "ResourceRecordSetCount": { - "type": "integer" - } - } - }, - "DelegationSet": { - "type": "structure", - "members": { - "NameServers": { - "type": "list", - "members": { - "name": "NameServer" - } - } - } - } - } - } - }, - "listHealthChecks": { - "name": "ListHealthChecks", - "http": { - "method": "GET", - "uri": "/2013-04-01/healthcheck?marker={Marker}&maxitems={MaxItems}" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - }, - "order": [ - "Marker", - "MaxItems" - ] - }, - "output": { - "type": "structure", - "members": { - "HealthChecks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "CallerReference": {}, - "HealthCheckConfig": { - "type": "structure", - "members": { - "IPAddress": {}, - "Port": { - "type": "integer" - }, - "Type": {}, - "ResourcePath": {}, - "FullyQualifiedDomainName": {}, - "SearchString": {}, - "RequestInterval": { - "type": "integer" - }, - "FailureThreshold": { - "type": "integer" - } - } - } - }, - "name": "HealthCheck" - } - }, - "Marker": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextMarker": {}, - "MaxItems": {} - } - } - }, - "listHostedZones": { - "name": "ListHostedZones", - "http": { - "method": "GET", - "uri": "/2013-04-01/hostedzone?marker={Marker}&maxitems={MaxItems}" - }, - "input": { - "type": "structure", - "members": { - "Marker": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - }, - "order": [ - "Marker", - "MaxItems" - ] - }, - "output": { - "type": "structure", - "members": { - "HostedZones": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "Name": {}, - "CallerReference": {}, - "Config": { - "type": "structure", - "members": { - "Comment": {} - } - }, - "ResourceRecordSetCount": { - "type": "integer" - } - }, - "name": "HostedZone" - } - }, - "Marker": {}, - "IsTruncated": { - "type": "boolean" - }, - "NextMarker": {}, - "MaxItems": {} - } - } - }, - "listResourceRecordSets": { - "name": "ListResourceRecordSets", - "http": { - "method": "GET", - "uri": "/2013-04-01/hostedzone/{HostedZoneId}/rrset?type={StartRecordType}&name={StartRecordName}&identifier={StartRecordIdentifier}&maxitems={MaxItems}" - }, - "input": { - "type": "structure", - "members": { - "HostedZoneId": { - "required": true, - "location": "uri" - }, - "StartRecordName": { - "location": "uri" - }, - "StartRecordType": { - "location": "uri" - }, - "StartRecordIdentifier": { - "location": "uri" - }, - "MaxItems": { - "location": "uri" - } - }, - "order": [ - "HostedZoneId", - "StartRecordName", - "StartRecordType", - "StartRecordIdentifier", - "MaxItems" - ] - }, - "output": { - "type": "structure", - "members": { - "ResourceRecordSets": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "Type": {}, - "SetIdentifier": {}, - "Weight": { - "type": "integer" - }, - "Region": {}, - "Failover": {}, - "TTL": { - "type": "integer" - }, - "ResourceRecords": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Value": {} - }, - "name": "ResourceRecord" - } - }, - "AliasTarget": { - "type": "structure", - "members": { - "HostedZoneId": {}, - "DNSName": {}, - "EvaluateTargetHealth": { - "type": "boolean" - } - } - }, - "HealthCheckId": {} - }, - "name": "ResourceRecordSet" - } - }, - "IsTruncated": { - "type": "boolean" - }, - "NextRecordName": {}, - "NextRecordType": {}, - "NextRecordIdentifier": {}, - "MaxItems": {} - } - } - } - }, - "pagination": { - "listHealthChecks": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "HealthChecks" - }, - "listHostedZones": { - "inputToken": "Marker", - "outputToken": "NextMarker", - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "HostedZones" - }, - "listResourceRecordSets": { - "moreResults": "IsTruncated", - "limitKey": "MaxItems", - "resultKey": "ResourceRecordSets", - "inputToken": [ - "StartRecordName", - "StartRecordType", - "StartRecordIdentifier" - ], - "outputToken": [ - "NextRecordName", - "NextRecordType", - "NextRecordIdentifier" - ] - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/S3-2006-03-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/S3-2006-03-01.json deleted file mode 100644 index 3fba0bdf..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/S3-2006-03-01.json +++ /dev/null @@ -1,2927 +0,0 @@ -{ - "format": "rest-xml", - "apiVersion": "2006-03-01", - "checksumFormat": "md5", - "endpointPrefix": "s3", - "globalEndpoint": "s3.amazonaws.com", - "serviceAbbreviation": "Amazon S3", - "serviceFullName": "Amazon Simple Storage Service", - "signatureVersion": "s3", - "timestampFormat": "rfc822", - "xmlnamespace": "http://s3.amazonaws.com/doc/2006-03-01/", - "operations": { - "abortMultipartUpload": { - "name": "AbortMultipartUpload", - "http": { - "method": "DELETE", - "uri": "/{Bucket}/{Key}?uploadId={UploadId}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "UploadId": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "completeMultipartUpload": { - "name": "CompleteMultipartUpload", - "http": { - "method": "POST", - "uri": "/{Bucket}/{Key}?uploadId={UploadId}" - }, - "input": { - "payload": "MultipartUpload", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "MultipartUpload": { - "type": "structure", - "name": "CompleteMultipartUpload", - "members": { - "Parts": { - "type": "list", - "name": "Part", - "members": { - "type": "structure", - "members": { - "ETag": {}, - "PartNumber": { - "type": "integer" - } - } - }, - "flattened": true - } - } - }, - "UploadId": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": {}, - "ETag": {}, - "Expiration": { - "type": "timestamp", - "location": "header", - "name": "x-amz-expiration" - }, - "Key": {}, - "Location": {}, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "name": "x-amz-version-id" - } - } - } - }, - "copyObject": { - "name": "CopyObject", - "alias": "PutObjectCopy", - "http": { - "method": "PUT", - "uri": "/{Bucket}/{Key}" - }, - "input": { - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "CacheControl": { - "location": "header", - "name": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "name": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "name": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "name": "Content-Language" - }, - "ContentType": { - "location": "header", - "name": "Content-Type" - }, - "CopySource": { - "required": true, - "location": "header", - "name": "x-amz-copy-source" - }, - "CopySourceIfMatch": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-match" - }, - "CopySourceIfModifiedSince": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-modified-since" - }, - "CopySourceIfNoneMatch": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-none-match" - }, - "CopySourceIfUnmodifiedSince": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-unmodified-since" - }, - "Expires": { - "type": "timestamp", - "location": "header", - "name": "Expires" - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - }, - "Key": { - "required": true, - "location": "uri" - }, - "Metadata": { - "type": "map", - "location": "header", - "name": "x-amz-meta-", - "members": {}, - "keys": {} - }, - "MetadataDirective": { - "location": "header", - "name": "x-amz-metadata-directive" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "name": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "name": "x-amz-website-redirect-location" - } - } - }, - "output": { - "type": "structure", - "members": { - "CopySourceVersionId": { - "location": "header", - "name": "x-amz-copy-source-version-id" - }, - "Expiration": { - "location": "header", - "name": "x-amz-expiration" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "ETag": {}, - "LastModified": {} - } - } - }, - "createBucket": { - "name": "CreateBucket", - "alias": "PutBucket", - "http": { - "method": "PUT", - "uri": "/{Bucket}" - }, - "input": { - "payload": "CreateBucketConfiguration", - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "CreateBucketConfiguration": { - "type": "structure", - "members": { - "LocationConstraint": {} - } - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "name": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - } - } - }, - "output": { - "type": "structure", - "members": { - "Location": { - "location": "header", - "name": "Location" - } - } - } - }, - "createMultipartUpload": { - "name": "CreateMultipartUpload", - "alias": "InitiateMultipartUpload", - "http": { - "method": "POST", - "uri": "/{Bucket}/{Key}?uploads" - }, - "input": { - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "CacheControl": { - "location": "header", - "name": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "name": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "name": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "name": "Content-Language" - }, - "ContentType": { - "location": "header", - "name": "Content-Type" - }, - "Expires": { - "type": "timestamp", - "location": "header", - "name": "Expires" - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - }, - "Key": { - "required": true, - "location": "uri" - }, - "Metadata": { - "type": "map", - "location": "header", - "name": "x-amz-meta-", - "members": {}, - "keys": {} - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "name": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "name": "x-amz-website-redirect-location" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": { - "name": "Bucket" - }, - "Key": {}, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "UploadId": {} - } - } - }, - "deleteBucket": { - "name": "DeleteBucket", - "http": { - "method": "DELETE", - "uri": "/{Bucket}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteBucketCors": { - "name": "DeleteBucketCors", - "http": { - "method": "DELETE", - "uri": "/{Bucket}?cors" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteBucketLifecycle": { - "name": "DeleteBucketLifecycle", - "http": { - "method": "DELETE", - "uri": "/{Bucket}?lifecycle" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteBucketPolicy": { - "name": "DeleteBucketPolicy", - "http": { - "method": "DELETE", - "uri": "/{Bucket}?policy" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteBucketTagging": { - "name": "DeleteBucketTagging", - "http": { - "method": "DELETE", - "uri": "/{Bucket}?tagging" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteBucketWebsite": { - "name": "DeleteBucketWebsite", - "http": { - "method": "DELETE", - "uri": "/{Bucket}?website" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteObject": { - "name": "DeleteObject", - "http": { - "method": "DELETE", - "uri": "/{Bucket}/{Key}?versionId={VersionId}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "MFA": { - "location": "header", - "name": "x-amz-mfa" - }, - "VersionId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "DeleteMarker": { - "type": "boolean", - "location": "header", - "name": "x-amz-delete-marker" - }, - "VersionId": { - "location": "header", - "name": "x-amz-version-id" - } - } - } - }, - "deleteObjects": { - "name": "DeleteObjects", - "alias": "DeleteMultipleObjects", - "http": { - "method": "POST", - "uri": "/{Bucket}?delete" - }, - "input": { - "payload": "Delete", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Delete": { - "type": "structure", - "required": true, - "members": { - "Objects": { - "type": "list", - "required": true, - "name": "Object", - "members": { - "type": "structure", - "members": { - "Key": { - "required": true - }, - "VersionId": {} - } - }, - "flattened": true - }, - "Quiet": { - "type": "boolean" - } - } - }, - "MFA": { - "location": "header", - "name": "x-amz-mfa" - } - } - }, - "output": { - "type": "structure", - "members": { - "Deleted": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DeleteMarker": { - "type": "boolean" - }, - "DeleteMarkerVersionId": {}, - "Key": {}, - "VersionId": {} - } - }, - "flattened": true - }, - "Error": { - "type": "list", - "name": "Errors", - "members": { - "type": "structure", - "members": { - "Code": {}, - "Key": {}, - "Message": {}, - "VersionId": {} - } - }, - "flattened": true - } - } - } - }, - "getBucketAcl": { - "name": "GetBucketAcl", - "http": { - "method": "GET", - "uri": "/{Bucket}?acl" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessControlList": { - "type": "list", - "name": "Grants", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "xsi:type": { - "name": "Type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - } - } - } - }, - "getBucketCors": { - "name": "GetBucketCors", - "http": { - "method": "GET", - "uri": "/{Bucket}?cors" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "CORSRule": { - "type": "list", - "name": "CORSRules", - "members": { - "type": "structure", - "members": { - "AllowedHeader": { - "type": "list", - "name": "AllowedHeaders", - "members": {}, - "flattened": true - }, - "AllowedMethod": { - "type": "list", - "name": "AllowedMethods", - "members": {}, - "flattened": true - }, - "AllowedOrigin": { - "type": "list", - "name": "AllowedOrigins", - "members": {}, - "flattened": true - }, - "ExposeHeader": { - "type": "list", - "name": "ExposeHeaders", - "members": {}, - "flattened": true - }, - "MaxAgeSeconds": { - "type": "integer" - } - } - }, - "flattened": true - } - } - } - }, - "getBucketLifecycle": { - "name": "GetBucketLifecycle", - "http": { - "method": "GET", - "uri": "/{Bucket}?lifecycle" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Rule": { - "type": "list", - "name": "Rules", - "members": { - "type": "structure", - "members": { - "Expiration": { - "type": "structure", - "members": { - "Date": { - "type": "timestamp", - "format": "iso8601" - }, - "Days": { - "type": "integer" - } - } - }, - "ID": {}, - "Prefix": {}, - "Status": {}, - "Transition": { - "type": "structure", - "members": { - "Date": { - "type": "timestamp", - "format": "iso8601" - }, - "Days": { - "type": "integer" - }, - "StorageClass": {} - } - } - } - }, - "flattened": true - } - } - } - }, - "getBucketLocation": { - "name": "GetBucketLocation", - "http": { - "method": "GET", - "uri": "/{Bucket}?location" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "LocationConstraint": {} - } - } - }, - "getBucketLogging": { - "name": "GetBucketLogging", - "http": { - "method": "GET", - "uri": "/{Bucket}?logging" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "LoggingEnabled": { - "type": "structure", - "members": { - "TargetBucket": {}, - "TargetGrants": { - "type": "list", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "xsi:type": { - "name": "Type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "TargetPrefix": {} - } - } - } - } - }, - "getBucketNotification": { - "name": "GetBucketNotification", - "http": { - "method": "GET", - "uri": "/{Bucket}?notification" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "TopicConfiguration": { - "type": "structure", - "members": { - "Event": {}, - "Topic": {} - } - } - } - } - }, - "getBucketPolicy": { - "name": "GetBucketPolicy", - "http": { - "method": "GET", - "uri": "/{Bucket}?policy" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Policy": {} - }, - "payload": "Policy" - } - }, - "getBucketRequestPayment": { - "name": "GetBucketRequestPayment", - "http": { - "method": "GET", - "uri": "/{Bucket}?requestPayment" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Payer": {} - } - } - }, - "getBucketTagging": { - "name": "GetBucketTagging", - "http": { - "method": "GET", - "uri": "/{Bucket}?tagging" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "TagSet": { - "type": "list", - "members": { - "type": "structure", - "name": "Tag", - "members": { - "Key": {}, - "Value": {} - } - } - } - } - } - }, - "getBucketVersioning": { - "name": "GetBucketVersioning", - "http": { - "method": "GET", - "uri": "/{Bucket}?versioning" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "MFADelete": {}, - "Status": {} - } - } - }, - "getBucketWebsite": { - "name": "GetBucketWebsite", - "http": { - "method": "GET", - "uri": "/{Bucket}?website" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ErrorDocument": { - "type": "structure", - "members": { - "Key": {} - } - }, - "IndexDocument": { - "type": "structure", - "members": { - "Suffix": {} - } - }, - "RedirectAllRequestsTo": { - "type": "structure", - "members": { - "HostName": {}, - "Protocol": {} - } - }, - "RoutingRules": { - "type": "list", - "members": { - "type": "structure", - "name": "RoutingRule", - "members": { - "Condition": { - "type": "structure", - "members": { - "HttpErrorCodeReturnedEquals": {}, - "KeyPrefixEquals": {} - } - }, - "Redirect": { - "type": "structure", - "members": { - "HostName": {}, - "HttpRedirectCode": {}, - "Protocol": {}, - "ReplaceKeyPrefixWith": {}, - "ReplaceKeyWith": {} - } - } - } - } - } - } - } - }, - "getObject": { - "name": "GetObject", - "http": { - "method": "GET", - "uri": "/{Bucket}/{Key}?versionId={VersionId}&response-content-type={ResponseContentType}&response-content-language={ResponseContentLanguage}&response-expires={ResponseExpires}&response-cache-control={ResponseCacheControl}&response-content-disposition={ResponseContentDisposition}&response-content-encoding={ResponseContentEncoding}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - }, - "IfModifiedSince": { - "type": "timestamp", - "location": "header", - "name": "If-Modified-Since" - }, - "IfNoneMatch": { - "location": "header", - "name": "If-None-Match" - }, - "IfUnmodifiedSince": { - "type": "timestamp", - "location": "header", - "name": "If-Unmodified-Since" - }, - "Key": { - "required": true, - "location": "uri" - }, - "Range": { - "location": "header", - "name": "Range" - }, - "ResponseCacheControl": { - "location": "uri" - }, - "ResponseContentDisposition": { - "location": "uri" - }, - "ResponseContentEncoding": { - "location": "uri" - }, - "ResponseContentLanguage": { - "location": "uri" - }, - "ResponseContentType": { - "location": "uri" - }, - "ResponseExpires": { - "type": "timestamp", - "location": "uri" - }, - "VersionId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "AcceptRanges": { - "location": "header", - "name": "accept-ranges" - }, - "Body": { - "type": "binary", - "streaming": true - }, - "CacheControl": { - "location": "header", - "name": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "name": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "name": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "name": "Content-Language" - }, - "ContentLength": { - "type": "integer", - "location": "header", - "name": "Content-Length" - }, - "ContentType": { - "location": "header", - "name": "Content-Type" - }, - "DeleteMarker": { - "type": "boolean", - "location": "header", - "name": "x-amz-delete-marker" - }, - "ETag": { - "location": "header", - "name": "ETag" - }, - "Expiration": { - "location": "header", - "name": "x-amz-expiration" - }, - "Expires": { - "type": "timestamp", - "location": "header", - "name": "Expires" - }, - "LastModified": { - "type": "timestamp", - "location": "header", - "name": "Last-Modified" - }, - "Metadata": { - "type": "map", - "location": "header", - "name": "x-amz-meta-", - "members": {}, - "keys": {} - }, - "MissingMeta": { - "type": "integer", - "location": "header", - "name": "x-amz-missing-meta" - }, - "Restore": { - "location": "header", - "name": "x-amz-restore" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "name": "x-amz-version-id" - }, - "WebsiteRedirectLocation": { - "location": "header", - "name": "x-amz-website-redirect-location" - } - }, - "payload": "Body" - } - }, - "getObjectAcl": { - "name": "GetObjectAcl", - "http": { - "method": "GET", - "uri": "/{Bucket}/{Key}?acl&versionId={VersionId}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "VersionId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "AccessControlList": { - "type": "list", - "name": "Grants", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "xsi:type": { - "name": "Type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - } - } - } - }, - "getObjectTorrent": { - "name": "GetObjectTorrent", - "http": { - "method": "GET", - "uri": "/{Bucket}/{Key}?torrent" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Body": { - "type": "binary", - "streaming": true - } - }, - "payload": "Body" - } - }, - "headBucket": { - "name": "HeadBucket", - "http": { - "method": "HEAD", - "uri": "/{Bucket}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "headObject": { - "name": "HeadObject", - "http": { - "method": "HEAD", - "uri": "/{Bucket}/{Key}?versionId={VersionId}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "IfMatch": { - "location": "header", - "name": "If-Match" - }, - "IfModifiedSince": { - "type": "timestamp", - "location": "header", - "name": "If-Modified-Since" - }, - "IfNoneMatch": { - "location": "header", - "name": "If-None-Match" - }, - "IfUnmodifiedSince": { - "type": "timestamp", - "location": "header", - "name": "If-Unmodified-Since" - }, - "Key": { - "required": true, - "location": "uri" - }, - "Range": { - "location": "header", - "name": "Range" - }, - "VersionId": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "AcceptRanges": { - "location": "header", - "name": "accept-ranges" - }, - "CacheControl": { - "location": "header", - "name": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "name": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "name": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "name": "Content-Language" - }, - "ContentLength": { - "type": "integer", - "location": "header", - "name": "Content-Length" - }, - "ContentType": { - "location": "header", - "name": "Content-Type" - }, - "DeleteMarker": { - "type": "boolean", - "location": "header", - "name": "x-amz-delete-marker" - }, - "ETag": { - "location": "header", - "name": "ETag" - }, - "Expiration": { - "location": "header", - "name": "x-amz-expiration" - }, - "Expires": { - "type": "timestamp", - "location": "header", - "name": "Expires" - }, - "LastModified": { - "type": "timestamp", - "location": "header", - "name": "Last-Modified" - }, - "Metadata": { - "type": "map", - "location": "header", - "name": "x-amz-meta-", - "members": {}, - "keys": {} - }, - "MissingMeta": { - "type": "integer", - "location": "header", - "name": "x-amz-missing-meta" - }, - "Restore": { - "location": "header", - "name": "x-amz-restore" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "name": "x-amz-version-id" - }, - "WebsiteRedirectLocation": { - "location": "header", - "name": "x-amz-website-redirect-location" - } - } - } - }, - "listBuckets": { - "name": "ListBuckets", - "alias": "GetService", - "http": { - "method": "GET", - "uri": "/" - }, - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "Buckets": { - "type": "list", - "members": { - "type": "structure", - "name": "Bucket", - "members": { - "CreationDate": { - "type": "timestamp" - }, - "Name": {} - } - } - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - } - } - } - }, - "listMultipartUploads": { - "name": "ListMultipartUploads", - "http": { - "method": "GET", - "uri": "/{Bucket}?uploads&prefix={Prefix}&delimiter={Delimiter}&max-uploads={MaxUploads}&key-marker={KeyMarker}&upload-id-marker={UploadIdMarker}&encoding-type={EncodingType}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Delimiter": { - "location": "uri" - }, - "EncodingType": { - "location": "uri" - }, - "KeyMarker": { - "location": "uri" - }, - "MaxUploads": { - "type": "integer", - "location": "uri" - }, - "Prefix": { - "location": "uri" - }, - "UploadIdMarker": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": {}, - "CommonPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Prefix": {} - } - }, - "flattened": true - }, - "EncodingType": { - "location": "header", - "name": "Encoding-Type" - }, - "IsTruncated": { - "type": "boolean" - }, - "KeyMarker": {}, - "MaxUploads": { - "type": "integer" - }, - "NextKeyMarker": {}, - "NextUploadIdMarker": {}, - "Prefix": {}, - "UploadIdMarker": {}, - "Upload": { - "type": "list", - "name": "Uploads", - "members": { - "type": "structure", - "members": { - "Initiated": { - "type": "timestamp" - }, - "Initiator": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "Key": {}, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "StorageClass": {}, - "UploadId": {} - } - }, - "flattened": true - } - } - } - }, - "listObjectVersions": { - "name": "ListObjectVersions", - "alias": "GetBucketObjectVersions", - "http": { - "method": "GET", - "uri": "/{Bucket}?versions&delimiter={Delimiter}&key-marker={KeyMarker}&max-keys={MaxKeys}&prefix={Prefix}&version-id-marker={VersionIdMarker}&encoding-type={EncodingType}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Delimiter": { - "location": "uri" - }, - "EncodingType": { - "location": "uri" - }, - "KeyMarker": { - "location": "uri" - }, - "MaxKeys": { - "type": "integer", - "location": "uri" - }, - "Prefix": { - "location": "uri" - }, - "VersionIdMarker": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "CommonPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Prefix": {} - } - }, - "flattened": true - }, - "DeleteMarker": { - "type": "list", - "name": "DeleteMarkers", - "members": { - "type": "structure", - "members": { - "IsLatest": { - "type": "boolean" - }, - "Key": {}, - "LastModified": { - "type": "timestamp" - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "VersionId": {} - } - }, - "flattened": true - }, - "EncodingType": { - "location": "header", - "name": "Encoding-Type" - }, - "IsTruncated": { - "type": "boolean" - }, - "KeyMarker": {}, - "MaxKeys": { - "type": "integer" - }, - "Name": {}, - "NextKeyMarker": {}, - "NextVersionIdMarker": {}, - "Prefix": {}, - "VersionIdMarker": {}, - "Version": { - "type": "list", - "name": "Versions", - "members": { - "type": "structure", - "members": { - "ETag": {}, - "IsLatest": { - "type": "boolean" - }, - "Key": {}, - "LastModified": { - "type": "timestamp" - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "Size": {}, - "StorageClass": {}, - "VersionId": {} - } - }, - "flattened": true - } - } - } - }, - "listObjects": { - "name": "ListObjects", - "alias": "GetBucket", - "http": { - "method": "GET", - "uri": "/{Bucket}?delimiter={Delimiter}&marker={Marker}&max-keys={MaxKeys}&prefix={Prefix}&encoding-type={EncodingType}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Delimiter": { - "location": "uri" - }, - "EncodingType": { - "location": "uri" - }, - "Marker": { - "location": "uri" - }, - "MaxKeys": { - "type": "integer", - "location": "uri" - }, - "Prefix": { - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "CommonPrefixes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Prefix": {} - } - }, - "flattened": true - }, - "Contents": { - "type": "list", - "members": { - "type": "structure", - "members": { - "ETag": {}, - "Key": {}, - "LastModified": { - "type": "timestamp" - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "Size": { - "type": "integer" - }, - "StorageClass": {} - } - }, - "flattened": true - }, - "EncodingType": { - "location": "header", - "name": "Encoding-Type" - }, - "IsTruncated": { - "type": "boolean" - }, - "Marker": {}, - "MaxKeys": { - "type": "integer" - }, - "Name": {}, - "NextMarker": {}, - "Prefix": {} - } - } - }, - "listParts": { - "name": "ListParts", - "http": { - "method": "GET", - "uri": "/{Bucket}/{Key}?uploadId={UploadId}&max-parts={MaxParts}&part-number-marker={PartNumberMarker}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "MaxParts": { - "type": "integer", - "location": "uri" - }, - "PartNumberMarker": { - "type": "integer", - "location": "uri" - }, - "UploadId": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "Bucket": {}, - "Initiator": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "IsTruncated": { - "type": "boolean" - }, - "Key": {}, - "MaxParts": { - "type": "integer" - }, - "NextPartNumberMarker": { - "type": "integer" - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - }, - "PartNumberMarker": { - "type": "integer" - }, - "Part": { - "type": "list", - "name": "Parts", - "members": { - "type": "structure", - "members": { - "ETag": {}, - "LastModified": { - "type": "timestamp" - }, - "PartNumber": { - "type": "integer" - }, - "Size": { - "type": "integer" - } - } - }, - "flattened": true - }, - "StorageClass": {}, - "UploadId": {} - } - } - }, - "putBucketAcl": { - "name": "PutBucketAcl", - "http": { - "method": "PUT", - "uri": "/{Bucket}?acl" - }, - "input": { - "payload": "AccessControlPolicy", - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "AccessControlPolicy": { - "type": "structure", - "members": { - "Grants": { - "type": "list", - "name": "AccessControlList", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "Type": { - "required": true, - "name": "xsi:type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - } - } - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "name": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketCors": { - "name": "PutBucketCors", - "http": { - "method": "PUT", - "uri": "/{Bucket}?cors" - }, - "input": { - "payload": "CORSConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "CORSConfiguration": { - "type": "structure", - "members": { - "CORSRules": { - "type": "list", - "name": "CORSRule", - "members": { - "type": "structure", - "members": { - "AllowedHeaders": { - "type": "list", - "name": "AllowedHeader", - "members": {}, - "flattened": true - }, - "AllowedMethods": { - "type": "list", - "name": "AllowedMethod", - "members": {}, - "flattened": true - }, - "AllowedOrigins": { - "type": "list", - "name": "AllowedOrigin", - "members": {}, - "flattened": true - }, - "ExposeHeaders": { - "type": "list", - "name": "ExposeHeader", - "members": {}, - "flattened": true - }, - "MaxAgeSeconds": { - "type": "integer" - } - } - }, - "flattened": true - } - } - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketLifecycle": { - "name": "PutBucketLifecycle", - "http": { - "method": "PUT", - "uri": "/{Bucket}?lifecycle" - }, - "input": { - "payload": "LifecycleConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "LifecycleConfiguration": { - "type": "structure", - "members": { - "Rules": { - "type": "list", - "required": true, - "name": "Rule", - "members": { - "type": "structure", - "members": { - "Expiration": { - "type": "structure", - "members": { - "Date": { - "type": "timestamp", - "format": "iso8601" - }, - "Days": { - "type": "integer" - } - } - }, - "ID": {}, - "Prefix": { - "required": true - }, - "Status": { - "required": true - }, - "Transition": { - "type": "structure", - "members": { - "Date": { - "type": "timestamp", - "format": "iso8601" - }, - "Days": { - "type": "integer" - }, - "StorageClass": {} - } - } - } - }, - "flattened": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketLogging": { - "name": "PutBucketLogging", - "http": { - "method": "PUT", - "uri": "/{Bucket}?logging" - }, - "input": { - "payload": "BucketLoggingStatus", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "BucketLoggingStatus": { - "type": "structure", - "required": true, - "members": { - "LoggingEnabled": { - "type": "structure", - "members": { - "TargetBucket": {}, - "TargetGrants": { - "type": "list", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "Type": { - "required": true, - "name": "xsi:type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "TargetPrefix": {} - } - } - } - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketNotification": { - "name": "PutBucketNotification", - "http": { - "method": "PUT", - "uri": "/{Bucket}?notification" - }, - "input": { - "payload": "NotificationConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "NotificationConfiguration": { - "type": "structure", - "required": true, - "members": { - "TopicConfiguration": { - "type": "structure", - "required": true, - "members": { - "Event": {}, - "Topic": {} - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketPolicy": { - "name": "PutBucketPolicy", - "http": { - "method": "PUT", - "uri": "/{Bucket}?policy" - }, - "input": { - "payload": "Policy", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "Policy": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketRequestPayment": { - "name": "PutBucketRequestPayment", - "http": { - "method": "PUT", - "uri": "/{Bucket}?requestPayment" - }, - "input": { - "payload": "RequestPaymentConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "RequestPaymentConfiguration": { - "type": "structure", - "required": true, - "members": { - "Payer": { - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketTagging": { - "name": "PutBucketTagging", - "http": { - "method": "PUT", - "uri": "/{Bucket}?tagging" - }, - "input": { - "payload": "Tagging", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "Tagging": { - "type": "structure", - "required": true, - "members": { - "TagSet": { - "type": "list", - "required": true, - "members": { - "type": "structure", - "required": true, - "name": "Tag", - "members": { - "Key": { - "required": true - }, - "Value": { - "required": true - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketVersioning": { - "name": "PutBucketVersioning", - "http": { - "method": "PUT", - "uri": "/{Bucket}?versioning" - }, - "input": { - "payload": "VersioningConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "MFA": { - "location": "header", - "name": "x-amz-mfa" - }, - "VersioningConfiguration": { - "type": "structure", - "required": true, - "members": { - "MFADelete": {}, - "Status": {} - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putBucketWebsite": { - "name": "PutBucketWebsite", - "http": { - "method": "PUT", - "uri": "/{Bucket}?website" - }, - "input": { - "payload": "WebsiteConfiguration", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "WebsiteConfiguration": { - "type": "structure", - "required": true, - "members": { - "ErrorDocument": { - "type": "structure", - "members": { - "Key": { - "required": true - } - } - }, - "IndexDocument": { - "type": "structure", - "members": { - "Suffix": { - "required": true - } - } - }, - "RedirectAllRequestsTo": { - "type": "structure", - "members": { - "HostName": { - "required": true - }, - "Protocol": {} - } - }, - "RoutingRules": { - "type": "list", - "members": { - "type": "structure", - "name": "RoutingRule", - "members": { - "Condition": { - "type": "structure", - "members": { - "HttpErrorCodeReturnedEquals": {}, - "KeyPrefixEquals": {} - } - }, - "Redirect": { - "type": "structure", - "required": true, - "members": { - "HostName": {}, - "HttpRedirectCode": {}, - "Protocol": {}, - "ReplaceKeyPrefixWith": {}, - "ReplaceKeyWith": {} - } - } - } - } - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "putObject": { - "name": "PutObject", - "http": { - "method": "PUT", - "uri": "/{Bucket}/{Key}" - }, - "input": { - "payload": "Body", - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "Body": { - "type": "binary", - "streaming": true - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "CacheControl": { - "location": "header", - "name": "Cache-Control" - }, - "ContentDisposition": { - "location": "header", - "name": "Content-Disposition" - }, - "ContentEncoding": { - "location": "header", - "name": "Content-Encoding" - }, - "ContentLanguage": { - "location": "header", - "name": "Content-Language" - }, - "ContentLength": { - "type": "integer", - "location": "header", - "name": "Content-Length" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "ContentType": { - "location": "header", - "name": "Content-Type" - }, - "Expires": { - "type": "timestamp", - "location": "header", - "name": "Expires" - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - }, - "Key": { - "required": true, - "location": "uri" - }, - "Metadata": { - "type": "map", - "location": "header", - "name": "x-amz-meta-", - "members": {}, - "keys": {} - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "StorageClass": { - "location": "header", - "name": "x-amz-storage-class" - }, - "WebsiteRedirectLocation": { - "location": "header", - "name": "x-amz-website-redirect-location" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "Expiration": { - "type": "timestamp", - "location": "header", - "name": "x-amz-expiration" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "VersionId": { - "location": "header", - "name": "x-amz-version-id" - } - } - } - }, - "putObjectAcl": { - "name": "PutObjectAcl", - "http": { - "method": "PUT", - "uri": "/{Bucket}/{Key}?acl" - }, - "input": { - "payload": "AccessControlPolicy", - "type": "structure", - "members": { - "ACL": { - "location": "header", - "name": "x-amz-acl" - }, - "AccessControlPolicy": { - "type": "structure", - "members": { - "Grants": { - "type": "list", - "name": "AccessControlList", - "members": { - "type": "structure", - "name": "Grant", - "members": { - "Grantee": { - "type": "structure", - "xmlns": { - "uri": "http://www.w3.org/2001/XMLSchema-instance", - "prefix": "xsi" - }, - "members": { - "DisplayName": {}, - "EmailAddress": {}, - "ID": {}, - "Type": { - "required": true, - "name": "xsi:type", - "attribute": true - }, - "URI": {} - } - }, - "Permission": {} - } - } - }, - "Owner": { - "type": "structure", - "members": { - "DisplayName": {}, - "ID": {} - } - } - } - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "GrantFullControl": { - "location": "header", - "name": "x-amz-grant-full-control" - }, - "GrantRead": { - "location": "header", - "name": "x-amz-grant-read" - }, - "GrantReadACP": { - "location": "header", - "name": "x-amz-grant-read-acp" - }, - "GrantWrite": { - "location": "header", - "name": "x-amz-grant-write" - }, - "GrantWriteACP": { - "location": "header", - "name": "x-amz-grant-write-acp" - }, - "Key": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "restoreObject": { - "name": "RestoreObject", - "alias": "PostObjectRestore", - "http": { - "method": "POST", - "uri": "/{Bucket}/{Key}?restore" - }, - "input": { - "payload": "RestoreRequest", - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "Key": { - "required": true, - "location": "uri" - }, - "RestoreRequest": { - "type": "structure", - "members": { - "Days": { - "type": "integer", - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "uploadPart": { - "name": "UploadPart", - "http": { - "method": "PUT", - "uri": "/{Bucket}/{Key}?partNumber={PartNumber}&uploadId={UploadId}" - }, - "input": { - "payload": "Body", - "type": "structure", - "members": { - "Body": { - "type": "binary", - "streaming": true - }, - "Bucket": { - "required": true, - "location": "uri" - }, - "ContentLength": { - "type": "integer", - "location": "header", - "name": "Content-Length" - }, - "ContentMD5": { - "location": "header", - "name": "Content-MD5" - }, - "Key": { - "required": true, - "location": "uri" - }, - "PartNumber": { - "type": "integer", - "required": true, - "location": "uri" - }, - "UploadId": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "ETag": { - "location": "header", - "name": "ETag" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - } - } - } - }, - "uploadPartCopy": { - "name": "UploadPartCopy", - "http": { - "method": "PUT", - "uri": "/{Bucket}/{Key}?partNumber={PartNumber}&uploadId={UploadId}" - }, - "input": { - "type": "structure", - "members": { - "Bucket": { - "required": true, - "location": "uri" - }, - "CopySource": { - "required": true, - "location": "header", - "name": "x-amz-copy-source" - }, - "CopySourceIfMatch": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-match" - }, - "CopySourceIfModifiedSince": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-modified-since" - }, - "CopySourceIfNoneMatch": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-none-match" - }, - "CopySourceIfUnmodifiedSince": { - "type": "timestamp", - "location": "header", - "name": "x-amz-copy-source-if-unmodified-since" - }, - "CopySourceRange": { - "location": "header", - "name": "x-amz-copy-source-range" - }, - "Key": { - "required": true, - "location": "uri" - }, - "PartNumber": { - "type": "integer", - "required": true, - "location": "uri" - }, - "UploadId": { - "required": true, - "location": "uri" - } - } - }, - "output": { - "type": "structure", - "members": { - "CopySourceVersionId": { - "location": "header", - "name": "x-amz-copy-source-version-id" - }, - "ServerSideEncryption": { - "location": "header", - "name": "x-amz-server-side-encryption" - }, - "ETag": {}, - "LastModified": { - "type": "timestamp" - } - } - } - } - }, - "pagination": { - "listMultipartUploads": { - "limitKey": "MaxUploads", - "moreResults": "IsTruncated", - "outputToken": [ - "NextKeyMarker", - "NextUploadIdMarker" - ], - "inputToken": [ - "KeyMarker", - "UploadIdMarker" - ], - "resultKey": "Uploads" - }, - "listObjectVersions": { - "moreResults": "IsTruncated", - "limitKey": "MaxKeys", - "outputToken": [ - "NextKeyMarker", - "NextVersionIdMarker" - ], - "inputToken": [ - "KeyMarker", - "VersionIdMarker" - ], - "resultKey": "Versions" - }, - "listObjects": { - "moreResults": "IsTruncated", - "limitKey": "MaxKeys", - "outputToken": "NextMarker or Contents[-1].Key", - "inputToken": "Marker", - "resultKey": [ - "Contents", - "CommonPrefixes" - ] - }, - "listParts": { - "moreResults": "IsTruncated", - "limitKey": "MaxParts", - "outputToken": "NextPartNumberMarker", - "inputToken": "PartNumberMarker", - "resultKey": "Parts" - } - }, - "waiters": { - "__default__": { - "interval": 5, - "maxAttempts": 20 - }, - "bucketExists": { - "operation": "HeadBucket", - "ignoreErrors": [ - "NoSuchBucket" - ], - "successType": "output" - }, - "bucketNotExists": { - "operation": "HeadBucket", - "successType": "error", - "successValue": 404 - }, - "objectExists": { - "operation": "HeadObject", - "ignoreErrors": [ - "NoSuchKey" - ], - "successType": "output" - }, - "objectNotExists": { - "operation": "HeadObject", - "successType": "error", - "successValue": 404 - } - } -} diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SES-2010-12-01.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SES-2010-12-01.json deleted file mode 100644 index d8f1deb4..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SES-2010-12-01.json +++ /dev/null @@ -1,490 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-12-01", - "endpointPrefix": "email", - "resultWrapped": true, - "serviceAbbreviation": "Amazon SES", - "serviceFullName": "Amazon Simple Email Service", - "signatureVersion": "v4", - "signingName": "ses", - "timestampFormat": "iso8601", - "operations": { - "deleteIdentity": { - "name": "DeleteIdentity", - "input": { - "type": "structure", - "members": { - "Identity": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteVerifiedEmailAddress": { - "name": "DeleteVerifiedEmailAddress", - "input": { - "type": "structure", - "members": { - "EmailAddress": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getIdentityDkimAttributes": { - "name": "GetIdentityDkimAttributes", - "input": { - "type": "structure", - "members": { - "Identities": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DkimAttributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "DkimEnabled": { - "type": "boolean" - }, - "DkimVerificationStatus": {}, - "DkimTokens": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "getIdentityNotificationAttributes": { - "name": "GetIdentityNotificationAttributes", - "input": { - "type": "structure", - "members": { - "Identities": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "NotificationAttributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "BounceTopic": {}, - "ComplaintTopic": {}, - "ForwardingEnabled": { - "type": "boolean" - } - } - } - } - } - } - }, - "getIdentityVerificationAttributes": { - "name": "GetIdentityVerificationAttributes", - "input": { - "type": "structure", - "members": { - "Identities": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VerificationAttributes": { - "type": "map", - "keys": {}, - "members": { - "type": "structure", - "members": { - "VerificationStatus": {}, - "VerificationToken": {} - } - } - } - } - } - }, - "getSendQuota": { - "name": "GetSendQuota", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "Max24HourSend": { - "type": "float" - }, - "MaxSendRate": { - "type": "float" - }, - "SentLast24Hours": { - "type": "float" - } - } - } - }, - "getSendStatistics": { - "name": "GetSendStatistics", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "SendDataPoints": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Timestamp": { - "type": "timestamp" - }, - "DeliveryAttempts": { - "type": "integer" - }, - "Bounces": { - "type": "integer" - }, - "Complaints": { - "type": "integer" - }, - "Rejects": { - "type": "integer" - } - } - } - } - } - } - }, - "listIdentities": { - "name": "ListIdentities", - "input": { - "type": "structure", - "members": { - "IdentityType": {}, - "NextToken": {}, - "MaxItems": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Identities": { - "type": "list", - "members": {} - }, - "NextToken": {} - } - } - }, - "listVerifiedEmailAddresses": { - "name": "ListVerifiedEmailAddresses", - "input": { - "type": "structure", - "members": {} - }, - "output": { - "type": "structure", - "members": { - "VerifiedEmailAddresses": { - "type": "list", - "members": {} - } - } - } - }, - "sendEmail": { - "name": "SendEmail", - "input": { - "type": "structure", - "members": { - "Source": { - "required": true - }, - "Destination": { - "type": "structure", - "members": { - "ToAddresses": { - "type": "list", - "members": {} - }, - "CcAddresses": { - "type": "list", - "members": {} - }, - "BccAddresses": { - "type": "list", - "members": {} - } - }, - "required": true - }, - "Message": { - "type": "structure", - "members": { - "Subject": { - "type": "structure", - "members": { - "Data": { - "required": true - }, - "Charset": {} - }, - "required": true - }, - "Body": { - "type": "structure", - "members": { - "Text": { - "type": "structure", - "members": { - "Data": { - "required": true - }, - "Charset": {} - } - }, - "Html": { - "type": "structure", - "members": { - "Data": { - "required": true - }, - "Charset": {} - } - } - }, - "required": true - } - }, - "required": true - }, - "ReplyToAddresses": { - "type": "list", - "members": {} - }, - "ReturnPath": {} - } - }, - "output": { - "type": "structure", - "members": { - "MessageId": {} - } - } - }, - "sendRawEmail": { - "name": "SendRawEmail", - "input": { - "type": "structure", - "members": { - "Source": {}, - "Destinations": { - "type": "list", - "members": {} - }, - "RawMessage": { - "type": "structure", - "members": { - "Data": { - "type": "base64", - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "MessageId": {} - } - } - }, - "setIdentityDkimEnabled": { - "name": "SetIdentityDkimEnabled", - "input": { - "type": "structure", - "members": { - "Identity": { - "required": true - }, - "DkimEnabled": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setIdentityFeedbackForwardingEnabled": { - "name": "SetIdentityFeedbackForwardingEnabled", - "input": { - "type": "structure", - "members": { - "Identity": { - "required": true - }, - "ForwardingEnabled": { - "type": "boolean", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setIdentityNotificationTopic": { - "name": "SetIdentityNotificationTopic", - "input": { - "type": "structure", - "members": { - "Identity": { - "required": true - }, - "NotificationType": { - "required": true - }, - "SnsTopic": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "verifyDomainDkim": { - "name": "VerifyDomainDkim", - "input": { - "type": "structure", - "members": { - "Domain": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DkimTokens": { - "type": "list", - "members": {} - } - } - } - }, - "verifyDomainIdentity": { - "name": "VerifyDomainIdentity", - "input": { - "type": "structure", - "members": { - "Domain": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VerificationToken": {} - } - } - }, - "verifyEmailAddress": { - "name": "VerifyEmailAddress", - "input": { - "type": "structure", - "members": { - "EmailAddress": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "verifyEmailIdentity": { - "name": "VerifyEmailIdentity", - "input": { - "type": "structure", - "members": { - "EmailAddress": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "listIdentities": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxItems", - "resultKey": "Identities" - }, - "listVerifiedEmailAddresses": { - "resultKey": "VerifiedEmailAddresses" - } - }, - "waiters": { - "__default__": { - "interval": 3, - "maxAttempts": 20 - }, - "identityExists": { - "operation": "GetIdentityVerificationAttributes", - "successType": "output", - "successPath": "VerificationAttributes[].VerificationStatus", - "successValue": true - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SNS-2010-03-31.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SNS-2010-03-31.json deleted file mode 100644 index f575f24c..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SNS-2010-03-31.json +++ /dev/null @@ -1,585 +0,0 @@ -{ - "format": "query", - "apiVersion": "2010-03-31", - "endpointPrefix": "sns", - "resultWrapped": true, - "serviceAbbreviation": "Amazon SNS", - "serviceFullName": "Amazon Simple Notification Service", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "addPermission": { - "name": "AddPermission", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "Label": { - "required": true - }, - "AWSAccountId": { - "type": "list", - "members": {}, - "required": true - }, - "ActionName": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "confirmSubscription": { - "name": "ConfirmSubscription", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "Token": { - "required": true - }, - "AuthenticateOnUnsubscribe": {} - } - }, - "output": { - "type": "structure", - "members": { - "SubscriptionArn": {} - } - } - }, - "createPlatformApplication": { - "name": "CreatePlatformApplication", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Platform": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "PlatformApplicationArn": {} - } - } - }, - "createPlatformEndpoint": { - "name": "CreatePlatformEndpoint", - "input": { - "type": "structure", - "members": { - "PlatformApplicationArn": { - "required": true - }, - "Token": { - "required": true - }, - "CustomUserData": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "EndpointArn": {} - } - } - }, - "createTopic": { - "name": "CreateTopic", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TopicArn": {} - } - } - }, - "deleteEndpoint": { - "name": "DeleteEndpoint", - "input": { - "type": "structure", - "members": { - "EndpointArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deletePlatformApplication": { - "name": "DeletePlatformApplication", - "input": { - "type": "structure", - "members": { - "PlatformApplicationArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteTopic": { - "name": "DeleteTopic", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getEndpointAttributes": { - "name": "GetEndpointAttributes", - "input": { - "type": "structure", - "members": { - "EndpointArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "getPlatformApplicationAttributes": { - "name": "GetPlatformApplicationAttributes", - "input": { - "type": "structure", - "members": { - "PlatformApplicationArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "getSubscriptionAttributes": { - "name": "GetSubscriptionAttributes", - "input": { - "type": "structure", - "members": { - "SubscriptionArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "getTopicAttributes": { - "name": "GetTopicAttributes", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "listEndpointsByPlatformApplication": { - "name": "ListEndpointsByPlatformApplication", - "input": { - "type": "structure", - "members": { - "PlatformApplicationArn": { - "required": true - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Endpoints": { - "type": "list", - "members": { - "type": "structure", - "members": { - "EndpointArn": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "NextToken": {} - } - } - }, - "listPlatformApplications": { - "name": "ListPlatformApplications", - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "PlatformApplications": { - "type": "list", - "members": { - "type": "structure", - "members": { - "PlatformApplicationArn": {}, - "Attributes": { - "type": "map", - "keys": {}, - "members": {} - } - } - } - }, - "NextToken": {} - } - } - }, - "listSubscriptions": { - "name": "ListSubscriptions", - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Subscriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubscriptionArn": {}, - "Owner": {}, - "Protocol": {}, - "Endpoint": {}, - "TopicArn": {} - } - } - }, - "NextToken": {} - } - } - }, - "listSubscriptionsByTopic": { - "name": "ListSubscriptionsByTopic", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Subscriptions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "SubscriptionArn": {}, - "Owner": {}, - "Protocol": {}, - "Endpoint": {}, - "TopicArn": {} - } - } - }, - "NextToken": {} - } - } - }, - "listTopics": { - "name": "ListTopics", - "input": { - "type": "structure", - "members": { - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "Topics": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TopicArn": {} - } - } - }, - "NextToken": {} - } - } - }, - "publish": { - "name": "Publish", - "input": { - "type": "structure", - "members": { - "TopicArn": {}, - "TargetArn": {}, - "Message": { - "required": true - }, - "Subject": {}, - "MessageStructure": {} - } - }, - "output": { - "type": "structure", - "members": { - "MessageId": {} - } - } - }, - "removePermission": { - "name": "RemovePermission", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "Label": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setEndpointAttributes": { - "name": "SetEndpointAttributes", - "input": { - "type": "structure", - "members": { - "EndpointArn": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setPlatformApplicationAttributes": { - "name": "SetPlatformApplicationAttributes", - "input": { - "type": "structure", - "members": { - "PlatformApplicationArn": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": {}, - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setSubscriptionAttributes": { - "name": "SetSubscriptionAttributes", - "input": { - "type": "structure", - "members": { - "SubscriptionArn": { - "required": true - }, - "AttributeName": { - "required": true - }, - "AttributeValue": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "setTopicAttributes": { - "name": "SetTopicAttributes", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "AttributeName": { - "required": true - }, - "AttributeValue": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "subscribe": { - "name": "Subscribe", - "input": { - "type": "structure", - "members": { - "TopicArn": { - "required": true - }, - "Protocol": { - "required": true - }, - "Endpoint": {} - } - }, - "output": { - "type": "structure", - "members": { - "SubscriptionArn": {} - } - } - }, - "unsubscribe": { - "name": "Unsubscribe", - "input": { - "type": "structure", - "members": { - "SubscriptionArn": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "listEndpointsByPlatformApplication": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Endpoints" - }, - "listPlatformApplications": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "PlatformApplications" - }, - "listSubscriptions": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Subscriptions" - }, - "listSubscriptionsByTopic": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Subscriptions" - }, - "listTopics": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Topics" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SQS-2012-11-05.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SQS-2012-11-05.json deleted file mode 100644 index d02d2e03..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SQS-2012-11-05.json +++ /dev/null @@ -1,553 +0,0 @@ -{ - "format": "query", - "apiVersion": "2012-11-05", - "endpointPrefix": "sqs", - "resultWrapped": true, - "serviceAbbreviation": "Amazon SQS", - "serviceFullName": "Amazon Simple Queue Service", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "addPermission": { - "name": "AddPermission", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Label": { - "required": true - }, - "AWSAccountIds": { - "type": "list", - "members": { - "name": "AWSAccountId" - }, - "flattened": true, - "required": true - }, - "Actions": { - "type": "list", - "members": { - "name": "ActionName" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "changeMessageVisibility": { - "name": "ChangeMessageVisibility", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "ReceiptHandle": { - "required": true - }, - "VisibilityTimeout": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "changeMessageVisibilityBatch": { - "name": "ChangeMessageVisibilityBatch", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Entries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": { - "required": true - }, - "ReceiptHandle": { - "required": true - }, - "VisibilityTimeout": { - "type": "integer" - } - }, - "name": "ChangeMessageVisibilityBatchRequestEntry" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ChangeMessageVisibilityBatchResultEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {} - }, - "name": "ChangeMessageVisibilityBatchResultEntry" - }, - "flattened": true, - "name": "Successful" - }, - "BatchResultErrorEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "SenderFault": { - "type": "boolean" - }, - "Code": {}, - "Message": {} - }, - "name": "BatchResultErrorEntry" - }, - "flattened": true, - "name": "Failed" - } - } - } - }, - "createQueue": { - "name": "CreateQueue", - "input": { - "type": "structure", - "members": { - "QueueName": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": { - "name": "Name" - }, - "members": { - "name": "Value" - }, - "flattened": true, - "name": "Attribute" - } - } - }, - "output": { - "type": "structure", - "members": { - "QueueUrl": {} - } - } - }, - "deleteMessage": { - "name": "DeleteMessage", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "ReceiptHandle": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteMessageBatch": { - "name": "DeleteMessageBatch", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Entries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": { - "required": true - }, - "ReceiptHandle": { - "required": true - } - }, - "name": "DeleteMessageBatchRequestEntry" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DeleteMessageBatchResultEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {} - }, - "name": "DeleteMessageBatchResultEntry" - }, - "flattened": true, - "name": "Successful" - }, - "BatchResultErrorEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "SenderFault": { - "type": "boolean" - }, - "Code": {}, - "Message": {} - }, - "name": "BatchResultErrorEntry" - }, - "flattened": true, - "name": "Failed" - } - } - } - }, - "deleteQueue": { - "name": "DeleteQueue", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "getQueueAttributes": { - "name": "GetQueueAttributes", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "AttributeNames": { - "type": "list", - "members": { - "name": "AttributeName" - }, - "flattened": true - } - } - }, - "output": { - "type": "structure", - "members": { - "Attribute": { - "type": "map", - "keys": { - "name": "Name" - }, - "members": { - "name": "Value" - }, - "flattened": true, - "name": "Attributes" - } - } - } - }, - "getQueueUrl": { - "name": "GetQueueUrl", - "input": { - "type": "structure", - "members": { - "QueueName": { - "required": true - }, - "QueueOwnerAWSAccountId": {} - } - }, - "output": { - "type": "structure", - "members": { - "QueueUrl": {} - } - } - }, - "listDeadLetterSourceQueues": { - "name": "ListDeadLetterSourceQueues", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "QueueUrl": { - "type": "list", - "members": { - "name": "QueueUrl" - }, - "flattened": true, - "name": "queueUrls" - } - } - } - }, - "listQueues": { - "name": "ListQueues", - "input": { - "type": "structure", - "members": { - "QueueNamePrefix": {} - } - }, - "output": { - "type": "structure", - "members": { - "QueueUrl": { - "type": "list", - "members": { - "name": "QueueUrl" - }, - "flattened": true, - "name": "QueueUrls" - } - } - } - }, - "receiveMessage": { - "name": "ReceiveMessage", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "AttributeNames": { - "type": "list", - "members": { - "name": "AttributeName" - }, - "flattened": true - }, - "MaxNumberOfMessages": { - "type": "integer" - }, - "VisibilityTimeout": { - "type": "integer" - }, - "WaitTimeSeconds": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Message": { - "type": "list", - "members": { - "type": "structure", - "members": { - "MessageId": {}, - "ReceiptHandle": {}, - "MD5OfBody": {}, - "Body": {}, - "Attribute": { - "type": "map", - "keys": { - "name": "Name" - }, - "members": { - "name": "Value" - }, - "flattened": true, - "name": "Attributes" - } - }, - "name": "Message" - }, - "flattened": true, - "name": "Messages" - } - } - } - }, - "removePermission": { - "name": "RemovePermission", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Label": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "sendMessage": { - "name": "SendMessage", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "MessageBody": { - "required": true - }, - "DelaySeconds": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "MD5OfMessageBody": {}, - "MessageId": {} - } - } - }, - "sendMessageBatch": { - "name": "SendMessageBatch", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Entries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": { - "required": true - }, - "MessageBody": { - "required": true - }, - "DelaySeconds": { - "type": "integer" - } - }, - "name": "SendMessageBatchRequestEntry" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SendMessageBatchResultEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "MessageId": {}, - "MD5OfMessageBody": {} - }, - "name": "SendMessageBatchResultEntry" - }, - "flattened": true, - "name": "Successful" - }, - "BatchResultErrorEntry": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Id": {}, - "SenderFault": { - "type": "boolean" - }, - "Code": {}, - "Message": {} - }, - "name": "BatchResultErrorEntry" - }, - "flattened": true, - "name": "Failed" - } - } - } - }, - "setQueueAttributes": { - "name": "SetQueueAttributes", - "input": { - "type": "structure", - "members": { - "QueueUrl": { - "required": true - }, - "Attributes": { - "type": "map", - "keys": { - "name": "Name" - }, - "members": { - "name": "Value" - }, - "flattened": true, - "name": "Attribute", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "listQueues": { - "resultKey": "QueueUrls" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/STS-2011-06-15.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/STS-2011-06-15.json deleted file mode 100644 index 200f938a..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/STS-2011-06-15.json +++ /dev/null @@ -1,243 +0,0 @@ -{ - "format": "query", - "apiVersion": "2011-06-15", - "endpointPrefix": "sts", - "globalEndpoint": "sts.amazonaws.com", - "resultWrapped": true, - "serviceAbbreviation": "AWS STS", - "serviceFullName": "AWS Security Token Service", - "signatureVersion": "v4", - "timestampFormat": "iso8601", - "operations": { - "assumeRole": { - "name": "AssumeRole", - "input": { - "type": "structure", - "members": { - "RoleArn": { - "required": true - }, - "RoleSessionName": { - "required": true - }, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - }, - "ExternalId": {}, - "SerialNumber": {}, - "TokenCode": {} - } - }, - "output": { - "type": "structure", - "members": { - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - }, - "AssumedRoleUser": { - "type": "structure", - "members": { - "AssumedRoleId": {}, - "Arn": {} - } - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "assumeRoleWithSAML": { - "name": "AssumeRoleWithSAML", - "input": { - "type": "structure", - "members": { - "RoleArn": { - "required": true - }, - "PrincipalArn": { - "required": true - }, - "SAMLAssertion": { - "required": true - }, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - }, - "AssumedRoleUser": { - "type": "structure", - "members": { - "AssumedRoleId": {}, - "Arn": {} - } - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "assumeRoleWithWebIdentity": { - "name": "AssumeRoleWithWebIdentity", - "input": { - "type": "structure", - "members": { - "RoleArn": { - "required": true - }, - "RoleSessionName": { - "required": true - }, - "WebIdentityToken": { - "required": true - }, - "ProviderId": {}, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - }, - "SubjectFromWebIdentityToken": {}, - "AssumedRoleUser": { - "type": "structure", - "members": { - "AssumedRoleId": {}, - "Arn": {} - } - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "decodeAuthorizationMessage": { - "name": "DecodeAuthorizationMessage", - "input": { - "type": "structure", - "members": { - "EncodedMessage": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "DecodedMessage": {} - } - } - }, - "getFederationToken": { - "name": "GetFederationToken", - "input": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Policy": {}, - "DurationSeconds": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - }, - "FederatedUser": { - "type": "structure", - "members": { - "FederatedUserId": {}, - "Arn": {} - } - }, - "PackedPolicySize": { - "type": "integer" - } - } - } - }, - "getSessionToken": { - "name": "GetSessionToken", - "input": { - "type": "structure", - "members": { - "DurationSeconds": { - "type": "integer" - }, - "SerialNumber": {}, - "TokenCode": {} - } - }, - "output": { - "type": "structure", - "members": { - "Credentials": { - "type": "structure", - "members": { - "AccessKeyId": {}, - "SecretAccessKey": {}, - "SessionToken": {}, - "Expiration": { - "type": "timestamp" - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SWF-2012-01-25.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SWF-2012-01-25.json deleted file mode 100644 index 7bf7b2ec..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SWF-2012-01-25.json +++ /dev/null @@ -1,3010 +0,0 @@ -{ - "format": "json", - "apiVersion": "2012-01-25", - "endpointPrefix": "swf", - "jsonVersion": "1.0", - "serviceAbbreviation": "Amazon SWF", - "serviceFullName": "Amazon Simple Workflow Service", - "signatureVersion": "v4", - "targetPrefix": "SimpleWorkflowService", - "timestampFormat": "unixTimestamp", - "operations": { - "countClosedWorkflowExecutions": { - "name": "CountClosedWorkflowExecutions", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "startTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - } - }, - "closeTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - } - }, - "executionFilter": { - "type": "structure", - "members": { - "workflowId": { - "required": true - } - } - }, - "typeFilter": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": {} - } - }, - "tagFilter": { - "type": "structure", - "members": { - "tag": { - "required": true - } - } - }, - "closeStatusFilter": { - "type": "structure", - "members": { - "status": { - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - } - }, - "countOpenWorkflowExecutions": { - "name": "CountOpenWorkflowExecutions", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "startTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - }, - "required": true - }, - "typeFilter": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": {} - } - }, - "tagFilter": { - "type": "structure", - "members": { - "tag": { - "required": true - } - } - }, - "executionFilter": { - "type": "structure", - "members": { - "workflowId": { - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - } - }, - "countPendingActivityTasks": { - "name": "CountPendingActivityTasks", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - } - }, - "countPendingDecisionTasks": { - "name": "CountPendingDecisionTasks", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "count": { - "type": "integer" - }, - "truncated": { - "type": "boolean" - } - } - } - }, - "deprecateActivityType": { - "name": "DeprecateActivityType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "activityType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deprecateDomain": { - "name": "DeprecateDomain", - "input": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deprecateWorkflowType": { - "name": "DeprecateWorkflowType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "describeActivityType": { - "name": "DescribeActivityType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "activityType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "typeInfo": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - }, - "configuration": { - "type": "structure", - "members": { - "defaultTaskStartToCloseTimeout": {}, - "defaultTaskHeartbeatTimeout": {}, - "defaultTaskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "defaultTaskScheduleToStartTimeout": {}, - "defaultTaskScheduleToCloseTimeout": {} - } - } - } - } - }, - "describeDomain": { - "name": "DescribeDomain", - "input": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "domainInfo": { - "type": "structure", - "members": { - "name": {}, - "status": {}, - "description": {} - } - }, - "configuration": { - "type": "structure", - "members": { - "workflowExecutionRetentionPeriodInDays": {} - } - } - } - } - }, - "describeWorkflowExecution": { - "name": "DescribeWorkflowExecution", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "execution": { - "type": "structure", - "members": { - "workflowId": { - "required": true - }, - "runId": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "executionInfo": { - "type": "structure", - "members": { - "execution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "startTimestamp": { - "type": "timestamp" - }, - "closeTimestamp": { - "type": "timestamp" - }, - "executionStatus": {}, - "closeStatus": {}, - "parent": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "tagList": { - "type": "list", - "members": {} - }, - "cancelRequested": { - "type": "boolean" - } - } - }, - "executionConfiguration": { - "type": "structure", - "members": { - "taskStartToCloseTimeout": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "childPolicy": {} - } - }, - "openCounts": { - "type": "structure", - "members": { - "openActivityTasks": { - "type": "integer" - }, - "openDecisionTasks": { - "type": "integer" - }, - "openTimers": { - "type": "integer" - }, - "openChildWorkflowExecutions": { - "type": "integer" - } - } - }, - "latestActivityTaskTimestamp": { - "type": "timestamp" - }, - "latestExecutionContext": {} - } - } - }, - "describeWorkflowType": { - "name": "DescribeWorkflowType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "typeInfo": { - "type": "structure", - "members": { - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - }, - "configuration": { - "type": "structure", - "members": { - "defaultTaskStartToCloseTimeout": {}, - "defaultExecutionStartToCloseTimeout": {}, - "defaultTaskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "defaultChildPolicy": {} - } - } - } - } - }, - "getWorkflowExecutionHistory": { - "name": "GetWorkflowExecutionHistory", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "execution": { - "type": "structure", - "members": { - "workflowId": { - "required": true - }, - "runId": { - "required": true - } - }, - "required": true - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "eventTimestamp": { - "type": "timestamp" - }, - "eventType": {}, - "eventId": { - "type": "integer" - }, - "workflowExecutionStartedEventAttributes": { - "type": "structure", - "members": { - "input": {}, - "executionStartToCloseTimeout": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "tagList": { - "type": "list", - "members": {} - }, - "continuedExecutionRunId": {}, - "parentWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "parentInitiatedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionCompletedEventAttributes": { - "type": "structure", - "members": { - "result": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "completeWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "failWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "childPolicy": {} - } - }, - "workflowExecutionCanceledEventAttributes": { - "type": "structure", - "members": { - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "cancelWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionContinuedAsNewEventAttributes": { - "type": "structure", - "members": { - "input": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "newExecutionRunId": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "type": "list", - "members": {} - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - } - } - }, - "continueAsNewWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionTerminatedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "childPolicy": {}, - "cause": {} - } - }, - "workflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "externalWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "externalInitiatedEventId": { - "type": "integer" - }, - "cause": {} - } - }, - "decisionTaskScheduledEventAttributes": { - "type": "structure", - "members": { - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "startToCloseTimeout": {} - } - }, - "decisionTaskStartedEventAttributes": { - "type": "structure", - "members": { - "identity": {}, - "scheduledEventId": { - "type": "integer" - } - } - }, - "decisionTaskCompletedEventAttributes": { - "type": "structure", - "members": { - "executionContext": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "decisionTaskTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskScheduledEventAttributes": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "activityId": {}, - "input": {}, - "control": {}, - "scheduleToStartTimeout": {}, - "scheduleToCloseTimeout": {}, - "startToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "heartbeatTimeout": {} - } - }, - "activityTaskStartedEventAttributes": { - "type": "structure", - "members": { - "identity": {}, - "scheduledEventId": { - "type": "integer" - } - } - }, - "activityTaskCompletedEventAttributes": { - "type": "structure", - "members": { - "result": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - }, - "details": {} - } - }, - "activityTaskCanceledEventAttributes": { - "type": "structure", - "members": { - "details": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - }, - "latestCancelRequestedEventId": { - "type": "integer" - } - } - }, - "activityTaskCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "activityId": {} - } - }, - "workflowExecutionSignaledEventAttributes": { - "type": "structure", - "members": { - "signalName": {}, - "input": {}, - "externalWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "externalInitiatedEventId": { - "type": "integer" - } - } - }, - "markerRecordedEventAttributes": { - "type": "structure", - "members": { - "markerName": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "recordMarkerFailedEventAttributes": { - "type": "structure", - "members": { - "markerName": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "timerStartedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "control": {}, - "startToFireTimeout": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "timerFiredEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "startedEventId": { - "type": "integer" - } - } - }, - "timerCanceledEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "startedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startChildWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "control": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "childPolicy": {}, - "taskStartToCloseTimeout": {}, - "tagList": { - "type": "list", - "members": {} - } - } - }, - "childWorkflowExecutionStartedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionCompletedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "result": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "reason": {}, - "details": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionTimedOutEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "timeoutType": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionCanceledEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "details": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionTerminatedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "signalExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "signalName": {}, - "input": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "externalWorkflowExecutionSignaledEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "signalExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "externalWorkflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "requestCancelExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "requestCancelExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "scheduleActivityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "requestCancelActivityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startTimerFailedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "cancelTimerFailedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startChildWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "cause": {}, - "workflowId": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - } - } - } - }, - "nextPageToken": {} - } - } - }, - "listActivityTypes": { - "name": "ListActivityTypes", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "name": {}, - "registrationStatus": { - "required": true - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "typeInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - } - }, - "nextPageToken": {} - } - } - }, - "listClosedWorkflowExecutions": { - "name": "ListClosedWorkflowExecutions", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "startTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - } - }, - "closeTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - } - }, - "executionFilter": { - "type": "structure", - "members": { - "workflowId": { - "required": true - } - } - }, - "closeStatusFilter": { - "type": "structure", - "members": { - "status": { - "required": true - } - } - }, - "typeFilter": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": {} - } - }, - "tagFilter": { - "type": "structure", - "members": { - "tag": { - "required": true - } - } - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "executionInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "execution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "startTimestamp": { - "type": "timestamp" - }, - "closeTimestamp": { - "type": "timestamp" - }, - "executionStatus": {}, - "closeStatus": {}, - "parent": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "tagList": { - "type": "list", - "members": {} - }, - "cancelRequested": { - "type": "boolean" - } - } - } - }, - "nextPageToken": {} - } - } - }, - "listDomains": { - "name": "ListDomains", - "input": { - "type": "structure", - "members": { - "nextPageToken": {}, - "registrationStatus": { - "required": true - }, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "domainInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "name": {}, - "status": {}, - "description": {} - } - } - }, - "nextPageToken": {} - } - } - }, - "listOpenWorkflowExecutions": { - "name": "ListOpenWorkflowExecutions", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "startTimeFilter": { - "type": "structure", - "members": { - "oldestDate": { - "type": "timestamp", - "required": true - }, - "latestDate": { - "type": "timestamp" - } - }, - "required": true - }, - "typeFilter": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": {} - } - }, - "tagFilter": { - "type": "structure", - "members": { - "tag": { - "required": true - } - } - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - }, - "executionFilter": { - "type": "structure", - "members": { - "workflowId": { - "required": true - } - } - } - } - }, - "output": { - "type": "structure", - "members": { - "executionInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "execution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "startTimestamp": { - "type": "timestamp" - }, - "closeTimestamp": { - "type": "timestamp" - }, - "executionStatus": {}, - "closeStatus": {}, - "parent": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "tagList": { - "type": "list", - "members": {} - }, - "cancelRequested": { - "type": "boolean" - } - } - } - }, - "nextPageToken": {} - } - } - }, - "listWorkflowTypes": { - "name": "ListWorkflowTypes", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "name": {}, - "registrationStatus": { - "required": true - }, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "typeInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "status": {}, - "description": {}, - "creationDate": { - "type": "timestamp" - }, - "deprecationDate": { - "type": "timestamp" - } - } - } - }, - "nextPageToken": {} - } - } - }, - "pollForActivityTask": { - "name": "PollForActivityTask", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - }, - "required": true - }, - "identity": {} - } - }, - "output": { - "type": "structure", - "members": { - "taskToken": {}, - "activityId": {}, - "startedEventId": { - "type": "integer" - }, - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "input": {} - } - } - }, - "pollForDecisionTask": { - "name": "PollForDecisionTask", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - }, - "required": true - }, - "identity": {}, - "nextPageToken": {}, - "maximumPageSize": { - "type": "integer" - }, - "reverseOrder": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "taskToken": {}, - "startedEventId": { - "type": "integer" - }, - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "events": { - "type": "list", - "members": { - "type": "structure", - "members": { - "eventTimestamp": { - "type": "timestamp" - }, - "eventType": {}, - "eventId": { - "type": "integer" - }, - "workflowExecutionStartedEventAttributes": { - "type": "structure", - "members": { - "input": {}, - "executionStartToCloseTimeout": {}, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "tagList": { - "type": "list", - "members": {} - }, - "continuedExecutionRunId": {}, - "parentWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "parentInitiatedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionCompletedEventAttributes": { - "type": "structure", - "members": { - "result": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "completeWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "failWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "childPolicy": {} - } - }, - "workflowExecutionCanceledEventAttributes": { - "type": "structure", - "members": { - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "cancelWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionContinuedAsNewEventAttributes": { - "type": "structure", - "members": { - "input": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "newExecutionRunId": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "type": "list", - "members": {} - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - } - } - }, - "continueAsNewWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "workflowExecutionTerminatedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "childPolicy": {}, - "cause": {} - } - }, - "workflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "externalWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "externalInitiatedEventId": { - "type": "integer" - }, - "cause": {} - } - }, - "decisionTaskScheduledEventAttributes": { - "type": "structure", - "members": { - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "startToCloseTimeout": {} - } - }, - "decisionTaskStartedEventAttributes": { - "type": "structure", - "members": { - "identity": {}, - "scheduledEventId": { - "type": "integer" - } - } - }, - "decisionTaskCompletedEventAttributes": { - "type": "structure", - "members": { - "executionContext": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "decisionTaskTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskScheduledEventAttributes": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "activityId": {}, - "input": {}, - "control": {}, - "scheduleToStartTimeout": {}, - "scheduleToCloseTimeout": {}, - "startToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "heartbeatTimeout": {} - } - }, - "activityTaskStartedEventAttributes": { - "type": "structure", - "members": { - "identity": {}, - "scheduledEventId": { - "type": "integer" - } - } - }, - "activityTaskCompletedEventAttributes": { - "type": "structure", - "members": { - "result": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "activityTaskTimedOutEventAttributes": { - "type": "structure", - "members": { - "timeoutType": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - }, - "details": {} - } - }, - "activityTaskCanceledEventAttributes": { - "type": "structure", - "members": { - "details": {}, - "scheduledEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - }, - "latestCancelRequestedEventId": { - "type": "integer" - } - } - }, - "activityTaskCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "activityId": {} - } - }, - "workflowExecutionSignaledEventAttributes": { - "type": "structure", - "members": { - "signalName": {}, - "input": {}, - "externalWorkflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "externalInitiatedEventId": { - "type": "integer" - } - } - }, - "markerRecordedEventAttributes": { - "type": "structure", - "members": { - "markerName": {}, - "details": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "recordMarkerFailedEventAttributes": { - "type": "structure", - "members": { - "markerName": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "timerStartedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "control": {}, - "startToFireTimeout": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "timerFiredEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "startedEventId": { - "type": "integer" - } - } - }, - "timerCanceledEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "startedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startChildWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "control": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": {} - } - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "childPolicy": {}, - "taskStartToCloseTimeout": {}, - "tagList": { - "type": "list", - "members": {} - } - } - }, - "childWorkflowExecutionStartedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionCompletedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "result": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "reason": {}, - "details": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionTimedOutEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "timeoutType": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionCanceledEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "details": {}, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "childWorkflowExecutionTerminatedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "initiatedEventId": { - "type": "integer" - }, - "startedEventId": { - "type": "integer" - } - } - }, - "signalExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "signalName": {}, - "input": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "externalWorkflowExecutionSignaledEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "signalExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "externalWorkflowExecutionCancelRequestedEventAttributes": { - "type": "structure", - "members": { - "workflowExecution": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {} - } - }, - "initiatedEventId": { - "type": "integer" - } - } - }, - "requestCancelExternalWorkflowExecutionInitiatedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "requestCancelExternalWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowId": {}, - "runId": {}, - "cause": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - }, - "scheduleActivityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "requestCancelActivityTaskFailedEventAttributes": { - "type": "structure", - "members": { - "activityId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startTimerFailedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "cancelTimerFailedEventAttributes": { - "type": "structure", - "members": { - "timerId": {}, - "cause": {}, - "decisionTaskCompletedEventId": { - "type": "integer" - } - } - }, - "startChildWorkflowExecutionFailedEventAttributes": { - "type": "structure", - "members": { - "workflowType": { - "type": "structure", - "members": { - "name": {}, - "version": {} - } - }, - "cause": {}, - "workflowId": {}, - "initiatedEventId": { - "type": "integer" - }, - "decisionTaskCompletedEventId": { - "type": "integer" - }, - "control": {} - } - } - } - } - }, - "nextPageToken": {}, - "previousStartedEventId": { - "type": "integer" - } - } - } - }, - "recordActivityTaskHeartbeat": { - "name": "RecordActivityTaskHeartbeat", - "input": { - "type": "structure", - "members": { - "taskToken": { - "required": true - }, - "details": {} - } - }, - "output": { - "type": "structure", - "members": { - "cancelRequested": { - "type": "boolean" - } - } - } - }, - "registerActivityType": { - "name": "RegisterActivityType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "name": { - "required": true - }, - "version": { - "required": true - }, - "description": {}, - "defaultTaskStartToCloseTimeout": {}, - "defaultTaskHeartbeatTimeout": {}, - "defaultTaskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "defaultTaskScheduleToStartTimeout": {}, - "defaultTaskScheduleToCloseTimeout": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "registerDomain": { - "name": "RegisterDomain", - "input": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "description": {}, - "workflowExecutionRetentionPeriodInDays": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "registerWorkflowType": { - "name": "RegisterWorkflowType", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "name": { - "required": true - }, - "version": { - "required": true - }, - "description": {}, - "defaultTaskStartToCloseTimeout": {}, - "defaultExecutionStartToCloseTimeout": {}, - "defaultTaskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "defaultChildPolicy": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "requestCancelWorkflowExecution": { - "name": "RequestCancelWorkflowExecution", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowId": { - "required": true - }, - "runId": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "respondActivityTaskCanceled": { - "name": "RespondActivityTaskCanceled", - "input": { - "type": "structure", - "members": { - "taskToken": { - "required": true - }, - "details": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "respondActivityTaskCompleted": { - "name": "RespondActivityTaskCompleted", - "input": { - "type": "structure", - "members": { - "taskToken": { - "required": true - }, - "result": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "respondActivityTaskFailed": { - "name": "RespondActivityTaskFailed", - "input": { - "type": "structure", - "members": { - "taskToken": { - "required": true - }, - "reason": {}, - "details": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "respondDecisionTaskCompleted": { - "name": "RespondDecisionTaskCompleted", - "input": { - "type": "structure", - "members": { - "taskToken": { - "required": true - }, - "decisions": { - "type": "list", - "members": { - "type": "structure", - "members": { - "decisionType": { - "required": true - }, - "scheduleActivityTaskDecisionAttributes": { - "type": "structure", - "members": { - "activityType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - }, - "activityId": { - "required": true - }, - "control": {}, - "input": {}, - "scheduleToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "scheduleToStartTimeout": {}, - "startToCloseTimeout": {}, - "heartbeatTimeout": {} - } - }, - "requestCancelActivityTaskDecisionAttributes": { - "type": "structure", - "members": { - "activityId": { - "required": true - } - } - }, - "completeWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "result": {} - } - }, - "failWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "reason": {}, - "details": {} - } - }, - "cancelWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "details": {} - } - }, - "continueAsNewWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "type": "list", - "members": {} - }, - "workflowTypeVersion": {} - } - }, - "recordMarkerDecisionAttributes": { - "type": "structure", - "members": { - "markerName": { - "required": true - }, - "details": {} - } - }, - "startTimerDecisionAttributes": { - "type": "structure", - "members": { - "timerId": { - "required": true - }, - "control": {}, - "startToFireTimeout": { - "required": true - } - } - }, - "cancelTimerDecisionAttributes": { - "type": "structure", - "members": { - "timerId": { - "required": true - } - } - }, - "signalExternalWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "workflowId": { - "required": true - }, - "runId": {}, - "signalName": { - "required": true - }, - "input": {}, - "control": {} - } - }, - "requestCancelExternalWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "workflowId": { - "required": true - }, - "runId": {}, - "control": {} - } - }, - "startChildWorkflowExecutionDecisionAttributes": { - "type": "structure", - "members": { - "workflowType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - }, - "workflowId": { - "required": true - }, - "control": {}, - "input": {}, - "executionStartToCloseTimeout": {}, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {}, - "tagList": { - "type": "list", - "members": {} - } - } - } - } - } - }, - "executionContext": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "signalWorkflowExecution": { - "name": "SignalWorkflowExecution", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowId": { - "required": true - }, - "runId": {}, - "signalName": { - "required": true - }, - "input": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "startWorkflowExecution": { - "name": "StartWorkflowExecution", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowId": { - "required": true - }, - "workflowType": { - "type": "structure", - "members": { - "name": { - "required": true - }, - "version": { - "required": true - } - }, - "required": true - }, - "taskList": { - "type": "structure", - "members": { - "name": { - "required": true - } - } - }, - "input": {}, - "executionStartToCloseTimeout": {}, - "tagList": { - "type": "list", - "members": {} - }, - "taskStartToCloseTimeout": {}, - "childPolicy": {} - } - }, - "output": { - "type": "structure", - "members": { - "runId": {} - } - } - }, - "terminateWorkflowExecution": { - "name": "TerminateWorkflowExecution", - "input": { - "type": "structure", - "members": { - "domain": { - "required": true - }, - "workflowId": { - "required": true - }, - "runId": {}, - "reason": {}, - "details": {}, - "childPolicy": {} - } - }, - "output": { - "type": "structure", - "members": {} - } - } - }, - "pagination": { - "getWorkflowExecutionHistory": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "events" - }, - "listActivityTypes": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "typeInfos" - }, - "listClosedWorkflowExecutions": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "executionInfos" - }, - "listDomains": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "domainInfos" - }, - "listOpenWorkflowExecutions": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "executionInfos" - }, - "listWorkflowTypes": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "typeInfos" - }, - "pollForDecisionTask": { - "limitKey": "maximumPageSize", - "inputToken": "nextPageToken", - "outputToken": "nextPageToken", - "resultKey": "events" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SimpleDB-2009-04-15.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SimpleDB-2009-04-15.json deleted file mode 100644 index cd2f10c4..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/SimpleDB-2009-04-15.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "format": "query", - "apiVersion": "2009-04-15", - "endpointPrefix": "sdb", - "resultWrapped": true, - "serviceFullName": "Amazon SimpleDB", - "signatureVersion": "v2", - "timestampFormat": "iso8601", - "operations": { - "batchDeleteAttributes": { - "name": "BatchDeleteAttributes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true, - "name": "ItemName" - }, - "Attributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "AlternateNameEncoding": {}, - "Value": { - "required": true - }, - "AlternateValueEncoding": {} - }, - "name": "Attribute" - }, - "flattened": true - } - }, - "name": "Item" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "batchPutAttributes": { - "name": "BatchPutAttributes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "Items": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true, - "name": "ItemName" - }, - "Attributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - }, - "Replace": { - "type": "boolean" - } - }, - "name": "Attribute" - }, - "flattened": true, - "required": true - } - }, - "name": "Item" - }, - "flattened": true, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "createDomain": { - "name": "CreateDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteAttributes": { - "name": "DeleteAttributes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ItemName": { - "required": true - }, - "Attributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "AlternateNameEncoding": {}, - "Value": { - "required": true - }, - "AlternateValueEncoding": {} - }, - "name": "Attribute" - }, - "flattened": true - }, - "Expected": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "Exists": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "deleteDomain": { - "name": "DeleteDomain", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "domainMetadata": { - "name": "DomainMetadata", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ItemCount": { - "type": "integer" - }, - "ItemNamesSizeBytes": { - "type": "integer" - }, - "AttributeNameCount": { - "type": "integer" - }, - "AttributeNamesSizeBytes": { - "type": "integer" - }, - "AttributeValueCount": { - "type": "integer" - }, - "AttributeValuesSizeBytes": { - "type": "integer" - }, - "Timestamp": { - "type": "integer" - } - } - } - }, - "getAttributes": { - "name": "GetAttributes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ItemName": { - "required": true - }, - "AttributeNames": { - "type": "list", - "members": { - "name": "AttributeName" - }, - "flattened": true - }, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Attribute": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "AlternateNameEncoding": {}, - "Value": {}, - "AlternateValueEncoding": {} - }, - "name": "Attribute" - }, - "flattened": true, - "name": "Attributes" - } - } - } - }, - "listDomains": { - "name": "ListDomains", - "input": { - "type": "structure", - "members": { - "MaxNumberOfDomains": { - "type": "integer" - }, - "NextToken": {} - } - }, - "output": { - "type": "structure", - "members": { - "DomainName": { - "type": "list", - "members": { - "name": "DomainName" - }, - "flattened": true, - "name": "DomainNames" - }, - "NextToken": {} - } - } - }, - "putAttributes": { - "name": "PutAttributes", - "input": { - "type": "structure", - "members": { - "DomainName": { - "required": true - }, - "ItemName": { - "required": true - }, - "Attributes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": { - "required": true - }, - "Value": { - "required": true - }, - "Replace": { - "type": "boolean" - } - }, - "name": "Attribute" - }, - "flattened": true, - "required": true - }, - "Expected": { - "type": "structure", - "members": { - "Name": {}, - "Value": {}, - "Exists": { - "type": "boolean" - } - } - } - } - }, - "output": { - "type": "structure", - "members": {} - } - }, - "select": { - "name": "Select", - "input": { - "type": "structure", - "members": { - "SelectExpression": { - "required": true - }, - "NextToken": {}, - "ConsistentRead": { - "type": "boolean" - } - } - }, - "output": { - "type": "structure", - "members": { - "Item": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "AlternateNameEncoding": {}, - "Attribute": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Name": {}, - "AlternateNameEncoding": {}, - "Value": {}, - "AlternateValueEncoding": {} - }, - "name": "Attribute" - }, - "flattened": true, - "name": "Attributes" - } - }, - "name": "Item" - }, - "flattened": true, - "name": "Items" - }, - "NextToken": {} - } - } - } - }, - "pagination": { - "listDomains": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "limitKey": "MaxNumberOfDomains", - "resultKey": "DomainNames" - }, - "select": { - "inputToken": "NextToken", - "outputToken": "NextToken", - "resultKey": "Items" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/StorageGateway-2013-06-30.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/StorageGateway-2013-06-30.json deleted file mode 100644 index 6ad09d51..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/StorageGateway-2013-06-30.json +++ /dev/null @@ -1,1335 +0,0 @@ -{ - "format": "json", - "apiVersion": "2013-06-30", - "endpointPrefix": "storagegateway", - "jsonVersion": "1.1", - "serviceFullName": "AWS Storage Gateway", - "signatureVersion": "v4", - "targetPrefix": "StorageGateway_20130630", - "timestampFormat": "iso8601", - "operations": { - "activateGateway": { - "name": "ActivateGateway", - "input": { - "type": "structure", - "members": { - "ActivationKey": { - "required": true - }, - "GatewayName": { - "required": true - }, - "GatewayTimezone": { - "required": true - }, - "GatewayRegion": { - "required": true - }, - "GatewayType": {}, - "TapeDriveType": {}, - "MediumChangerType": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "addCache": { - "name": "AddCache", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "DiskIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "addUploadBuffer": { - "name": "AddUploadBuffer", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "DiskIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "addWorkingStorage": { - "name": "AddWorkingStorage", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "DiskIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "cancelArchival": { - "name": "CancelArchival", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "TapeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "cancelRetrieval": { - "name": "CancelRetrieval", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "TapeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "createCachediSCSIVolume": { - "name": "CreateCachediSCSIVolume", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "VolumeSizeInBytes": { - "type": "integer", - "required": true - }, - "SnapshotId": {}, - "TargetName": { - "required": true - }, - "NetworkInterfaceId": { - "required": true - }, - "ClientToken": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "TargetARN": {} - } - } - }, - "createSnapshot": { - "name": "CreateSnapshot", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - }, - "SnapshotDescription": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "SnapshotId": {} - } - } - }, - "createSnapshotFromVolumeRecoveryPoint": { - "name": "CreateSnapshotFromVolumeRecoveryPoint", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - }, - "SnapshotDescription": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "SnapshotId": {}, - "VolumeARN": {}, - "VolumeRecoveryPointTime": {} - } - } - }, - "createStorediSCSIVolume": { - "name": "CreateStorediSCSIVolume", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "DiskId": { - "required": true - }, - "SnapshotId": {}, - "PreserveExistingData": { - "type": "boolean", - "required": true - }, - "TargetName": { - "required": true - }, - "NetworkInterfaceId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeSizeInBytes": { - "type": "integer" - }, - "TargetARN": {} - } - } - }, - "createTapes": { - "name": "CreateTapes", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "TapeSizeInBytes": { - "type": "integer", - "required": true - }, - "ClientToken": { - "required": true - }, - "NumTapesToCreate": { - "type": "integer", - "required": true - }, - "TapeBarcodePrefix": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARNs": { - "type": "list", - "members": {} - } - } - } - }, - "deleteBandwidthRateLimit": { - "name": "DeleteBandwidthRateLimit", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "BandwidthType": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "deleteChapCredentials": { - "name": "DeleteChapCredentials", - "input": { - "type": "structure", - "members": { - "TargetARN": { - "required": true - }, - "InitiatorName": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TargetARN": {}, - "InitiatorName": {} - } - } - }, - "deleteGateway": { - "name": "DeleteGateway", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "deleteSnapshotSchedule": { - "name": "DeleteSnapshotSchedule", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - }, - "deleteTape": { - "name": "DeleteTape", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "TapeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "deleteTapeArchive": { - "name": "DeleteTapeArchive", - "input": { - "type": "structure", - "members": { - "TapeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "deleteVolume": { - "name": "DeleteVolume", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - }, - "describeBandwidthRateLimit": { - "name": "DescribeBandwidthRateLimit", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "AverageUploadRateLimitInBitsPerSec": { - "type": "integer" - }, - "AverageDownloadRateLimitInBitsPerSec": { - "type": "integer" - } - } - } - }, - "describeCache": { - "name": "DescribeCache", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "type": "list", - "members": {} - }, - "CacheAllocatedInBytes": { - "type": "integer" - }, - "CacheUsedPercentage": { - "type": "float" - }, - "CacheDirtyPercentage": { - "type": "float" - }, - "CacheHitPercentage": { - "type": "float" - }, - "CacheMissPercentage": { - "type": "float" - } - } - } - }, - "describeCachediSCSIVolumes": { - "name": "DescribeCachediSCSIVolumes", - "input": { - "type": "structure", - "members": { - "VolumeARNs": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "CachediSCSIVolumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeId": {}, - "VolumeType": {}, - "VolumeStatus": {}, - "VolumeSizeInBytes": { - "type": "integer" - }, - "VolumeProgress": { - "type": "float" - }, - "SourceSnapshotId": {}, - "VolumeiSCSIAttributes": { - "type": "structure", - "members": { - "TargetARN": {}, - "NetworkInterfaceId": {}, - "NetworkInterfacePort": { - "type": "integer" - }, - "LunNumber": { - "type": "integer" - }, - "ChapEnabled": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeChapCredentials": { - "name": "DescribeChapCredentials", - "input": { - "type": "structure", - "members": { - "TargetARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "ChapCredentials": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TargetARN": {}, - "SecretToAuthenticateInitiator": {}, - "InitiatorName": {}, - "SecretToAuthenticateTarget": {} - } - } - } - } - } - }, - "describeGatewayInformation": { - "name": "DescribeGatewayInformation", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "GatewayId": {}, - "GatewayTimezone": {}, - "GatewayState": {}, - "GatewayNetworkInterfaces": { - "type": "list", - "members": { - "type": "structure", - "members": { - "Ipv4Address": {}, - "MacAddress": {}, - "Ipv6Address": {} - } - } - }, - "GatewayType": {}, - "NextUpdateAvailabilityDate": {} - } - } - }, - "describeMaintenanceStartTime": { - "name": "DescribeMaintenanceStartTime", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "HourOfDay": { - "type": "integer" - }, - "MinuteOfHour": { - "type": "integer" - }, - "DayOfWeek": { - "type": "integer" - }, - "Timezone": {} - } - } - }, - "describeSnapshotSchedule": { - "name": "DescribeSnapshotSchedule", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {}, - "StartAt": { - "type": "integer" - }, - "RecurrenceInHours": { - "type": "integer" - }, - "Description": {}, - "Timezone": {} - } - } - }, - "describeStorediSCSIVolumes": { - "name": "DescribeStorediSCSIVolumes", - "input": { - "type": "structure", - "members": { - "VolumeARNs": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "StorediSCSIVolumes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeId": {}, - "VolumeType": {}, - "VolumeStatus": {}, - "VolumeSizeInBytes": { - "type": "integer" - }, - "VolumeProgress": { - "type": "float" - }, - "VolumeDiskId": {}, - "SourceSnapshotId": {}, - "PreservedExistingData": { - "type": "boolean" - }, - "VolumeiSCSIAttributes": { - "type": "structure", - "members": { - "TargetARN": {}, - "NetworkInterfaceId": {}, - "NetworkInterfacePort": { - "type": "integer" - }, - "LunNumber": { - "type": "integer" - }, - "ChapEnabled": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "describeTapeArchives": { - "name": "DescribeTapeArchives", - "input": { - "type": "structure", - "members": { - "TapeARNs": { - "type": "list", - "members": {} - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeArchives": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeBarcode": {}, - "TapeSizeInBytes": { - "type": "integer" - }, - "CompletionTime": { - "type": "timestamp" - }, - "RetrievedTo": {}, - "TapeStatus": {} - } - } - }, - "Marker": {} - } - } - }, - "describeTapeRecoveryPoints": { - "name": "DescribeTapeRecoveryPoints", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "TapeRecoveryPointInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeRecoveryPointTime": { - "type": "timestamp" - }, - "TapeSizeInBytes": { - "type": "integer" - }, - "TapeStatus": {} - } - } - }, - "Marker": {} - } - } - }, - "describeTapes": { - "name": "DescribeTapes", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "TapeARNs": { - "type": "list", - "members": {} - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Tapes": { - "type": "list", - "members": { - "type": "structure", - "members": { - "TapeARN": {}, - "TapeBarcode": {}, - "TapeSizeInBytes": { - "type": "integer" - }, - "TapeStatus": {}, - "VTLDevice": {}, - "Progress": { - "type": "float" - } - } - } - }, - "Marker": {} - } - } - }, - "describeUploadBuffer": { - "name": "DescribeUploadBuffer", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "type": "list", - "members": {} - }, - "UploadBufferUsedInBytes": { - "type": "integer" - }, - "UploadBufferAllocatedInBytes": { - "type": "integer" - } - } - } - }, - "describeVTLDevices": { - "name": "DescribeVTLDevices", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "VTLDeviceARNs": { - "type": "list", - "members": {} - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "VTLDevices": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VTLDeviceARN": {}, - "VTLDeviceType": {}, - "VTLDeviceVendor": {}, - "VTLDeviceProductIdentifier": {}, - "DeviceiSCSIAttributes": { - "type": "structure", - "members": { - "TargetARN": {}, - "NetworkInterfaceId": {}, - "NetworkInterfacePort": { - "type": "integer" - }, - "ChapEnabled": { - "type": "boolean" - } - } - } - } - } - }, - "Marker": {} - } - } - }, - "describeWorkingStorage": { - "name": "DescribeWorkingStorage", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "DiskIds": { - "type": "list", - "members": {} - }, - "WorkingStorageUsedInBytes": { - "type": "integer" - }, - "WorkingStorageAllocatedInBytes": { - "type": "integer" - } - } - } - }, - "disableGateway": { - "name": "DisableGateway", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "listGateways": { - "name": "ListGateways", - "input": { - "type": "structure", - "members": { - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "Gateways": { - "type": "list", - "members": { - "type": "structure", - "members": { - "GatewayARN": {}, - "GatewayType": {}, - "GatewayOperationalState": {} - } - } - }, - "Marker": {} - } - } - }, - "listLocalDisks": { - "name": "ListLocalDisks", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "Disks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "DiskId": {}, - "DiskPath": {}, - "DiskNode": {}, - "DiskSizeInBytes": { - "type": "integer" - }, - "DiskAllocationType": {}, - "DiskAllocationResource": {} - } - } - } - } - } - }, - "listVolumeRecoveryPoints": { - "name": "ListVolumeRecoveryPoints", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "VolumeRecoveryPointInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeSizeInBytes": { - "type": "integer" - }, - "VolumeUsageInBytes": { - "type": "integer" - }, - "VolumeRecoveryPointTime": {} - } - } - } - } - } - }, - "listVolumes": { - "name": "ListVolumes", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "Marker": {}, - "Limit": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {}, - "Marker": {}, - "VolumeInfos": { - "type": "list", - "members": { - "type": "structure", - "members": { - "VolumeARN": {}, - "VolumeType": {} - } - } - } - } - } - }, - "retrieveTapeArchive": { - "name": "RetrieveTapeArchive", - "input": { - "type": "structure", - "members": { - "TapeARN": { - "required": true - }, - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "retrieveTapeRecoveryPoint": { - "name": "RetrieveTapeRecoveryPoint", - "input": { - "type": "structure", - "members": { - "TapeARN": { - "required": true - }, - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "TapeARN": {} - } - } - }, - "shutdownGateway": { - "name": "ShutdownGateway", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "startGateway": { - "name": "StartGateway", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "updateBandwidthRateLimit": { - "name": "UpdateBandwidthRateLimit", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "AverageUploadRateLimitInBitsPerSec": { - "type": "integer" - }, - "AverageDownloadRateLimitInBitsPerSec": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "updateChapCredentials": { - "name": "UpdateChapCredentials", - "input": { - "type": "structure", - "members": { - "TargetARN": { - "required": true - }, - "SecretToAuthenticateInitiator": { - "required": true - }, - "InitiatorName": { - "required": true - }, - "SecretToAuthenticateTarget": {} - } - }, - "output": { - "type": "structure", - "members": { - "TargetARN": {}, - "InitiatorName": {} - } - } - }, - "updateGatewayInformation": { - "name": "UpdateGatewayInformation", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "GatewayName": {}, - "GatewayTimezone": {} - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "updateGatewaySoftwareNow": { - "name": "UpdateGatewaySoftwareNow", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "updateMaintenanceStartTime": { - "name": "UpdateMaintenanceStartTime", - "input": { - "type": "structure", - "members": { - "GatewayARN": { - "required": true - }, - "HourOfDay": { - "type": "integer", - "required": true - }, - "MinuteOfHour": { - "type": "integer", - "required": true - }, - "DayOfWeek": { - "type": "integer", - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "GatewayARN": {} - } - } - }, - "updateSnapshotSchedule": { - "name": "UpdateSnapshotSchedule", - "input": { - "type": "structure", - "members": { - "VolumeARN": { - "required": true - }, - "StartAt": { - "type": "integer", - "required": true - }, - "RecurrenceInHours": { - "type": "integer", - "required": true - }, - "Description": {} - } - }, - "output": { - "type": "structure", - "members": { - "VolumeARN": {} - } - } - } - }, - "pagination": { - "describeCachediSCSIVolumes": { - "resultKey": "CachediSCSIVolumes" - }, - "describeStorediSCSIVolumes": { - "resultKey": "StorediSCSIVolumes" - }, - "describeTapeArchives": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "TapeArchives" - }, - "describeTapeRecoveryPoints": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "TapeRecoveryPointInfos" - }, - "describeTapes": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "Tapes" - }, - "describeVTLDevices": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "VTLDevices" - }, - "listGateways": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "Gateways" - }, - "listLocalDisks": { - "resultKey": "Disks" - }, - "listVolumeRecoveryPoints": { - "resultKey": "VolumeRecoveryPointInfos" - }, - "listVolumes": { - "inputToken": "Marker", - "outputToken": "Marker", - "limitKey": "Limit", - "resultKey": "VolumeInfos" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Support-2013-04-15.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Support-2013-04-15.json deleted file mode 100644 index 5474326b..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/Support-2013-04-15.json +++ /dev/null @@ -1,500 +0,0 @@ -{ - "format": "json", - "apiVersion": "2013-04-15", - "endpointPrefix": "support", - "jsonVersion": "1.1", - "serviceFullName": "AWS Support", - "signatureVersion": "v4", - "targetPrefix": "AWSSupport_20130415", - "timestampFormat": "iso8601", - "operations": { - "addCommunicationToCase": { - "name": "AddCommunicationToCase", - "input": { - "type": "structure", - "members": { - "caseId": {}, - "communicationBody": { - "required": true - }, - "ccEmailAddresses": { - "type": "list", - "members": {} - } - } - }, - "output": { - "type": "structure", - "members": { - "result": { - "type": "boolean" - } - } - } - }, - "createCase": { - "name": "CreateCase", - "input": { - "type": "structure", - "members": { - "subject": { - "required": true - }, - "serviceCode": {}, - "severityCode": {}, - "categoryCode": {}, - "communicationBody": { - "required": true - }, - "ccEmailAddresses": { - "type": "list", - "members": {} - }, - "language": {}, - "issueType": {} - } - }, - "output": { - "type": "structure", - "members": { - "caseId": {} - } - } - }, - "describeCases": { - "name": "DescribeCases", - "input": { - "type": "structure", - "members": { - "caseIdList": { - "type": "list", - "members": {} - }, - "displayId": {}, - "afterTime": {}, - "beforeTime": {}, - "includeResolvedCases": { - "type": "boolean" - }, - "nextToken": {}, - "maxResults": { - "type": "integer" - }, - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "cases": { - "type": "list", - "members": { - "type": "structure", - "members": { - "caseId": {}, - "displayId": {}, - "subject": {}, - "status": {}, - "serviceCode": {}, - "categoryCode": {}, - "severityCode": {}, - "submittedBy": {}, - "timeCreated": {}, - "recentCommunications": { - "type": "structure", - "members": { - "communications": { - "type": "list", - "members": { - "type": "structure", - "members": { - "caseId": {}, - "body": {}, - "submittedBy": {}, - "timeCreated": {} - } - } - }, - "nextToken": {} - } - }, - "ccEmailAddresses": { - "type": "list", - "members": {} - }, - "language": {} - } - } - }, - "nextToken": {} - } - } - }, - "describeCommunications": { - "name": "DescribeCommunications", - "input": { - "type": "structure", - "members": { - "caseId": { - "required": true - }, - "beforeTime": {}, - "afterTime": {}, - "nextToken": {}, - "maxResults": { - "type": "integer" - } - } - }, - "output": { - "type": "structure", - "members": { - "communications": { - "type": "list", - "members": { - "type": "structure", - "members": { - "caseId": {}, - "body": {}, - "submittedBy": {}, - "timeCreated": {} - } - } - }, - "nextToken": {} - } - } - }, - "describeServices": { - "name": "DescribeServices", - "input": { - "type": "structure", - "members": { - "serviceCodeList": { - "type": "list", - "members": {} - }, - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "services": { - "type": "list", - "members": { - "type": "structure", - "members": { - "code": {}, - "name": {}, - "categories": { - "type": "list", - "members": { - "type": "structure", - "members": { - "code": {}, - "name": {} - } - } - } - } - } - } - } - } - }, - "describeSeverityLevels": { - "name": "DescribeSeverityLevels", - "input": { - "type": "structure", - "members": { - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "severityLevels": { - "type": "list", - "members": { - "type": "structure", - "members": { - "code": {}, - "name": {} - } - } - } - } - } - }, - "describeTrustedAdvisorCheckRefreshStatuses": { - "name": "DescribeTrustedAdvisorCheckRefreshStatuses", - "input": { - "type": "structure", - "members": { - "checkIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "statuses": { - "type": "list", - "members": { - "type": "structure", - "members": { - "checkId": {}, - "status": {}, - "millisUntilNextRefreshable": { - "type": "integer" - } - } - } - } - } - } - }, - "describeTrustedAdvisorCheckResult": { - "name": "DescribeTrustedAdvisorCheckResult", - "input": { - "type": "structure", - "members": { - "checkId": { - "required": true - }, - "language": {} - } - }, - "output": { - "type": "structure", - "members": { - "result": { - "type": "structure", - "members": { - "checkId": {}, - "timestamp": {}, - "status": {}, - "resourcesSummary": { - "type": "structure", - "members": { - "resourcesProcessed": { - "type": "integer" - }, - "resourcesFlagged": { - "type": "integer" - }, - "resourcesIgnored": { - "type": "integer" - }, - "resourcesSuppressed": { - "type": "integer" - } - } - }, - "categorySpecificSummary": { - "type": "structure", - "members": { - "costOptimizing": { - "type": "structure", - "members": { - "estimatedMonthlySavings": { - "type": "float" - }, - "estimatedPercentMonthlySavings": { - "type": "float" - } - } - } - } - }, - "flaggedResources": { - "type": "list", - "members": { - "type": "structure", - "members": { - "status": {}, - "region": {}, - "resourceId": {}, - "isSuppressed": { - "type": "boolean" - }, - "metadata": { - "type": "list", - "members": {} - } - } - } - } - } - } - } - } - }, - "describeTrustedAdvisorCheckSummaries": { - "name": "DescribeTrustedAdvisorCheckSummaries", - "input": { - "type": "structure", - "members": { - "checkIds": { - "type": "list", - "members": {}, - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "summaries": { - "type": "list", - "members": { - "type": "structure", - "members": { - "checkId": {}, - "timestamp": {}, - "status": {}, - "hasFlaggedResources": { - "type": "boolean" - }, - "resourcesSummary": { - "type": "structure", - "members": { - "resourcesProcessed": { - "type": "integer" - }, - "resourcesFlagged": { - "type": "integer" - }, - "resourcesIgnored": { - "type": "integer" - }, - "resourcesSuppressed": { - "type": "integer" - } - } - }, - "categorySpecificSummary": { - "type": "structure", - "members": { - "costOptimizing": { - "type": "structure", - "members": { - "estimatedMonthlySavings": { - "type": "float" - }, - "estimatedPercentMonthlySavings": { - "type": "float" - } - } - } - } - } - } - } - } - } - } - }, - "describeTrustedAdvisorChecks": { - "name": "DescribeTrustedAdvisorChecks", - "input": { - "type": "structure", - "members": { - "language": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "checks": { - "type": "list", - "members": { - "type": "structure", - "members": { - "id": {}, - "name": {}, - "description": {}, - "category": {}, - "metadata": { - "type": "list", - "members": {} - } - } - } - } - } - } - }, - "refreshTrustedAdvisorCheck": { - "name": "RefreshTrustedAdvisorCheck", - "input": { - "type": "structure", - "members": { - "checkId": { - "required": true - } - } - }, - "output": { - "type": "structure", - "members": { - "status": { - "type": "structure", - "members": { - "checkId": {}, - "status": {}, - "millisUntilNextRefreshable": { - "type": "integer" - } - } - } - } - } - }, - "resolveCase": { - "name": "ResolveCase", - "input": { - "type": "structure", - "members": { - "caseId": {} - } - }, - "output": { - "type": "structure", - "members": { - "initialCaseStatus": {}, - "finalCaseStatus": {} - } - } - } - }, - "pagination": { - "describeCases": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "limitKey": "maxResults", - "resultKey": "cases" - }, - "describeCommunications": { - "inputToken": "nextToken", - "outputToken": "nextToken", - "limitKey": "maxResults", - "resultKey": "communications" - }, - "describeServices": { - "resultKey": "services" - }, - "describeTrustedAdvisorCheckRefreshStatuses": { - "resultKey": "statuses" - }, - "describeTrustedAdvisorCheckSummaries": { - "resultKey": "summaries" - } - } -} \ No newline at end of file diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/symlinks.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/symlinks.json deleted file mode 100644 index e0e599f0..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/apis/symlinks.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "CloudFront": ["2013-05-12*"], - "EC2": ["2013-06-15*", "2013-10-15*"], - "ElastiCache": ["2012-11-15*"] -} diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/index.js b/node_modules/aws-sdk/node_modules/aws-sdk-apis/index.js deleted file mode 100644 index f59baaad..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var fs = require('fs'); - -var apiRoot = __dirname + '/apis'; -var serviceMap = null; -var serviceIdentifiers = []; -var serviceNames = []; - -function buildServiceMap() { - if (serviceMap !== null) return; - - // load symlinks file for API versions that have been removed from disk but - // are still referenceable in code. - var symlinksFile = apiRoot + '/symlinks.json'; - var symlinks = JSON.parse(fs.readFileSync(symlinksFile).toString()); - - // create a map of each service name to its list of versions - serviceMap = {}; - fs.readdirSync(apiRoot).forEach(function (file) { - var match = file.match(/^([^-]+)-(\d+-\d+-\d+)\.json$/); - if (match) { - var svcName = match[1], version = match[2]; - var svcIdentifier = svcName.toLowerCase(); - - if (!serviceMap[svcIdentifier]) { // build the base service values - // add versions from symlinks, if any - var versions = symlinks[svcName] || []; - serviceMap[svcIdentifier] = { name: svcName, versions: versions }; - } - - serviceMap[svcIdentifier].versions.push(version); - } - }); - - Object.keys(serviceMap).forEach(function(identifier) { - serviceMap[identifier].versions = serviceMap[identifier].versions.sort(); - serviceIdentifiers.push(identifier); - serviceNames.push(serviceMap[identifier].name); - }); -} - -function getServices() { - buildServiceMap(); - return serviceIdentifiers; -} - -function getServiceNames() { - buildServiceMap(); - return serviceNames; -} - -function serviceVersions(svc) { - buildServiceMap(); - svc = serviceIdentifier(svc); - return serviceMap[svc] ? serviceMap[svc].versions : null; -} - -function serviceName(svc) { - buildServiceMap(); - svc = serviceIdentifier(svc); - return serviceMap[svc] ? serviceMap[svc].name : null; -} - -function serviceFile(svc, version) { - buildServiceMap(); - svc = serviceIdentifier(svc); - if (!serviceMap[svc]) return null; - - return apiRoot + '/' + serviceMap[svc].name + '-' + version + '.json'; -} - -function serviceIdentifier(svc) { - return svc.toLowerCase(); -} - -module.exports = { - serviceVersions: serviceVersions, - serviceName: serviceName, - serviceIdentifier: serviceIdentifier, - serviceFile: serviceFile -}; -Object.defineProperty(module.exports, 'services', { - enumerable: true, get: getServices -}); -Object.defineProperty(module.exports, 'serviceNames', { - enumerable: true, get: getServiceNames -}); diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/lib/translator.js b/node_modules/aws-sdk/node_modules/aws-sdk-apis/lib/translator.js deleted file mode 100644 index ea6c7fdc..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/lib/translator.js +++ /dev/null @@ -1,377 +0,0 @@ -/* global Buffer: true */ -/* eslint camelcase:0 */ - -var Buffer = require('buffer').Buffer; - -/* A couple of utility methods */ - -var abort = {}; - -function each(obj, iter) { - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - var ret = iter(key, obj[key]); - if (ret === abort) break; - } - } -} - -function copy(object) { - if (object === null || object === undefined) return object; - var dupe = {}; - for (var key in object) { - dupe[key] = object[key]; - } - return dupe; -} - -function update(a, b) { - each(b, function iterator(key, value) { a[key] = value; }); - return a; -} - -function merge(a, b) { - return update(copy(a), b); -} - -/* End utility methods */ - -function Shape(rules, options) { - if (!rules) { - this.rules = { type: 'structure', members: {} }; - return; - } - - this.options = options; - this.rules = {}; - this.set_type(rules.type); - each(rules, function(key, value) { - if (key !== 'type') this['set_' + key](value); - }.bind(this)); - - if (this.rules.type === 'blob') { - if (this.rules.payload || this.rules.streaming) { - this.rules.type = 'binary'; - } else { - this.rules.type = 'base64'; - } - } -} - -function InputShape(rules, options) { - Shape.call(this, rules, options); -} - -function OutputShape(rules, options) { - Shape.call(this, rules, options); -} - -/** - * @api private - */ -Shape.prototype = { - shapeClass: function() { - if (this instanceof InputShape) return InputShape; - if (this instanceof OutputShape) return OutputShape; - }, - - xmlname: function() { - if (this.rules.flattened) { - return this._xmlname || (this.rules.members || {}).name; - } else { - return this._xmlname; - } - }, - - set_type: function(name) { - var types = { - structure: 'structure', - list: 'list', - map: 'map', - boolean: 'boolean', - timestamp: 'timestamp', - character: 'string', - double: 'float', - float: 'float', - integer: 'integer', - long: 'integer', - short: 'integer', - string: 'string', - blob: 'blob', - biginteger: 'integer', - bigdecimal: 'float' - }; - if (name === 'string') { // omit string to reduce size - return; - } else if (types[name]) { - this.rules.type = types[name]; - } else { - throw new Error('unhandled shape type ' + name); - } - }, - - set_members: function(members) { - var type = this.rules.type; - var ShapeClass = this.shapeClass(); - if (type === 'structure') { - this.rules.members = {}; - each(members, function(memberName, memberRules) { - var shape = new ShapeClass(memberRules, this.options); - if (this.swapNames(shape)) { - shape.rules.name = memberName; - memberName = shape.xmlname(); - } - this.rules.members[memberName] = shape.rules; - }.bind(this)); - } else if (type === 'list') { - this.rules.members = new ShapeClass(members, this.options).rules; - } else if (type === 'map') { - this.rules.members = new ShapeClass(members, this.options).rules; - } else if (type === 'blob') { - this.rules.members = {}; - } else { - throw new Error('unhandled complex shape `' + type + '\''); - } - }, - - set_keys: function(rules) { - var ShapeClass = this.shapeClass(); - this.rules.keys = new ShapeClass(rules, this.options).rules; - }, - - set_timestamp_format: function(format) { - this.rules.format = format; - }, - - set_xmlname: function(name) { - this._xmlname = name; - this.rules.name = name; - }, - - set_location: function (location) { - this.rules.location = (location === 'http_status' ? 'status' : location); - }, - - set_location_name: function(header_name) { - this.rules.name = header_name; - }, - - set_payload: function(state) { - if (state) this.rules.payload = true; - }, - - set_flattened: function(state) { - if (state) this.rules.flattened = true; - }, - - set_streaming: function(state) { - if (state) this.rules.streaming = true; - }, - - set_xmlattribute: function(state) { - if (state) this.rules.attribute = true; - }, - - set_xmlnamespace: function(ns) { - this.rules.xmlns = ns; - }, - - set_documentation: function(docs) { - if (this.options.documentation) this.rules.documentation = docs; - }, - - set_enum: function(values) { - if (this.options.documentation) this.rules['enum'] = values; - }, - - set_wrapper: function() {}, - set_shape_name: function() {}, - set_box: function() {}, - set_sensitive: function() {} -}; - -InputShape.prototype = merge(Shape.prototype, { - swapNames: function() { return false; }, - - set_required: function() { this.rules.required = true; }, - set_member_order: function(order) { this.rules.order = order; }, - - set_min_length: function(min) { - if (this.options.documentation) this.rules.min_length = min; - }, - - set_max_length: function(max) { - if (this.options.documentation) this.rules.max_length = max; - }, - - set_pattern: function(pattern) { - if (this.options.documentation) this.rules.pattern = pattern; - } -}); - -OutputShape.prototype = merge(Shape.prototype, { - swapNames: function(shape) { - if (this.options.documentation) return false; - return shape.xmlname() && ['query', 'rest-xml'].indexOf(this.options.type) >= 0; - }, - - set_required: function() {}, - set_member_order: function() {}, - set_min_length: function() {}, - set_max_length: function() {}, - set_pattern: function() {} -}); - -function Operation(rules, options) { - var origRules = rules; - - function normalizeInputs() { - if (options.type.indexOf('rest') < 0) return; - - var xml = options.type.indexOf('xml') >= 0; - var payload = false; - var wrapper = false; - - var hasPayload = false; - each(rules.input.members, function(name, rule) { - if (rule.payload) { - hasPayload = true; - payload = name; - delete rule.payload; - return abort; - } - }); - - if (!hasPayload) { - var list = []; - each(rules.input.members, function(name, rule) { - if (!rule.location) { list.push(name); } - }); - - if (list.length > 0) { - payload = list; - if (xml) wrapper = origRules.input.shape_name; - } - } - - if (wrapper) rules.input = merge({wrapper: wrapper}, rules.input); - if (payload) rules.input = merge({payload: payload}, rules.input); - } - - function normalizeOutputs() { - var moveUp = null; - - each(rules.output.members, function(memberName, rule) { - if (rule.payload && rule.type === 'structure') { - delete rule.payload; - moveUp = memberName; - } - else if (rule.payload || rule.streaming) { - delete rule.payload; - rules.output.payload = memberName; - } - }); - - if (moveUp) { - var rule = rules.output.members[moveUp]; - delete rules.output.members[moveUp]; - update(rules.output.members, rule.members); - } - } - - rules = copy(rules); - - rules.input = new InputShape(rules.input, options).rules; - rules.output = new OutputShape(rules.output, options).rules; - rules.input.members = rules.input.members || {}; - rules.output.members = rules.output.members || {}; - - normalizeInputs(); - normalizeOutputs(); - - if (rules.http) delete rules.http.response_code; - if (options.documentation) { - rules.errors = rules.errors.map(function(e) { return e.shape_name; }); - } else { - delete rules.errors; - delete rules.documentation; - delete rules.documentation_url; - delete rules.response_code; - } - - return rules; -} - -function Translator(api, options) { - var translate = {}; - - function inflect(key) { - return key.replace(/_(\w)/g, function (_, m) { return m.toUpperCase(); }); - } - - function setTranslatedKeys() { - var list = Object.keys(api); - list.push('timestamp_format'); - list.sort().forEach(function (key) { translate[inflect(key)] = api[key]; }); - translate.timestampFormat = translate.timestampFormat || 'iso8601'; - if (translate.jsonVersion) translate.jsonVersion = translate.jsonVersion.toString(); - if (translate.jsonVersion === '1') translate.jsonVersion = '1.0'; - if (!options.documentation) delete translate.documentation; - if (!translate.resultWrapped) delete translate.resultWrapped; - if (!api.type.match(/xml/)) delete translate.xmlnamespace; - delete translate.operations; - delete translate.pagination; - delete translate.waiters; - delete translate.type; - } - - function setOperations() { - translate.operations = {}; - each(api.operations, function (key, value) { - var methodName = key[0].toLowerCase() + key.substr(1); - methodName = methodName.replace(/\d{4}_\d{2}_\d{2}$/, ''); - var operation = new Operation(value, options); - translate.operations[methodName] = operation; - }); - } - - function setPagination() { - if (api.pagination) { - translate.pagination = {}; - each(api.pagination, function (key, value) { - var object = {}; - each(value, function (k2, v2) { object[inflect(k2)] = v2; }); - translate.pagination[key[0].toLowerCase() + key.substr(1)] = object; - }); - } - } - - function setWaiters() { - if (api.waiters) { - translate.waiters = {}; - each(api.waiters, function (key, value) { - var object = {}; - each(value, function (k2, v2) { object[inflect(k2)] = v2; }); - translate.waiters[key[0].toLowerCase() + key.substr(1)] = object; - }); - } - } - - if (typeof api === 'string' || Buffer.isBuffer(api)) { - api = JSON.parse(api); - } - - options = options || {}; - options.type = api.type; - - translate.format = api.type; - - setTranslatedKeys(); - setOperations(); - setPagination(); - setWaiters(); - - return translate; -} - -module.exports = Translator; diff --git a/node_modules/aws-sdk/node_modules/aws-sdk-apis/package.json b/node_modules/aws-sdk/node_modules/aws-sdk-apis/package.json deleted file mode 100644 index 8ef2b145..00000000 --- a/node_modules/aws-sdk/node_modules/aws-sdk-apis/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "aws-sdk-apis", - "description": "AWS SDK for JavaScript APIs", - "version": "2.0.5", - "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" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/aws/aws-sdk-js-apis" - }, - "bugs": { - "url": "http://github.com/aws/aws-sdk-js-apis/issues" - }, - "licenses": [ - { - "type": "Apache 2.0", - "url": "http://github.com/aws/aws-sdk-js-apis/raw/master/LICENSE.txt" - } - ], - "keywords": [ - "api", - "amazon", - "aws", - "sdk" - ], - "readme": "# AWS SDK for JavaScript APIs Package\n\nThis package contains all of the API definitions used by the\n[aws-sdk](https://github.com/aws/aws-sdk-js) package.\n", - "readmeFilename": "README.md", - "_id": "aws-sdk-apis@2.0.5", - "dist": { - "shasum": "78587e177dc4f6f217948cc0e6d3b8c566c62823" - }, - "_from": "aws-sdk-apis@2.x", - "_resolved": "https://registry.npmjs.org/aws-sdk-apis/-/aws-sdk-apis-2.0.5.tgz" -} diff --git a/node_modules/aws-sdk/node_modules/xml2js/.npmignore b/node_modules/aws-sdk/node_modules/xml2js/.npmignore deleted file mode 100644 index c3c1388e..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.swp -node_modules diff --git a/node_modules/aws-sdk/node_modules/xml2js/.travis.yml b/node_modules/aws-sdk/node_modules/xml2js/.travis.yml deleted file mode 100644 index 999ea35c..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js - -# test on two node.js versions: 0.6 and 0.8 -node_js: - - 0.8 diff --git a/node_modules/aws-sdk/node_modules/xml2js/Cakefile b/node_modules/aws-sdk/node_modules/xml2js/Cakefile deleted file mode 100644 index 11434428..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/Cakefile +++ /dev/null @@ -1,12 +0,0 @@ -{spawn, exec} = require 'child_process' - -task 'build', 'continually build the JavaScript code', -> - coffee = spawn 'coffee', ['-cw', '-o', 'lib', 'src'] - coffee.stdout.on 'data', (data) -> console.log data.toString().trim() - -task 'doc', 'rebuild the Docco documentation', -> - exec([ - 'docco src/xml2js.coffee' - ].join(' && '), (err) -> - throw err if err - ) diff --git a/node_modules/aws-sdk/node_modules/xml2js/LICENSE b/node_modules/aws-sdk/node_modules/xml2js/LICENSE deleted file mode 100644 index e3b4222a..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright 2010, 2011, 2012, 2013. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/aws-sdk/node_modules/xml2js/README.md b/node_modules/aws-sdk/node_modules/xml2js/README.md deleted file mode 100644 index bf04126d..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/README.md +++ /dev/null @@ -1,228 +0,0 @@ -node-xml2js -=========== - -Ever had the urge to parse XML? And wanted to access the data in some sane, -easy way? Don't want to compile a C parser, for whatever reason? Then xml2js is -what you're looking for! - -Description -=========== - -Simple XML to JavaScript object converter. Uses -[sax-js](https://github.com/isaacs/sax-js/). - -Note: If you're looking for a full DOM parser, you probably want -[JSDom](https://github.com/tmpvar/jsdom). - -Installation -============ - -Simplest way to install `xml2js` is to use [npm](http://npmjs.org), just `npm -install xml2js` which will download xml2js and all dependencies. - -Usage -===== - -No extensive tutorials required because you are a smart developer! The task of -parsing XML should be an easy one, so let's make it so! Here's some examples. - -Shoot-and-forget usage ----------------------- - -You want to parse XML as simple and easy as possible? It's dangerous to go -alone, take this: - -```javascript -var parseString = require('xml2js').parseString; -var xml = "Hello xml2js!" -parseString(xml, function (err, result) { - console.dir(result); -}); -``` - -Can't get easier than this, right? This works starting with `xml2js` 0.2.3. -With CoffeeScript it looks like this: - -```coffeescript -parseString = require('xml2js').parseString -xml = "Hello xml2js!" -parseString xml, (err, result) -> - console.dir result -``` - -If you need some special options, fear not, `xml2js` supports a number of -options (see below), you can specify these as second argument: - -```javascript -parseString(xml, {trim: true}, function (err, result) { -}); -``` - -Simple as pie usage -------------------- - -That's right, if you have been using xml-simple or a home-grown -wrapper, this is was added in 0.1.11 just for you: - -```javascript -var fs = require('fs'), - xml2js = require('xml2js'); - -var parser = new xml2js.Parser(); -fs.readFile(__dirname + '/foo.xml', function(err, data) { - parser.parseString(data, function (err, result) { - console.dir(result); - console.log('Done'); - }); -}); -``` - -Look ma, no event listeners! - -You can also use `xml2js` from -[CoffeeScript](http://jashkenas.github.com/coffee-script/), further reducing -the clutter: - -```coffeescript -fs = require 'fs', -xml2js = require 'xml2js' - -parser = new xml2js.Parser() -fs.readFile __dirname + '/foo.xml', (err, data) -> - parser.parseString data, (err, result) -> - console.dir result - console.log 'Done.' -``` - -"Traditional" usage -------------------- - -Alternatively you can still use the traditional `addListener` variant that was -supported since forever: - -```javascript -var fs = require('fs'), - xml2js = require('xml2js'); - -var parser = new xml2js.Parser(); -parser.addListener('end', function(result) { - console.dir(result); - console.log('Done.'); -}); -fs.readFile(__dirname + '/foo.xml', function(err, data) { - parser.parseString(data); -}); -``` - -If you want to parse multiple files, you have multiple possibilites: - - * You can create one `xml2js.Parser` per file. That's the recommended one - and is promised to always *just work*. - * You can call `reset()` on your parser object. - * You can hope everything goes well anyway. This behaviour is not - guaranteed work always, if ever. Use option #1 if possible. Thanks! - -So you wanna some JSON? ------------------------ - -Just wrap the `result` object in a call to `JSON.stringify` like this -`JSON.stringify(result)`. You get a string containing the JSON representation -of the parsed object that you can feed to JSON-hungry consumers. - -Displaying results ------------------- - -You might wonder why, using `console.dir` or `console.log` the output at some -level is only `[Object]`. Don't worry, this is not because xml2js got lazy. -That's because Node uses `util.inspect` to convert the object into strings and -that function stops after `depth=2` which is a bit low for most XML. - -To display the whole deal, you can use `console.log(util.inspect(result, false, -null))`, which displays the whole result. - -So much for that, but what if you use -[eyes](https://github.com/cloudhead/eyes.js) for nice colored output and it -truncates the output with `…`? Don't fear, there's also a solution for that, -you just need to increase the `maxLength` limit by creating a custom inspector -`var inspect = require('eyes').inspector({maxLength: false})` and then you can -easily `inspect(result)`. - -Options -======= - -Apart from the default settings, there is a number of options that can be -specified for the parser. Options are specified by ``new Parser({optionName: -value})``. Possible options are: - - * `attrkey` (default: `$`): Prefix that is used to access the attributes. - Version 0.1 default was `@`. - * `charkey` (default: `_`): Prefix that is used to access the character - content. Version 0.1 default was `#`. - * `explicitCharkey` (default: `false`) - * `trim` (default: `false`): Trim the whitespace at the beginning and end of - text nodes. - * `normalizeTags` (default: `false`): Normalize all tag names to lowercase. - * `normalize` (default: `false`): Trim whitespaces inside text nodes. - * `explicitRoot` (default: `true`): Set this if you want to get the root - node in the resulting object. - * `emptyTag` (default: `undefined`): what will the value of empty nodes be. - Default is `{}`. - * `explicitArray` (default: `true`): Always put child nodes in an array if - true; otherwise an array is created only if there is more than one. - * `ignoreAttrs` (default: `false`): Ignore all XML attributes and only create - text nodes. - * `mergeAttrs` (default: `false`): Merge attributes and child elements as - properties of the parent, instead of keying attributes off a child - attribute object. This option is ignored if `ignoreAttrs` is `false`. - * `validator` (default `null`): You can specify a callable that validates - the resulting structure somehow, however you want. See unit tests - for an example. - * `xmlns` (default `false`): Give each element a field usually called '$ns' - (the first character is the same as attrkey) that contains its local name - and namespace URI. - -Updating to new version -======================= - -Version 0.2 changed the default parsing settings, but version 0.1.14 introduced -the default settings for version 0.2, so these settings can be tried before the -migration. - -```javascript -var xml2js = require('xml2js'); -var parser = new xml2js.Parser(xml2js.defaults["0.2"]); -``` - -To get the 0.1 defaults in version 0.2 you can just use -`xml2js.defaults["0.1"]` in the same place. This provides you with enough time -to migrate to the saner way of parsing in xml2js 0.2. We try to make the -migration as simple and gentle as possible, but some breakage cannot be -avoided. - -So, what exactly did change and why? In 0.2 we changed some defaults to parse -the XML in a more universal and sane way. So we disabled `normalize` and `trim` -so xml2js does not cut out any text content. You can reenable this at will of -course. A more important change is that we return the root tag in the resulting -JavaScript structure via the `explicitRoot` setting, so you need to access the -first element. This is useful for anybody who wants to know what the root node -is and preserves more information. The last major change was to enable -`explicitArray`, so everytime it is possible that one might embed more than one -sub-tag into a tag, xml2js >= 0.2 returns an array even if the array just -includes one element. This is useful when dealing with APIs that return -variable amounts of subtags. - -Running tests, development -========================== - -[![Build Status](https://secure.travis-ci.org/Leonidas-from-XIV/node-xml2js.png?branch=master)](https://travis-ci.org/Leonidas-from-XIV/node-xml2js) - -The development requirements are handled by npm, you just need to install them. -We also have a number of unit tests, they can be run using `npm test` directly -from the project root. This runs zap to discover all the tests and execute -them. - -If you like to contribute, keep in mind that xml2js is written in CoffeeScript, -so don't develop on the JavaScript files that are checked into the repository -for convenience reasons. Also, please write some unit test to check your -behaviour and if it is some user-facing thing, add some documentation to this -README, so people will know it exists. Thanks in advance! diff --git a/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js b/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js deleted file mode 100644 index 79457a68..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/lib/xml2js.js +++ /dev/null @@ -1,250 +0,0 @@ -// Generated by CoffeeScript 1.4.0 -(function() { - var events, isEmpty, sax, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - - sax = require('sax'); - - events = require('events'); - - isEmpty = function(thing) { - return typeof thing === "object" && (thing != null) && Object.keys(thing).length === 0; - }; - - exports.defaults = { - "0.1": { - explicitCharkey: false, - trim: true, - normalize: true, - normalizeTags: false, - attrkey: "@", - charkey: "#", - explicitArray: false, - ignoreAttrs: false, - 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 - } - }; - - exports.ValidationError = (function(_super) { - - __extends(ValidationError, _super); - - function ValidationError(message) { - this.message = message; - } - - return ValidationError; - - })(Error); - - exports.Parser = (function(_super) { - - __extends(Parser, _super); - - function Parser(opts) { - this.parseString = __bind(this.parseString, this); - - this.reset = __bind(this.reset, this); - - var key, value, _ref; - this.options = {}; - _ref = exports.defaults["0.2"]; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - value = _ref[key]; - this.options[key] = value; - } - for (key in opts) { - if (!__hasProp.call(opts, key)) continue; - value = opts[key]; - this.options[key] = value; - } - if (this.options.xmlns) { - this.options.xmlnskey = this.options.attrkey + "ns"; - } - this.reset(); - } - - Parser.prototype.reset = function() { - var attrkey, charkey, err, stack, - _this = this; - this.removeAllListeners(); - this.saxParser = sax.parser(true, { - trim: false, - normalize: false, - xmlns: this.options.xmlns - }); - err = false; - this.saxParser.onerror = function(error) { - if (!err) { - err = true; - return _this.emit("error", error); - } - }; - this.EXPLICIT_CHARKEY = this.options.explicitCharkey; - this.resultObject = null; - stack = []; - attrkey = this.options.attrkey; - charkey = this.options.charkey; - this.saxParser.onopentag = function(node) { - var key, obj, _ref; - obj = {}; - obj[charkey] = ""; - if (!_this.options.ignoreAttrs) { - _ref = node.attributes; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - if (!(attrkey in obj) && !_this.options.mergeAttrs) { - obj[attrkey] = {}; - } - if (_this.options.mergeAttrs) { - obj[key] = node.attributes[key]; - } else { - obj[attrkey][key] = node.attributes[key]; - } - } - } - obj["#name"] = _this.options.normalizeTags ? node.name.toLowerCase() : node.name; - if (_this.options.xmlns) { - obj[_this.options.xmlnskey] = { - uri: node.uri, - local: node.local - }; - } - return stack.push(obj); - }; - this.saxParser.onclosetag = function() { - var node, nodeName, obj, old, s, xpath; - obj = stack.pop(); - nodeName = obj["#name"]; - delete obj["#name"]; - s = stack[stack.length - 1]; - if (obj[charkey].match(/^\s*$/)) { - delete obj[charkey]; - } else { - if (_this.options.trim) { - obj[charkey] = obj[charkey].trim(); - } - if (_this.options.normalize) { - obj[charkey] = obj[charkey].replace(/\s{2,}/g, " ").trim(); - } - if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) { - obj = obj[charkey]; - } - } - if (_this.options.emptyTag !== void 0 && isEmpty(obj)) { - obj = _this.options.emptyTag; - } - if (_this.options.validator != null) { - xpath = "/" + ((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = stack.length; _i < _len; _i++) { - node = stack[_i]; - _results.push(node["#name"]); - } - return _results; - })()).concat(nodeName).join("/"); - obj = _this.options.validator(xpath, s && s[nodeName], obj); - } - if (stack.length > 0) { - if (!_this.options.explicitArray) { - if (!(nodeName in s)) { - return s[nodeName] = obj; - } else if (s[nodeName] instanceof Array) { - return s[nodeName].push(obj); - } else { - old = s[nodeName]; - s[nodeName] = [old]; - return s[nodeName].push(obj); - } - } else { - if (!(s[nodeName] instanceof Array)) { - s[nodeName] = []; - } - return s[nodeName].push(obj); - } - } else { - if (_this.options.explicitRoot) { - old = obj; - obj = {}; - obj[nodeName] = old; - } - _this.resultObject = obj; - return _this.emit("end", _this.resultObject); - } - }; - return this.saxParser.ontext = this.saxParser.oncdata = function(text) { - var s; - s = stack[stack.length - 1]; - if (s) { - return s[charkey] += text; - } - }; - }; - - Parser.prototype.parseString = function(str, cb) { - if ((cb != null) && typeof cb === "function") { - this.on("end", function(result) { - this.reset(); - return cb(null, result); - }); - this.on("error", function(err) { - this.reset(); - return cb(err); - }); - } - if (str.toString().trim() === '') { - this.emit("end", null); - return true; - } - try { - return this.saxParser.write(str.toString()); - } catch (ex) { - return this.emit("error", ex.message); - } - }; - - return Parser; - - })(events.EventEmitter); - - exports.parseString = function(str, a, b) { - var cb, options, parser; - if (b != null) { - if (typeof b === 'function') { - cb = b; - } - if (typeof a === 'object') { - options = a; - } - } else { - if (typeof a === 'function') { - cb = a; - } - options = {}; - } - parser = new exports.Parser(options); - return parser.parseString(str, cb); - }; - -}).call(this); diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/AUTHORS b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/AUTHORS deleted file mode 100644 index 7145cbcd..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -# contributors sorted by whether or not they're me. -Isaac Z. Schlueter -Stein Martin Hustad -Mikeal Rogers -Laurie Harper -Jann Horn -Elijah Insua -Henry Rawas -Justin Makeig -Mike Schilling diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE deleted file mode 100644 index 62e4ccf9..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE +++ /dev/null @@ -1,32 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. 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. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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. - - -The file "examples/strict.dtd" is licensed by the W3C and used according -to the terms of the W3C SOFTWARE NOTICE AND LICENSE. See LICENSE-W3C.html -for details. diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE-W3C.html b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE-W3C.html deleted file mode 100644 index a611e3f9..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/LICENSE-W3C.html +++ /dev/null @@ -1,188 +0,0 @@ - -W3C Software Notice and License
- - - -
-

- W3C - -

- -
- - - -
-
- -
- - -
-
- -
- - -
-
-
- -
-
-

W3C Software Notice and License

-
-
-

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("") -}) - -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(['

abcdefgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); - -testPosition(['
abcde','fgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); diff --git a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script-close-better.js b/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script-close-better.js deleted file mode 100644 index f4887b9a..00000000 --- a/node_modules/aws-sdk/node_modules/xml2js/node_modules/sax/test/script-close-better.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", "'
foo
", - 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[![Build Status](https://secure.travis-ci.org/Leonidas-from-XIV/node-xml2js.png?branch=master)](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/). - -[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](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 += ''; - 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 += ''; - 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[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](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 [![Version](https://badge.fury.io/js/aws-sdk.png)](http://badge.fury.io/js/aws-sdk) [![Build Status](https://travis-ci.org/aws/aws-sdk-js.png?branch=master)](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 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Service NameClass NameAPI Version
Amazon CloudFrontAWS.CloudFront2012-05-05
2013-11-11
Amazon CloudSearchAWS.CloudSearch2011-02-01
2013-01-01
Amazon CloudWatchAWS.CloudWatch2010-08-01
Amazon DynamoDBAWS.DynamoDB2011-12-05
2012-08-10
Amazon Elastic Compute CloudAWS.EC22014-02-01
Amazon Elastic MapReduceAWS.EMR2009-03-31
Amazon Elastic TranscoderAWS.ElasticTranscoder2012-09-25
Amazon ElastiCacheAWS.ElastiCache2013-06-15
Amazon GlacierAWS.Glacier2012-06-01
Amazon KinesisAWS.Kinesis2013-12-02
Amazon RedshiftAWS.Redshift2012-12-01
Amazon Relational Database ServiceAWS.RDS2013-01-10
2013-02-12
2013-09-09
Amazon Route 53AWS.Route532013-04-01
Amazon Simple Email ServiceAWS.SES2010-12-01
Amazon Simple Notification ServiceAWS.SNS2010-03-31
Amazon Simple Queue ServiceAWS.SQS2012-11-05
Amazon Simple Storage ServiceAWS.S32006-03-01
Amazon Simple Workflow ServiceAWS.SimpleWorkflow2012-01-25
Amazon SimpleDBAWS.SimpleDB2009-04-15
Auto ScalingAWS.AutoScaling2011-01-01
AWS CloudFormationAWS.CloudFormation2010-05-15
AWS CloudTrailAWS.CloudTrail2013-11-01
AWS Data PipelineAWS.DataPipeline2012-10-29
AWS Direct ConnectAWS.DirectConnect2012-10-25
AWS Elastic BeanstalkAWS.ElasticBeanstalk2010-12-01
AWS Identity and Access ManagementAWS.IAM2010-05-08
AWS Import/ExportAWS.ImportExport2010-06-01
AWS OpsWorksAWS.OpsWorks2013-02-18
AWS Security Token ServiceAWS.STS2011-06-15
AWS Storage GatewayAWS.StorageGateway2012-06-30
2013-06-30
AWS SupportAWS.Support2013-04-15
Elastic Load BalancingAWS.ELB2012-06-01
\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 += '

' + file + ' (' + covered + '/' + total + ', ' + - (parseFloat(covered) / parseFloat(total) * 100).toFixed(2) + - '% covered) [+]

\n'; - var lineAccess = []; - - out += ""; - for (var lineNo in cov[file].source) { - lineNo = parseInt(lineNo); - out += ""; - out += "\n"; - } - out += "\n\n"; - } - out += ''; - } - var head = ""; - var body = out; - body = "

Total coverage: " + (parseFloat(entireCovered) / parseFloat(entireTotal) * 100).toFixed(2) + "%

\n" + body; - var page = "\n\n"+head+"\n\n\n"+body+"\n\n\n"; - fs.writeFileSync('coverage.html', page); - - console.log('Test coverage:\n'); - var files = []; - for (var file in stats) { - files.push([file, stats[file]]); - } - files.sort(function(a, b) { - var aVal = parseFloat(a[1].covered) / parseFloat(a[1].total); - var bVal = parseFloat(b[1].covered) / parseFloat(b[1].total); - return (aVal > bVal ? -1 : 1); - }); - for (var item in files) { - var file = files[item][0]; - var stats = files[item][1]; - printStats(file, stats.covered, stats.total) - } - - console.log(''); - printStats('Total', entireCovered, entireTotal); - - cleanup(); -}); - -exec('./node_modules/visionmedia-jscoverage/jscoverage lib lib-cov') -require(path.join(__dirname, '../node_modules/jasmine-node/lib/jasmine-node/cli.js')); diff --git a/node_modules/aws-sdk/testem.json b/node_modules/aws-sdk/testem.json deleted file mode 100644 index 925b9a63..00000000 --- a/node_modules/aws-sdk/testem.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "framework": "jasmine", - "test_page": "dist/tests.html" -} diff --git a/node_modules/coalesce/.npmignore b/node_modules/coalesce/.npmignore deleted file mode 100644 index 836ae9d0..00000000 --- a/node_modules/coalesce/.npmignore +++ /dev/null @@ -1 +0,0 @@ -play/ \ No newline at end of file diff --git a/node_modules/coalesce/Procfile b/node_modules/coalesce/Procfile deleted file mode 100644 index 0a818360..00000000 --- a/node_modules/coalesce/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: node init.js \ No newline at end of file diff --git a/node_modules/coalesce/README.md b/node_modules/coalesce/README.md deleted file mode 100644 index e879d0ec..00000000 --- a/node_modules/coalesce/README.md +++ /dev/null @@ -1,375 +0,0 @@ -Coalesce -======== - -_Fuses your code into an emergent superstructure._ - -[![The Tech Talk](http://dl.dropboxusercontent.com/u/4374976/screenshots/coalesce.png)](http://vimeo.com/85853754) - -As simple as: -``` -npm install coalesce && node -e "require('coalesce')({port:8888, sec: -2})" -``` - -That is it, now you can create infinite new projects, like this one: - -**hello.html** -``` - - - -
- Hello ! -
- - - -``` -**hello.js** -``` -module.exports = require('theory') -('hello', function(a){ - - a.com.send({ what: "World", where: {on: 'magic'} }); - - return (document.hello.to.onkeyup = function(m){ - - m && m.what? document.hello.to.value = m.what : - a.com.send({what: document.hello.to.value, where: 'magic' }); - - }); - -}); -``` -Save 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.) - -Now load in 2 windows, side by side, the inputs will synchronize when you type! - -Curiosity 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). - -##Summary of Thoughts## -1. 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. -2. Your modules get magically deployed and initialized when a browser requests them, or if otherwise specified in a startup configuration. -3. 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. -4. 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. -5. 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. - -###...continued code examples### -But then you are like, "yo, where is my $?" and I reply "I ain't your sugar daddy, foo'." so you then: -``` -module.exports = require('theory') -('hello', function(a){ - - // your initialization code here. - - return { world: $('input').val() }; // the module you export. - -},['http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js']); -``` -Yupe, that is right, you can declare and manage your dependencies all within your javascript! - -All you need in your HTML is one script tag that requires your app from inside, as seen above: -``` - -``` -Now once your modularized code loads, it won't execute until all of your dependencies are loaded. - -This finally makes it easy to manage any type of large project. -If one of your dependencies is also a module, which has dependencies within it, everything asynchronously cascades. -The Theory library makes sure any Inception style depth level of dependencies is all stacked up properly before your code runs. - -Hey, 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. -(if you didn't laugh... ignore this ever happened) - -So you are probably like, hey, that is what Theory does, but what is Coalesce? ->Coalesce is the web that connects all of your modules, both Node and in the browser. -But it provides more than just a seamless TCP / HTTP / AJAX / Websocket communication layer for your apps, it also automatically distributes and deploys them. - -This is kind of a throwback to PHP, but don't worry, in a good way. -Restart Coalesce with `node -e "require('coalesce')({port:8888})"`, you run this once and it acts as the master web server. -You then create your app - let's overwrite hello.js, again, to this: -``` -module.exports = require('theory') -('hello', function(a){ - - console.log("Running in both Node and on the page."); - -}); -``` -When you fire up from your browser, your browser makes a request to load 'hello.js'. -Coalesce then attempts to execute 'hello.js' as a separate Node process. -If 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. -(Note: The assumptions and static server behaviors can be modified or overwritten, as described in the API). -However, if the code can run in Node it does, and in particular, if it is a Theory module, it automagically integrates. - -Now take this example, let's overwrite hello.js again: -``` -module.exports = require('theory') -('hello', function(a){ - - console.log("Running in both Node and on the page."); - - if( root.page ){ - a.com.send("Hello World, from the page!"); - } - - return (function(m){ - - if( root.node ){ - console.log(m.what); - } - - }); - -}); -``` -Now when you refresh you should see your Node console print out the message that had been sent from the browser. -There are several things to learn from this. - -###Conclusion### -1. Coalesce should have automatically roll reloaded (since hot reloading is dangerous) your server side hello.js for you without needing to restart Coalesce. -2. 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'. -3. 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. -4. 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. -5. 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. -6. The returned function exported out in (3) receives this message, and then logs it out. - -Note, this is the same thing that happened earlier with the synchronizing inputs - except since that was client side only -(the module crashed when it tried to access the `document` element, which is undefined in node) and security was disabled via `{sec: -2}`, -the message relayed through the server to all other windows where they were on 'magic' and displayed the message in the input. -(Javascript's native `keyup` listener was bound to the exported module, which was responsible for then sending the input value). - -At this point, you feel like you were following along, but now everything just exploded and you are probably confused. - -The 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. - -Remember, elegant complexity is created from the emergence of simplicity. This is coalescence. - -## Messages ## -Before we talk about how to intercept HTTP requests and such, you must understand how the magic behaves. -Coalesce hates opinionated frameworks, and is as unopinionated as possible. The one catch is how a message is structured. -Messages are the glue that causes all your apps to work in unison, so they are vital to the core of everything. -Pardon the cross-disciplinary worlds, but Coalesce borrows the 'W's of journalism to describe information. - -**Who . What . When . Where . Why . How** - -These little goodies are what produce the powerful flexibility of Coalesce, and therefore are required for the magic to happen. -If you cannot accept this one opinion, which enables you to be free from opinions everywhere else, then Coalesce is not for you. - -- **Who** An expandable object containing data relating to the recipient and the sender. - - `{who: 'Mark'}` expands into `{who: { to: 'Mark' }}` which indicates the message is to be sent to Mark. - - In Node, `m.who.tid` is the ID of the specific tab that sent the socket message. - - In Node, `m.who.sid` is the session ID from the original HTTP request. - - Server Examples: - - `a.com.send({ what: "This is sent back to the same tab which sent me this message.", who: m.who.tid })` - - `a.com.send({ what: "I will be sent to every tab that is in this session.", who: m.who.sid })` -- **What** An expandable anything. This is the crux of the data you are actually sending, everything else is just metadata relating to the payload. - - Client Examples: - - `a.com.send("Hello world!")` expands into and is accessible via `m.what`. - - `a.com.send({ foo: 'bar' })` the value of 'bar' is accessible via `m.what.foo`. - - `a.com.send({ foo: 'bar', who: 'Mark' })` expands into `{ who: {to: 'Mark'}, what: {foo: 'bar'} }`. - - `a.com.send({ what: {foo: 'bar'}, who: {to: 'Mark'} })` is already expanded. -- **When** Is a hyper precise millisecond timestamp of when the message was created. - - It is 17 digits long, which is 4 digits longer than the normal `new Date().getTime()`. - - It is not expandable. -- **Where** Is an expandable object pertaining to pub/sub and where the message has been processed. - - `{where: 'magic'}` expands into `{where: {at: 'magic'}}` which broadcasts the message to subscribers of the 'magic' channel. - - `{where: {on: 'magic'}}` subscribes and broadcasts to the 'magic' channel. - - `{where: {off: 'magic'}}` broadcasts and unsubscribes to the 'magic' channel. -- **Why** Is not used, but can be optionally added if you want to provide an arbitrary comment about why the message was sent. -- **How** Mandatory Metadata Object. - - `m.how.way` holds the magical key which routes which way the object goes, by default is the name of the module. - - Can overwrite the 'way' property to communicate with other modules, or directly to functions of a module using the dot notation. - - Usage of the 'way' property, for now, will be described elsewhere. - - You can attach any critical metadata, such as version numbers, etc. - -Because communication between modules is so important, the Theory library provides many helper functions. -Despite this, it is strongly recommended and encouraged you write your own helper functions ontop of the helper functions. -Not to get too meta, but the Theory library also has helper functions to assist you in writing your own helper functions. -If this is not already an emphasis enough on how important this is, -then also note that the entire security of your app is controlled by what information you allow to flow through these APIs you create. -Because Coalesce is not opinionated, you have to enforce your own validation, sanitation, and app specific authorization. - -Therefore, writing your own abstraction ontop of the communication layer will substantially ease your own development and prevent vulnerabilities. - -## Intercepting HTTP ## - -Now we get to start to use Coalesce's API. -This 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. -``` -module.exports = require('theory') -({name: 'hello' -, author: 'Mark Nadal' -, version: 5 -, dependencies: [ - 'fs' -],state: { way: 'server' } -, invincible: true -, init: function(a){ - return { - server: function(m){ - // HTTP Intercept: - console.log(m); - a.fs.writeFileSync(__dirname+'./lastReq.js', "alert('The last request was at "+Date()+"')"); - m.what.body = "alert('Hello World!')"; - a.com.reply(m); - } - } -}}); -``` -Now refresh the page, we should get an ugly ol'alert message. What we are learning... - -1. 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. -2. 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. -3. 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. -4. 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. -5. As the console will show, we have access to the request `m.what.url`, `m.what.headers`, and `m.what.cookies`. -6. 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']`. -7. We can modify the response, by setting a `m.what.body`, `m.what.type`, and so on. -8. `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. -9. 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. - -So let's fiddle with the http function by overwriting it with this: -``` - // HTTP Intercept: - console.log(m); - m.what.url.pathname = '/play/lastReq.js'; - m.what.type = 'js'; - a.com.reply(m); -``` -Refresh and bam. It delivered the file we created previously by changing the route of the pathname. - -This 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. - -In 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. - -**init.js** -``` -require('coalesce')({ - port: 8888 - ,run: ['./play/hello'] -}); -``` -Save 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: - -1. Coalesce takes a single parameter which is an options object. -2. You declare your routes in your app itself with the state property, not in the configuration - this makes things super flexible. -3. 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. -4. 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. -5. 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. - -Alright, now let's update the http function of our hello.js file again: -``` - // HTTP Intercept: - console.log(m.what.url); - m.what.body = "Hello, "+ (m.what.url.query.name || 'World') +"!"; - a.com.reply(m); -``` -Awesome sauce, hit up and look what it says! Now try playing around with it yourself. That's all for now on this topic, folks. - -## Intercepting Sockets ## -This 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. - -Despite 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: - -1. Client emit --> 2. Server receive, sanitize, validate, process. Emit --> to another module 3. process, then Server emit --> 4. Client(s) receive. - -Adding in Redis, you can get this kind of fine grain precision: - -1. 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. - -If 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. - -## API ## - -### Config Options ### - -- `host` the hostname you want for the server. *`'localhost'`* -- `port` the port which you want the server to listen on. *`80`* -- `dir` the root directory for the server. *(defaults to the directory of file requiring coalesce)* -- `sec` the security options object. - - `relay` allows messages to pass through the server to other clients automatically if there is no matching module to route to. *`false`* - - `incognito` no session cookie tracking, equivalent to a browser's incognito mode, except for the server. *`false`* - - `key` same as https.createServer's key option, such as the contents of a key.pem file. *`''`* - - `cert` same as https.createServer's cert option, such as the contents of a cert.pem file. *`''`* - - rather than declaring `sec` as an object, you can set its value to one of the following **shorthands**: - - `-2` == `{relay: true, incognito: true}` -- `run` an array of paths you want to run when the server spins up. *`[]`* -- `hook` some special hooks for debugging purposes that will get embedded into Coalesce such as: - - `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){ }`* - - `aft` a function which gets called after the request is handled. *`function(req,res){ }`* - - `err` a function which gets called in case the static server encounters an error. *`function(req,res){ }`* -- `com` the SockJS config options object, see SockJS's docs. - -**miscellaneous:** - -- `no_global_theory_src` prevents auto linking and caching Theory for global server side reference as well as client side HTML reference. *`false`* -- `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`* - -Example: -``` -var Coalesce = require('coalesce') - ,opt = {}; - -opt.port = 8888; -opt.sec = { relay: true }; -opt.hook = { pre: function(req,res){ - console.log(req.url); -}} -opt.impatient = 5*1000; -opt.com = { - log: function(level, m){ - if(level === 'error') - console.log(m); - } -} - -Coalesce(opt); - -console.log("Coalesce @ "+ opt.port); -``` - -### Module Options ### - -- `state` the state object, for intercepting HTTP requests, as detailed in the examples. *`{}`* - - `m.what.headers` are the default headers from the request. - - `m.what.method` whether 'post' or 'get' etc., always lower case. - - `m.what.url` is an object concerning the URL. - - `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. - - `m.what.form` if a form happened to be submitted, this is it. - - `m.what.files` if files were uploaded, this is where you deal with them. - - `m.what.body` assign anything to this, and it will become the body of the response. - - `m.what.type` allows you to set the Content-Type. - - `m.what.encoding` to set the Content-Encoding. - - `m.what.cache` use `0` for forcing no cache, or manually provide a cache control value. - - `m.what.status` in case you need to set an explicit status code. - - `m.what.redirect` to redirect to another URL. -- `invincible` a boolean as to whether you want this module to respawn server side, in case it crashes. *`false`* - -Example: ->scroll up to see the example in the HTTP intercept section. - -### Messages ### ->scroll up to see Messages section. - -## Random Ramblings... ## -This is just tossing up a quick getting started guide, but it obviously is pretty vague. -So I'll just explain as much as I can really quickly in a garbled mess. -Programming is just 9 primitives - booleans, numbers, strings, texts, arrays, objects combined with loops, functions, and if statements. -Given these constructs, you then have and do 3 basic things - data, manipulation, and communication. -The Theory library provides a solid foundation for this, an abstraction layer for modular Javascript regardless of server, client, or IE6. -Coalesce creates the communication layer between all these modules, whether server to server, client to client, or server to client and vice versa, -for all protocols - TCP, HTTP, Websocket, or AJAX, all with proper dependency, routing, and event pub/sub. -This means when you write beautiful modules for your app, Coalesce automatically becomes a distributed scalable system because your files are physically separated. - -## Future ## -Obviously 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! - -Here is to the future, help me create it! In the meanwhile, please experiment and play with it, and join me! - -*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! - -Crafted with love by Mark Nadal, whom is not responsible for any liabilities from the use of this code. diff --git a/node_modules/coalesce/assemble.sh b/node_modules/coalesce/assemble.sh deleted file mode 100644 index df41d86a..00000000 --- a/node_modules/coalesce/assemble.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/bash -#To initiate this script, remember to dos2unix if on windows, then run the following, -#where $USER and $IP is the default username and IP of your remote Ubuntu 12.04 machine: -#scp assemble.sh $USER@$IP:/home/$USER/ && ssh $USER@$IP 'bash ./assemble.sh' - -#NODE=http://nodejs.org/dist/v0.8.15/node-v0.8.15-linux-x64.tar.gz #binary -NODE=http://nodejs.org/dist/v0.8.15/node-v0.8.15.tar.gz -MONGO=http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.1.tgz -REDIS=http://redis.googlecode.com/files/redis-2.6.6.tar.gz -PHANTOM=http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86_64-dynamic.tar.gz -ZMQ=http://download.zeromq.org/zeromq-3.2.0-rc1.tar.gz - -IP=`curl -s checkip.dyndns.org | grep -Eo '[0-9\.]+'` -USER=`whoami` - -echo "creating theory" - -cd ~ -if [ -d theory ]; -then - echo "theory folder already exists" -else - mkdir theory -fi - -echo "getting core" -sudo apt-get update -y -sudo apt-get install wget curl zsh git-core build-essential openssl libssl-dev upstart monit libtool autoconf uuid-dev lvm2 xfsprogs -y -sudo apt-get install mdadm --no-install-recommends -y - -cd ~/theory -if [ -e /usr/local/bin/node ]; -then - echo "node already installed." -else - #TODO: REPLACE THE FOLLOWING BUILD WITH NAVE INSTEAD, TO MAKE THINGS FAST! - echo "installing node" - wget -O node.tar.gz $NODE - mkdir node - tar -zxf node.tar.gz -C node --strip-components 1 - cd node - ./configure - make - sudo make install - echo "node installed" -fi - -cd ~/theory -if [ -e /data/db ]; -then - echo "drives already configured" -else - #Mark's version - echo "configuring drives" - DRIVES=`sudo node -e "var proc = require('child_process'); - proc.exec('lsblk -l',function(e,stdout){ - stdout = stdout.split(/\n/g);var s=''; - for(var i=1; i /proc/sys/net/ipv4/ip_local_port_range - echo "fs.file-max = 999999 - net.ipv4.tcp_rmem = 4096 4096 16777216 - net.ipv4.tcp_wmem = 4096 4096 16777216" | sudo tee - a /etc/sysctl.conf - sudo mv /etc/cron.weekly/apt-xapian-index /etc/cron.monthly/apt-xapian-index - - PWD=`pwd` - echo "creating and initializing code" - sudo ln -s $PWD /usr/local/bin/theory - mkdir code - echo "var http = require('http'); -http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('Hello World'); -}).listen(80);console.log('running at 80');" > code/init.js - mkdir git - cd git - git init --bare - PWD=`pwd` - echo "====== DO LOCALLY ======" - echo "git init" - echo "git add ." - echo "git commit -m 'init'" - echo "git remote add web ssh://$USER@$IP$PWD" - echo "git push web master" - echo "====== END LOCAL ======" - echo "#!/bin/sh -sudo stop theory -GIT_WORK_TREE=/usr/local/bin/theory/code git checkout -f -sudo start theory -echo 'deployed'" > hooks/post-receive - chmod +x hooks/post-receive - cd ~/theory - sudo echo "limit nofile 999999 999999 - -description 'start theory' -author 'theory' - -start on runlevel [2345] -stop on shutdown - -respawn - -script - sudo NODE_ENV=production /usr/local/bin/node /usr/local/bin/theory/code/init.js >> /var/log/theory.log 2>&1 -end script" > theory.conf - sudo mv theory.conf /etc/init/ - - sudo echo "set daemon 7 -include /etc/monit/conf.d/* - -check system theory -set httpd port 8080 and - allow theory:symphony -" > monitrc - sudo mv monitrc /etc/monit/ - - sudo echo "check host theory_init with address 127.0.0.1 -start program = '/sbin/start theory' -stop program = '/sbin/stop theory' -if failed port 80 protocol HTTP - request / - with timeout 2 seconds - then restart -" > theory - sudo mv theory /etc/monit/conf.d/ - sudo chown -fR ubuntu ~/theory - sudo chown -fR $USER ~/theory -fi - -sudo start theory -echo "DONE :) $IP" - -# STUFF TO WORK ON: -#SCALE ON: (in node) -#os.freemem() / os.totalmem() 80% ~ 100% for a few days -#node-aws auto controls diff --git a/node_modules/coalesce/coalesce.js b/node_modules/coalesce/coalesce.js deleted file mode 100644 index bdf9421e..00000000 --- a/node_modules/coalesce/coalesce.js +++ /dev/null @@ -1,723 +0,0 @@ -module.exports=require('theory')((function(){ - var web = {}; - web.name = 'web'; - web.version = 1.9; - web.author = 'Mark'; - web.dependencies = [ - 'fs' - ,'url' - ,'path' - ,'http' - ,'https' - ,'child_process' - ]; - web.init = (function(a){ - function web(opt){ - return web.configure(opt); - } var fs = a.fs - , path = a.path - , URL = a.url; - web.opt = {}; - web.configure = (function(opt){ - if(opt.how){ return } - module.reqdir = a.path.dirname((module.parent||{}).filename); - opt = a.obj.is(opt)? opt : {}; - opt.host = opt.host||'localhost'; - opt.port = opt.port||80; - opt.dir = opt.dir || module.reqdir || __dirname; - if(a.bi.is(opt.sec)){ - opt.sec = {}; - } else if(a.num.is(opt.sec)){ - opt.sec = (opt.sec === -2)? {relay: true, incognito: true} : opt.sec; // incognito, eh? - }else if(a.obj.is(opt.sec)){ - - } else { - opt.sec = {}; - } - opt.session = opt.session||{}; - opt.session.sid = opt.session.sid||(function(){ return a.text.random(16) }); - opt.session.tid = opt.session.tid||(function(){ return a.text.random(16) }); - opt.session.expire = opt.session.expire||1000*60*60*24*7*4; - opt.session.wait = opt.session.wait||1000*60*2; - opt.cache = opt.cache||{}; - opt.cache.age = opt.cache.age||0; - opt.com = opt.com||{}; - opt.com.log = opt.com.log || function(w,m){}; - opt.com.prefix = opt.com.prefix||'/com'; - opt.com.url = opt.com.url||"http"+((opt.sec.key&&opt.sec.cert)?'s':'')+"://" - +opt.host+(opt.port?':'+opt.port:'') - +(opt.com.path||"/node_modules/sockjs/sockjs-0.3.min.js"); - if(a.list.is(opt.run)){ - var run = opt.run; - opt.run = {}; - opt.run.is = run; - } opt.run = opt.run||{}; - opt.run.impatient = opt.run.impatient||1000*3; - opt.hook = opt.hook||{}; - opt.hook.pre = opt.hook.pre||(function(){}); - opt.hook.aft = opt.hook.aft||(function(){}); - opt.hook.err = opt.hook.err||(function(){}); - opt.hook.reply = opt.hook.reply||(function(){}); - opt.node = opt.node||{}; - opt.node.mid = opt.node.mid || a.text.r(16); - web.opt = a.obj(opt).u(web.opt||{}); - web.theorize(); - web.run(opt.run.is,{invincible:true}); - web.state(); - return web; - }); - a.text.find.js = /\.js$/i; - web.state = (function(){ - function state($){ - state.com = sock.createServer({ - sockjs_url: web.opt.com.url - }); - state.dir = new ns.Server(web.opt.dir); - if(web.opt.sec.key && web.opt.sec.cert){ - state.on = a.https.createServer({key: web.opt.sec.key, cert: web.opt.sec.cert}); - } else { - state.on = a.http.createServer(); - } - state.on.addListener('request',state.req); - state.on.addListener('upgrade',function(req,res){ - if(state.sent(res)){ return } - res.end(); - }); - state.on.listen(web.opt.port, web.opt.host); - state.com.on('connection',state.con); - state.com.installHandlers(state.on,web.opt.com); - if(web.opt.node && web.opt.node.src){ - if(!a.list.is(web.opt.node.src)){ - web.opt.node.src = [web.opt.node.src]; - } - a.list(web.opt.node.src).each(function(url){ - var toe = toes.create(url); - web.node.cons[url] = toe; - toe.on('error', function(e){ console.log('ut-oh', e) }); // need to add this before the connection event. - toe.on('connection', function(){ - toe.writable = true; - toe.mid = url; - toe.write(a.text.ify(a.com.meta({ - what: {auth: web.opt.node.key, to: url} - ,where: {mid: web.opt.node.mid} - }))); - state.con(toe); - }); - }); - } - return web; - } - var mime = require('mime') - , ns = require('node-static') - , formidable = require('formidable') - , toes = require('sockjs-client') - , sock = require('sockjs'); - state.ways = []; - state.sort = (function(A,B){ - if(!A || !B){ return 0 } - A = A.flow; B = B.flow; - if(A < B){ return -1 } - else if(A > B){ return 1 } - else { return 0 } - }); - state.map = (function(req,map){ - var url = req.url || url; - map = map || state.ways; - return a.list(map).each(function(v,i){ - if(!a.obj.is(v)){ return } - if(v.flow < (req.flow||-Infinity)){ return } - v.params = v.params || []; - if(a.text.is(v.match)){ - v.regex = state.regex(v); - } if(a.text.is(v.regex)){ - v.regex = new RegExp(v.regex,v.flags); - } if(a.test(v.regex).of(RegExp)){ - var r = v.regex.exec(url.pathname); - if(r){ - url.params = state.regex(v,r||[]); - return v; - } - } if(a.fns.is(v.match)){ - if(v.match(url)){ return v} - } - })||{flow:Infinity,on:state.err}; - return (0 <= r.flow && (fs.existsSync||path.existsSync)(url.file))? - url.file : r.file || url.file; - }); - state.regex = (function(m,r){ // via expressjs - try{ - var path = m.match, keys = m.params||[], params = {}, sensitive, strict; - if(r){ m = r; - for (var i = 1, len = m.length; i < len; ++i) { - var key = keys[i - 1]; - var val = 'string' == typeof m[i] - ? decodeURIComponent(m[i]) : m[i]; - if (key) { - params[key.name] = val; - } else { - params[i] = val; - } - } - return params; - } - if (path instanceof RegExp) return path; - if (Array.isArray(path)) path = '(' + path.join('|') + ')'; - path = path - .concat(strict ? '' : '/?') - .replace(/\/\(/g, '(?:/') - .replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?(\*)?/g, function(_, slash, format, key, capture, optional, star){ - keys.push({ name: key, optional: !! optional }); - slash = slash || ''; - return '' - + (optional ? '' : slash) - + '(?:' - + (optional ? slash : '') - + (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')' - + (optional || '') - + (star ? '(/*)?' : ''); - }) - .replace(/([\/.])/g, '\\$1') - .replace(/\*/g, '(.*)'); - return new RegExp('^' + path + '$', sensitive ? '' : 'i'); - } catch(e){ console.log("something has gone expressively wrong."); } - }); - state.sent = (function(res){ - if(res.headerSent) { return true } - }); - state.url = (function(req){ - var url = a.obj.is(req.url)? req.url : URL.parse(req.url,true); - url.ext = url.ext || path.extname(url.pathname).replace(/^\./,''); - return url; - }); - state.file = (function(req,dir){ - return path.normalize(path.join(dir||web.opt.dir,req.url.pathname)); - }); - state.way = (function(req){ - var p = a.text.is(req||'')? req : (req.map.file || req.file) || ''; - return path.basename(p,path.extname(p)); - }); - state.err = (function(req,res){ - web.cookie.set(res,req.cookies); - state.dir.serve(req,res,function(e,r){ - if(!e){ return web.opt.hook.aft(req,res) } - if(!req.flow){ return state.req(req,res,++req.flow) } - if(web.opt.hook.err(req,res,e,r)){ return } - if(state.sent(res)){ return } - res.writeHead(e.status, e.headers); - res.end(); - }); - }); - state.ways.push({ - way: 'state' - ,match: '*' - ,flow: 0 - ,on: state.err - }); - state.req = (function(req,res){ - req.url = state.url(req); - req.file = state.file(req); - req.map = state.map(req); - req.flow = req.map.flow; - req.cookies = web.cookie.parse(req); - req.cookies.sid = req.cookies.sid || web.opt.session.sid(); - web.opt.hook.pre(req,res); - if(web.theorize(req,res)){ return } - if(req.flow === Infinity){ return state.err(req,res) } - a.fns.flow([function(next){ - web.run.it({ - file: req.map.file || req.file - ,reply: state.msg - },function(v){ - if(v && (v=((v=state.way(req))+'.' - +a(web.run.on,v+'.meta.state.way'))) - ){ - if(a.text(req.method).low() == 'post'){ - var form = new formidable.IncomingForm(); - req.form = {}; req.files = {}; - form.on('field',function(k,v){ - req.form[k] = v; - }).on('file',function(k,v){ - if(!req.files[k]){ req.files[k] = [] } - (req.files[k]||[]).push(v); - }).on('error',function(e){ - console.log("formidable error:",e); - if(form.done){ return } - next(form.done = v); - }).on('end', function(){ - if(form.done){ return } - next(form.done = v); - }); - return form.parse(req); - } return next(v); - } state.err(req,res); - }); - },function(way,next){ - var m = a.com.meta({how:{way:way,web:'state'},where:{pid:0}}); - m.what.url = req.url; - m.what.form = req.form; - m.what.files = req.files; - m.what.cookies = req.cookies; - m.what.headers = req.headers; - m.what.method = a.text(req.method).low(); - web.reply(m,function(m){ - web.opt.hook.reply(m); - if(m && m.what !== undefined){ - if(m.what.type !== undefined){ - var type = mime.lookup(m.what.type||'') - ,chs = mime.charsets.lookup(type); - res.setHeader('Content-Type', type + (chs ? '; charset=' + chs : '')); - } if(m.what.encoding !== undefined){ - res.setHeader('Content-Encoding', m.what.encoding); - } if(m.what.cache !== undefined){ - if(m.what.cache === 0){ - res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); - res.setHeader('Pragma', 'no-cache'); - res.setHeader('Expires', 0); - } else { - res.setHeader('Cache-Control', m.what.cache); - } - } web.cookie.set(res,m.what.cookies||req.cookies); - if(m.what.status !== undefined){ - res.statusCode = m.what.status; - } if(m.what.redirect !== undefined){ - res.setHeader('Location', m.what.redirect); - res.statusCode = m.what.status || 302; - if(state.sent(res)){ return } - return res.end(); - } if(m.what.body !== undefined){ - if(state.sent(res)){ return } - res.end(a.text.is(m.what.body)?m.what.body:a.text.ify(m.what.body)); - return web.opt.hook.aft(req,res); - } req.url.pathname = m.what.pathname||a(m.what,'url.pathname')||req.url.pathname; - if(req.flow === 0){ return state.err(req,res) } - req.flow = (m.what.flow === null)? Infinity : - a.num.is(m.what.flow)? m.what.flow : (req.flow + 1); - } next(req,res); - }); - }],state.req); - }); - state.msg = (function(m,opt,con){ - if(!a.obj.is(m)) return; - var way = a(m,'how.way')||a(m,'way')||'' - ,opt = opt||{}, g; - way = a.text(way).clip('.',0,1); - if(opt != way){ - if(web.run.on[way] && (g = web.run.on[way].meta) && !g.fatal){ - var to = web.run.to(way); - if(way !== g.name && m && m.how && m.how.way){ - m.how.way = m.how.way.replace(way, g.name); - } - to.com && to.com.send && to.com.send(m); - to.count++; - return; - } else - if(a[way]){ // TODO: Warning this is a no-joke condition! It is now on bottom, but should still think about bug edge cases like "test". - a(a(m,'how.way')+'->')(m); - return; - }else{} - if(!web.opt.sec.relay){ - return; - } - } - if((con = state.con.s[m.who.to]) && con.writable){ - return con.write(a.text.ify(state.con.clean(m))); - } - if((con = state.sub(m)) && (m.where.on||m.where.off||m.where.at)){ - m.where.at = m.where.on||m.where.off||m.where.at; - delete m.where.on; - delete m.where.off; - web.event.emit(m.where.at,m); - // toes should go here too! - return; - } - a.obj(web.node.cons).each(function(con,i){ // distinguish between 'reply' and 'send'! - if(!con || !con.write){ return } - con.write(a.text.ify(m)); - }); - }); - state.sub = (function(m,opt,con){ - if( !a.obj.is(m) || !a.obj.is(m.where) || - !a(m,'who.tid') || !(con = state.con.s[m.who.tid])) return; - if(m.where.off){ - if(!con.hear[m.where.off]) return; - web.event.off(con.hear[m.where.off]); - delete con.hear[m.where.off]; - return con; - } if(con.hear[m.where.on]) return con; - con.hear[m.where.on] = web.event.on(m.where.on,function(m){ - if(!con.writable || con.tid == m.who.tid || !state.con.s[con.id]) return; - con.write(a.text.ify(state.con.clean(m))); - }); - return con; - }); - state.con = (function(con){ - con.hear = {}; - state.con.s[con.id] = con; - con.on('data',function(m){ - m = a.com.meta(a.obj.ify(m),con); - if(web.node.auth(con,m)){ return } - web.cookie.tid(con,m,function(v){ - if(!v){ return } - if(web.name == a.list(m.how.way.split('.')).at(1)){ - m.how.way = ''; - } m.where.pid = (m.where.pid === process.pid)? 0 : m.where.pid; - state.msg(m); - }); - }); - con.on('close',function(m){ - console.log(con.id+" disconnected."); - a.obj(con.hear).each(function(v,i){ - web.event.off(v); - }); - delete state.con.s[con.id]; - if(con.mid){ - delete web.node.cons[con.mid]; - } - }); - con.on('error', function(e){ // TODO: if mid try to reconnect! - console.log('con error', e); - }); - }); - state.con.s = {}; - state.con.clean = (function(m){ - if(!m) return {}; - m.who = {tid:m.who.tid,sid:m.who.sid - ,to:m.who.to,from:m.who.from - ,of:m.who.of,via:m.who.via - }; - return m; - }); - return state; - })(); - web.reply = (function(m,fn){ - if(fn){ - web.run.res[m.when] = fn; - web.state.msg(m,m.how.way); - return; - } - if(fn = web.run.res[m.when]){ - fn(m); - delete web.run.res[m.when]; - return; - } - }); - web.cookie = (function(){ - function cookie($){ - return web; - } - cookie.tryst = {}; - cookie.parse = (function(m){ - var l,p,c={}; - if(a(m,'headers.cookie')){ - l = m.headers.cookie.split(/\s?;\s?/ig); - a.list(l).each(function(v,i){ - p = v.split(/=/); - c[p[0]] = p.slice(1).join('='); - }); - } return c; - }); - cookie.set = (function(res,c,tid){ - var h = res.getHeader('Set-Cookie') || [], m; - if(a.text.is(h)){ h = [h] }; c = c || {}; - if(c.sid){ - c.sid = {value: c.sid.value || c.sid.val || c.sid, HttpOnly:true}; - } - if(c.tid){ - if(!tid){ delete c.tid; } - else{ - c.tid = {value: c.tid.value || c.sid.tal || c.tid, HttpOnly:false}; - } - } - c = a.obj(c).each(function(v,i,t){ - if(a.text.is(v)){ - v = {value: v}; - } if(a.obj.is(v)){ - i = i+'='+v.value || v.val || ''; - m = a.obj(v).each(function(w,j,q){ q(a.text.low(j),w) })||{}; - m.httponly = a.obj(m).has('httponly')? m.httponly : true; - m.path = m.path || '/'; - if(m.path){ i += "; path=" + m.path } - if(m.expires){ i += "; expires=" + m.expires } - if(m.domain){ i += "; domain=" + m.domain } - if(m.secure){ i += "; secure" } - if(m.httponly){ i += "; HttpOnly" } - t(i); - } - })||[]; - res.setHeader('Set-Cookie', a.list(h).fuse(c)); - }); - cookie.tid = (function(req,m,fn){ - if(fn){ - if(req.mid){ - return fn(true); - } - if(req.sid || req.tid){ - m.who = a.obj(req.who||{}).u(m.who); - m.how = a.obj(req.how||{}).u(m.how); - m.where = a.obj(req.where||{}).u(m.where); - m.who.tid = req.tid; - m.who.sid = req.sid; - return fn(true); - } if(m.who.tid){ - // GETEX REDIS HERE - var s, t = a.time.is(), w, ws; - if(s = cookie.tryst[m.who.tid]){ - web.state.con.s[req.tid = m.who.tid] = req; - req.sid = m.who.sid = s.sid; - if((w = a.text(m.how.way).clip('.',0,1)) && (ws=a(web.run.on,w+'.meta.stream.on'))){ - var n = a.com.meta({what:s,who:m.who,how:{way:(w+='.'+ws),web:'stream'},where:{pid:0}}); - n.what.data = m.what; - web.reply(n,function(n){ - delete n.who.to; - delete n.where.pid; - delete n.how.way; - delete n.how.web; - req.who = n.who; - req.how = n.how; - req.where = n.where; - cookie.tid(req,m,fn); - }); - } else { - fn(true); - } - } else { - if(web.opt.sec.incognito){ req.sid = req.tid = m.who.tid; fn(true) } - } delete cookie.tryst[m.who.tid]; - a.obj(cookie.tryst).each(function(v,i){ - if(web.opt.session.wait < t - v.ts){ - delete cookie.tryst[i]; - } - }); - } - } if(req.url){ - req.cookies = req.cookies||{}; - // SETEX REDIS HERE - - cookie.tryst[req.cookies.tid = web.opt.session.tid()] - = {sid: req.cookies.sid, ts: a.time.is() - , cookies: a.obj(req.cookies).each(function(v,i,t){ - if(a.obj.is(v)){ - t(i, v.value || v.val || ''); - }else{ - t(i, v || ''); - } - }) - } - return req.cookies; - } - }); - return cookie; - })(); - web.node = (function(){ - function node(){ - - } - node.auth = function(con,m){ - if(con.sid || con.tid){ return } - if(con.mid){ - if(m.where){ m.where.mid = m.where.mid || con.mid } - return; - } - if(m && m.where && m.where.mid && m.what && m.what.auth){ - console.log('node auth', m); - //console.log("auth machine..."); - if(!web.opt.node || !web.opt.node.key){ - con.close(); - console.log("none"); - return true; - } - if(m.where.mid === web.opt.node.mid){ - con.close(); - console.log("self"); - return true; - } - if(m.what.auth === web.opt.node.key){ - con.mid = m.where.mid; - web.node.cons[con.mid] = con; - console.log("machine auth success"); - return true; - } - con.close(); - return true; - } - } - node.cons = {}; - return node; - })(); - web.run = (function(){ - function run($,opt){ - if(!$){ return web } - opt = opt || {}; - if(!a.list.is($)){ - $ = [$]; - } a.list($).each(function(v,i,t){ - var p = v; p = p.slice(0,3) == '../'? module.reqdir+'/'+p : p; - p = p.slice(0,2) == './'? module.reqdir + p.slice(1) : p; - p = a.text.find.js.test(p)? p : p + '.js'; - run.it({ - file:p - ,reply: web.state.msg - ,invincible: opt.invincible - },function(v){ }); - }); - return web; - } - var spawn = a.child_process.spawn - , fork = a.child_process.fork; - run.on = {}; - run.res = {}; - run.it = (function(m,fn){ - if(!m){ return } - var opt = m.what || m - , way = opt.way = web.state.way(opt.file); - if(way === theory.name){ return fn(false) } - if(opt.file == (module.parent||{}).filename){ return fn(false) } - if(!a.text.find.js.test(opt.file)){ return fn(false) } // ? why again ? - if(!(fs.existsSync||path.existsSync)(opt.file)){ return fn(false) } - if(!opt.respawn && run.on[way]){ - if(a(run.on,way+'.meta.state')){ return fn(true) } // change API - return fn(false); - } - console.log("RUN :-->"+" testing "+opt.file); - var ts = a.time.is() - , p = fork(opt.file,[],{env:process.env}) - , gear = run.on[way] || (run.on[way]={meta:{},cogs:{}}) - , cog = gear.cogs[p.pid] = {com:p, pid:p.pid, start:ts, count:0} - gear.meta.invincible = opt.invincible; - p.on('message',function(m){ - m = a.obj.ify(m); - if(a(m,'onOpen.readyState')===1){ - a.time.stop(opt.impatient); - if(m && m.mod && m.mod.state){ m.mod.state.file = opt.file } - else { fn(0); fn = function(){} } - gear.meta = a.obj(m.mod).u(gear.meta); - if(gear.meta && gear.meta.name){ - run.on[gear.meta.name] = gear; - } - web.state.ways.push(a(m,'mod.state')); - web.state.ways.sort(web.state.sort); - opt.invincible = gear.meta.invincible; - run.track(opt,opt.reply); - fn(p.pid||true); fn = function(){}; - return; - } opt.reply(m,(gear.meta&&gear.meta.name)||way); - }); - p.on('exit',function(d,e){ - if(cog.end){ - delete gear.cogs[p.pid]; - return; - } if(gear.meta.invincible){ - cog.end = a.time.is(); - console.log("RUN :-->"+" respawn: "+d+" >> "+way+" survived "+(cog.end - cog.start)/1000+" seconds. >> respawn: "+e); - delete gear.cogs[p.pid]; - opt.respawn = true; - run.it(opt,(function(){})); - return; - } a.time.stop(opt.impatient); - fn(false); fn = function(){}; - gear.meta.fatal = true; - cog.end = a.time.is(); - delete cog.com; cog.com = {send:function(){}}; - console.log("RUN :-->"+" exit: "+d+" >> "+way+" survived "+(cog.end - cog.start)/1000+" seconds. >> exit: "+e); - }); - if(opt.respawn){ return } - opt.impatient = a.time.wait(function(){ - fn(false); fn = function(){}; - },web.opt.run.impatient); - }); - run.tracked = {}; - run.track = (function(opt,cb){ // depreciate - if(run.tracked[opt.way||opt.file]){ return } - fs.watchFile(opt.file,function(c,o){ - opt.respawn = true; - run.it(opt,(function(p){ - if(!p) return; - a.obj(a(run.on,opt.way+'.cogs')).each(function(v,i){ - if(v.pid === p) return; - if(v.end){ - v.com && v.com.kill && v.com.kill(); // not killing? - return; - } - v.end = a.time.is(); - }); - }),cb); - }); - run.tracked[opt.way||opt.file] = true; - }); - run.to = (function(way){ // TODO: Use different algorithm? Such as oldest-used first. - var low; - a.obj(a(run.on,way+'.cogs')).each(function(v,i){ - low = (!v.end && v.count < (low||(low=v)).count)? v : low; - }); - return low||{}; - }); - return run; - })(); - web.event = (function(){ - function event(e){ - if(e){ - e.on = event.on; - e.off = event.off; - e.emit = event.emit; - return e; - } return event; - } - event.w = event.w||{}; - event.emit = (function(w,m){ - a.obj(event.w[w]||{}).each(function(c,i){ - if(c(m) === null){ - delete event.w[i]; - } - }); - return event.w[w]; - }); - event.on = (function(w,c){ - if(!w) return {}; - var r = a.time.now(); - (event.w[w]||(event.w[w]={}))[r] = c; - return r; - }); - event.off = (function(w){ - if(event.w[w]){ - delete event.w[w]; - } else { - a.obj(event.w).each(function(v,i){ - delete v[w]; - if(a.obj.empty(v)){ - delete event.w[i]; - } - }); - } - }); - return event; - })(); - web.theorize = (function(req,res){ - if(req){ - if(a.text.low(web.state.way(req.url.pathname)) === theory.name){ - req.cookies = web.cookie.tid(req); - if(!web.opt.no_global_theory_src){ - web.cookie.set(res,req.cookies,req.cookies.tid); - if(web.state.sent(res)){ return } - res.writeHead(200, { 'Content-Type': 'text/javascript; charset=utf-8' }); - res.end(a.theory_js,'utf-8'); - return true; - } - } - } if(!web.opt.no_global_theory_src){ - a.theory_js = a.theory_js||fs.readFileSync(process.env.totheory,'utf8'); - if( (fs.existsSync||path.existsSync)(module.reqdir+'/node_modules') && - (fs.existsSync||path.existsSync)(__dirname+'/node_modules/theory') && - !(fs.existsSync||path.existsSync)(module.reqdir+'/node_modules/theory')){ - fs.mkdirSync(module.reqdir+'/node_modules/theory') - fs.writeFileSync(module.reqdir+'/node_modules/theory/index.js' - ,"module.exports=require('" - +path.relative(module.reqdir+'/node_modules/theory' - ,process.env.totheory).replace(/\\/ig,'/') - +"');"); - } - } - }); - return a.web = web; - }); - return web; -})()); \ No newline at end of file diff --git a/node_modules/coalesce/init.js b/node_modules/coalesce/init.js deleted file mode 100644 index 0d2ea42d..00000000 --- a/node_modules/coalesce/init.js +++ /dev/null @@ -1 +0,0 @@ -require('./coalesce')({port: (process.env.PORT||8888), sec: -2}); \ No newline at end of file diff --git a/node_modules/coalesce/license b/node_modules/coalesce/license deleted file mode 100644 index 97d7a7ff..00000000 --- a/node_modules/coalesce/license +++ /dev/null @@ -1,7 +0,0 @@ -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. \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/.npmignore b/node_modules/coalesce/node_modules/formidable/.npmignore deleted file mode 100644 index 4fbabb33..00000000 --- a/node_modules/coalesce/node_modules/formidable/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/test/tmp/ -*.upload -*.un~ -*.http diff --git a/node_modules/coalesce/node_modules/formidable/.travis.yml b/node_modules/coalesce/node_modules/formidable/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/coalesce/node_modules/formidable/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/coalesce/node_modules/formidable/Makefile b/node_modules/coalesce/node_modules/formidable/Makefile deleted file mode 100644 index 89458724..00000000 --- a/node_modules/coalesce/node_modules/formidable/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SHELL := /bin/bash - -test: - @./test/run.js - -build: npm test - -npm: - npm install . - -clean: - rm test/tmp/* - -.PHONY: test clean build diff --git a/node_modules/coalesce/node_modules/formidable/Readme.md b/node_modules/coalesce/node_modules/formidable/Readme.md deleted file mode 100644 index a5ca104b..00000000 --- a/node_modules/coalesce/node_modules/formidable/Readme.md +++ /dev/null @@ -1,311 +0,0 @@ -# Formidable - -[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable) - -## Purpose - -A node.js module for parsing form data, especially file uploads. - -## Current status - -This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading -and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from -a large variety of clients and is considered production-ready. - -## Features - -* Fast (~500mb/sec), non-buffering multipart parser -* Automatically writing file uploads to disk -* Low memory footprint -* Graceful error handling -* Very high test coverage - -## Changelog - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) - -## Installation - -Via [npm](http://github.com/isaacs/npm): - - npm install formidable@latest - -Manually: - - git clone git://github.com/felixge/node-formidable.git formidable - vim my.js - # var formidable = require('./formidable'); - -Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library. - -## Example - -Parse an incoming file upload. - - var formidable = require('formidable'), - http = require('http'), - - util = require('util'); - - http.createServer(function(req, res) { - if (req.url == '/upload' && req.method.toLowerCase() == 'post') { - // parse a file upload - var form = new formidable.IncomingForm(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - }).listen(80); - -## API - -### formidable.IncomingForm - -__new formidable.IncomingForm()__ - -Creates a new incoming form. - -__incomingForm.encoding = 'utf-8'__ - -The encoding to use for incoming form fields. - -__incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()__ - -The directory for placing file uploads in. You can move them later on using -`fs.rename()`. The default directory is picked at module load time depending on -the first existing directory from those listed above. - -__incomingForm.keepExtensions = false__ - -If you want the files written to `incomingForm.uploadDir` to include the extensions of the original files, set this property to `true`. - -__incomingForm.type__ - -Either 'multipart' or 'urlencoded' depending on the incoming request. - -__incomingForm.maxFieldsSize = 2 * 1024 * 1024__ - -Limits the amount of memory a field (not file) can allocate in bytes. -If this value is exceeded, an `'error'` event is emitted. The default -size is 2MB. - -__incomingForm.hash = false__ - -If you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`. - -__incomingForm.bytesReceived__ - -The amount of bytes received for this form so far. - -__incomingForm.bytesExpected__ - -The expected number of bytes in this form. - -__incomingForm.parse(request, [cb])__ - -Parses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback: - - incomingForm.parse(req, function(err, fields, files) { - // ... - }); - -__incomingForm.onPart(part)__ - -You may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing. - - incomingForm.onPart = function(part) { - part.addListener('data', function() { - // ... - }); - } - -If you want to use formidable to only handle certain parts for you, you can do so: - - incomingForm.onPart = function(part) { - if (!part.filename) { - // let formidable handle all non-file parts - incomingForm.handlePart(part); - } - } - -Check the code in this method for further inspiration. - -__Event: 'progress' (bytesReceived, bytesExpected)__ - -Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar. - -__Event: 'field' (name, value)__ - -Emitted whenever a field / value pair has been received. - -__Event: 'fileBegin' (name, file)__ - -Emitted whenever a new file is detected in the upload stream. Use this even if -you want to stream the file to somewhere else while buffering the upload on -the file system. - -__Event: 'file' (name, file)__ - -Emitted whenever a field / file pair has been received. `file` is an instance of `File`. - -__Event: 'error' (err)__ - -Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events. - -__Event: 'aborted'__ - -Emitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core). - -__Event: 'end' ()__ - -Emitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response. - -### formidable.File - -__file.size = 0__ - -The size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet. - -__file.path = null__ - -The path this file is being written to. You can modify this in the `'fileBegin'` event in -case you are unhappy with the way formidable generates a temporary path for your files. - -__file.name = null__ - -The name this file had according to the uploading client. - -__file.type = null__ - -The mime type of this file, according to the uploading client. - -__file.lastModifiedDate = null__ - -A date object (or `null`) containing the time this file was last written to. Mostly -here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/). - -__file.hash = null__ - -If hash calculation was set, you can read the hex digest out of this var. - -## License - -Formidable is licensed under the MIT license. - -## Ports - -* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable - -## Credits - -* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js diff --git a/node_modules/coalesce/node_modules/formidable/TODO b/node_modules/coalesce/node_modules/formidable/TODO deleted file mode 100644 index e1107f2a..00000000 --- a/node_modules/coalesce/node_modules/formidable/TODO +++ /dev/null @@ -1,3 +0,0 @@ -- Better bufferMaxSize handling approach -- Add tests for JSON parser pull request and merge it -- Implement QuerystringParser the same way as MultipartParser diff --git a/node_modules/coalesce/node_modules/formidable/benchmark/bench-multipart-parser.js b/node_modules/coalesce/node_modules/formidable/benchmark/bench-multipart-parser.js deleted file mode 100644 index bff41f15..00000000 --- a/node_modules/coalesce/node_modules/formidable/benchmark/bench-multipart-parser.js +++ /dev/null @@ -1,70 +0,0 @@ -require('../test/common'); -var multipartParser = require('../lib/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - Buffer = require('buffer').Buffer, - boundary = '-----------------------------168072824752491622650073', - mb = 100, - buffer = createMultipartBuffer(boundary, mb * 1024 * 1024), - callbacks = - { partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, - }; - - -parser.initWithBoundary(boundary); -parser.onHeaderField = function() { - callbacks.headerField++; -}; - -parser.onHeaderValue = function() { - callbacks.headerValue++; -}; - -parser.onPartBegin = function() { - callbacks.partBegin++; -}; - -parser.onPartData = function() { - callbacks.partData++; -}; - -parser.onPartEnd = function() { - callbacks.partEnd++; -}; - -parser.onEnd = function() { - callbacks.end++; -}; - -var start = +new Date(), - nparsed = parser.write(buffer), - duration = +new Date - start, - mbPerSec = (mb / (duration / 1000)).toFixed(2); - -console.log(mbPerSec+' mb/sec'); - -assert.equal(nparsed, buffer.length); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' - + 'content-disposition: form-data; name="field1"\r\n' - + '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); diff --git a/node_modules/coalesce/node_modules/formidable/example/post.js b/node_modules/coalesce/node_modules/formidable/example/post.js deleted file mode 100644 index f6c15a64..00000000 --- a/node_modules/coalesce/node_modules/formidable/example/post.js +++ /dev/null @@ -1,43 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - } else if (req.url == '/post') { - var form = new formidable.IncomingForm(), - fields = []; - - form - .on('error', function(err) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - }) - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/coalesce/node_modules/formidable/example/upload.js b/node_modules/coalesce/node_modules/formidable/example/upload.js deleted file mode 100644 index 050cdd9d..00000000 --- a/node_modules/coalesce/node_modules/formidable/example/upload.js +++ /dev/null @@ -1,48 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - } else if (req.url == '/upload') { - var form = new formidable.IncomingForm(), - files = [], - fields = []; - - form.uploadDir = TEST_TMP; - - form - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('file', function(field, file) { - console.log(field, file); - files.push([field, file]); - }) - .on('end', function() { - console.log('-> upload done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/coalesce/node_modules/formidable/index.js b/node_modules/coalesce/node_modules/formidable/index.js deleted file mode 100644 index be410325..00000000 --- a/node_modules/coalesce/node_modules/formidable/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/formidable'); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/lib/file.js b/node_modules/coalesce/node_modules/formidable/lib/file.js deleted file mode 100644 index dad8d5f7..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/file.js +++ /dev/null @@ -1,73 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var util = require('./util'), - WriteStream = require('fs').WriteStream, - EventEmitter = require('events').EventEmitter, - crypto = require('crypto'); - -function File(properties) { - EventEmitter.call(this); - - this.size = 0; - this.path = null; - this.name = null; - this.type = null; - this.hash = null; - this.lastModifiedDate = null; - - this._writeStream = null; - - for (var key in properties) { - this[key] = properties[key]; - } - - if(typeof this.hash === 'string') { - this.hash = crypto.createHash(properties.hash); - } - - this._backwardsCompatibility(); -} -module.exports = File; -util.inherits(File, EventEmitter); - -// @todo Next release: Show error messages when accessing these -File.prototype._backwardsCompatibility = function() { - var self = this; - this.__defineGetter__('length', function() { - return self.size; - }); - this.__defineGetter__('filename', function() { - return self.name; - }); - this.__defineGetter__('mime', function() { - return self.type; - }); -}; - -File.prototype.open = function() { - this._writeStream = new WriteStream(this.path); -}; - -File.prototype.write = function(buffer, cb) { - var self = this; - this._writeStream.write(buffer, function() { - if(self.hash) { - self.hash.update(buffer); - } - self.lastModifiedDate = new Date(); - self.size += buffer.length; - self.emit('progress', self.size); - cb(); - }); -}; - -File.prototype.end = function(cb) { - var self = this; - this._writeStream.end(function() { - if(self.hash) { - self.hash = self.hash.digest('hex'); - } - self.emit('end'); - cb(); - }); -}; diff --git a/node_modules/coalesce/node_modules/formidable/lib/incoming_form.js b/node_modules/coalesce/node_modules/formidable/lib/incoming_form.js deleted file mode 100644 index 060eac29..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/incoming_form.js +++ /dev/null @@ -1,384 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var fs = require('fs'); -var util = require('./util'), - path = require('path'), - File = require('./file'), - MultipartParser = require('./multipart_parser').MultipartParser, - QuerystringParser = require('./querystring_parser').QuerystringParser, - StringDecoder = require('string_decoder').StringDecoder, - EventEmitter = require('events').EventEmitter, - Stream = require('stream').Stream; - -function IncomingForm(opts) { - if (!(this instanceof IncomingForm)) return new IncomingForm; - EventEmitter.call(this); - - opts=opts||{}; - - this.error = null; - this.ended = false; - - this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024; - this.keepExtensions = opts.keepExtensions || false; - this.uploadDir = opts.uploadDir || IncomingForm.UPLOAD_DIR; - this.encoding = opts.encoding || 'utf-8'; - this.headers = null; - this.type = null; - this.hash = false; - - this.bytesReceived = null; - this.bytesExpected = null; - - this._parser = null; - this._flushing = 0; - this._fieldsSize = 0; -}; -util.inherits(IncomingForm, EventEmitter); -exports.IncomingForm = IncomingForm; - -IncomingForm.UPLOAD_DIR = (function() { - var dirs = [process.env.TMP, '/tmp', process.cwd()]; - for (var i = 0; i < dirs.length; i++) { - var dir = dirs[i]; - var isDirectory = false; - - try { - isDirectory = fs.statSync(dir).isDirectory(); - } catch (e) {} - - if (isDirectory) return dir; - } -})(); - -IncomingForm.prototype.parse = function(req, cb) { - this.pause = function() { - try { - req.pause(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - return true; - }; - - this.resume = function() { - try { - req.resume(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - - return true; - }; - - this.writeHeaders(req.headers); - - var self = this; - req - .on('error', function(err) { - self._error(err); - }) - .on('aborted', function() { - self.emit('aborted'); - }) - .on('data', function(buffer) { - self.write(buffer); - }) - .on('end', function() { - if (self.error) { - return; - } - - var err = self._parser.end(); - if (err) { - self._error(err); - } - }); - - if (cb) { - var fields = {}, files = {}; - this - .on('field', function(name, value) { - fields[name] = value; - }) - .on('file', function(name, file) { - files[name] = file; - }) - .on('error', function(err) { - cb(err, fields, files); - }) - .on('end', function() { - cb(null, fields, files); - }); - } - - return this; -}; - -IncomingForm.prototype.writeHeaders = function(headers) { - this.headers = headers; - this._parseContentLength(); - this._parseContentType(); -}; - -IncomingForm.prototype.write = function(buffer) { - if (!this._parser) { - this._error(new Error('unintialized parser')); - return; - } - - this.bytesReceived += buffer.length; - this.emit('progress', this.bytesReceived, this.bytesExpected); - - var bytesParsed = this._parser.write(buffer); - if (bytesParsed !== buffer.length) { - this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed')); - } - - return bytesParsed; -}; - -IncomingForm.prototype.pause = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.resume = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.onPart = function(part) { - // this method can be overwritten by the user - this.handlePart(part); -}; - -IncomingForm.prototype.handlePart = function(part) { - var self = this; - - if (part.filename === undefined) { - var value = '' - , decoder = new StringDecoder(this.encoding); - - part.on('data', function(buffer) { - self._fieldsSize += buffer.length; - if (self._fieldsSize > self.maxFieldsSize) { - self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data')); - return; - } - value += decoder.write(buffer); - }); - - part.on('end', function() { - self.emit('field', part.name, value); - }); - return; - } - - this._flushing++; - - var file = new File({ - path: this._uploadPath(part.filename), - name: part.filename, - type: part.mime, - hash: self.hash - }); - - this.emit('fileBegin', part.name, file); - - file.open(); - - part.on('data', function(buffer) { - self.pause(); - file.write(buffer, function() { - self.resume(); - }); - }); - - part.on('end', function() { - file.end(function() { - self._flushing--; - self.emit('file', part.name, file); - self._maybeEnd(); - }); - }); -}; - -IncomingForm.prototype._parseContentType = function() { - if (!this.headers['content-type']) { - this._error(new Error('bad content-type header, no content-type')); - return; - } - - if (this.headers['content-type'].match(/urlencoded/i)) { - this._initUrlencoded(); - return; - } - - if (this.headers['content-type'].match(/multipart/i)) { - var m; - if (m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i)) { - this._initMultipart(m[1] || m[2]); - } else { - this._error(new Error('bad content-type header, no multipart boundary')); - } - return; - } - - this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type'])); -}; - -IncomingForm.prototype._error = function(err) { - if (this.error) { - return; - } - - this.error = err; - this.pause(); - this.emit('error', err); -}; - -IncomingForm.prototype._parseContentLength = function() { - if (this.headers['content-length']) { - this.bytesReceived = 0; - this.bytesExpected = parseInt(this.headers['content-length'], 10); - this.emit('progress', this.bytesReceived, this.bytesExpected); - } -}; - -IncomingForm.prototype._newParser = function() { - return new MultipartParser(); -}; - -IncomingForm.prototype._initMultipart = function(boundary) { - this.type = 'multipart'; - - var parser = new MultipartParser(), - self = this, - headerField, - headerValue, - part; - - parser.initWithBoundary(boundary); - - parser.onPartBegin = function() { - part = new Stream(); - part.readable = true; - part.headers = {}; - part.name = null; - part.filename = null; - part.mime = null; - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString(self.encoding, start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString(self.encoding, start, end); - }; - - parser.onHeaderEnd = function() { - headerField = headerField.toLowerCase(); - part.headers[headerField] = headerValue; - - var m; - if (headerField == 'content-disposition') { - if (m = headerValue.match(/name="([^"]+)"/i)) { - part.name = m[1]; - } - - part.filename = self._fileName(headerValue); - } else if (headerField == 'content-type') { - part.mime = headerValue; - } - - headerField = ''; - headerValue = ''; - }; - - parser.onHeadersEnd = function() { - self.onPart(part); - }; - - parser.onPartData = function(b, start, end) { - part.emit('data', b.slice(start, end)); - }; - - parser.onPartEnd = function() { - part.emit('end'); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._fileName = function(headerValue) { - var m = headerValue.match(/filename="(.*?)"($|; )/i) - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -}; - -IncomingForm.prototype._initUrlencoded = function() { - this.type = 'urlencoded'; - - var parser = new QuerystringParser() - , self = this; - - parser.onField = function(key, val) { - self.emit('field', key, val); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._uploadPath = function(filename) { - var name = ''; - for (var i = 0; i < 32; i++) { - name += Math.floor(Math.random() * 16).toString(16); - } - - if (this.keepExtensions) { - var ext = path.extname(filename); - ext = ext.replace(/(\.[a-z0-9]+).*/, '$1') - - name += ext; - } - - return path.join(this.uploadDir, name); -}; - -IncomingForm.prototype._maybeEnd = function() { - if (!this.ended || this._flushing) { - return; - } - - this.emit('end'); -}; diff --git a/node_modules/coalesce/node_modules/formidable/lib/index.js b/node_modules/coalesce/node_modules/formidable/lib/index.js deleted file mode 100644 index 7a6e3e10..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var IncomingForm = require('./incoming_form').IncomingForm; -IncomingForm.IncomingForm = IncomingForm; -module.exports = IncomingForm; diff --git a/node_modules/coalesce/node_modules/formidable/lib/multipart_parser.js b/node_modules/coalesce/node_modules/formidable/lib/multipart_parser.js deleted file mode 100644 index 9ca567cd..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/multipart_parser.js +++ /dev/null @@ -1,312 +0,0 @@ -var Buffer = require('buffer').Buffer, - s = 0, - S = - { PARSER_UNINITIALIZED: s++, - START: s++, - START_BOUNDARY: s++, - HEADER_FIELD_START: s++, - HEADER_FIELD: s++, - HEADER_VALUE_START: s++, - HEADER_VALUE: s++, - HEADER_VALUE_ALMOST_DONE: s++, - HEADERS_ALMOST_DONE: s++, - PART_DATA_START: s++, - PART_DATA: s++, - PART_END: s++, - END: s++, - }, - - f = 1, - F = - { PART_BOUNDARY: f, - LAST_BOUNDARY: f *= 2, - }, - - LF = 10, - CR = 13, - SPACE = 32, - HYPHEN = 45, - COLON = 58, - A = 97, - Z = 122, - - lower = function(c) { - return c | 0x20; - }; - -for (var s in S) { - exports[s] = S[s]; -} - -function MultipartParser() { - this.boundary = null; - this.boundaryChars = null; - this.lookbehind = null; - this.state = S.PARSER_UNINITIALIZED; - - this.index = null; - this.flags = 0; -}; -exports.MultipartParser = MultipartParser; - -MultipartParser.stateToString = function(stateNumber) { - for (var state in S) { - var number = S[state]; - if (number === stateNumber) return state; - } -}; - -MultipartParser.prototype.initWithBoundary = function(str) { - this.boundary = new Buffer(str.length+4); - this.boundary.write('\r\n--', 'ascii', 0); - this.boundary.write(str, 'ascii', 4); - this.lookbehind = new Buffer(this.boundary.length+8); - this.state = S.START; - - this.boundaryChars = {}; - for (var i = 0; i < this.boundary.length; i++) { - this.boundaryChars[this.boundary[i]] = true; - } -}; - -MultipartParser.prototype.write = function(buffer) { - var self = this, - i = 0, - len = buffer.length, - prevIndex = this.index, - index = this.index, - state = this.state, - flags = this.flags, - lookbehind = this.lookbehind, - boundary = this.boundary, - boundaryChars = this.boundaryChars, - boundaryLength = this.boundary.length, - boundaryEnd = boundaryLength - 1, - bufferLength = buffer.length, - c, - cl, - - mark = function(name) { - self[name+'Mark'] = i; - }, - clear = function(name) { - delete self[name+'Mark']; - }, - callback = function(name, buffer, start, end) { - if (start !== undefined && start === end) { - return; - } - - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](buffer, start, end); - } - }, - dataCallback = function(name, clear) { - var markSymbol = name+'Mark'; - if (!(markSymbol in self)) { - return; - } - - if (!clear) { - callback(name, buffer, self[markSymbol], buffer.length); - self[markSymbol] = 0; - } else { - callback(name, buffer, self[markSymbol], i); - delete self[markSymbol]; - } - }; - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case S.PARSER_UNINITIALIZED: - return i; - case S.START: - index = 0; - state = S.START_BOUNDARY; - case S.START_BOUNDARY: - if (index == boundary.length - 2) { - if (c != CR) { - return i; - } - index++; - break; - } else if (index - 1 == boundary.length - 2) { - if (c != LF) { - return i; - } - index = 0; - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - - if (c != boundary[index+2]) { - return i; - } - index++; - break; - case S.HEADER_FIELD_START: - state = S.HEADER_FIELD; - mark('headerField'); - index = 0; - case S.HEADER_FIELD: - if (c == CR) { - clear('headerField'); - state = S.HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c == HYPHEN) { - break; - } - - if (c == COLON) { - if (index == 1) { - // empty header field - return i; - } - dataCallback('headerField', true); - state = S.HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - return i; - } - break; - case S.HEADER_VALUE_START: - if (c == SPACE) { - break; - } - - mark('headerValue'); - state = S.HEADER_VALUE; - case S.HEADER_VALUE: - if (c == CR) { - dataCallback('headerValue', true); - callback('headerEnd'); - state = S.HEADER_VALUE_ALMOST_DONE; - } - break; - case S.HEADER_VALUE_ALMOST_DONE: - if (c != LF) { - return i; - } - state = S.HEADER_FIELD_START; - break; - case S.HEADERS_ALMOST_DONE: - if (c != LF) { - return i; - } - - callback('headersEnd'); - state = S.PART_DATA_START; - break; - case S.PART_DATA_START: - state = S.PART_DATA - mark('partData'); - case S.PART_DATA: - prevIndex = index; - - if (index == 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundary.length) { - if (boundary[index] == c) { - if (index == 0) { - dataCallback('partData', true); - } - index++; - } else { - index = 0; - } - } else if (index == boundary.length) { - index++; - if (c == CR) { - // CR = part boundary - flags |= F.PART_BOUNDARY; - } else if (c == HYPHEN) { - // HYPHEN = end boundary - flags |= F.LAST_BOUNDARY; - } else { - index = 0; - } - } else if (index - 1 == boundary.length) { - if (flags & F.PART_BOUNDARY) { - index = 0; - if (c == LF) { - // unset the PART_BOUNDARY flag - flags &= ~F.PART_BOUNDARY; - callback('partEnd'); - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - } else if (flags & F.LAST_BOUNDARY) { - if (c == HYPHEN) { - callback('partEnd'); - callback('end'); - state = S.END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - callback('partData', lookbehind, 0, prevIndex); - prevIndex = 0; - mark('partData'); - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case S.END: - break; - default: - return i; - } - } - - dataCallback('headerField'); - dataCallback('headerValue'); - dataCallback('partData'); - - this.index = index; - this.state = state; - this.flags = flags; - - return len; -}; - -MultipartParser.prototype.end = function() { - if (this.state != S.END) { - return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain()); - } -}; - -MultipartParser.prototype.explain = function() { - return 'state = ' + MultipartParser.stateToString(this.state); -}; diff --git a/node_modules/coalesce/node_modules/formidable/lib/querystring_parser.js b/node_modules/coalesce/node_modules/formidable/lib/querystring_parser.js deleted file mode 100644 index 63f109ec..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/querystring_parser.js +++ /dev/null @@ -1,25 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -// This is a buffering parser, not quite as nice as the multipart one. -// If I find time I'll rewrite this to be fully streaming as well -var querystring = require('querystring'); - -function QuerystringParser() { - this.buffer = ''; -}; -exports.QuerystringParser = QuerystringParser; - -QuerystringParser.prototype.write = function(buffer) { - this.buffer += buffer.toString('ascii'); - return buffer.length; -}; - -QuerystringParser.prototype.end = function() { - var fields = querystring.parse(this.buffer); - for (var field in fields) { - this.onField(field, fields[field]); - } - this.buffer = ''; - - this.onEnd(); -}; \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/lib/util.js b/node_modules/coalesce/node_modules/formidable/lib/util.js deleted file mode 100644 index e9493e9b..00000000 --- a/node_modules/coalesce/node_modules/formidable/lib/util.js +++ /dev/null @@ -1,6 +0,0 @@ -// Backwards compatibility ... -try { - module.exports = require('util'); -} catch (e) { - module.exports = require('sys'); -} diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/Makefile b/node_modules/coalesce/node_modules/formidable/node-gently/Makefile deleted file mode 100644 index 01f71404..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -test: - @find test/simple/test-*.js | xargs -n 1 -t node - -.PHONY: test \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/Readme.md b/node_modules/coalesce/node_modules/formidable/node-gently/Readme.md deleted file mode 100644 index f8f0c664..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/Readme.md +++ /dev/null @@ -1,167 +0,0 @@ -# Gently - -## Purpose - -A node.js module that helps with stubbing and behavior verification. It allows you to test the most remote and nested corners of your code while keeping being fully unobtrusive. - -## Features - -* Overwrite and stub individual object functions -* Verify that all expected calls have been made in the expected order -* Restore stubbed functions to their original behavior -* Detect object / class names from obj.constructor.name and obj.toString() -* Hijack any required module function or class constructor - -## Installation - -Via [npm](http://github.com/isaacs/npm): - - npm install gently@latest - -## Example - -Make sure your dog is working properly: - - function Dog() {} - - Dog.prototype.seeCat = function() { - this.bark('whuf, whuf'); - this.run(); - } - - Dog.prototype.bark = function(bark) { - require('sys').puts(bark); - } - - var gently = new (require('gently')) - , assert = require('assert') - , dog = new Dog(); - - gently.expect(dog, 'bark', function(bark) { - assert.equal(bark, 'whuf, whuf'); - }); - gently.expect(dog, 'run'); - - dog.seeCat(); - -You can also easily test event emitters with this, for example a simple sequence of 2 events emitted by `fs.WriteStream`: - - var gently = new (require('gently')) - , stream = new (require('fs').WriteStream)('my_file.txt'); - - gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'open'); - }); - - gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'drain'); - }); - -For a full read world example, check out this test case: [test-incoming-form.js](http://github.com/felixge/node-formidable/blob/master/test/simple/test-incoming-form.js) (in [node-formdiable](http://github.com/felixge/node-formidable)). - -## API - -### Gently - -#### new Gently() - -Creates a new gently instance. It listens to the process `'exit'` event to make sure all expectations have been verified. - -#### gently.expect(obj, method, [[count], stubFn]) - -Creates an expectation for an objects method to be called. You can optionally specify the call `count` you are expecting, as well as `stubFn` function that will run instead of the original function. - -Returns a reference to the function that is getting overwritten. - -#### gently.expect([count], stubFn) - -Returns a function that is supposed to be executed `count` times, delegating any calls to the provided `stubFn` function. Naming your stubFn closure will help to properly diagnose errors that are being thrown: - - childProcess.exec('ls', gently.expect(function lsCallback(code) { - assert.equal(0, code); - })); - -#### gently.restore(obj, method) - -Restores an object method that has been previously overwritten using `gently.expect()`. - -#### gently.hijack(realRequire) - -Returns a new require functions that catches a reference to all required modules into `gently.hijacked`. - -To use this function, include a line like this in your `'my-module.js'`. - - if (global.GENTLY) require = GENTLY.hijack(require); - - var sys = require('sys'); - exports.hello = function() { - sys.log('world'); - }; - -Now you can write a test for the module above: - - var gently = global.GENTLY = new (require('gently')) - , myModule = require('./my-module'); - - gently.expect(gently.hijacked.sys, 'log', function(str) { - assert.equal(str, 'world'); - }); - - myModule.hello(); - -#### gently.stub(location, [exportsName]) - -Returns a stub class that will be used instead of the real class from the module at `location` with the given `exportsName`. - -This allows to test an OOP version of the previous example, where `'my-module.js'`. - - if (global.GENTLY) require = GENTLY.hijack(require); - - var World = require('./world'); - - exports.hello = function() { - var world = new World(); - world.hello(); - } - -And `world.js` looks like this: - - var sys = require('sys'); - - function World() { - - } - module.exports = World; - - World.prototype.hello = function() { - sys.log('world'); - }; - -Testing `'my-module.js'` can now easily be accomplished: - - var gently = global.GENTLY = new (require('gently')) - , WorldStub = gently.stub('./world') - , myModule = require('./my-module') - , WORLD; - - gently.expect(WorldStub, 'new', function() { - WORLD = this; - }); - - gently.expect(WORLD, 'hello'); - - myModule.hello(); - -#### gently.hijacked - -An object that holds the references to all hijacked modules. - -#### gently.verify([msg]) - -Verifies that all expectations of this gently instance have been satisfied. If not called manually, this method is called when the process `'exit'` event is fired. - -If `msg` is given, it will appear in any error that might be thrown. - -## License - -Gently is licensed under the MIT license. \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/example/dog.js b/node_modules/coalesce/node_modules/formidable/node-gently/example/dog.js deleted file mode 100644 index 022fae0c..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/example/dog.js +++ /dev/null @@ -1,22 +0,0 @@ -require('../test/common'); -function Dog() {} - -Dog.prototype.seeCat = function() { - this.bark('whuf, whuf'); - this.run(); -} - -Dog.prototype.bark = function(bark) { - require('sys').puts(bark); -} - -var gently = new (require('gently')) - , assert = require('assert') - , dog = new Dog(); - -gently.expect(dog, 'bark', function(bark) { - assert.equal(bark, 'whuf, whuf'); -}); -gently.expect(dog, 'run'); - -dog.seeCat(); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/example/event_emitter.js b/node_modules/coalesce/node_modules/formidable/node-gently/example/event_emitter.js deleted file mode 100644 index 7def134f..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/example/event_emitter.js +++ /dev/null @@ -1,11 +0,0 @@ -require('../test/common'); -var gently = new (require('gently')) - , stream = new (require('fs').WriteStream)('my_file.txt'); - -gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'open'); -}); - -gently.expect(stream, 'emit', function(event) { - assert.equal(event, 'drain'); -}); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/index.js b/node_modules/coalesce/node_modules/formidable/node-gently/index.js deleted file mode 100644 index 69122bdb..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/gently'); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/gently.js b/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/gently.js deleted file mode 100644 index 8af0e1ec..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/gently.js +++ /dev/null @@ -1,184 +0,0 @@ -var path = require('path'); - -function Gently() { - this.expectations = []; - this.hijacked = {}; - - var self = this; - process.addListener('exit', function() { - self.verify('process exit'); - }); -}; -module.exports = Gently; - -Gently.prototype.stub = function(location, exportsName) { - function Stub() { - return Stub['new'].apply(this, arguments); - }; - - Stub['new'] = function () {}; - - var stubName = 'require('+JSON.stringify(location)+')'; - if (exportsName) { - stubName += '.'+exportsName; - } - - Stub.prototype.toString = Stub.toString = function() { - return stubName; - }; - - var exports = this.hijacked[location] || {}; - if (exportsName) { - exports[exportsName] = Stub; - } else { - exports = Stub; - } - - this.hijacked[location] = exports; - return Stub; -}; - -Gently.prototype.hijack = function(realRequire) { - var self = this; - return function(location) { - return self.hijacked[location] = (self.hijacked[location]) - ? self.hijacked[location] - : realRequire(location); - }; -}; - -Gently.prototype.expect = function(obj, method, count, stubFn) { - if (typeof obj != 'function' && typeof obj != 'object' && typeof obj != 'number') { - throw new Error - ( 'Bad 1st argument for gently.expect(), ' - + 'object, function, or number expected, got: '+(typeof obj) - ); - } else if (typeof obj == 'function' && (typeof method != 'string')) { - // expect(stubFn) interface - stubFn = obj; - obj = null; - method = null; - count = 1; - } else if (typeof method == 'function') { - // expect(count, stubFn) interface - count = obj; - stubFn = method; - obj = null; - method = null; - } else if (typeof count == 'function') { - // expect(obj, method, stubFn) interface - stubFn = count; - count = 1; - } else if (count === undefined) { - // expect(obj, method) interface - count = 1; - } - - var name = this._name(obj, method, stubFn); - this.expectations.push({obj: obj, method: method, stubFn: stubFn, name: name, count: count}); - - var self = this; - function delegate() { - return self._stubFn(this, obj, method, name, Array.prototype.slice.call(arguments)); - } - - if (!obj) { - return delegate; - } - - var original = (obj[method]) - ? obj[method]._original || obj[method] - : undefined; - - obj[method] = delegate; - return obj[method]._original = original; -}; - -Gently.prototype.restore = function(obj, method) { - if (!obj[method] || !obj[method]._original) { - throw new Error(this._name(obj, method)+' is not gently stubbed'); - } - obj[method] = obj[method]._original; -}; - -Gently.prototype.verify = function(msg) { - if (!this.expectations.length) { - return; - } - - var validExpectations = []; - for (var i = 0, l = this.expectations.length; i < l; i++) { - var expectation = this.expectations[i]; - - if (expectation.count > 0) { - validExpectations.push(expectation); - } - } - - this.expectations = []; // reset so that no duplicate verification attempts are made - - if (!validExpectations.length) { - return; - } - - var expectation = validExpectations[0]; - - throw new Error - ( 'Expected call to '+expectation.name+' did not happen' - + ( (msg) - ? ' ('+msg+')' - : '' - ) - ); -}; - -Gently.prototype._stubFn = function(self, obj, method, name, args) { - var expectation = this.expectations[0], obj, method; - - if (!expectation) { - throw new Error('Unexpected call to '+name+', no call was expected'); - } - - if (expectation.obj !== obj || expectation.method !== method) { - throw new Error('Unexpected call to '+name+', expected call to '+ expectation.name); - } - - expectation.count -= 1; - if (expectation.count === 0) { - this.expectations.shift(); - - // autorestore original if its not a closure - // and no more expectations on that object - var has_more_expectations = this.expectations.reduce(function (memo, expectation) { - return memo || (expectation.obj === obj && expectation.method === method); - }, false); - if (obj !== null && method !== null && !has_more_expectations) { - if (typeof obj[method]._original !== 'undefined') { - obj[method] = obj[method]._original; - delete obj[method]._original; - } else { - delete obj[method]; - } - } - } - - if (expectation.stubFn) { - return expectation.stubFn.apply(self, args); - } -}; - -Gently.prototype._name = function(obj, method, stubFn) { - if (obj) { - var objectName = obj.toString(); - if (objectName == '[object Object]' && obj.constructor.name) { - objectName = '['+obj.constructor.name+']'; - } - return (objectName)+'.'+method+'()'; - } - - if (stubFn.name) { - return stubFn.name+'()'; - } - - return '>> '+stubFn.toString()+' <<'; -}; diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/index.js b/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/index.js deleted file mode 100644 index 64c1977b..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/lib/gently/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./gently'); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/package.json b/node_modules/coalesce/node_modules/formidable/node-gently/package.json deleted file mode 100644 index 9c1b7a00..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "gently", - "version": "0.9.2", - "directories": { - "lib": "./lib/gently" - }, - "main": "./lib/gently/index", - "dependencies": {}, - "devDependencies": {}, - "engines": { - "node": "*" - }, - "optionalDependencies": {} -} diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/test/common.js b/node_modules/coalesce/node_modules/formidable/node-gently/test/common.js deleted file mode 100644 index 978b5c53..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/test/common.js +++ /dev/null @@ -1,8 +0,0 @@ -var path = require('path') - , sys = require('sys'); - -require.paths.unshift(path.dirname(__dirname)+'/lib'); - -global.puts = sys.puts; -global.p = function() {sys.error(sys.inspect.apply(null, arguments))};; -global.assert = require('assert'); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/node-gently/test/simple/test-gently.js b/node_modules/coalesce/node_modules/formidable/node-gently/test/simple/test-gently.js deleted file mode 100644 index 4f8fe2dd..00000000 --- a/node_modules/coalesce/node_modules/formidable/node-gently/test/simple/test-gently.js +++ /dev/null @@ -1,348 +0,0 @@ -require('../common'); -var Gently = require('gently') - , gently; - -function test(test) { - process.removeAllListeners('exit'); - gently = new Gently(); - test(); -} - -test(function constructor() { - assert.deepEqual(gently.expectations, []); - assert.deepEqual(gently.hijacked, {}); - assert.equal(gently.constructor.name, 'Gently'); -}); - -test(function expectBadArgs() { - var BAD_ARG = 'oh no'; - try { - gently.expect(BAD_ARG); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Bad 1st argument for gently.expect(), object, function, or number expected, got: '+(typeof BAD_ARG)); - } -}); - -test(function expectObjMethod() { - var OBJ = {}, NAME = 'foobar'; - OBJ.foo = function(x) { - return x; - }; - - gently._name = function() { - return NAME; - }; - - var original = OBJ.foo - , stubFn = function() {}; - - (function testAddOne() { - assert.strictEqual(gently.expect(OBJ, 'foo', stubFn), original); - - assert.equal(gently.expectations.length, 1); - var expectation = gently.expectations[0]; - assert.strictEqual(expectation.obj, OBJ); - assert.strictEqual(expectation.method, 'foo'); - assert.strictEqual(expectation.stubFn, stubFn); - assert.strictEqual(expectation.name, NAME); - assert.strictEqual(OBJ.foo._original, original); - })(); - - (function testAddTwo() { - gently.expect(OBJ, 'foo', 2, stubFn); - assert.equal(gently.expectations.length, 2); - assert.strictEqual(OBJ.foo._original, original); - })(); - - (function testAddOneWithoutMock() { - gently.expect(OBJ, 'foo'); - assert.equal(gently.expectations.length, 3); - })(); - - var stubFnCalled = 0, SELF = {}; - gently._stubFn = function(self, obj, method, name, args) { - stubFnCalled++; - assert.strictEqual(self, SELF); - assert.strictEqual(obj, OBJ); - assert.strictEqual(method, 'foo'); - assert.strictEqual(name, NAME); - assert.deepEqual(args, [1, 2]); - return 23; - }; - assert.equal(OBJ.foo.apply(SELF, [1, 2]), 23); - assert.equal(stubFnCalled, 1); -}); - -test(function expectClosure() { - var NAME = 'MY CLOSURE'; - function closureFn() {}; - - gently._name = function() { - return NAME; - }; - - var fn = gently.expect(closureFn); - assert.equal(gently.expectations.length, 1); - var expectation = gently.expectations[0]; - assert.strictEqual(expectation.obj, null); - assert.strictEqual(expectation.method, null); - assert.strictEqual(expectation.stubFn, closureFn); - assert.strictEqual(expectation.name, NAME); - - var stubFnCalled = 0, SELF = {}; - gently._stubFn = function(self, obj, method, name, args) { - stubFnCalled++; - assert.strictEqual(self, SELF); - assert.strictEqual(obj, null); - assert.strictEqual(method, null); - assert.strictEqual(name, NAME); - assert.deepEqual(args, [1, 2]); - return 23; - }; - assert.equal(fn.apply(SELF, [1, 2]), 23); - assert.equal(stubFnCalled, 1); -}); - -test(function expectClosureCount() { - var stubFnCalled = 0; - function closureFn() {stubFnCalled++}; - - var fn = gently.expect(2, closureFn); - assert.equal(gently.expectations.length, 1); - fn(); - assert.equal(gently.expectations.length, 1); - fn(); - assert.equal(stubFnCalled, 2); -}); - -test(function restore() { - var OBJ = {}, NAME = '[my object].myFn()'; - OBJ.foo = function(x) { - return x; - }; - - gently._name = function() { - return NAME; - }; - - var original = OBJ.foo; - gently.expect(OBJ, 'foo'); - gently.restore(OBJ, 'foo'); - assert.strictEqual(OBJ.foo, original); - - (function testError() { - try { - gently.restore(OBJ, 'foo'); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, NAME+' is not gently stubbed'); - } - })(); -}); - -test(function _stubFn() { - var OBJ1 = {toString: function() {return '[OBJ 1]'}} - , OBJ2 = {toString: function() {return '[OBJ 2]'}, foo: function () {return 'bar';}} - , SELF = {}; - - gently.expect(OBJ1, 'foo', function(x) { - assert.strictEqual(this, SELF); - return x * 2; - }); - - assert.equal(gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]), 10); - - (function testAutorestore() { - assert.equal(OBJ2.foo(), 'bar'); - - gently.expect(OBJ2, 'foo', function() { - return 'stubbed foo'; - }); - - gently.expect(OBJ2, 'foo', function() { - return "didn't restore yet"; - }); - - assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), 'stubbed foo'); - assert.equal(gently._stubFn(SELF, OBJ2, 'foo', 'dummy_name', []), "didn't restore yet"); - assert.equal(OBJ2.foo(), 'bar'); - assert.deepEqual(gently.expectations, []); - })(); - - (function testNoMoreCallExpected() { - try { - gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Unexpected call to dummy_name, no call was expected'); - } - })(); - - (function testDifferentCallExpected() { - gently.expect(OBJ2, 'bar'); - try { - gently._stubFn(SELF, OBJ1, 'foo', 'dummy_name', [5]); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Unexpected call to dummy_name, expected call to '+gently._name(OBJ2, 'bar')); - } - - assert.equal(gently.expectations.length, 1); - })(); - - (function testNoMockCallback() { - OBJ2.bar(); - assert.equal(gently.expectations.length, 0); - })(); -}); - -test(function stub() { - var LOCATION = './my_class'; - - (function testRegular() { - var Stub = gently.stub(LOCATION); - assert.ok(Stub instanceof Function); - assert.strictEqual(gently.hijacked[LOCATION], Stub); - assert.ok(Stub['new'] instanceof Function); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+')'); - - (function testConstructor() { - var newCalled = 0 - , STUB - , ARGS = ['foo', 'bar']; - - Stub['new'] = function(a, b) { - assert.equal(a, ARGS[0]); - assert.equal(b, ARGS[1]); - newCalled++; - STUB = this; - }; - - var stub = new Stub(ARGS[0], ARGS[1]); - assert.strictEqual(stub, STUB); - assert.equal(newCalled, 1); - assert.equal(stub.toString(), 'require('+JSON.stringify(LOCATION)+')'); - })(); - - (function testUseReturnValueAsInstance() { - var R = {}; - - Stub['new'] = function() { - return R; - }; - - var stub = new Stub(); - assert.strictEqual(stub, R); - - })(); - })(); - - var EXPORTS_NAME = 'MyClass'; - test(function testExportsName() { - var Stub = gently.stub(LOCATION, EXPORTS_NAME); - assert.strictEqual(gently.hijacked[LOCATION][EXPORTS_NAME], Stub); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME); - - (function testConstructor() { - var stub = new Stub(); - assert.equal(Stub.toString(), 'require('+JSON.stringify(LOCATION)+').'+EXPORTS_NAME); - })(); - }); -}); - -test(function hijack() { - var LOCATION = './foo' - , REQUIRE_CALLS = 0 - , EXPORTS = {} - , REQUIRE = function() { - REQUIRE_CALLS++; - return EXPORTS; - }; - - var hijackedRequire = gently.hijack(REQUIRE); - hijackedRequire(LOCATION); - assert.strictEqual(gently.hijacked[LOCATION], EXPORTS); - - assert.equal(REQUIRE_CALLS, 1); - - // make sure we are caching the hijacked module - hijackedRequire(LOCATION); - assert.equal(REQUIRE_CALLS, 1); -}); - -test(function verify() { - var OBJ = {toString: function() {return '[OBJ]'}}; - gently.verify(); - - gently.expect(OBJ, 'foo'); - try { - gently.verify(); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen'); - } - - try { - gently.verify('foo'); - assert.ok(false, 'throw needs to happen'); - } catch (e) { - assert.equal(e.message, 'Expected call to [OBJ].foo() did not happen (foo)'); - } -}); - -test(function processExit() { - var verifyCalled = 0; - gently.verify = function(msg) { - verifyCalled++; - assert.equal(msg, 'process exit'); - }; - - process.emit('exit'); - assert.equal(verifyCalled, 1); -}); - -test(function _name() { - (function testNamedClass() { - function Foo() {}; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), '[Foo].bar()'); - })(); - - (function testToStringPreference() { - function Foo() {}; - Foo.prototype.toString = function() { - return '[Superman 123]'; - }; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), '[Superman 123].bar()'); - })(); - - (function testUnamedClass() { - var Foo = function() {}; - var foo = new Foo(); - assert.equal(gently._name(foo, 'bar'), foo.toString()+'.bar()'); - })(); - - (function testNamedClosure() { - function myClosure() {}; - assert.equal(gently._name(null, null, myClosure), myClosure.name+'()'); - })(); - - (function testUnamedClosure() { - var myClosure = function() {2+2 == 5}; - assert.equal(gently._name(null, null, myClosure), '>> '+myClosure.toString()+' <<'); - })(); -}); - -test(function verifyExpectNone() { - var OBJ = {toString: function() {return '[OBJ]'}}; - gently.verify(); - - gently.expect(OBJ, 'foo', 0); - try { - gently.verify(); - } catch (e) { - assert.fail('Exception should not have been thrown'); - } -}); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/formidable/package.json b/node_modules/coalesce/node_modules/formidable/package.json deleted file mode 100644 index 0d15f403..00000000 --- a/node_modules/coalesce/node_modules/formidable/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "formidable", - "version": "1.0.11", - "dependencies": {}, - "devDependencies": { - "gently": "0.8.0", - "findit": "0.1.1", - "hashish": "0.0.4", - "urun": "0.0.4", - "utest": "0.0.3" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "make test" - }, - "engines": { - "node": "*" - }, - "optionalDependencies": {}, - "readme": "# Formidable\n\n[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)\n\n## Purpose\n\nA node.js module for parsing form data, especially file uploads.\n\n## Current status\n\nThis module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading\nand encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from\na large variety of clients and is considered production-ready.\n\n## Features\n\n* Fast (~500mb/sec), non-buffering multipart parser\n* Automatically writing file uploads to disk\n* Low memory footprint\n* Graceful error handling\n* Very high test coverage\n\n## Changelog\n\n### v1.0.9\n\n* Emit progress when content length header parsed (Tim Koschützki)\n* Fix Readme syntax due to GitHub changes (goob)\n* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara)\n\n### v1.0.8\n\n* Strip potentially unsafe characters when using `keepExtensions: true`.\n* Switch to utest / urun for testing\n* Add travis build\n\n### v1.0.7\n\n* Remove file from package that was causing problems when installing on windows. (#102)\n* Fix typos in Readme (Jason Davies).\n\n### v1.0.6\n\n* Do not default to the default to the field name for file uploads where\n filename=\"\".\n\n### v1.0.5\n\n* Support filename=\"\" in multipart parts\n* Explain unexpected end() errors in parser better\n\n**Note:** Starting with this version, formidable emits 'file' events for empty\nfile input fields. Previously those were incorrectly emitted as regular file\ninput fields with value = \"\".\n\n### v1.0.4\n\n* Detect a good default tmp directory regardless of platform. (#88)\n\n### v1.0.3\n\n* Fix problems with utf8 characters (#84) / semicolons in filenames (#58)\n* Small performance improvements\n* New test suite and fixture system\n\n### v1.0.2\n\n* Exclude node\\_modules folder from git\n* Implement new `'aborted'` event\n* Fix files in example folder to work with recent node versions\n* Make gently a devDependency\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2)\n\n### v1.0.1\n\n* Fix package.json to refer to proper main directory. (#68, Dean Landolt)\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1)\n\n### v1.0.0\n\n* Add support for multipart boundaries that are quoted strings. (Jeff Craig)\n\nThis marks the beginning of development on version 2.0 which will include\nseveral architectural improvements.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0)\n\n### v0.9.11\n\n* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki)\n* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class\n\n**Important:** The old property names of the File class will be removed in a\nfuture release.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11)\n\n### Older releases\n\nThese releases were done before starting to maintain the above Changelog:\n\n* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10)\n* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9)\n* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8)\n* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7)\n* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6)\n* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5)\n* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4)\n* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3)\n* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2)\n* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0)\n\n## Installation\n\nVia [npm](http://github.com/isaacs/npm):\n\n npm install formidable@latest\n\nManually:\n\n git clone git://github.com/felixge/node-formidable.git formidable\n vim my.js\n # var formidable = require('./formidable');\n\nNote: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.\n\n## Example\n\nParse an incoming file upload.\n\n var formidable = require('formidable'),\n http = require('http'),\n\n util = require('util');\n\n http.createServer(function(req, res) {\n if (req.url == '/upload' && req.method.toLowerCase() == 'post') {\n // parse a file upload\n var form = new formidable.IncomingForm();\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
'+\n '
'+\n '
'+\n ''+\n '
'\n );\n }).listen(80);\n\n## API\n\n### formidable.IncomingForm\n\n__new formidable.IncomingForm()__\n\nCreates a new incoming form.\n\n__incomingForm.encoding = 'utf-8'__\n\nThe encoding to use for incoming form fields.\n\n__incomingForm.uploadDir = process.env.TMP || '/tmp' || process.cwd()__\n\nThe directory for placing file uploads in. You can move them later on using\n`fs.rename()`. The default directory is picked at module load time depending on\nthe first existing directory from those listed above.\n\n__incomingForm.keepExtensions = false__\n\nIf you want the files written to `incomingForm.uploadDir` to include the extensions of the original files, set this property to `true`.\n\n__incomingForm.type__\n\nEither 'multipart' or 'urlencoded' depending on the incoming request.\n\n__incomingForm.maxFieldsSize = 2 * 1024 * 1024__\n\nLimits the amount of memory a field (not file) can allocate in bytes.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 2MB.\n\n__incomingForm.hash = false__\n\nIf you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.\n\n__incomingForm.bytesReceived__\n\nThe amount of bytes received for this form so far.\n\n__incomingForm.bytesExpected__\n\nThe expected number of bytes in this form.\n\n__incomingForm.parse(request, [cb])__\n\nParses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback:\n\n incomingForm.parse(req, function(err, fields, files) {\n // ...\n });\n\n__incomingForm.onPart(part)__\n\nYou may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing.\n\n incomingForm.onPart = function(part) {\n part.addListener('data', function() {\n // ...\n });\n }\n\nIf you want to use formidable to only handle certain parts for you, you can do so:\n\n incomingForm.onPart = function(part) {\n if (!part.filename) {\n // let formidable handle all non-file parts\n incomingForm.handlePart(part);\n }\n }\n\nCheck the code in this method for further inspiration.\n\n__Event: 'progress' (bytesReceived, bytesExpected)__\n\nEmitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.\n\n__Event: 'field' (name, value)__\n\nEmitted whenever a field / value pair has been received.\n\n__Event: 'fileBegin' (name, file)__\n\nEmitted whenever a new file is detected in the upload stream. Use this even if\nyou want to stream the file to somewhere else while buffering the upload on\nthe file system.\n\n__Event: 'file' (name, file)__\n\nEmitted whenever a field / file pair has been received. `file` is an instance of `File`.\n\n__Event: 'error' (err)__\n\nEmitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.\n\n__Event: 'aborted'__\n\nEmitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core).\n\n__Event: 'end' ()__\n\nEmitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response.\n\n### formidable.File\n\n__file.size = 0__\n\nThe size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet.\n\n__file.path = null__\n\nThe path this file is being written to. You can modify this in the `'fileBegin'` event in\ncase you are unhappy with the way formidable generates a temporary path for your files.\n\n__file.name = null__\n\nThe name this file had according to the uploading client.\n\n__file.type = null__\n\nThe mime type of this file, according to the uploading client.\n\n__file.lastModifiedDate = null__\n\nA date object (or `null`) containing the time this file was last written to. Mostly\nhere for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).\n\n__file.hash = null__\n\nIf hash calculation was set, you can read the hex digest out of this var.\n\n## License\n\nFormidable is licensed under the MIT license.\n\n## Ports\n\n* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable\n\n## Credits\n\n* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js\n", - "readmeFilename": "Readme.md", - "description": "[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)", - "_id": "formidable@1.0.11", - "dist": { - "shasum": "2c56edbf30989db453ab311ac38b373ca8949b60" - }, - "_from": "formidable@1.0.11", - "_resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz" -} diff --git a/node_modules/coalesce/node_modules/formidable/test/common.js b/node_modules/coalesce/node_modules/formidable/test/common.js deleted file mode 100644 index eb432ad6..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/common.js +++ /dev/null @@ -1,19 +0,0 @@ -var mysql = require('..'); -var path = require('path'); - -var root = path.join(__dirname, '../'); -exports.dir = { - root : root, - lib : root + '/lib', - fixture : root + '/test/fixture', - tmp : root + '/test/tmp', -}; - -exports.port = 13532; - -exports.formidable = require('..'); -exports.assert = require('assert'); - -exports.require = function(lib) { - return require(exports.dir.lib + '/' + lib); -}; diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/file/funkyfilename.txt b/node_modules/coalesce/node_modules/formidable/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785e..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/file/plain.txt b/node_modules/coalesce/node_modules/formidable/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e2..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md b/node_modules/coalesce/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3d..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/js/no-filename.js b/node_modules/coalesce/node_modules/formidable/test/fixture/js/no-filename.js deleted file mode 100644 index 0bae4494..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/js/no-filename.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt'}, -]; diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/js/special-chars-in-filename.js b/node_modules/coalesce/node_modules/formidable/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index eb76fdc1..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,21 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - {type: 'field', name: 'title', value: 'Weird filename'}, - {type: 'file', name: 'upload', filename: filename, fixture: properFilename}, - ]; -}; - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/node_modules/coalesce/node_modules/formidable/test/fixture/multipart.js b/node_modules/coalesce/node_modules/formidable/test/fixture/multipart.js deleted file mode 100644 index a4761699..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/node_modules/coalesce/node_modules/formidable/test/integration/test-fixtures.js b/node_modules/coalesce/node_modules/formidable/test/integration/test-fixtures.js deleted file mode 100644 index 66ad259e..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/integration/test-fixtures.js +++ /dev/null @@ -1,89 +0,0 @@ -var hashish = require('hashish'); -var fs = require('fs'); -var findit = require('findit'); -var path = require('path'); -var http = require('http'); -var net = require('net'); -var assert = require('assert'); - -var common = require('../common'); -var formidable = common.formidable; - -var server = http.createServer(); -server.listen(common.port, findFixtures); - -function findFixtures() { - var fixtures = []; - findit - .sync(common.dir.fixture + '/js') - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - fixtures.push({ - name : group + '/' + name, - fixture : fixture, - }); - }); - }); - - testNext(fixtures); -} - -function testNext(fixtures) { - var fixture = fixtures.shift(); - if (!fixture) return server.close(); - - var name = fixture.name; - var fixture = fixture.fixture; - - uploadFixture(name, function(err, parts) { - if (err) throw err; - - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var filename = parsedPart.value.name; - assert.equal(filename, expectedPart.filename); - } - }); - - testNext(fixtures); - }); -}; - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - - var parts = []; - form - .on('error', callback) - .on('fileBegin', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }) - .on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }) - .on('end', function() { - callback(null, parts); - }); - }); - - var socket = net.createConnection(common.port); - var file = fs.createReadStream(common.dir.fixture + '/http/' + name); - - file.pipe(socket); -} diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/common.js b/node_modules/coalesce/node_modules/formidable/test/legacy/common.js deleted file mode 100644 index 2b985981..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/common.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -try { - global.Gently = require('gently'); -} catch (e) { - throw new Error('this test suite requires node-gently'); -} - -exports.lib = path.join(__dirname, '../../lib'); - -global.GENTLY = new Gently(); - -global.assert = require('assert'); -global.TEST_PORT = 13532; -global.TEST_FIXTURES = path.join(__dirname, '../fixture'); -global.TEST_TMP = path.join(__dirname, '../tmp'); - -// Stupid new feature in node that complains about gently attaching too many -// listeners to process 'exit'. This is a workaround until I can think of a -// better way to deal with this. -if (process.setMaxListeners) { - process.setMaxListeners(10000); -} diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/integration/test-multipart-parser.js b/node_modules/coalesce/node_modules/formidable/test/legacy/integration/test-multipart-parser.js deleted file mode 100644 index 75232aa4..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +++ /dev/null @@ -1,80 +0,0 @@ -var common = require('../common'); -var CHUNK_LENGTH = 10, - multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - fixtures = require(TEST_FIXTURES + '/multipart'), - Buffer = require('buffer').Buffer; - -Object.keys(fixtures).forEach(function(name) { - var fixture = fixtures[name], - buffer = new Buffer(Buffer.byteLength(fixture.raw, 'binary')), - offset = 0, - chunk, - nparsed, - - parts = [], - part = null, - headerField, - headerValue, - endCalled = ''; - - parser.initWithBoundary(fixture.boundary); - parser.onPartBegin = function() { - part = {headers: {}, data: ''}; - parts.push(part); - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString('ascii', start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString('ascii', start, end); - } - - parser.onHeaderEnd = function() { - part.headers[headerField] = headerValue; - headerField = ''; - headerValue = ''; - }; - - parser.onPartData = function(b, start, end) { - var str = b.toString('ascii', start, end); - part.data += b.slice(start, end); - } - - parser.onEnd = function() { - endCalled = true; - } - - buffer.write(fixture.raw, 'binary', 0); - - while (offset < buffer.length) { - if (offset + CHUNK_LENGTH < buffer.length) { - chunk = buffer.slice(offset, offset+CHUNK_LENGTH); - } else { - chunk = buffer.slice(offset, buffer.length); - } - offset = offset + CHUNK_LENGTH; - - nparsed = parser.write(chunk); - if (nparsed != chunk.length) { - if (fixture.expectError) { - return; - } - puts('-- ERROR --'); - p(chunk.toString('ascii')); - throw new Error(chunk.length+' bytes written, but only '+nparsed+' bytes parsed!'); - } - } - - if (fixture.expectError) { - throw new Error('expected parse error did not happen'); - } - - assert.ok(endCalled); - assert.deepEqual(parts, fixture.parts); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-file.js b/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-file.js deleted file mode 100644 index 52ceedb4..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-file.js +++ /dev/null @@ -1,104 +0,0 @@ -var common = require('../common'); -var WriteStreamStub = GENTLY.stub('fs', 'WriteStream'); - -var File = require(common.lib + '/file'), - EventEmitter = require('events').EventEmitter, - file, - gently; - -function test(test) { - gently = new Gently(); - file = new File(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.ok(file instanceof EventEmitter); - assert.strictEqual(file.size, 0); - assert.strictEqual(file.path, null); - assert.strictEqual(file.name, null); - assert.strictEqual(file.type, null); - assert.strictEqual(file.lastModifiedDate, null); - - assert.strictEqual(file._writeStream, null); - - (function testSetProperties() { - var file2 = new File({foo: 'bar'}); - assert.equal(file2.foo, 'bar'); - })(); -}); - -test(function open() { - var WRITE_STREAM; - file.path = '/foo'; - - gently.expect(WriteStreamStub, 'new', function (path) { - WRITE_STREAM = this; - assert.strictEqual(path, file.path); - }); - - file.open(); - assert.strictEqual(file._writeStream, WRITE_STREAM); -}); - -test(function write() { - var BUFFER = {length: 10}, - CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'write', function (buffer, cb) { - assert.strictEqual(buffer, BUFFER); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.ok(file.lastModifiedDate instanceof Date); - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 10); - }); - - cb(); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 20); - }); - - cb(); - }); - - file.write(BUFFER, CB); -}); - -test(function end() { - var CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'end', function (cb) { - gently.expect(file, 'emit', function (event) { - assert.equal(event, 'end'); - }); - - CB_STUB = gently.expect(function endCb() { - }); - - cb(); - }); - - file.end(CB); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-incoming-form.js deleted file mode 100644 index 84de439e..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-incoming-form.js +++ /dev/null @@ -1,727 +0,0 @@ -var common = require('../common'); -var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'), - QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'), - EventEmitterStub = GENTLY.stub('events', 'EventEmitter'), - StreamStub = GENTLY.stub('stream', 'Stream'), - FileStub = GENTLY.stub('./file'); - -var formidable = require(common.lib + '/index'), - IncomingForm = formidable.IncomingForm, - events = require('events'), - fs = require('fs'), - path = require('path'), - Buffer = require('buffer').Buffer, - fixtures = require(TEST_FIXTURES + '/multipart'), - form, - gently; - -function test(test) { - gently = new Gently(); - gently.expect(EventEmitterStub, 'call'); - form = new IncomingForm(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.strictEqual(form.error, null); - assert.strictEqual(form.ended, false); - assert.strictEqual(form.type, null); - assert.strictEqual(form.headers, null); - assert.strictEqual(form.keepExtensions, false); - assert.strictEqual(form.uploadDir, '/tmp'); - assert.strictEqual(form.encoding, 'utf-8'); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024); - assert.strictEqual(form._parser, null); - assert.strictEqual(form._flushing, 0); - assert.strictEqual(form._fieldsSize, 0); - assert.ok(form instanceof EventEmitterStub); - assert.equal(form.constructor.name, 'IncomingForm'); - - (function testSimpleConstructor() { - gently.expect(EventEmitterStub, 'call'); - var form = IncomingForm(); - assert.ok(form instanceof IncomingForm); - })(); - - (function testSimpleConstructorShortcut() { - gently.expect(EventEmitterStub, 'call'); - var form = formidable(); - assert.ok(form instanceof IncomingForm); - })(); -}); - -test(function parse() { - var REQ = {headers: {}} - , emit = {}; - - gently.expect(form, 'writeHeaders', function(headers) { - assert.strictEqual(headers, REQ.headers); - }); - - var events = ['error', 'aborted', 'data', 'end']; - gently.expect(REQ, 'on', events.length, function(event, fn) { - assert.equal(event, events.shift()); - emit[event] = fn; - return this; - }); - - form.parse(REQ); - - (function testPause() { - gently.expect(REQ, 'pause'); - assert.strictEqual(form.pause(), true); - })(); - - (function testPauseCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testPauseHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testResume() { - gently.expect(REQ, 'resume'); - assert.strictEqual(form.resume(), true); - })(); - - (function testResumeCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testResumeHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testEmitError() { - var ERR = new Error('something bad happened'); - gently.expect(form, '_error',function(err) { - assert.strictEqual(err, ERR); - }); - emit.error(ERR); - })(); - - (function testEmitAborted() { - gently.expect(form, 'emit',function(event) { - assert.equal(event, 'aborted'); - }); - - emit.aborted(); - })(); - - - (function testEmitData() { - var BUFFER = [1, 2, 3]; - gently.expect(form, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - }); - emit.data(BUFFER); - })(); - - (function testEmitEnd() { - form._parser = {}; - - (function testWithError() { - var ERR = new Error('haha'); - gently.expect(form._parser, 'end', function() { - return ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - emit.end(); - })(); - - (function testWithoutError() { - gently.expect(form._parser, 'end'); - emit.end(); - })(); - - (function testAfterError() { - form.error = true; - emit.end(); - })(); - })(); - - (function testWithCallback() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(), - REQ = {headers: {}}, - parseCalled = 0; - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - gently.expect(form, 'on', 4, function(event, fn) { - if (event == 'field') { - fn('field1', 'foo'); - fn('field1', 'bar'); - fn('field2', 'nice'); - } - - if (event == 'file') { - fn('file1', '1'); - fn('file1', '2'); - fn('file2', '3'); - } - - if (event == 'end') { - fn(); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbOk(err, fields, files) { - assert.deepEqual(fields, {field1: 'bar', field2: 'nice'}); - assert.deepEqual(files, {file1: '2', file2: '3'}); - })); - - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - var ERR = new Error('test'); - gently.expect(form, 'on', 3, function(event, fn) { - if (event == 'field') { - fn('foo', 'bar'); - } - - if (event == 'error') { - fn(ERR); - gently.expect(form, 'on'); - } - return this; - }); - - form.parse(REQ, gently.expect(function parseCbErr(err, fields, files) { - assert.strictEqual(err, ERR); - assert.deepEqual(fields, {foo: 'bar'}); - })); - })(); -}); - -test(function pause() { - assert.strictEqual(form.pause(), false); -}); - -test(function resume() { - assert.strictEqual(form.resume(), false); -}); - - -test(function writeHeaders() { - var HEADERS = {}; - gently.expect(form, '_parseContentLength'); - gently.expect(form, '_parseContentType'); - - form.writeHeaders(HEADERS); - assert.strictEqual(form.headers, HEADERS); -}); - -test(function write() { - var parser = {}, - BUFFER = [1, 2, 3]; - - form._parser = parser; - form.bytesExpected = 523423; - - (function testBasic() { - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, BUFFER.length); - assert.equal(bytesExpected, form.bytesExpected); - }); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length; - }); - - assert.equal(form.write(BUFFER), BUFFER.length); - assert.equal(form.bytesReceived, BUFFER.length); - })(); - - (function testParserError() { - gently.expect(form, 'emit'); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length - 1; - }); - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/parser error/i)); - }); - - assert.equal(form.write(BUFFER), BUFFER.length - 1); - assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length); - })(); - - (function testUninitialized() { - delete form._parser; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unintialized parser/i)); - }); - form.write(BUFFER); - })(); -}); - -test(function parseContentType() { - var HEADERS = {}; - - form.headers = {'content-type': 'application/x-www-form-urlencoded'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - // accept anything that has 'urlencoded' in it - form.headers = {'content-type': 'broken-client/urlencoded-stupid'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - var BOUNDARY = '---------------------------57814261102167618332366269'; - form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - - (function testQuotedBoundary() { - form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - })(); - - (function testNoBoundary() { - form.headers = {'content-type': 'multipart/form-data'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no multipart boundary/i)); - }); - form._parseContentType(); - })(); - - (function testNoContentType() { - form.headers = {}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no content-type/i)); - }); - form._parseContentType(); - })(); - - (function testUnknownContentType() { - form.headers = {'content-type': 'invalid'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unknown content-type/i)); - }); - form._parseContentType(); - })(); -}); - -test(function parseContentLength() { - var HEADERS = {}; - - form.headers = {}; - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - - form.headers['content-length'] = '8'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, 0); - assert.strictEqual(form.bytesExpected, 8); - - // JS can be evil, lets make sure we are not - form.headers['content-length'] = '08'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesExpected, 8); -}); - -test(function _initMultipart() { - var BOUNDARY = '123', - PARSER; - - gently.expect(MultipartParserStub, 'new', function() { - PARSER = this; - }); - - gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - - form._initMultipart(BOUNDARY); - assert.equal(form.type, 'multipart'); - assert.strictEqual(form._parser, PARSER); - - (function testRegularField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.strictEqual(part, PART); - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field1"' - , 'foo': 'bar' - } - ); - assert.equal(part.name, 'field1'); - - var strings = ['hello', ' world']; - gently.expect(part, 'emit', 2, function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), strings.shift()); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10); - PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('foo'), 0, 3); - PARSER.onHeaderValue(new Buffer('bar'), 0, 3); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('hello world'), 0, 5); - PARSER.onPartData(new Buffer('hello world'), 5, 11); - PARSER.onPartEnd(); - })(); - - (function testFileField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"' - , 'content-type': 'text/plain' - } - ); - assert.equal(part.name, 'field2'); - assert.equal(part.filename, 'Sun"et.jpg'); - assert.equal(part.mime, 'text/plain'); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), '... contents of file1.txt ...'); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12); - PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29); - PARSER.onPartEnd(); - })(); - - (function testEnd() { - gently.expect(form, '_maybeEnd'); - PARSER.onEnd(); - assert.ok(form.ended); - })(); -}); - -test(function _fileName() { - // TODO - return; -}); - -test(function _initUrlencoded() { - var PARSER; - - gently.expect(QuerystringParserStub, 'new', function() { - PARSER = this; - }); - - form._initUrlencoded(); - assert.equal(form.type, 'urlencoded'); - assert.strictEqual(form._parser, PARSER); - - (function testOnField() { - var KEY = 'KEY', VAL = 'VAL'; - gently.expect(form, 'emit', function(field, key, val) { - assert.equal(field, 'field'); - assert.equal(key, KEY); - assert.equal(val, VAL); - }); - - PARSER.onField(KEY, VAL); - })(); - - (function testOnEnd() { - gently.expect(form, '_maybeEnd'); - - PARSER.onEnd(); - assert.equal(form.ended, true); - })(); -}); - -test(function _error() { - var ERR = new Error('bla'); - - gently.expect(form, 'pause'); - gently.expect(form, 'emit', function(event, err) { - assert.equal(event, 'error'); - assert.strictEqual(err, ERR); - }); - - form._error(ERR); - assert.strictEqual(form.error, ERR); - - // make sure _error only does its thing once - form._error(ERR); -}); - -test(function onPart() { - var PART = {}; - gently.expect(form, 'handlePart', function(part) { - assert.strictEqual(part, PART); - }); - - form.onPart(PART); -}); - -test(function handlePart() { - (function testUtf8Field() { - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field'); - assert.equal(value, 'hello world: €'); - }); - - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testBinaryField() { - var PART = new events.EventEmitter(); - PART.name = 'my_field2'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field2'); - assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary')); - }); - - form.encoding = 'binary'; - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testFieldSize() { - form.maxFieldsSize = 8; - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, '_error', function(err) { - assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data'); - }); - - form.handlePart(PART); - form._fieldsSize = 1; - PART.emit('data', new Buffer(7)); - PART.emit('data', new Buffer(1)); - })(); - - (function testFilePart() { - var PART = new events.EventEmitter(), - FILE = new events.EventEmitter(), - PATH = '/foo/bar'; - - PART.name = 'my_file'; - PART.filename = 'sweet.txt'; - PART.mime = 'sweet.txt'; - - gently.expect(form, '_uploadPath', function(filename) { - assert.equal(filename, PART.filename); - return PATH; - }); - - gently.expect(FileStub, 'new', function(properties) { - assert.equal(properties.path, PATH); - assert.equal(properties.name, PART.filename); - assert.equal(properties.type, PART.mime); - FILE = this; - - gently.expect(form, 'emit', function (event, field, file) { - assert.equal(event, 'fileBegin'); - assert.strictEqual(field, PART.name); - assert.strictEqual(file, FILE); - }); - - gently.expect(FILE, 'open'); - }); - - form.handlePart(PART); - assert.equal(form._flushing, 1); - - var BUFFER; - gently.expect(form, 'pause'); - gently.expect(FILE, 'write', function(buffer, cb) { - assert.strictEqual(buffer, BUFFER); - gently.expect(form, 'resume'); - // @todo handle cb(new Err) - cb(); - }); - - PART.emit('data', BUFFER = new Buffer('test')); - - gently.expect(FILE, 'end', function(cb) { - gently.expect(form, 'emit', function(event, field, file) { - assert.equal(event, 'file'); - assert.strictEqual(file, FILE); - }); - - gently.expect(form, '_maybeEnd'); - - cb(); - assert.equal(form._flushing, 0); - }); - - PART.emit('end'); - })(); -}); - -test(function _uploadPath() { - (function testUniqueId() { - var UUID_A, UUID_B; - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - assert.equal(uploadDir, form.uploadDir); - UUID_A = uuid; - }); - form._uploadPath(); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - UUID_B = uuid; - }); - form._uploadPath(); - - assert.notEqual(UUID_A, UUID_B); - })(); - - (function testFileExtension() { - form.keepExtensions = true; - var FILENAME = 'foo.jpg', - EXT = '.bar'; - - gently.expect(GENTLY.hijacked.path, 'extname', function(filename) { - assert.equal(filename, FILENAME); - gently.restore(path, 'extname'); - - return EXT; - }); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) { - assert.equal(path.extname(name), EXT); - }); - form._uploadPath(FILENAME); - })(); -}); - -test(function _maybeEnd() { - gently.expect(form, 'emit', 0); - form._maybeEnd(); - - form.ended = true; - form._flushing = 1; - form._maybeEnd(); - - gently.expect(form, 'emit', function(event) { - assert.equal(event, 'end'); - }); - - form.ended = true; - form._flushing = 0; - form._maybeEnd(); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-multipart-parser.js b/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-multipart-parser.js deleted file mode 100644 index d8dc968c..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('../common'); -var multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - events = require('events'), - Buffer = require('buffer').Buffer, - parser; - -function test(test) { - parser = new MultipartParser(); - test(); -} - -test(function constructor() { - assert.equal(parser.boundary, null); - assert.equal(parser.state, 0); - assert.equal(parser.flags, 0); - assert.equal(parser.boundaryChars, null); - assert.equal(parser.index, null); - assert.equal(parser.lookbehind, null); - assert.equal(parser.constructor.name, 'MultipartParser'); -}); - -test(function initWithBoundary() { - var boundary = 'abc'; - parser.initWithBoundary(boundary); - assert.deepEqual(Array.prototype.slice.call(parser.boundary), [13, 10, 45, 45, 97, 98, 99]); - assert.equal(parser.state, multipartParser.START); - - assert.deepEqual(parser.boundaryChars, {10: true, 13: true, 45: true, 97: true, 98: true, 99: true}); -}); - -test(function parserError() { - var boundary = 'abc', - buffer = new Buffer(5); - - parser.initWithBoundary(boundary); - buffer.write('--ad', 'ascii', 0); - assert.equal(parser.write(buffer), 3); -}); - -test(function end() { - (function testError() { - assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain()); - })(); - - (function testRegular() { - parser.state = multipartParser.END; - assert.strictEqual(parser.end(), undefined); - })(); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-querystring-parser.js b/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-querystring-parser.js deleted file mode 100644 index 54d3e2d5..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var QuerystringParser = require(common.lib + '/querystring_parser').QuerystringParser, - Buffer = require('buffer').Buffer, - gently, - parser; - -function test(test) { - gently = new Gently(); - parser = new QuerystringParser(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.equal(parser.buffer, ''); - assert.equal(parser.constructor.name, 'QuerystringParser'); -}); - -test(function write() { - var a = new Buffer('a=1'); - assert.equal(parser.write(a), a.length); - - var b = new Buffer('&b=2'); - parser.write(b); - assert.equal(parser.buffer, a + b); -}); - -test(function end() { - var FIELDS = {a: ['b', {c: 'd'}], e: 'f'}; - - gently.expect(GENTLY.hijacked.querystring, 'parse', function(str) { - assert.equal(str, parser.buffer); - return FIELDS; - }); - - gently.expect(parser, 'onField', Object.keys(FIELDS).length, function(key, val) { - assert.deepEqual(FIELDS[key], val); - }); - - gently.expect(parser, 'onEnd'); - - parser.buffer = 'my buffer'; - parser.end(); - assert.equal(parser.buffer, ''); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/node_modules/coalesce/node_modules/formidable/test/legacy/system/test-multi-video-upload.js deleted file mode 100644 index 479e46d6..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +++ /dev/null @@ -1,75 +0,0 @@ -var common = require('../common'); -var BOUNDARY = '---------------------------10102754414578508781458777923', - FIXTURE = TEST_FIXTURES+'/multi_video.upload', - fs = require('fs'), - util = require(common.lib + '/util'), - http = require('http'), - formidable = require(common.lib + '/index'), - server = http.createServer(); - -server.on('request', function(req, res) { - var form = new formidable.IncomingForm(), - uploads = {}; - - form.uploadDir = TEST_TMP; - form.hash = 'sha1'; - form.parse(req); - - form - .on('fileBegin', function(field, file) { - assert.equal(field, 'upload'); - - var tracker = {file: file, progress: [], ended: false}; - uploads[file.filename] = tracker; - file - .on('progress', function(bytesReceived) { - tracker.progress.push(bytesReceived); - assert.equal(bytesReceived, file.length); - }) - .on('end', function() { - tracker.ended = true; - }); - }) - .on('field', function(field, value) { - assert.equal(field, 'title'); - assert.equal(value, ''); - }) - .on('file', function(field, file) { - assert.equal(field, 'upload'); - assert.strictEqual(uploads[file.filename].file, file); - }) - .on('end', function() { - assert.ok(uploads['shortest_video.flv']); - assert.ok(uploads['shortest_video.flv'].ended); - assert.ok(uploads['shortest_video.flv'].progress.length > 3); - assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a'); - assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.length); - assert.ok(uploads['shortest_video.mp4']); - assert.ok(uploads['shortest_video.mp4'].ended); - assert.ok(uploads['shortest_video.mp4'].progress.length > 3); - assert.equal(uploads['shortest_video.mp4'].file.hash, '937dfd4db263f4887ceae19341dcc8d63bcd557f'); - - server.close(); - res.writeHead(200); - res.end('good'); - }); -}); - -server.listen(TEST_PORT, function() { - var client = http.createClient(TEST_PORT), - stat = fs.statSync(FIXTURE), - headers = { - 'content-type': 'multipart/form-data; boundary='+BOUNDARY, - 'content-length': stat.size, - } - request = client.request('POST', '/', headers), - fixture = new fs.ReadStream(FIXTURE); - - fixture - .on('data', function(b) { - request.write(b); - }) - .on('end', function() { - request.end(); - }); -}); diff --git a/node_modules/coalesce/node_modules/formidable/test/run.js b/node_modules/coalesce/node_modules/formidable/test/run.js deleted file mode 100644 index 50b23610..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/run.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('urun')(__dirname) diff --git a/node_modules/coalesce/node_modules/formidable/test/unit/test-incoming-form.js b/node_modules/coalesce/node_modules/formidable/test/unit/test-incoming-form.js deleted file mode 100644 index fe2ac1c6..00000000 --- a/node_modules/coalesce/node_modules/formidable/test/unit/test-incoming-form.js +++ /dev/null @@ -1,63 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var IncomingForm = common.require('incoming_form').IncomingForm; -var path = require('path'); - -var form; -test('IncomingForm', { - before: function() { - form = new IncomingForm(); - }, - - '#_fileName with regular characters': function() { - var filename = 'foo.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'foo.txt'); - }, - - '#_fileName with unescaped quote': function() { - var filename = 'my".txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with escaped quote': function() { - var filename = 'my%22.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with bad quote and additional sub-header': function() { - var filename = 'my".txt'; - var header = makeHeader(filename) + '; foo="bar"'; - assert.equal(form._fileName(header), filename); - }, - - '#_fileName with semicolon': function() { - var filename = 'my;.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my;.txt'); - }, - - '#_fileName with utf8 character': function() { - var filename = 'my☃.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my☃.txt'); - }, - - '#_uploadPath strips harmful characters from extension when keepExtensions': function() { - form.keepExtensions = true; - - var ext = path.extname(form._uploadPath('fine.jpg?foo=bar')); - assert.equal(ext, '.jpg'); - - var ext = path.extname(form._uploadPath('fine?foo=bar')); - assert.equal(ext, ''); - - var ext = path.extname(form._uploadPath('super.cr2+dsad')); - assert.equal(ext, '.cr2'); - - var ext = path.extname(form._uploadPath('super.bar')); - assert.equal(ext, '.bar'); - }, -}); - -function makeHeader(filename) { - return 'Content-Disposition: form-data; name="upload"; filename="' + filename + '"'; -} diff --git a/node_modules/coalesce/node_modules/formidable/tool/record.js b/node_modules/coalesce/node_modules/formidable/tool/record.js deleted file mode 100644 index 9f1cef86..00000000 --- a/node_modules/coalesce/node_modules/formidable/tool/record.js +++ /dev/null @@ -1,47 +0,0 @@ -var http = require('http'); -var fs = require('fs'); -var connections = 0; - -var server = http.createServer(function(req, res) { - var socket = req.socket; - console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
'+ - '
'+ - '
'+ - ''+ - '
' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/node_modules/coalesce/node_modules/node-static/.npmignore b/node_modules/coalesce/node_modules/node-static/.npmignore deleted file mode 100644 index 073cfe29..00000000 --- a/node_modules/coalesce/node_modules/node-static/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -npm-debug.log -node_modules - diff --git a/node_modules/coalesce/node_modules/node-static/LICENSE b/node_modules/coalesce/node_modules/node-static/LICENSE deleted file mode 100644 index 91f6632d..00000000 --- a/node_modules/coalesce/node_modules/node-static/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2010 Alexis Sellier - -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/node-static/README.md b/node_modules/coalesce/node_modules/node-static/README.md deleted file mode 100644 index ccf25740..00000000 --- a/node_modules/coalesce/node_modules/node-static/README.md +++ /dev/null @@ -1,201 +0,0 @@ -node-static -=========== - -> a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org) - -node-static has an in-memory file cache, making it highly efficient. -node-static understands and supports *conditional GET* and *HEAD* requests. -node-static was inspired by some of the other static-file serving modules out there, -such as node-paperboy and antinode. - -Synopsis --------- - - var static = require('node-static'); - - // - // Create a node-static server instance to serve the './public' folder - // - var file = new static.Server('./public'); - - require('http').createServer(function (request, response) { - request.addListener('end', function () { - // - // Serve files! - // - file.serve(request, response); - }).resume(); - }).listen(8080); - -API ---- - -### Creating a node-static Server # - -Creating a file server instance is as simple as: - - new static.Server(); - -This will serve files in the current directory. If you want to serve files in a specific -directory, pass it as the first argument: - - new static.Server('./public'); - -You can also specify how long the client is supposed to cache the files node-static serves: - - new static.Server('./public', { cache: 3600 }); - -This will set the `Cache-Control` header, telling clients to cache the file for an hour. -This is the default setting. - -### Serving files under a directory # - -To serve files under a directory, simply call the `serve` method on a `Server` instance, passing it -the HTTP request and response object: - - var static = require('node-static'); - - var fileServer = new static.Server('./public'); - - require('http').createServer(function (request, response) { - request.addListener('end', function () { - fileServer.serve(request, response); - }).resume(); - }).listen(8080); - -### Serving specific files # - -If you want to serve a specific file, like an error page for example, use the `serveFile` method: - - fileServer.serveFile('/error.html', 500, {}, request, response); - -This will serve the `error.html` file, from under the file root directory, with a `500` status code. -For example, you could serve an error page, when the initial request wasn't found: - - require('http').createServer(function (request, response) { - request.addListener('end', function () { - fileServer.serve(request, response, function (e, res) { - if (e && (e.status === 404)) { // If the file wasn't found - fileServer.serveFile('/not-found.html', 404, {}, request, response); - } - }); - }).resume(); - }).listen(8080); - -More on intercepting errors bellow. - -### Intercepting errors & Listening # - -An optional callback can be passed as last argument, it will be called every time a file -has been served successfully, or if there was an error serving the file: - - var static = require('node-static'); - - var fileServer = new static.Server('./public'); - - require('http').createServer(function (request, response) { - request.addListener('end', function () { - fileServer.serve(request, response, function (err, result) { - if (err) { // There was an error serving the file - sys.error("Error serving " + request.url + " - " + err.message); - - // Respond to the client - response.writeHead(err.status, err.headers); - response.end(); - } - }); - }).resume(); - }).listen(8080); - -Note that if you pass a callback, and there is an error serving the file, node-static -*will not* respond to the client. This gives you the opportunity to re-route the request, -or handle it differently. - -For example, you may want to interpret a request as a static request, but if the file isn't found, -send it to an application. - -If you only want to *listen* for errors, you can use *event listeners*: - - fileServer.serve(request, response).addListener('error', function (err) { - sys.error("Error serving " + request.url + " - " + err.message); - }); - -With this method, you don't have to explicitly send the response back, in case of an error. - -### Options when creating an instance of `Server` # - -#### `cache` # - -Sets the `Cache-Control` header. - -example: `{ cache: 7200 }` - -Passing a number will set the cache duration to that number of seconds. -Passing `false` will disable the `Cache-Control` header. - -> Defaults to `3600` - - -#### `serverInfo` # - -Sets the `Server` header. - -example: `{ serverInfo: "myserver" }` - -> Defaults to `node-static/{version}` - -#### `headers` # - -Sets response headers. - -example: `{ 'X-Hello': 'World!' }` - -> defaults to `{}` - -#### `gzip` # - -Enable support for sending compressed responses. This will enable a check for a -file with the same name plus '.gz' in the same folder. If the compressed file is -found and the client has indicated support for gzip file transfer, the contents -of the .gz file will be sent in place of the uncompressed file along with a -Content-Encoding: gzip header to inform the client the data has been compressed. - -example: `{ gzip: true }` -example: `{ gzip: /^\/text/ }` - -Passing `true` will enable this check for all files. -Passing a RegExp instance will only enable this check if the content-type of the -respond would match that RegExp using its test() method. - -> Defaults to `false` - - -Command Line Interface ----------------------- - -`node-static` also provides a CLI. - -### Installation # - - $ npm install -g node-static - -### Example Usage # - - # serve up the current directory - $ static - serving "." at http://127.0.0.1:8080 - - # serve up a different directory - $ static public - serving "public" at http://127.0.0.1:8080 - - # specify additional headers (this one is useful for development) - $ static -H '{"Cache-Control": "no-cache, must-revalidate"}' - serving "." at http://127.0.0.1:8080 - - # set cache control max age - $ static -c 7200 - serving "." at http://127.0.0.1:8080 - - # show help message, including all options - $ static -h diff --git a/node_modules/coalesce/node_modules/node-static/benchmark/node-static-0.3.0.txt b/node_modules/coalesce/node_modules/node-static/benchmark/node-static-0.3.0.txt deleted file mode 100644 index c6083ea5..00000000 --- a/node_modules/coalesce/node_modules/node-static/benchmark/node-static-0.3.0.txt +++ /dev/null @@ -1,43 +0,0 @@ -This is ApacheBench, Version 2.3 <$Revision: 655654 $> -Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ -Licensed to The Apache Software Foundation, http://www.apache.org/ - -Benchmarking 127.0.0.1 (be patient) - - -Server Software: node-static/0.3.0 -Server Hostname: 127.0.0.1 -Server Port: 8080 - -Document Path: /lib/node-static.js -Document Length: 6038 bytes - -Concurrency Level: 20 -Time taken for tests: 2.323 seconds -Complete requests: 10000 -Failed requests: 0 -Write errors: 0 -Total transferred: 63190000 bytes -HTML transferred: 60380000 bytes -Requests per second: 4304.67 [#/sec] (mean) -Time per request: 4.646 [ms] (mean) -Time per request: 0.232 [ms] (mean, across all concurrent requests) -Transfer rate: 26563.66 [Kbytes/sec] received - -Connection Times (ms) - min mean[+/-sd] median max -Connect: 0 0 0.2 0 3 -Processing: 1 4 1.4 4 28 -Waiting: 1 4 1.3 4 18 -Total: 2 5 1.5 4 28 - -Percentage of the requests served within a certain time (ms) - 50% 4 - 66% 5 - 75% 5 - 80% 5 - 90% 5 - 95% 6 - 98% 8 - 99% 9 - 100% 28 (longest request) diff --git a/node_modules/coalesce/node_modules/node-static/bin/cli.js b/node_modules/coalesce/node_modules/node-static/bin/cli.js deleted file mode 100644 index 632b112c..00000000 --- a/node_modules/coalesce/node_modules/node-static/bin/cli.js +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/env node - -var fs = require('fs'), - path = require('path'), - tty = require('tty'), - statik = require('./../lib/node-static'); - - var argv = require('optimist') - .usage([ - 'USAGE: $0 [-p ] []', - 'simple, rfc 2616 compliant file streaming module for node'] - .join('\n\n')) - .option('port', { - alias: 'p', - 'default': 8080, - description: 'TCP port at which the files will be served' - }) - .option('cache', { - alias: 'c', - description: '"Cache-Control" header setting, defaults to 3600' - }) - .option('version', { - alias: 'v', - description: 'node-static version' - }) - .option('headers', { - alias: 'H', - description: 'additional headers (in JSON format)' - }) - .option('header-file', { - alias: 'f', - description: 'JSON file of additional headers' - }) - .option('help', { - alias: 'h', - description: 'display this help message' - }) - .argv; - - var dir = argv._[0] || '.'; - - var trainwreck = fs.readFileSync(path.join(__dirname, '../etc/trainwreck.jpg')), - notFound = fs.readFileSync(path.join(__dirname, '../etc/404.html')) - .toString() - .replace('{{trainwreck}}', trainwreck.toString('base64')); - - var colors = require('colors'); - - var log = function(request, response, statusCode) { - var d = new Date(); - var seconds = d.getSeconds() < 10? '0'+d.getSeconds() : d.getSeconds(), - datestr = d.getHours() + ':' + d.getMinutes() + ':' + seconds, - line = datestr + ' [' + response.statusCode + ']: ' + request.url, - colorized = line; - if (tty.isatty(process.stdout.fd)) - colorized = (response.statusCode >= 500) ? line.red.bold : - (response.statusCode >= 400) ? line.red : - line; - console.log(colorized); - }; - - var file, options; - -if (argv.help){ - require('optimist').showHelp(console.log); - process.exit(0); -} - -if (argv.version){ - console.log('node-static', statik.version.join('.')); - process.exit(0); -} - -if (argv.cache){ - (options = options || {}).cache = argv.cache; -} - -if (argv.headers){ - (options = options || {}).headers = JSON.parse(argv.headers); -} - -if (argv['header-file']){ - (options = options || {}).headers = - JSON.parse(fs.readFileSync(argv['header-file'])); -} - -file = new(statik.Server)(dir, options); - -require('http').createServer(function (request, response) { - request.addListener('end', function () { - file.serve(request, response, function(e, rsp) { - if (e && e.status === 404) { - response.writeHead(e.status, e.headers); - response.end(notFound); - log(request, response); - } else { - log(request, response); - } - }); - }).resume(); -}).listen(+argv.port); - -console.log('serving "' + dir + '" at http://127.0.0.1:' + argv.port); - diff --git a/node_modules/coalesce/node_modules/node-static/etc/404.html b/node_modules/coalesce/node_modules/node-static/etc/404.html deleted file mode 100644 index 147aeb10..00000000 --- a/node_modules/coalesce/node_modules/node-static/etc/404.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -

not found

-

don't worry though, it could be worse.

- - - diff --git a/node_modules/coalesce/node_modules/node-static/etc/trainwreck.jpg b/node_modules/coalesce/node_modules/node-static/etc/trainwreck.jpg deleted file mode 100644 index ac85b635..00000000 Binary files a/node_modules/coalesce/node_modules/node-static/etc/trainwreck.jpg and /dev/null differ diff --git a/node_modules/coalesce/node_modules/node-static/examples/file-server.js b/node_modules/coalesce/node_modules/node-static/examples/file-server.js deleted file mode 100644 index 4f0796e7..00000000 --- a/node_modules/coalesce/node_modules/node-static/examples/file-server.js +++ /dev/null @@ -1,20 +0,0 @@ -var static = require('../lib/node-static'); - -// -// Create a node-static server to serve the current directory -// -var file = new static.Server('.', { cache: 7200, headers: {'X-Hello':'World!'} }); - -require('http').createServer(function (request, response) { - file.serve(request, response, function (err, res) { - if (err) { // An error as occured - console.error("> Error serving " + request.url + " - " + err.message); - response.writeHead(err.status, err.headers); - response.end(); - } else { // The file was served successfully - console.log("> " + request.url + " - " + res.message); - } - }); -}).listen(8080); - -console.log("> node-static is listening on http://127.0.0.1:8080"); diff --git a/node_modules/coalesce/node_modules/node-static/lib/node-static.js b/node_modules/coalesce/node_modules/node-static/lib/node-static.js deleted file mode 100644 index 5e0cc3c6..00000000 --- a/node_modules/coalesce/node_modules/node-static/lib/node-static.js +++ /dev/null @@ -1,329 +0,0 @@ -var fs = require('fs') - , events = require('events') - , buffer = require('buffer') - , http = require('http') - , url = require('url') - , path = require('path') - , mime = require('mime') - , util = require('./node-static/util'); - -// Current version -var version = [0, 7, 1]; - -Server = function (root, options) { - if (root && (typeof(root) === 'object')) { options = root; root = null } - - this.root = path.resolve(root || '.'); - this.options = options || {}; - this.cache = 3600; - - this.defaultHeaders = {}; - this.options.headers = this.options.headers || {}; - - if ('cache' in this.options) { - if (typeof(this.options.cache) === 'number') { - this.cache = this.options.cache; - } else if (! this.options.cache) { - this.cache = false; - } - } - - if ('serverInfo' in this.options) { - this.serverInfo = this.options.serverInfo.toString(); - } else { - this.serverInfo = 'node-static/' + version.join('.'); - } - - this.defaultHeaders['server'] = this.serverInfo; - - if (this.cache !== false) { - this.defaultHeaders['cache-control'] = 'max-age=' + this.cache; - } - - for (var k in this.defaultHeaders) { - this.options.headers[k] = this.options.headers[k] || - this.defaultHeaders[k]; - } -}; - -Server.prototype.serveDir = function (pathname, req, res, finish) { - var htmlIndex = path.join(pathname, 'index.html'), - that = this; - - fs.stat(htmlIndex, function (e, stat) { - if (!e) { - var status = 200; - var headers = {}; - var originalPathname = decodeURI(url.parse(req.url).pathname); - if (originalPathname.length && originalPathname.charAt(originalPathname.length - 1) !== '/') { - return finish(301, { 'Location': originalPathname + '/' }); - } else { - that.respond(null, status, headers, [htmlIndex], stat, req, res, finish); - } - } else { - // Stream a directory of files as a single file. - fs.readFile(path.join(pathname, 'index.json'), function (e, contents) { - if (e) { return finish(404, {}) } - var index = JSON.parse(contents); - streamFiles(index.files); - }); - } - }); - function streamFiles(files) { - util.mstat(pathname, files, function (e, stat) { - if (e) { return finish(404, {}) } - that.respond(pathname, 200, {}, files, stat, req, res, finish); - }); - } -}; - -Server.prototype.serveFile = function (pathname, status, headers, req, res) { - var that = this; - var promise = new(events.EventEmitter); - - pathname = this.resolve(pathname); - - fs.stat(pathname, function (e, stat) { - if (e) { - return promise.emit('error', e); - } - that.respond(null, status, headers, [pathname], stat, req, res, function (status, headers) { - that.finish(status, headers, req, res, promise); - }); - }); - return promise; -}; - -Server.prototype.finish = function (status, headers, req, res, promise, callback) { - var result = { - status: status, - headers: headers, - message: http.STATUS_CODES[status] - }; - - headers['server'] = this.serverInfo; - - if (!status || status >= 400) { - if (callback) { - callback(result); - } else { - if (promise.listeners('error').length > 0) { - promise.emit('error', result); - } - else { - res.writeHead(status, headers); - res.end(); - } - } - } else { - // Don't end the request here, if we're streaming; - // it's taken care of in `prototype.stream`. - if (status !== 200 || req.method !== 'GET') { - res.writeHead(status, headers); - res.end(); - } - callback && callback(null, result); - promise.emit('success', result); - } -}; - -Server.prototype.servePath = function (pathname, status, headers, req, res, finish) { - var that = this, - promise = new(events.EventEmitter); - - pathname = this.resolve(pathname); - - // Only allow GET and HEAD requests - if (req.method !== 'GET' && req.method !== 'HEAD') { - finish(405, { 'Allow': 'GET, HEAD' }); - return promise; - } - - // Make sure we're not trying to access a - // file outside of the root. - if (pathname.indexOf(that.root) === 0) { - fs.stat(pathname, function (e, stat) { - if (e) { - finish(404, {}); - } else if (stat.isFile()) { // Stream a single file. - that.respond(null, status, headers, [pathname], stat, req, res, finish); - } else if (stat.isDirectory()) { // Stream a directory of files. - that.serveDir(pathname, req, res, finish); - } else { - finish(400, {}); - } - }); - } else { - // Forbidden - finish(403, {}); - } - return promise; -}; - -Server.prototype.resolve = function (pathname) { - return path.resolve(path.join(this.root, pathname)); -}; - -Server.prototype.serve = function (req, res, callback) { - var that = this, - promise = new(events.EventEmitter), - pathname; - - var finish = function (status, headers) { - that.finish(status, headers, req, res, promise, callback); - }; - - try { - pathname = decodeURI(url.parse(req.url).pathname); - } - catch(e) { - return process.nextTick(function() { - return finish(400, {}); - }); - } - - process.nextTick(function () { - that.servePath(pathname, 200, {}, req, res, finish).on('success', function (result) { - promise.emit('success', result); - }).on('error', function (err) { - promise.emit('error'); - }); - }); - if (! callback) { return promise } -}; - -/* Check if we should consider sending a gzip version of the file based on the - * file content type and client's Accept-Encoding header value. - */ -Server.prototype.gzipOk = function(req, contentType) { - var enable = this.options.gzip; - if(enable && - (typeof enable === 'boolean' || - (contentType && (enable instanceof RegExp) && enable.test(contentType)))) { - var acceptEncoding = req.headers['accept-encoding']; - return acceptEncoding && acceptEncoding.indexOf("gzip") >= 0; - } - return false; -} - -/* Send a gzipped version of the file if the options and the client indicate gzip is enabled and - * we find a .gz file mathing the static resource requested. - */ -Server.prototype.respondGzip = function(pathname, status, contentType, _headers, files, stat, req, res, finish) { - var that = this; - if(files.length == 1 && this.gzipOk(req, contentType)) { - var gzFile = files[0] + ".gz"; - fs.stat(gzFile, function(e, gzStat) { - if(!e && gzStat.isFile()) { - //console.log('Serving', gzFile, 'to gzip-capable client instead of', files[0], 'new size is', gzStat.size, 'uncompressed size', stat.size); - var vary = _headers['Vary']; - _headers['Vary'] = (vary && vary != 'Accept-Encoding'?vary+', ':'')+'Accept-Encoding'; - _headers['Content-Encoding'] = 'gzip'; - stat.size = gzStat.size; - files = [gzFile]; - } else { - //console.log('gzip file not found or error finding it', gzFile, String(e), stat.isFile()); - } - that.respondNoGzip(pathname, status, contentType, _headers, files, stat, req, res, finish); - }); - } else { - // Client doesn't want gzip or we're sending multiple files - that.respondNoGzip(pathname, status, contentType, _headers, files, stat, req, res, finish); - } -} - -Server.prototype.respondNoGzip = function (pathname, status, contentType, _headers, files, stat, req, res, finish) { - var mtime = Date.parse(stat.mtime), - key = pathname || files[0], - headers = {}, - clientETag = req.headers['if-none-match'], - clientMTime = Date.parse(req.headers['if-modified-since']); - - - // Copy default headers - for (var k in this.options.headers) { headers[k] = this.options.headers[k] } - // Copy custom headers - for (var k in _headers) { headers[k] = _headers[k] } - - headers['Etag'] = JSON.stringify([stat.ino, stat.size, mtime].join('-')); - headers['Date'] = new(Date)().toUTCString(); - headers['Last-Modified'] = new(Date)(stat.mtime).toUTCString(); - headers['Content-Type'] = contentType; - headers['Content-Length'] = stat.size; - - for (var k in _headers) { headers[k] = _headers[k] } - - // Conditional GET - // If the "If-Modified-Since" or "If-None-Match" headers - // match the conditions, send a 304 Not Modified. - if ((clientMTime || clientETag) && - (!clientETag || clientETag === headers['Etag']) && - (!clientMTime || clientMTime >= mtime)) { - // 304 response should not contain entity headers - ['Content-Encoding', - 'Content-Language', - 'Content-Length', - 'Content-Location', - 'Content-MD5', - 'Content-Range', - 'Content-Type', - 'Expires', - 'Last-Modified'].forEach(function(entityHeader) { - delete headers[entityHeader]; - }); - finish(304, headers); - } else { - res.writeHead(status, headers); - - this.stream(pathname, files, new(buffer.Buffer)(stat.size), res, function (e, buffer) { - if (e) { return finish(500, {}) } - finish(status, headers); - }); - } -}; - -Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) { - var contentType = _headers['Content-Type'] || - mime.lookup(files[0]) || - 'application/octet-stream'; - if(this.options.gzip) { - this.respondGzip(pathname, status, contentType, _headers, files, stat, req, res, finish); - } else { - this.respondNoGzip(pathname, status, contentType, _headers, files, stat, req, res, finish); - } -} - -Server.prototype.stream = function (pathname, files, buffer, res, callback) { - (function streamFile(files, offset) { - var file = files.shift(); - - if (file) { - file = file[0] === '/' ? file : path.join(pathname || '.', file); - - // Stream the file to the client - fs.createReadStream(file, { - flags: 'r', - mode: 0666 - }).on('data', function (chunk) { - chunk.copy(buffer, offset); - offset += chunk.length; - }).on('close', function () { - streamFile(files, offset); - }).on('error', function (err) { - callback(err); - console.error(err); - }).pipe(res, { end: false }); - } else { - res.end(); - callback(null, buffer, offset); - } - })(files.slice(0), 0); -}; - -// Exports -exports.Server = Server; -exports.version = version; -exports.mime = mime; - - - diff --git a/node_modules/coalesce/node_modules/node-static/lib/node-static/util.js b/node_modules/coalesce/node_modules/node-static/lib/node-static/util.js deleted file mode 100644 index 02de548d..00000000 --- a/node_modules/coalesce/node_modules/node-static/lib/node-static/util.js +++ /dev/null @@ -1,30 +0,0 @@ -var fs = require('fs') - , path = require('path'); - -exports.mstat = function (dir, files, callback) { - (function mstat(files, stats) { - var file = files.shift(); - - if (file) { - fs.stat(path.join(dir, file), function (e, stat) { - if (e) { - callback(e); - } else { - mstat(files, stats.concat([stat])); - } - }); - } else { - callback(null, { - size: stats.reduce(function (total, stat) { - return total + stat.size; - }, 0), - mtime: stats.reduce(function (latest, stat) { - return latest > stat.mtime ? latest : stat.mtime; - }, 0), - ino: stats.reduce(function (total, stat) { - return total + stat.ino; - }, 0) - }); - } - })(files.slice(0), []); -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/MIT-LICENSE.txt b/node_modules/coalesce/node_modules/node-static/node_modules/colors/MIT-LICENSE.txt deleted file mode 100644 index 7dca1070..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/MIT-LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2010 - -Marak Squires -Alexis Sellier (cloudhead) - -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. \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/ReadMe.md b/node_modules/coalesce/node_modules/node-static/node_modules/colors/ReadMe.md deleted file mode 100644 index 0eda52db..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/ReadMe.md +++ /dev/null @@ -1,77 +0,0 @@ -# colors.js - get color and style in your node.js console ( and browser ) like what - - - - -## Installation - - npm install colors - -## colors and styles! - -- bold -- italic -- underline -- inverse -- yellow -- cyan -- white -- magenta -- green -- red -- grey -- blue -- rainbow -- zebra -- random - -## Usage - -``` js -var colors = require('./colors'); - -console.log('hello'.green); // outputs green text -console.log('i like cake and pies'.underline.red) // outputs red underlined text -console.log('inverse the color'.inverse); // inverses the color -console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces) -``` - -# Creating Custom themes - -```js - -var colors = require('colors'); - -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); -``` - - -### Contributors - -Marak (Marak Squires) -Alexis Sellier (cloudhead) -mmalecki (Maciej MaÅ‚ecki) -nicoreed (Nico Reed) -morganrallen (Morgan Allen) -JustinCampbell (Justin Campbell) -ded (Dustin Diaz) - - -#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded) diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/colors.js b/node_modules/coalesce/node_modules/node-static/node_modules/colors/colors.js deleted file mode 100644 index 7a537d8d..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/colors.js +++ /dev/null @@ -1,342 +0,0 @@ -/* -colors.js - -Copyright (c) 2010 - -Marak Squires -Alexis Sellier (cloudhead) - -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. - -*/ - -var isHeadless = false; - -if (typeof module !== 'undefined') { - isHeadless = true; -} - -if (!isHeadless) { - var exports = {}; - var module = {}; - var colors = exports; - exports.mode = "browser"; -} else { - exports.mode = "console"; -} - -// -// Prototypes the string object to have additional method calls that add terminal colors -// -var addProperty = function (color, func) { - exports[color] = function (str) { - return func.apply(str); - }; - String.prototype.__defineGetter__(color, func); -}; - -function stylize(str, style) { - - var styles; - - if (exports.mode === 'console') { - styles = { - //styles - 'bold' : ['\x1B[1m', '\x1B[22m'], - 'italic' : ['\x1B[3m', '\x1B[23m'], - 'underline' : ['\x1B[4m', '\x1B[24m'], - 'inverse' : ['\x1B[7m', '\x1B[27m'], - 'strikethrough' : ['\x1B[9m', '\x1B[29m'], - //text colors - //grayscale - 'white' : ['\x1B[37m', '\x1B[39m'], - 'grey' : ['\x1B[90m', '\x1B[39m'], - 'black' : ['\x1B[30m', '\x1B[39m'], - //colors - 'blue' : ['\x1B[34m', '\x1B[39m'], - 'cyan' : ['\x1B[36m', '\x1B[39m'], - 'green' : ['\x1B[32m', '\x1B[39m'], - 'magenta' : ['\x1B[35m', '\x1B[39m'], - 'red' : ['\x1B[31m', '\x1B[39m'], - 'yellow' : ['\x1B[33m', '\x1B[39m'], - //background colors - //grayscale - 'whiteBG' : ['\x1B[47m', '\x1B[49m'], - 'greyBG' : ['\x1B[49;5;8m', '\x1B[49m'], - 'blackBG' : ['\x1B[40m', '\x1B[49m'], - //colors - 'blueBG' : ['\x1B[44m', '\x1B[49m'], - 'cyanBG' : ['\x1B[46m', '\x1B[49m'], - 'greenBG' : ['\x1B[42m', '\x1B[49m'], - 'magentaBG' : ['\x1B[45m', '\x1B[49m'], - 'redBG' : ['\x1B[41m', '\x1B[49m'], - 'yellowBG' : ['\x1B[43m', '\x1B[49m'] - }; - } else if (exports.mode === 'browser') { - styles = { - //styles - 'bold' : ['', ''], - 'italic' : ['', ''], - 'underline' : ['', ''], - 'inverse' : ['', ''], - 'strikethrough' : ['', ''], - //text colors - //grayscale - 'white' : ['', ''], - 'grey' : ['', ''], - 'black' : ['', ''], - //colors - 'blue' : ['', ''], - 'cyan' : ['', ''], - 'green' : ['', ''], - 'magenta' : ['', ''], - 'red' : ['', ''], - 'yellow' : ['', ''], - //background colors - //grayscale - 'whiteBG' : ['', ''], - 'greyBG' : ['', ''], - 'blackBG' : ['', ''], - //colors - 'blueBG' : ['', ''], - 'cyanBG' : ['', ''], - 'greenBG' : ['', ''], - 'magentaBG' : ['', ''], - 'redBG' : ['', ''], - 'yellowBG' : ['', ''] - }; - } else if (exports.mode === 'none') { - return str + ''; - } else { - console.log('unsupported mode, try "browser", "console" or "none"'); - } - return styles[style][0] + str + styles[style][1]; -} - -function applyTheme(theme) { - - // - // Remark: This is a list of methods that exist - // on String that you should not overwrite. - // - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', - 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', - 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight' - ]; - - Object.keys(theme).forEach(function (prop) { - if (stringPrototypeBlacklist.indexOf(prop) !== -1) { - console.log('warn: '.red + ('String.prototype' + prop).magenta + ' is probably something you don\'t want to override. Ignoring style name'); - } - else { - if (typeof(theme[prop]) === 'string') { - addProperty(prop, function () { - return exports[theme[prop]](this); - }); - } - else { - addProperty(prop, function () { - var ret = this; - for (var t = 0; t < theme[prop].length; t++) { - ret = exports[theme[prop][t]](ret); - } - return ret; - }); - } - } - }); -} - - -// -// Iterate through all default styles and colors -// -var x = ['bold', 'underline', 'strikethrough', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta', 'greyBG', 'blackBG', 'yellowBG', 'redBG', 'greenBG', 'blueBG', 'whiteBG', 'cyanBG', 'magentaBG']; -x.forEach(function (style) { - - // __defineGetter__ at the least works in more browsers - // http://robertnyman.com/javascript/javascript-getters-setters.html - // Object.defineProperty only works in Chrome - addProperty(style, function () { - return stylize(this, style); - }); -}); - -function sequencer(map) { - return function () { - if (!isHeadless) { - return this.replace(/( )/, '$1'); - } - var exploded = this.split(""), i = 0; - exploded = exploded.map(map); - return exploded.join(""); - }; -} - -var rainbowMap = (function () { - var rainbowColors = ['red', 'yellow', 'green', 'blue', 'magenta']; //RoY G BiV - return function (letter, i, exploded) { - if (letter === " ") { - return letter; - } else { - return stylize(letter, rainbowColors[i++ % rainbowColors.length]); - } - }; -})(); - -exports.themes = {}; - -exports.addSequencer = function (name, map) { - addProperty(name, sequencer(map)); -}; - -exports.addSequencer('rainbow', rainbowMap); -exports.addSequencer('zebra', function (letter, i, exploded) { - return i % 2 === 0 ? letter : letter.inverse; -}); - -exports.setTheme = function (theme) { - if (typeof theme === 'string') { - try { - exports.themes[theme] = require(theme); - applyTheme(exports.themes[theme]); - return exports.themes[theme]; - } catch (err) { - console.log(err); - return err; - } - } else { - applyTheme(theme); - } -}; - - -addProperty('stripColors', function () { - return ("" + this).replace(/\x1B\[\d+m/g, ''); -}); - -// please no -function zalgo(text, options) { - var soul = { - "up" : [ - 'Ì', 'ÌŽ', 'Ì„', 'Ì…', - 'Ì¿', 'Ì‘', '̆', 'Ì', - 'Í’', 'Í—', 'Í‘', '̇', - '̈', 'ÌŠ', 'Í‚', 'Ì“', - '̈', 'ÍŠ', 'Í‹', 'ÍŒ', - '̃', 'Ì‚', 'ÌŒ', 'Í', - 'Ì€', 'Ì', 'Ì‹', 'Ì', - 'Ì’', 'Ì“', 'Ì”', '̽', - '̉', 'Í£', 'ͤ', 'Í¥', - 'ͦ', 'ͧ', 'ͨ', 'Í©', - 'ͪ', 'Í«', 'ͬ', 'Í­', - 'Í®', 'ͯ', '̾', 'Í›', - '͆', 'Ìš' - ], - "down" : [ - 'Ì–', 'Ì—', '̘', 'Ì™', - 'Ìœ', 'Ì', 'Ìž', 'ÌŸ', - 'Ì ', '̤', 'Ì¥', '̦', - 'Ì©', '̪', 'Ì«', '̬', - 'Ì­', 'Ì®', '̯', '̰', - '̱', '̲', '̳', '̹', - '̺', 'Ì»', '̼', 'Í…', - '͇', '͈', '͉', 'Í', - 'ÍŽ', 'Í“', 'Í”', 'Í•', - 'Í–', 'Í™', 'Íš', 'Ì£' - ], - "mid" : [ - 'Ì•', 'Ì›', 'Ì€', 'Ì', - '͘', 'Ì¡', 'Ì¢', '̧', - '̨', 'Ì´', '̵', '̶', - 'Íœ', 'Í', 'Íž', - 'ÍŸ', 'Í ', 'Í¢', '̸', - 'Ì·', 'Í¡', ' Ò‰' - ] - }, - all = [].concat(soul.up, soul.down, soul.mid), - zalgo = {}; - - function randomNumber(range) { - var r = Math.floor(Math.random() * range); - return r; - } - - function is_char(character) { - var bool = false; - all.filter(function (i) { - bool = (i === character); - }); - return bool; - } - - function heComes(text, options) { - var result = '', counts, l; - options = options || {}; - options["up"] = options["up"] || true; - options["mid"] = options["mid"] || true; - options["down"] = options["down"] || true; - options["size"] = options["size"] || "maxi"; - text = text.split(''); - for (l in text) { - if (is_char(l)) { - continue; - } - result = result + text[l]; - counts = {"up" : 0, "down" : 0, "mid" : 0}; - switch (options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.min = randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.min = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down = randomNumber(8) + 1; - break; - } - - var arr = ["up", "mid", "down"]; - for (var d in arr) { - var index = arr[d]; - for (var i = 0 ; i <= counts[index]; i++) { - if (options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - } - return heComes(text); -} - - -// don't summon zalgo -addProperty('zalgo', function () { - return zalgo(this); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.html b/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.html deleted file mode 100644 index 7a2ae605..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - Colors Example - - - - - - \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.js b/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.js deleted file mode 100644 index b1e03a4f..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/example.js +++ /dev/null @@ -1,77 +0,0 @@ -var colors = require('./colors'); - -//colors.mode = "browser"; - -var test = colors.red("hopefully colorless output"); -console.log('Rainbows are fun!'.rainbow); -console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported -console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported -//console.log('zalgo time!'.zalgo); -console.log(test.stripColors); -console.log("a".grey + " b".black); -console.log("Zebras are so fun!".zebra); -console.log('background color attack!'.black.whiteBG) - -// -// Remark: .strikethrough may not work with Mac OS Terminal App -// -console.log("This is " + "not".strikethrough + " fun."); -console.log(colors.rainbow('Rainbows are fun!')); -console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported -console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported -//console.log(colors.zalgo('zalgo time!')); -console.log(colors.stripColors(test)); -console.log(colors.grey("a") + colors.black(" b")); - -colors.addSequencer("america", function(letter, i, exploded) { - if(letter === " ") return letter; - switch(i%3) { - case 0: return letter.red; - case 1: return letter.white; - case 2: return letter.blue; - } -}); - -colors.addSequencer("random", (function() { - var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; - - return function(letter, i, exploded) { - return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]]; - }; -})()); - -console.log("AMERICA! F--K YEAH!".america); -console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random); - -// -// Custom themes -// - -// Load theme with JSON literal -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); - -// outputs grey text -console.log("this is an input".input); - -// Load a theme from file -colors.setTheme('./themes/winston-dark.js'); - -console.log("this is an input".input); - diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/package.json b/node_modules/coalesce/node_modules/node-static/node_modules/colors/package.json deleted file mode 100644 index 5d5f4d5d..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "colors", - "description": "get colors in your node.js console like what", - "version": "0.6.2", - "author": { - "name": "Marak Squires" - }, - "homepage": "https://github.com/Marak/colors.js", - "bugs": { - "url": "https://github.com/Marak/colors.js/issues" - }, - "keywords": [ - "ansi", - "terminal", - "colors" - ], - "repository": { - "type": "git", - "url": "http://github.com/Marak/colors.js.git" - }, - "engines": { - "node": ">=0.1.90" - }, - "main": "colors", - "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej MaÅ‚ecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n", - "readmeFilename": "ReadMe.md", - "_id": "colors@0.6.2", - "dist": { - "shasum": "feb92acb58bc6d82083ec15e6c8718877e2dd746" - }, - "_from": "colors@>=0.6.0", - "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/test.js b/node_modules/coalesce/node_modules/node-static/node_modules/colors/test.js deleted file mode 100644 index c32417d6..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/test.js +++ /dev/null @@ -1,70 +0,0 @@ -var assert = require('assert'), - colors = require('./colors'); - -var s = 'string'; - -function a(s, code) { - return '\x1B[' + code.toString() + 'm' + s + '\x1B[39m'; -} - -function aE(s, color, code) { - assert.equal(s[color], a(s, code)); - assert.equal(colors[color](s), a(s, code)); - assert.equal(s[color], colors[color](s)); - assert.equal(s[color].stripColors, s); - assert.equal(s[color].stripColors, colors.stripColors(s)); -} - -function h(s, color) { - return '' + s + ''; -} - -var stylesColors = ['white', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; -var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); - -colors.mode = 'console'; -assert.equal(s.bold, '\x1B[1m' + s + '\x1B[22m'); -assert.equal(s.italic, '\x1B[3m' + s + '\x1B[23m'); -assert.equal(s.underline, '\x1B[4m' + s + '\x1B[24m'); -assert.equal(s.strikethrough, '\x1B[9m' + s + '\x1B[29m'); -assert.equal(s.inverse, '\x1B[7m' + s + '\x1B[27m'); -assert.ok(s.rainbow); -aE(s, 'white', 37); -aE(s, 'grey', 90); -aE(s, 'black', 30); -aE(s, 'blue', 34); -aE(s, 'cyan', 36); -aE(s, 'green', 32); -aE(s, 'magenta', 35); -aE(s, 'red', 31); -aE(s, 'yellow', 33); -assert.equal(s, 'string'); - -colors.setTheme({error:'red'}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); - -colors.mode = 'browser'; -assert.equal(s.bold, '' + s + ''); -assert.equal(s.italic, '' + s + ''); -assert.equal(s.underline, '' + s + ''); -assert.equal(s.strikethrough, '' + s + ''); -assert.equal(s.inverse, '' + s + ''); -assert.ok(s.rainbow); -stylesColors.forEach(function (color) { - assert.equal(s[color], h(s, color)); - assert.equal(colors[color](s), h(s, color)); -}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); - -colors.mode = 'none'; -stylesAll.forEach(function (style) { - assert.equal(s[style], s); - assert.equal(colors[style](s), s); -}); - -assert.equal(typeof("astring".red),'string'); -assert.equal(typeof("astring".error),'string'); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-dark.js b/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-dark.js deleted file mode 100644 index 49a905ba..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-dark.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'black', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}; \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-light.js b/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-light.js deleted file mode 100644 index 571972c1..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/colors/themes/winston-light.js +++ /dev/null @@ -1,12 +0,0 @@ -module['exports'] = { - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}; \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/.travis.yml b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/LICENSE b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -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/node-static/node_modules/optimist/example/bool.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/bool.js deleted file mode 100644 index a998fb7a..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/bool.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_double.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_double.js deleted file mode 100644 index a35a7e6d..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_double.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_single.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_single.js deleted file mode 100644 index 017bb689..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/boolean_single.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_hash.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_hash.js deleted file mode 100644 index ade77681..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_hash.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; - -console.log(argv.x + argv.y); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_singles.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_singles.js deleted file mode 100644 index d9b1ff45..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/default_singles.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/divide.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/divide.js deleted file mode 100644 index 5e2ee82f..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/divide.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count.js deleted file mode 100644 index b5f95bf6..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_options.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_options.js deleted file mode 100644 index d9ac7090..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_options.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .options({ - file : { - demand : true, - alias : 'f', - description : 'Load a file' - }, - base : { - alias : 'b', - description : 'Numeric base to use for output', - default : 10, - }, - }) - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_wrap.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_wrap.js deleted file mode 100644 index 42675111..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/line_count_wrap.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .wrap(80) - .demand('f') - .alias('f', [ 'file', 'filename' ]) - .describe('f', - "Load a file. It's pretty important." - + " Required even. So you'd better specify it." - ) - .alias('b', 'base') - .describe('b', 'Numeric base to display the number of lines in') - .default('b', 10) - .describe('x', 'Super-secret optional parameter which is secret') - .default('x', '') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/nonopt.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/nonopt.js deleted file mode 100644 index ee633eed..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/nonopt.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/reflect.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/reflect.js deleted file mode 100644 index 816b3e11..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/reflect.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.dir(require('optimist').argv); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/short.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/short.js deleted file mode 100644 index 1db0ad0f..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/short.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/string.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/string.js deleted file mode 100644 index a8e5aeb2..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/string.js +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .string('x', 'y') - .argv -; -console.dir([ argv.x, argv.y ]); - -/* Turns off numeric coercion: - ./node string.js -x 000123 -y 9876 - [ '000123', '9876' ] -*/ diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/usage-options.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/usage-options.js deleted file mode 100644 index b9999776..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/usage-options.js +++ /dev/null @@ -1,19 +0,0 @@ -var optimist = require('./../index'); - -var argv = optimist.usage('This is my awesome program', { - 'about': { - description: 'Provide some details about the author of this program', - required: true, - short: 'a', - }, - 'info': { - description: 'Provide some information about the node.js agains!!!!!!', - boolean: true, - short: 'i' - } -}).argv; - -optimist.showHelp(); - -console.log('\n\nInspecting options'); -console.dir(argv); \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/xup.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/xup.js deleted file mode 100644 index 8f6ecd20..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/example/xup.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} - diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/index.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/index.js deleted file mode 100644 index 4da5a6d8..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/index.js +++ /dev/null @@ -1,343 +0,0 @@ -var path = require('path'); -var minimist = require('minimist'); -var wordwrap = require('wordwrap'); - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('optimist')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('optimist').argv - to get a parsed version of process.argv. -*/ - -var inst = Argv(process.argv.slice(2)); -Object.keys(inst).forEach(function (key) { - Argv[key] = typeof inst[key] == 'function' - ? inst[key].bind(inst) - : inst[key]; -}); - -var exports = module.exports = Argv; -function Argv (processArgs, cwd) { - var self = {}; - if (!cwd) cwd = process.cwd(); - - self.$0 = process.argv - .slice(0,2) - .map(function (x) { - var b = rebase(cwd, x); - return x.match(/^\//) && b.length < x.length - ? b : x - }) - .join(' ') - ; - - if (process.env._ != undefined && process.argv[1] == process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ); - } - - var options = { - boolean: [], - string: [], - alias: {}, - default: [] - }; - - self.boolean = function (bools) { - options.boolean.push.apply(options.boolean, [].concat(bools)); - return self; - }; - - self.string = function (strings) { - options.string.push.apply(options.string, [].concat(strings)); - return self; - }; - - self.default = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]); - }); - } - else { - options.default[key] = value; - } - return self; - }; - - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]); - }); - } - else { - options.alias[x] = (options.alias[x] || []).concat(y); - } - return self; - }; - - var demanded = {}; - self.demand = function (keys) { - if (typeof keys == 'number') { - if (!demanded._) demanded._ = 0; - demanded._ += keys; - } - else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key); - }); - } - else { - demanded[keys] = true; - } - - return self; - }; - - var usage; - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg; - msg = null; - } - - usage = msg; - - if (opts) self.options(opts); - - return self; - }; - - function fail (msg) { - self.showHelp(); - if (msg) console.error(msg); - process.exit(1); - } - - var checks = []; - self.check = function (f) { - checks.push(f); - return self; - }; - - var descriptions = {}; - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]); - }); - } - else { - descriptions[key] = desc; - } - return self; - }; - - self.parse = function (args) { - return parseArgs(args); - }; - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]); - }); - } - else { - if (opt.alias) self.alias(key, opt.alias); - if (opt.demand) self.demand(key); - if (typeof opt.default !== 'undefined') { - self.default(key, opt.default); - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - } - if (opt.string || opt.type === 'string') { - self.string(key); - } - - var desc = opt.describe || opt.description || opt.desc; - if (desc) { - self.describe(key, desc); - } - } - - return self; - }; - - var wrap = null; - self.wrap = function (cols) { - wrap = cols; - return self; - }; - - self.showHelp = function (fn) { - if (!fn) fn = console.error; - fn(self.help()); - }; - - self.help = function () { - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(options.default)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true; - return acc; - }, {}) - ); - - var help = keys.length ? [ 'Options:' ] : []; - - if (usage) { - help.unshift(usage.replace(/\$0/g, self.$0), ''); - } - - var switches = keys.reduce(function (acc, key) { - acc[key] = [ key ].concat(options.alias[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - ; - return acc; - }, {}); - - var switchlen = longest(Object.keys(switches).map(function (s) { - return switches[s] || ''; - })); - - var desclen = longest(Object.keys(descriptions).map(function (d) { - return descriptions[d] || ''; - })); - - keys.forEach(function (key) { - var kswitch = switches[key]; - var desc = descriptions[key] || ''; - - if (wrap) { - desc = wordwrap(switchlen + 4, wrap)(desc) - .slice(switchlen + 4) - ; - } - - var spadding = new Array( - Math.max(switchlen - kswitch.length + 3, 0) - ).join(' '); - - var dpadding = new Array( - Math.max(desclen - desc.length + 1, 0) - ).join(' '); - - var type = null; - - if (options.boolean[key]) type = '[boolean]'; - if (options.string[key]) type = '[string]'; - - if (!wrap && dpadding.length > 0) { - desc += dpadding; - } - - var prelude = ' ' + kswitch + spadding; - var extra = [ - type, - demanded[key] - ? '[required]' - : null - , - options.default[key] !== undefined - ? '[default: ' + JSON.stringify(options.default[key]) + ']' - : null - , - ].filter(Boolean).join(' '); - - var body = [ desc, extra ].filter(Boolean).join(' '); - - if (wrap) { - var dlines = desc.split('\n'); - var dlen = dlines.slice(-1)[0].length - + (dlines.length === 1 ? prelude.length : 0) - - body = desc + (dlen + extra.length > wrap - 2 - ? '\n' - + new Array(wrap - extra.length + 1).join(' ') - + extra - : new Array(wrap - extra.length - dlen + 1).join(' ') - + extra - ); - } - - help.push(prelude + body); - }); - - help.push(''); - return help.join('\n'); - }; - - Object.defineProperty(self, 'argv', { - get : function () { return parseArgs(processArgs) }, - enumerable : true, - }); - - function parseArgs (args) { - var argv = minimist(args, options); - argv.$0 = self.$0; - - if (demanded._ && argv._.length < demanded._) { - fail('Not enough non-option arguments: got ' - + argv._.length + ', need at least ' + demanded._ - ); - } - - var missing = []; - Object.keys(demanded).forEach(function (key) { - if (!argv[key]) missing.push(key); - }); - - if (missing.length) { - fail('Missing required arguments: ' + missing.join(', ')); - } - - checks.forEach(function (f) { - try { - if (f(argv) === false) { - fail('Argument check failed: ' + f.toString()); - } - } - catch (err) { - fail(err) - } - }); - - return argv; - } - - function longest (xs) { - return Math.max.apply( - null, - xs.map(function (x) { return x.length }) - ); - } - - return self; -}; - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase; -function rebase (base, dir) { - var ds = path.normalize(dir).split('/').slice(1); - var bs = path.normalize(base).split('/').slice(1); - - for (var i = 0; ds[i] && ds[i] == bs[i]; i++); - ds.splice(0, i); bs.splice(0, i); - - var p = path.normalize( - bs.map(function () { return '..' }).concat(ds).join('/') - ).replace(/\/$/,'').replace(/^$/, '.'); - return p.match(/^[.\/]/) ? p : './' + p; -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/.travis.yml b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/LICENSE b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/LICENSE deleted file mode 100644 index ee27ba4b..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -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/node-static/node_modules/optimist/node_modules/minimist/example/parse.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/example/parse.js deleted file mode 100644 index abff3e8e..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/example/parse.js +++ /dev/null @@ -1,2 +0,0 @@ -var argv = require('../')(process.argv.slice(2)); -console.dir(argv); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/index.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/index.js deleted file mode 100644 index 584f551a..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/index.js +++ /dev/null @@ -1,187 +0,0 @@ -module.exports = function (args, opts) { - if (!opts) opts = {}; - - var flags = { bools : {}, strings : {} }; - - [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - }); - - var aliases = {}; - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); - - var defaults = opts['default'] || {}; - - var argv = { _ : [] }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--')+1); - args = args.slice(0, args.indexOf('--')); - } - - function setArg (key, val) { - var value = !flags.strings[key] && isNumber(val) - ? Number(val) : val - ; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (/^--.+=/.test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (/^--no-.+/.test(arg)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (/^--.+/.test(arg)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !/^-/.test(next) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - else if (/^-[^-]+/.test(arg)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - var next = arg.slice(j+2); - - if (next === '-') { - setArg(letters[j], next) - continue; - } - - if (/[A-Za-z]/.test(letters[j]) - && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { - setArg(letters[j], next); - broken = true; - break; - } - - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true); - } - } - - var key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, flags.strings[key] ? '' : true); - } - } - } - else { - argv._.push( - flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) - ); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!hasKey(argv, key.split('.'))) { - setKey(argv, key.split('.'), defaults[key]); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[key]); - }); - } - }); - - notFlags.forEach(function(key) { - argv._.push(key); - }); - - return argv; -}; - -function hasKey (obj, keys) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - o = (o[key] || {}); - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} - -function isNumber (x) { - if (typeof x === 'number') return true; - if (/^0x[0-9a-f]+$/i.test(x)) return true; - return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); -} - -function longest (xs) { - return Math.max.apply(null, xs.map(function (x) { return x.length })); -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/package.json b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/package.json deleted file mode 100644 index a7876d8f..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "name": "minimist", - "version": "0.0.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "tape": "~1.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/substack/minimist.git" - }, - "homepage": "https://github.com/substack/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "readme": "# minimist\n\nparse argument options\n\nThis module is the guts of optimist's argument parser without all the\nfanciful decoration.\n\n[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist)\n\n[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist)\n\n# example\n\n``` js\nvar argv = require('minimist')(process.argv.slice(2));\nconsole.dir(argv);\n```\n\n```\n$ node example/parse.js -a beep -b boop\n{ _: [], a: 'beep', b: 'boop' }\n```\n\n```\n$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz\n{ _: [ 'foo', 'bar', 'baz' ],\n x: 3,\n y: 4,\n n: 5,\n a: true,\n b: true,\n c: true,\n beep: 'boop' }\n```\n\n# methods\n\n``` js\nvar parseArgs = require('minimist')\n```\n\n## var argv = parseArgs(args, opts={})\n\nReturn an argument object `argv` populated with the array arguments from `args`.\n\n`argv._` contains all the arguments that didn't have an option associated with\nthem.\n\nNumeric-looking arguments will be returned as numbers unless `opts.string` or\n`opts.boolean` is set for that argument name.\n\nAny arguments after `'--'` will not be parsed and will end up in `argv._`.\n\noptions can be:\n\n* `opts.string` - a string or array of strings argument names to always treat as\nstrings\n* `opts.boolean` - a string or array of strings to always treat as booleans\n* `opts.alias` - an object mapping string names to strings or arrays of string\nargument names to use as aliases\n* `opts.default` - an object mapping string argument names to default values\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install minimist\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/minimist/issues" - }, - "_id": "minimist@0.0.8", - "dist": { - "shasum": "857fcabfc3397d2625b8228262e86aa7a011b05d" - }, - "_from": "minimist@~0.0.1", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz" -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/readme.markdown b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/readme.markdown deleted file mode 100644 index c2563532..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/readme.markdown +++ /dev/null @@ -1,73 +0,0 @@ -# minimist - -parse argument options - -This module is the guts of optimist's argument parser without all the -fanciful decoration. - -[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) - -[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) - -# example - -``` js -var argv = require('minimist')(process.argv.slice(2)); -console.dir(argv); -``` - -``` -$ node example/parse.js -a beep -b boop -{ _: [], a: 'beep', b: 'boop' } -``` - -``` -$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ _: [ 'foo', 'bar', 'baz' ], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' } -``` - -# methods - -``` js -var parseArgs = require('minimist') -``` - -## var argv = parseArgs(args, opts={}) - -Return an argument object `argv` populated with the array arguments from `args`. - -`argv._` contains all the arguments that didn't have an option associated with -them. - -Numeric-looking arguments will be returned as numbers unless `opts.string` or -`opts.boolean` is set for that argument name. - -Any arguments after `'--'` will not be parsed and will end up in `argv._`. - -options can be: - -* `opts.string` - a string or array of strings argument names to always treat as -strings -* `opts.boolean` - a string or array of strings to always treat as booleans -* `opts.alias` - an object mapping string names to strings or arrays of string -argument names to use as aliases -* `opts.default` - an object mapping string argument names to default values - -# install - -With [npm](https://npmjs.org) do: - -``` -npm install minimist -``` - -# license - -MIT diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dash.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dash.js deleted file mode 100644 index 8b034b99..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dash.js +++ /dev/null @@ -1,24 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('-', function (t) { - t.plan(5); - t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); - t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); - t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); - t.deepEqual( - parse([ '-b', '-' ], { boolean: 'b' }), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - parse([ '-s', '-' ], { string: 's' }), - { s: '-', _: [] } - ); -}); - -test('-a -- b', function (t) { - t.plan(3); - t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); - t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/default_bool.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/default_bool.js deleted file mode 100644 index f0041ee4..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/default_bool.js +++ /dev/null @@ -1,20 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true } - }); - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false } - }); - t.equal(argv.somefalse, false); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dotted.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dotted.js deleted file mode 100644 index ef0ae349..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/dotted.js +++ /dev/null @@ -1,16 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); -}); - -test('dotted default', function (t) { - var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/long.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/long.js deleted file mode 100644 index 5d3a1e09..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/long.js +++ /dev/null @@ -1,31 +0,0 @@ -var test = require('tape'); -var parse = require('../'); - -test('long opts', function (t) { - t.deepEqual( - parse([ '--bool' ]), - { bool : true, _ : [] }, - 'long boolean' - ); - t.deepEqual( - parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture sp' - ); - t.deepEqual( - parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [] }, - 'long capture eq' - ); - t.deepEqual( - parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures sp' - ); - t.deepEqual( - parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [] }, - 'long captures eq' - ); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse.js deleted file mode 100644 index 8a906466..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse.js +++ /dev/null @@ -1,318 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse args', function (t) { - t.deepEqual( - parse([ '--no-moo' ]), - { moo : false, _ : [] }, - 'no' - ); - t.deepEqual( - parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [] }, - 'multi' - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ] - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789' - ]); - t.deepEqual(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ] - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var argv = parse([ '-t', 'moo' ], { boolean: 't' }); - t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: [ 't', 'verbose' ], - default: { verbose: true } - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false } - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'] - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { - boolean: ['x','y','z'] - }); - - t.deepEqual(argv, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ] - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = parse([ '-s', "X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse([ "--s=X\nX" ]) - t.deepEqual(args, { _ : [], s : "X\nX" }); - t.end(); -}); - -test('strings' , function (t) { - var s = parse([ '-s', '0001234' ], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse([ '-x', '56' ], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = parse([ ' ', ' ' ], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('empty strings', function(t) { - var s = parse([ '-s' ], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); - - var str = parse([ '--str' ], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); - - var letters = parse([ '-art' ], { - string: [ 'a', 't' ] - }); - - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); - - t.end(); -}); - - -test('slashBreak', function (t) { - t.same( - parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [] } - ); - t.same( - parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [] } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: 'zoom' } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = parse([ '-f', '11', '--zoom', '55' ], { - alias: { z: [ 'zm', 'zoom' ] } - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]); - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - } - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' } - }); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - alias: { 'h': 'herp' }, - boolean: 'herp' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ 'derp' ] - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - alias: { h: 'herp' }, - boolean: 'h' - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - '_': [ ] - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool' - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse_modified.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse_modified.js deleted file mode 100644 index 21851b03..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/parse_modified.js +++ /dev/null @@ -1,9 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = parse([ '-b', '123' ], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: ['123'] }); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/short.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/short.js deleted file mode 100644 index d513a1c2..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/short.js +++ /dev/null @@ -1,67 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); - t.deepEqual( - parse([ '-123', '456' ]), - { 1: true, 2: true, 3: 456, _: [] } - ); -}); - -test('short', function (t) { - t.deepEqual( - parse([ '-b' ]), - { b : true, _ : [] }, - 'short boolean' - ); - t.deepEqual( - parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ] }, - 'bare' - ); - t.deepEqual( - parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [] }, - 'group' - ); - t.deepEqual( - parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [] }, - 'short group next' - ); - t.deepEqual( - parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [] }, - 'short capture' - ); - t.deepEqual( - parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [] }, - 'short captures' - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.deepEqual( - parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ] - } - ); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/whitespace.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/whitespace.js deleted file mode 100644 index 8a52a58c..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/minimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var parse = require('../'); -var test = require('tape'); - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/.npmignore b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/README.markdown b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/center.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae9..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/meat.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e10..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/index.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc9452..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/package.json deleted file mode 100644 index 9ba95a3a..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "wordwrap", - "description": "Wrap those words. Show them at what columns to start and stop.", - "version": "0.0.2", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "main": "./index.js", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "expresso" - }, - "devDependencies": { - "expresso": "=0.7.x" - }, - "engines": { - "node": ">=0.4.0" - }, - "license": "MIT/X11", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "homepage": "https://github.com/substack/node-wordwrap", - "_id": "wordwrap@0.0.2", - "dist": { - "shasum": "624b9d3e54ad494743ebeb222c78828a452556bf" - }, - "_from": "wordwrap@~0.0.2", - "_resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/break.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/break.js deleted file mode 100644 index 749292ec..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,30 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('../'); - -exports.hard = function () { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 2); - assert.ok(lines[0].length < 80); - assert.ok(lines[1].length < 80); - - assert.equal(s, s_.replace(/\n/g, '')); -}; - -exports.break = function () { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 3); - assert.ok(lines[0].length === 20); - assert.ok(lines[1].length === 20); - assert.ok(lines[2].length === 15); - - assert.equal(s, s_.replace(/\n/g, '')); -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 0cfb76d1..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('wordwrap'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -exports.stop80 = function () { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - }); -}; - -exports.start20stop60 = function () { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/package.json b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/package.json deleted file mode 100644 index 82dd72ba..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "optimist", - "version": "0.6.1", - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "main": "./index.js", - "dependencies": { - "wordwrap": "~0.0.2", - "minimist": "~0.0.1" - }, - "devDependencies": { - "hashish": "~0.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap ./test/*.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/node-optimist.git" - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" - }, - "readme": "# DEPRECATION NOTICE\n\nI don't want to maintain this module anymore since I just use\n[minimist](https://npmjs.org/package/minimist), the argument parsing engine,\ndirectly instead nowadays.\n\nSee [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed\nsuccessor to optimist.\n\n[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs)\n\nYou should also consider [nomnom](https://github.com/harthur/nomnom).\n\noptimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\nshort numbers\n-------------\n\nShort numeric `head -n5` style argument work too:\n\n $ node reflect.js -n123 -m456\n { '3': true,\n '6': true,\n _: [],\n '$0': 'node ./reflect.js',\n n: 123,\n m: 456 }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" - }, - "homepage": "https://github.com/substack/node-optimist", - "_id": "optimist@0.6.1", - "dist": { - "shasum": "da3ea74686fa21a19a111c326e90eb15a0196686" - }, - "_from": "optimist@>=0.3.4", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz" -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/readme.markdown b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/readme.markdown deleted file mode 100644 index b74b4372..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/readme.markdown +++ /dev/null @@ -1,513 +0,0 @@ -# DEPRECATION NOTICE - -I don't want to maintain this module anymore since I just use -[minimist](https://npmjs.org/package/minimist), the argument parsing engine, -directly instead nowadays. - -See [yargs](https://github.com/chevex/yargs) for the modern, pirate-themed -successor to optimist. - -[![yarrrrrrrgs!](http://i.imgur.com/4WFGVJ9.png)](https://github.com/chevex/yargs) - -You should also consider [nomnom](https://github.com/harthur/nomnom). - -optimist -======== - -Optimist is a node.js library for option parsing for people who hate option -parsing. More specifically, this module is for people who like all the --bells -and -whistlz of program usage but think optstrings are a waste of time. - -With optimist, option parsing doesn't have to suck (as much). - -[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) - -examples -======== - -With Optimist, the options are just a hash! No optstrings attached. -------------------------------------------------------------------- - -xup.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} -```` - -*** - - $ ./xup.js --rif=55 --xup=9.52 - Buy more riffiwobbles - - $ ./xup.js --rif 12 --xup 8.1 - Sell the xupptumblers - -![This one's optimistic.](http://substack.net/images/optimistic.png) - -But wait! There's more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long and short (and grouped): ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); -```` - -*** - - $ ./bool.js -s - The cat says: meow - - $ ./bool.js -sp - The cat says: meow. - - $ ./bool.js -sp --fr - Le chat dit: miaou. - -And non-hypenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 moo - (6.82,3.35) - [ 'moo' ] - - $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz - (0.54,1.12) - [ 'foo', 'bar', 'baz' ] - -Plus, Optimist comes with .usage() and .demand()! -------------------------------------------------- - -divide.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); -```` - -*** - - $ ./divide.js -x 55 -y 11 - 5 - - $ node ./divide.js -x 4.91 -z 2.51 - Usage: node ./divide.js -x [num] -y [num] - - Options: - -x [required] - -y [required] - - Missing required arguments: y - -EVEN MORE HOLY COW ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv); -```` - -*** - - $ ./boolean_single.js -v foo bar baz - true - [ 'bar', 'baz', 'foo' ] - -boolean_double.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Optimist is here to help... ---------------------------- - -You can describe parameters for help messages and set aliases. Optimist figures -out how to format a handy help string automatically. - -line_count.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - - $ node line_count.js - Count the lines in a file. - Usage: node ./line_count.js - - Options: - -f, --file Load a file [required] - - Missing required arguments: f - - $ node line_count.js --file line_count.js - 20 - - $ node line_count.js -f line_count.js - 20 - -methods -======= - -By itself, - -````javascript -require('optimist').argv -````` - -will use `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('optimist')([ '-x', '1', '-y', '2' ]).argv -```` - -or use .parse() to do the same thing: - -````javascript -require('optimist').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. - -.default(key, value) --------------------- - -Set `argv[key]` to `value` if no option was specified on `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -.demand(key) ------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. - -If `key` is an Array, demand each element. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('optimist') - .options('f', { - alias : 'file', - default : '/etc/passwd', - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('optimist') - .alias('f', 'file') - .default('f', '/etc/passwd') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -.usage(message) ---------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -If `fn` throws or returns `false`, show the thrown error, usage information, and -exit. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be -`false`. - -If `key` is an Array, interpret all the elements as booleans. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an Array, interpret all the elements as strings. - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -.help() -------- - -Return the generated usage string. - -.showHelp(fn=console.error) ---------------------------- - -Print the usage data using `fn` for printing. - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - '$0': 'node ./examples/reflect.js', - a: 1, - b: 2 } - -negate fields -------------- - -If you want to explicity set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], - '$0': 'node ./examples/reflect.js', - a: true, - b: false } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], - '$0': 'node ./examples/reflect.js', - x: [ 5, 8, 0 ] } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - '$0': 'node ./examples/reflect.js', - foo: { bar: { baz: 33 }, quux: 5 } } - -short numbers -------------- - -Short numeric `head -n5` style argument work too: - - $ node reflect.js -n123 -m456 - { '3': true, - '6': true, - _: [], - '$0': 'node ./reflect.js', - n: 123, - m: 456 } - -installation -============ - -With [npm](http://github.com/isaacs/npm), just do: - npm install optimist - -or clone this project on github: - - git clone http://github.com/substack/node-optimist.git - -To run the tests with [expresso](http://github.com/visionmedia/expresso), -just do: - - expresso - -inspired By -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_.js deleted file mode 100644 index d9c58b36..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_.js +++ /dev/null @@ -1,71 +0,0 @@ -var spawn = require('child_process').spawn; -var test = require('tap').test; - -test('dotSlashEmpty', testCmd('./bin.js', [])); - -test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); - -test('nodeEmpty', testCmd('node bin.js', [])); - -test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); - -test('whichNodeEmpty', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', []) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - assert.error(err); - t.end(); - }); -}); - -test('whichNodeArgs', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); -}); - -function testCmd (cmd, args) { - - return function (t) { - var to = setTimeout(function () { - assert.fail('Never got stdout data.') - }, 5000); - - var oldDir = process.cwd(); - process.chdir(__dirname + '/_'); - - var cmds = cmd.split(' '); - - var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); - process.chdir(oldDir); - - bin.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); - - bin.stdout.on('data', function (buf) { - clearTimeout(to); - var _ = JSON.parse(buf.toString()); - t.same(_.map(String), args.map(String)); - t.end(); - }); - }; -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/argv.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/argv.js deleted file mode 100644 index 3d096062..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/argv.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log(JSON.stringify(process.argv)); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/bin.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/bin.js deleted file mode 100644 index 4a18d85f..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/_/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('../../index').argv -console.log(JSON.stringify(argv._)); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/dash.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/dash.js deleted file mode 100644 index af8ed6fc..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/dash.js +++ /dev/null @@ -1,31 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-', function (t) { - t.plan(5); - t.deepEqual( - fix(optimist.parse([ '-n', '-' ])), - { n: '-', _: [] } - ); - t.deepEqual( - fix(optimist.parse([ '-' ])), - { _: [ '-' ] } - ); - t.deepEqual( - fix(optimist.parse([ '-f-' ])), - { f: '-', _: [] } - ); - t.deepEqual( - fix(optimist([ '-b', '-' ]).boolean('b').argv), - { b: true, _: [ '-' ] } - ); - t.deepEqual( - fix(optimist([ '-s', '-' ]).string('s').argv), - { s: '-', _: [] } - ); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse.js deleted file mode 100644 index d320f433..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse.js +++ /dev/null @@ -1,446 +0,0 @@ -var optimist = require('../index'); -var path = require('path'); -var test = require('tap').test; - -var $0 = 'node ./' + path.relative(process.cwd(), __filename); - -test('short boolean', function (t) { - var parse = optimist.parse([ '-b' ]); - t.same(parse, { b : true, _ : [], $0 : $0 }); - t.same(typeof parse.b, 'boolean'); - t.end(); -}); - -test('long boolean', function (t) { - t.same( - optimist.parse([ '--bool' ]), - { bool : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('bare', function (t) { - t.same( - optimist.parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } - ); - t.end(); -}); - -test('short group', function (t) { - t.same( - optimist.parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short group next', function (t) { - t.same( - optimist.parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short captures', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture sp', function (t) { - t.same( - optimist.parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture eq', function (t) { - t.same( - optimist.parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end() -}); - -test('long captures sp', function (t) { - t.same( - optimist.parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long captures eq', function (t) { - t.same( - optimist.parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('no', function (t) { - t.same( - optimist.parse([ '--no-moo' ]), - { moo : false, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('multi', function (t) { - t.same( - optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [], $0 : $0 } - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.same( - optimist.parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ], - $0 : $0 - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = optimist.parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.same(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ], - $0 : $0 - }); - t.same(typeof argv.x, 'number'); - t.same(typeof argv.y, 'number'); - t.same(typeof argv.z, 'number'); - t.same(typeof argv.w, 'string'); - t.same(typeof argv.hex, 'number'); - t.same(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; - t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) - .boolean(['t', 'verbose']).default('verbose', true).argv; - - t.same(parse, { - verbose: false, - t: true, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var parse = optimist(['moo']) - .boolean(['t', 'verbose']) - .default('verbose', false) - .default('t', false).argv; - - t.same(parse, { - verbose: false, - t: false, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) - .boolean(['x','y','z']).argv; - - t.same(parse, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ], - $0 : $0 - }); - - t.same(typeof parse.x, 'boolean'); - t.same(typeof parse.y, 'boolean'); - t.same(typeof parse.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = optimist.parse([ '-s', "X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = optimist.parse([ "--s=X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - t.end(); -}); - -test('strings' , function (t) { - var s = optimist([ '-s', '0001234' ]).string('s').argv.s; - t.same(s, '0001234'); - t.same(typeof s, 'string'); - - var x = optimist([ '-x', '56' ]).string('x').argv.x; - t.same(x, '56'); - t.same(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = optimist([ ' ', ' ' ]).string('_').argv._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - optimist.parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.same( - optimist.parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', 'zoom') - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', [ 'zm', 'zoom' ]) - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('boolean default true', function (t) { - var argv = optimist.options({ - sometrue: { - boolean: true, - default: true - } - }).argv; - - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = optimist.options({ - somefalse: { - boolean: true, - default: false - } - }).argv; - - t.equal(argv.somefalse, false); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = optimist([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]).argv; - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - }, - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('herp') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('herp') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .options(opts) - .argv; - var propertyArgv = optimist(regular).options(opts).argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('h') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('h') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse_modified.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse_modified.js deleted file mode 100644 index a57dc84e..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/parse_modified.js +++ /dev/null @@ -1,14 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('parse with modifier functions' , function (t) { - t.plan(1); - - var argv = optimist().boolean('b').parse([ '-b', '123' ]); - t.deepEqual(fix(argv), { b: true, _: ['123'] }); -}); - -function fix (obj) { - delete obj.$0; - return obj; -} diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/short.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/short.js deleted file mode 100644 index b2c38ad8..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/short.js +++ /dev/null @@ -1,16 +0,0 @@ -var optimist = require('../index'); -var test = require('tap').test; - -test('-n123', function (t) { - t.plan(1); - var parse = optimist.parse([ '-n123' ]); - t.equal(parse.n, 123); -}); - -test('-123', function (t) { - t.plan(3); - var parse = optimist.parse([ '-123', '456' ]); - t.equal(parse['1'], true); - t.equal(parse['2'], true); - t.equal(parse['3'], 456); -}); diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/usage.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/usage.js deleted file mode 100644 index 300454c1..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/usage.js +++ /dev/null @@ -1,292 +0,0 @@ -var Hash = require('hashish'); -var optimist = require('../index'); -var test = require('tap').test; - -test('usageFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'Options:', - ' -x [required]', - ' -y [required]', - 'Missing required arguments: y', - ] - ); - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - - -test('usagePass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkPass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'You forgot about -y' - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('checkCondPass', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkCondFail', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/).join('\n'), - 'Usage: ./usage -x NUM -y NUM\n' - + 'Argument check failed: ' + checker.toString() - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('countPass', function (t) { - var r = checkUsage(function () { - return optimist('1 2 3 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same(r, { - result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('countFail', function (t) { - var r = checkUsage(function () { - return optimist('1 2 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same( - r.result, - { _ : [ '1', '2' ], moo : true, $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage [x] [y] [z] {OPTIONS}', - 'Not enough non-option arguments: got 2, need at least 3', - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('defaultSingles', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70 --powsy'.split(' ')) - .default('foo', 5) - .default('bar', 6) - .default('baz', 7) - .argv - ; - }); - t.same(r.result, { - foo : '50', - bar : 6, - baz : '70', - powsy : true, - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultAliases', function (t) { - var r = checkUsage(function () { - return optimist('') - .alias('f', 'foo') - .default('f', 5) - .argv - ; - }); - t.same(r.result, { - f : '5', - foo : '5', - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultHash', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70'.split(' ')) - .default({ foo : 10, bar : 20, quux : 30 }) - .argv - ; - }); - t.same(r.result, { - _ : [], - $0 : './usage', - foo : 50, - baz : 70, - bar : 20, - quux : 30, - }); - t.end(); -}); - -test('rebase', function (t) { - t.equal( - optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), - './foo/bar/baz' - ); - t.equal( - optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), - '../../..' - ); - t.equal( - optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), - '../pow/zoom.txt' - ); - t.end(); -}); - -function checkUsage (f) { - - var exit = false; - - process._exit = process.exit; - process._env = process.env; - process._argv = process.argv; - - process.exit = function (t) { exit = true }; - process.env = Hash.merge(process.env, { _ : 'node' }); - process.argv = [ './usage' ]; - - var errors = []; - var logs = []; - - console._error = console.error; - console.error = function (msg) { errors.push(msg) }; - console._log = console.log; - console.log = function (msg) { logs.push(msg) }; - - var result = f(); - - process.exit = process._exit; - process.env = process._env; - process.argv = process._argv; - - console.error = console._error; - console.log = console._log; - - return { - errors : errors, - logs : logs, - exit : exit, - result : result, - }; -}; diff --git a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/whitespace.js b/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/whitespace.js deleted file mode 100644 index 90b90752..00000000 --- a/node_modules/coalesce/node_modules/node-static/node_modules/optimist/test/whitespace.js +++ /dev/null @@ -1,8 +0,0 @@ -var optimist = require('../'); -var test = require('tap').test; - -test('whitespace should be whitespace' , function (t) { - t.plan(1); - var x = optimist.parse([ '-x', '\t' ]).x; - t.equal(x, '\t'); -}); diff --git a/node_modules/coalesce/node_modules/node-static/package.json b/node_modules/coalesce/node_modules/node-static/package.json deleted file mode 100644 index 830a89d9..00000000 --- a/node_modules/coalesce/node_modules/node-static/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "node-static", - "description": "simple, compliant file streaming module for node", - "url": "http://github.com/cloudhead/node-static", - "keywords": [ - "http", - "static", - "file", - "server" - ], - "author": { - "name": "Alexis Sellier", - "email": "self@cloudhead.net" - }, - "contributors": [ - { - "name": "Pablo Cantero", - "email": "pablo@pablocantero.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/cloudhead/node-static" - }, - "main": "./lib/node-static", - "scripts": { - "test": "vows --spec --isolate" - }, - "bin": { - "static": "bin/cli.js" - }, - "license": "MIT", - "dependencies": { - "optimist": ">=0.3.4", - "colors": ">=0.6.0", - "mime": ">=1.2.9" - }, - "devDependencies": { - "request": "latest", - "vows": "latest" - }, - "version": "0.7.1", - "engines": { - "node": ">= 0.4.1" - }, - "readme": "node-static\n===========\n\n> a simple, *rfc 2616 compliant* file streaming module for [node](http://nodejs.org)\n\nnode-static has an in-memory file cache, making it highly efficient.\nnode-static understands and supports *conditional GET* and *HEAD* requests.\nnode-static was inspired by some of the other static-file serving modules out there,\nsuch as node-paperboy and antinode.\n\nSynopsis\n--------\n\n var static = require('node-static');\n\n //\n // Create a node-static server instance to serve the './public' folder\n //\n var file = new static.Server('./public');\n\n require('http').createServer(function (request, response) {\n request.addListener('end', function () {\n //\n // Serve files!\n //\n file.serve(request, response);\n }).resume();\n }).listen(8080);\n\nAPI\n---\n\n### Creating a node-static Server #\n\nCreating a file server instance is as simple as:\n\n new static.Server();\n\nThis will serve files in the current directory. If you want to serve files in a specific\ndirectory, pass it as the first argument:\n\n new static.Server('./public');\n\nYou can also specify how long the client is supposed to cache the files node-static serves:\n\n new static.Server('./public', { cache: 3600 });\n\nThis will set the `Cache-Control` header, telling clients to cache the file for an hour.\nThis is the default setting.\n\n### Serving files under a directory #\n\nTo serve files under a directory, simply call the `serve` method on a `Server` instance, passing it\nthe HTTP request and response object:\n \n var static = require('node-static');\n\n var fileServer = new static.Server('./public');\n\n require('http').createServer(function (request, response) {\n request.addListener('end', function () {\n fileServer.serve(request, response);\n }).resume();\n }).listen(8080);\n\n### Serving specific files #\n\nIf you want to serve a specific file, like an error page for example, use the `serveFile` method:\n\n fileServer.serveFile('/error.html', 500, {}, request, response);\n\nThis will serve the `error.html` file, from under the file root directory, with a `500` status code.\nFor example, you could serve an error page, when the initial request wasn't found:\n\n require('http').createServer(function (request, response) {\n request.addListener('end', function () {\n fileServer.serve(request, response, function (e, res) {\n if (e && (e.status === 404)) { // If the file wasn't found\n fileServer.serveFile('/not-found.html', 404, {}, request, response);\n }\n });\n }).resume();\n }).listen(8080);\n\nMore on intercepting errors bellow.\n\n### Intercepting errors & Listening #\n\nAn optional callback can be passed as last argument, it will be called every time a file\nhas been served successfully, or if there was an error serving the file:\n\n var static = require('node-static');\n \n var fileServer = new static.Server('./public');\n\n require('http').createServer(function (request, response) {\n request.addListener('end', function () {\n fileServer.serve(request, response, function (err, result) {\n if (err) { // There was an error serving the file\n sys.error(\"Error serving \" + request.url + \" - \" + err.message);\n\n // Respond to the client\n response.writeHead(err.status, err.headers);\n response.end();\n }\n });\n }).resume();\n }).listen(8080);\n\nNote that if you pass a callback, and there is an error serving the file, node-static\n*will not* respond to the client. This gives you the opportunity to re-route the request,\nor handle it differently.\n\nFor example, you may want to interpret a request as a static request, but if the file isn't found,\nsend it to an application.\n\nIf you only want to *listen* for errors, you can use *event listeners*:\n\n fileServer.serve(request, response).addListener('error', function (err) {\n sys.error(\"Error serving \" + request.url + \" - \" + err.message);\n });\n\nWith this method, you don't have to explicitly send the response back, in case of an error.\n\n### Options when creating an instance of `Server` #\n\n#### `cache` #\n\nSets the `Cache-Control` header.\n\nexample: `{ cache: 7200 }`\n\nPassing a number will set the cache duration to that number of seconds.\nPassing `false` will disable the `Cache-Control` header.\n\n> Defaults to `3600`\n\n\n#### `serverInfo` #\n\nSets the `Server` header.\n\nexample: `{ serverInfo: \"myserver\" }`\n\n> Defaults to `node-static/{version}`\n\n#### `headers` #\n\nSets response headers.\n\nexample: `{ 'X-Hello': 'World!' }`\n\n> defaults to `{}`\n\n#### `gzip` #\n\nEnable support for sending compressed responses. This will enable a check for a\nfile with the same name plus '.gz' in the same folder. If the compressed file is\nfound and the client has indicated support for gzip file transfer, the contents\nof the .gz file will be sent in place of the uncompressed file along with a\nContent-Encoding: gzip header to inform the client the data has been compressed.\n\nexample: `{ gzip: true }`\nexample: `{ gzip: /^\\/text/ }`\n\nPassing `true` will enable this check for all files.\nPassing a RegExp instance will only enable this check if the content-type of the\nrespond would match that RegExp using its test() method.\n\n> Defaults to `false`\n\n\nCommand Line Interface\n----------------------\n\n`node-static` also provides a CLI.\n\n### Installation #\n\n $ npm install -g node-static\n\n### Example Usage #\n\n # serve up the current directory\n $ static\n serving \".\" at http://127.0.0.1:8080\n\n # serve up a different directory\n $ static public\n serving \"public\" at http://127.0.0.1:8080\n\n # specify additional headers (this one is useful for development)\n $ static -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}'\n serving \".\" at http://127.0.0.1:8080\n\n # set cache control max age\n $ static -c 7200\n serving \".\" at http://127.0.0.1:8080\n\n # show help message, including all options\n $ static -h\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/cloudhead/node-static/issues" - }, - "homepage": "https://github.com/cloudhead/node-static", - "_id": "node-static@0.7.1", - "dist": { - "shasum": "abda969541fc828572002a308831d0e7c64489c6" - }, - "_from": "node-static@0.7.1", - "_resolved": "https://registry.npmjs.org/node-static/-/node-static-0.7.1.tgz" -} diff --git a/node_modules/coalesce/node_modules/node-static/test/fixtures/hello.txt b/node_modules/coalesce/node_modules/node-static/test/fixtures/hello.txt deleted file mode 100644 index 95d09f2b..00000000 --- a/node_modules/coalesce/node_modules/node-static/test/fixtures/hello.txt +++ /dev/null @@ -1 +0,0 @@ -hello world \ No newline at end of file diff --git a/node_modules/coalesce/node_modules/node-static/test/fixtures/index.html b/node_modules/coalesce/node_modules/node-static/test/fixtures/index.html deleted file mode 100644 index eee1c7a7..00000000 --- a/node_modules/coalesce/node_modules/node-static/test/fixtures/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Awesome page - - - hello world! - - diff --git a/node_modules/coalesce/node_modules/node-static/test/fixtures/there/index.html b/node_modules/coalesce/node_modules/node-static/test/fixtures/there/index.html deleted file mode 100644 index 6798b098..00000000 --- a/node_modules/coalesce/node_modules/node-static/test/fixtures/there/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Other page - - - hello there! - - diff --git a/node_modules/coalesce/node_modules/node-static/test/integration/node-static-test.js b/node_modules/coalesce/node_modules/node-static/test/integration/node-static-test.js deleted file mode 100644 index c1e5d396..00000000 --- a/node_modules/coalesce/node_modules/node-static/test/integration/node-static-test.js +++ /dev/null @@ -1,249 +0,0 @@ -var vows = require('vows') - , request = require('request') - , assert = require('assert') - , static = require('../../lib/node-static'); - -var fileServer = new static.Server(__dirname + '/../fixtures'); -var suite = vows.describe('node-static'); -var TEST_PORT = 8080; -var TEST_SERVER = 'http://localhost:' + TEST_PORT; -var version = static.version.join('.'); -var server; -var callback; - -headers = { - 'requesting headers': { - topic : function(){ - request.head(TEST_SERVER + '/index.html', this.callback); - } - } -} -headers['requesting headers']['should respond with node-static/' + version] = function(error, response, body){ - assert.equal(response.headers['server'], 'node-static/' + version); -} - -suite.addBatch({ - 'once an http server is listening with a callback': { - topic: function () { - server = require('http').createServer(function (request, response) { - fileServer.serve(request, response, function(err, result) { - if (callback) - callback(request, response, err, result); - else - request.end(); - }); - }).listen(TEST_PORT, this.callback) - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. - * A topic without tests will be not executed */ - assert.isTrue(true); - } - }, -}).addBatch({ - 'streaming a 404 page': { - topic: function(){ - callback = function(request, response, err, result) { - if (err) { - response.writeHead(err.status, err.headers); - setTimeout(function() { - response.end('Custom 404 Stream.') - }, 100); - } - } - request.get(TEST_SERVER + '/not-found', this.callback); - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - }, - 'should respond with the streamed content': function(error, response, body){ - callback = null; - assert.equal(body, 'Custom 404 Stream.'); - } - } -}).addBatch({ - 'once an http server is listening without a callback': { - topic: function () { - server.close(); - server = require('http').createServer(function (request, response) { - fileServer.serve(request, response); - }).listen(TEST_PORT, this.callback) - }, - 'should be listening' : function(){ - /* This test is necessary to ensure the topic execution. - * A topic without tests will be not executed */ - assert.isTrue(true); - } - } -}).addBatch({ - 'requesting a file not found': { - topic : function(){ - request.get(TEST_SERVER + '/not-found', this.callback); - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}) -.addBatch({ - 'requesting a malformed URI': { - topic: function(){ - request.get(TEST_SERVER + '/a%AFc', this.callback); - }, - 'should respond with 400': function(error, response, body){ - assert.equal(response.statusCode, 400); - } - } -}) -.addBatch({ - 'serving hello.txt': { - topic : function(){ - request.get(TEST_SERVER + '/hello.txt', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/plain': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/plain'); - }, - 'should respond with hello world': function(error, response, body){ - assert.equal(body, 'hello world'); - } - } -}).addBatch({ - 'serving directory index': { - topic : function(){ - request.get(TEST_SERVER, this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}).addBatch({ - 'serving index.html from the cache': { - topic : function(){ - request.get(TEST_SERVER + '/index.html', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}).addBatch({ - 'requesting with If-None-Match': { - topic : function(){ - var _this = this; - request.get(TEST_SERVER + '/index.html', function(error, response, body){ - request({ - method: 'GET', - uri: TEST_SERVER + '/index.html', - headers: {'if-none-match': response.headers['etag']} - }, - _this.callback); - }); - }, - 'should respond with 304' : function(error, response, body){ - assert.equal(response.statusCode, 304); - } - }, - 'requesting with If-None-Match and If-Modified-Since': { - topic : function(){ - var _this = this; - request.get(TEST_SERVER + '/index.html', function(error, response, body){ - var modified = Date.parse(response.headers['last-modified']); - var oneDayLater = new Date(modified + (24 * 60 * 60 * 1000)).toUTCString(); - var nonMatchingEtag = '1111222233334444'; - request({ - method: 'GET', - uri: TEST_SERVER + '/index.html', - headers: { - 'if-none-match': nonMatchingEtag, - 'if-modified-since': oneDayLater - } - }, - _this.callback); - }); - }, - 'should respond with a 200': function(error, response, body){ - assert.equal(response.statusCode, 200); - } - } -}).addBatch({ - 'requesting HEAD': { - topic : function(){ - request.head(TEST_SERVER + '/index.html', this.callback); - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'head must has no body' : function(error, response, body){ - assert.isUndefined(body); - } - } -}) -.addBatch(headers) -.addBatch({ - 'addings custom mime types': { - topic : function(){ - static.mime.define({'application/font-woff': ['woff']}); - this.callback(); - }, - 'should add woff' : function(error, response, body){ - assert.equal(static.mime.lookup('woff'), 'application/font-woff'); - } - } -}) -.addBatch({ - 'serving subdirectory index': { - topic : function(){ - request.get(TEST_SERVER + '/there/', this.callback); // with trailing slash - }, - 'should respond with 200' : function(error, response, body){ - assert.equal(response.statusCode, 200); - }, - 'should respond with text/html': function(error, response, body){ - assert.equal(response.headers['content-type'], 'text/html'); - } - } -}) -.addBatch({ - 'redirecting to subdirectory index': { - topic : function(){ - request.get({ url: TEST_SERVER + '/there', followRedirect: false }, this.callback); // without trailing slash - }, - 'should respond with 301' : function(error, response, body){ - assert.equal(response.statusCode, 301); - }, - 'should respond with location header': function(error, response, body){ - assert.equal(response.headers['location'], '/there/'); // now with trailing slash - }, - 'should respond with empty string body' : function(error, response, body){ - assert.equal(body, ''); - } - } -}) -.addBatch({ - 'requesting a subdirectory (with trailing slash) not found': { - topic : function(){ - request.get(TEST_SERVER + '/notthere/', this.callback); // with trailing slash - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}) -.addBatch({ - 'requesting a subdirectory (without trailing slash) not found': { - topic : function(){ - request.get({ url: TEST_SERVER + '/notthere', followRedirect: false }, this.callback); // without trailing slash - }, - 'should respond with 404' : function(error, response, body){ - assert.equal(response.statusCode, 404); - } - } -}).export(module); diff --git a/node_modules/coalesce/node_modules/sockjs-client/.npmignore b/node_modules/coalesce/node_modules/sockjs-client/.npmignore deleted file mode 100644 index 042ccf27..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -*~ diff --git a/node_modules/coalesce/node_modules/sockjs-client/README.md b/node_modules/coalesce/node_modules/sockjs-client/README.md deleted file mode 100644 index d281ad50..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# SockJS Client Node - -Node client for [SockJS](https://github.com/sockjs). Currently, only -the XHR Streaming transport is supported. - -## Usage - - var sjsc = require('sockjs-client'); - var client = sjsc.create("http://localhost/sjsServer"); - client.on('connection', function () { // connection is established }); - client.on('data', function (msg) { // received some data }); - client.on('error', function (e) { // something went wrong }); - client.write("Have some text you mighty SockJS server!"); diff --git a/node_modules/coalesce/node_modules/sockjs-client/index.js b/node_modules/coalesce/node_modules/sockjs-client/index.js deleted file mode 100644 index ca750a54..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/sockjs-client'); diff --git a/node_modules/coalesce/node_modules/sockjs-client/lib/sockjs-client.js b/node_modules/coalesce/node_modules/sockjs-client/lib/sockjs-client.js deleted file mode 100644 index f4391532..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/lib/sockjs-client.js +++ /dev/null @@ -1,379 +0,0 @@ -(function (parent) { - 'use strict'; - - var url = require('url'), - http = require('http'), - https = require('https'), - uuid = require('node-uuid'), - events = require('events'), - util; - - function InvalidURL (parsedURL) { - this.parsedURL = parsedURL; - } - InvalidURL.prototype = { - prototype: Error.prototype, - toString: function () { return "Invalid URL: " + this.parsedURL.href; } - }; - - function InvalidState (extra) { - this.extra = extra; - } - InvalidState.prototype = { - prototype: Error.prototype, - toString: function () { return "Invalid State " + this.extra; } - }; - - util = (function () { - var empty = {}; - return { - hasOwnProperty: function (obj, field) { - return empty.hasOwnProperty.call(obj, field); - }, - - shallowCopy: function (src, dest) { - var keys = Object.keys(src), - i; - for (i = 0; i < keys.length; i += 1) { - dest[keys[i]] = src[keys[i]]; - } - }, - - liftFunctions: function (src, dest, fields) { - var i, field; - for (i = 0; i < fields.length; i += 1) { - field = fields[i]; - if (undefined !== src[field] && - undefined !== src[field].call) { - dest[field] = src[field].bind(src); - } - } - } - }; - }()); - - function SockJSClient (server) { - var parsed, serverId, sessionId; - - parsed = url.parse(server); - - if ('http:' === parsed.protocol) { - this.client = http; - } else if ('https:' === parsed.protocol) { - this.client = https; - } else { - throw new InvalidURL(parsed); - } - - if (parsed.pathname === '/') { - parsed.pathname = ''; - } - - serverId = Math.round(Math.random() * 999); - sessionId = uuid(); - - this.server = url.parse( - parsed.protocol + "//" + parsed.host + parsed.pathname + - "/" + serverId + "/" + sessionId); - - this.error = Object.getPrototypeOf(this).error.bind(this); - this.connection = Object.getPrototypeOf(this).connection.bind(this); - this.closed = Object.getPrototypeOf(this).closed.bind(this); - - this.emitter = new events.EventEmitter(); - util.liftFunctions( - this.emitter, this, - ['on', 'once', 'removeListener', 'removeAllListeners', 'emit']); - - this.writeBuffer = []; - } - - SockJSClient.prototype = { - isReady: false, - isClosing: false, - isClosed: false, - - connect: function () { - if (this.isReady || this.isClosing || this.isClosed) { - return; - } - var transport = new XHRStreaming(this); - transport.on('error', this.error); - transport.on('connection', this.connection); - transport.on('close', this.closed); - (new StateMachine(transport)).invoke(); - }, - - connection: function (transport) { - if (this.isClosing) { - transport.close(); - } else if (! (this.isReady || this.isClosed)) { - this.isReady = true; - this.transport = transport; - this.emit('connection'); - if (0 !== this.writeBuffer.length) { - transport.write(this.writeBuffer); - this.writeBuffer = []; - } - } - }, - - error: function () { - this.isReady = false; - var args = Array.prototype.slice.call(arguments, 0); - args.unshift('error'); - this.emit.apply(this, args); - if (this.isClosing) { - this.closed(); - } - }, - - write: function (message) { - if (this.isClosed || this.isClosing) { - return; - } else if (this.isReady) { - return this.transport.write([message]); - } else { - this.writeBuffer.push(message); - } - }, - - close: function () { - if (! (this.isClosing || this.isClosed)) { - this.isClosing = true; - if (this.isReady) { - this.isReady = false; - this.transport.close(); - } - } - }, - - closed: function () { - if (! this.isClosed) { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift('close'); - this.emit.apply(this, args); - } - this.isClosed = true; - this.isClosing = false; - this.isReady = false; - } - }; - - function XHRStreaming (sjs) { - this.sjs = sjs; - this.emitter = new events.EventEmitter(); - util.liftFunctions( - this.emitter, this, - ['on', 'once', 'removeListener', 'removeAllListeners', 'emit']); - this.error = Object.getPrototypeOf(this).error.bind(this); - this.initialPayloadRemaining = this.initialPayloadLength; - this.partialChunk = ""; - } - XHRStreaming.prototype = { - fsm: {'start': 'connected', - 'connected': 'dataInitial', - 'dataInitial': 'dataOpen', - 'dataOpen': 'running', - 'running': 'running', - 'errored': 'errored' - }, - - initialPayloadLength: 2049, - - start: function (sm) { - var request = {method: 'POST', - headers: {'Content-Length': 0}}, - clientRequest; - util.shallowCopy(this.sjs.server, request); - request.path += '/xhr_streaming'; - clientRequest = this.sjs.client.request(request, sm.stepper()); - clientRequest.on('error', this.error.bind(this, sm)); - clientRequest.end(); - }, - - write: function (message) { - var data = JSON.stringify(message), - request = {method: 'POST', - headers: { - 'Content-Type': 'application/json', - 'Content-Length': Buffer.byteLength(data,'utf8')}}, - clientRequest; - util.shallowCopy(this.sjs.server, request); - request.path += '/xhr_send'; - clientRequest = this.sjs.client.request(request); - clientRequest.write(data); - clientRequest.end(); - }, - - close: function () { - if (undefined !== this.response) { - this.response.removeAllListeners(); - this.response.destroy(); - } - this.emit('close'); - }, - - connected: function (sm, result) { - this.response = result; - if (200 !== result.statusCode) { - this.error(sm, result.statusCode); - } else { - result.setEncoding('utf8'); - result.on('data', sm.stepper()); - result.on('end', this.reopen.bind(this, sm)); - } - }, - - dataInitial: function (sm, chunk) { - var remaining = this.initialPayloadRemaining - chunk.length; - if (remaining > 0) { - this.initialPayloadRemaining = remaining; - sm.switchTo('dataInitial'); - } else { - this.initialPayloadRemaining = this.initialPayloadLength; - if (remaining < 0) { - (sm.stepper())(sm, chunk.slice(this.initialPayloadRemaining)); - } - } - }, - - dataOpen: function (sm, chunk) { - var fsm; - chunk = this.partialChunk.concat(chunk); - if (chunk.length < 2) { - this.partialChunk = chunk; - sm.switchTo('dataOpen'); - } else { - this.partialChunk = ""; - if ('o\n' === chunk.slice(0, 2)) { - fsm = {}; - util.shallowCopy(this.fsm, fsm); - this.fsm = fsm; - fsm['dataInitial'] = 'running'; // from here on, another 'o\n' is an error - this.emit('connection', this); - if (2 < chunk.length) { - (sm.stepper())(sm, chunk.slice(2)); - } - } else { - this.error(sm, chunk); - } - } - }, - - running: function (sm, chunk) { - var type; - chunk = this.partialChunk.concat(chunk); - if (1 < chunk.length) { - type = chunk.charAt(0); - switch (type) { - case 'h': // heartbeat - this.partialChunk = chunk.slice(2); - break; - case 'a': // data - this.emitData(chunk, this.partialChunk.length); - break; - case 'c': // close frame - this.close(); - break; - default: - this.error(sm, "Unexpected frame type", type, chunk); - } - } else { - this.partialChunk = chunk; - } - }, - - emitData: function (chunk, searchStart) { - var index = chunk.indexOf('\n', searchStart), - array, i; - if (-1 === index) { - this.partialChunk = chunk; - } else { - index += 1; - if (index === chunk.length) { - this.partialChunk = ""; - } else { - this.partialChunk = chunk.slice(index); - } - array = JSON.parse(chunk.slice(1, index)); - for (i = 0; i < array.length; i += 1) { - this.sjs.emit('data', array[i]); - } - } - }, - - reopen: function (sm) { - (sm.stepper('start'))(); - }, - - error: function () { - if (undefined !== this.response) { - this.response.removeAllListeners(); - this.response.destroy(); - } - var args = Array.prototype.slice.call(arguments, 0), - sm; - sm = args.shift(); - sm.switchTo('errored'); - this.emit('error', args); - }, - - errored: function () {} - } - - function StateMachine (callbacks) { - this.callbacks = callbacks; - this.stepper = Object.getPrototypeOf(this).stepper.bind(this); - this.fun = this.stepper(); - } - StateMachine.prototype = { - invoke: function () { - if (undefined === this.fun) { - throw new InvalidState(this); - } - var args = Array.prototype.slice.call(arguments, 0); - args.unshift(this); - return this.fun.apply(this.callbacks, args); - }, - - nextStateName: function () { - if (util.hasOwnProperty(this, 'switchedTo')) { - return this.switchedTo; - } else if (util.hasOwnProperty(this, 'stateName')) { - return this.callbacks.fsm[this.stateName]; - } else { - return 'start'; - } - }, - - switchTo: function (name) { - if (undefined === name) { - delete this.switchedTo; - } else { - this.switchedTo = name; - } - }, - - stepper: function (name) { - return (function () { - if (undefined !== name) { - this.switchTo(name); - } - this.stateName = this.nextStateName(); - this.switchTo(); - this.fun = this.callbacks[this.stateName]; - this.invoke.apply(this, arguments); - }).bind(this); - } - }; - - exports.create = function (url) { - var sjsc = new SockJSClient(url); - sjsc.connect(); - return sjsc; - }; - exports.InvalidURL = InvalidURL; - exports.InvalidState = InvalidState; - -}(this)); diff --git a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/.npmignore b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/.npmignore deleted file mode 100644 index fd4f2b06..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.DS_Store diff --git a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/LICENSE.md b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/LICENSE.md deleted file mode 100644 index bcdddf9a..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/README.md b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/README.md deleted file mode 100644 index a44d9a76..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/benchmark/README.md b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/benchmark/README.md deleted file mode 100644 index aaeb2ea0..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/benchmark/bench.gnu b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/benchmark/bench.gnu deleted file mode 100644 index a342fbbe..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/benchmark/bench.sh b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/benchmark/bench.sh deleted file mode 100644 index d870a0cb..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/benchmark/benchmark-native.c b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/benchmark/benchmark-native.c deleted file mode 100644 index dbfc75f6..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/benchmark/benchmark.js b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/benchmark/benchmark.js deleted file mode 100644 index 40e6efbe..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/package.json b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/package.json deleted file mode 100644 index 23949263..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/package.json +++ /dev/null @@ -1,39 +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" -} diff --git a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/compare_v1.js b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/compare_v1.js deleted file mode 100644 index 05af8221..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/test/test.html b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/test.html deleted file mode 100644 index d80326ec..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/test.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - diff --git a/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/test.js b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/test/test.js deleted file mode 100644 index be23919a..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/node_modules/node-uuid/uuid.js b/node_modules/coalesce/node_modules/sockjs-client/node_modules/node-uuid/uuid.js deleted file mode 100644 index 27f1d127..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/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-client/package.json b/node_modules/coalesce/node_modules/sockjs-client/package.json deleted file mode 100644 index bc70fac2..00000000 --- a/node_modules/coalesce/node_modules/sockjs-client/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "sockjs-client", - "author": { - "name": "Matthew Sackman" - }, - "version": "0.1.3", - "keywords": [ - "websockets", - "websocket" - ], - "repository": { - "type": "git", - "url": "git://github.com/sockjs/sockjs-client-node.git" - }, - "main": "index", - "description": "Client library for SockJS", - "dependencies": { - "node-uuid": "1.3.3" - }, - "readme": "# SockJS Client Node\n\nNode client for [SockJS](https://github.com/sockjs). Currently, only\nthe XHR Streaming transport is supported.\n\n## Usage\n\n var sjsc = require('sockjs-client');\n var client = sjsc.create(\"http://localhost/sjsServer\");\n client.on('connection', function () { // connection is established });\n client.on('data', function (msg) { // received some data });\n client.on('error', function (e) { // something went wrong });\n client.write(\"Have some text you mighty SockJS server!\");\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/sockjs/sockjs-client-node/issues" - }, - "homepage": "https://github.com/sockjs/sockjs-client-node", - "_id": "sockjs-client@0.1.3", - "dist": { - "shasum": "aaaf2f27bf4bf6f101e69f71008c8dbe6e810a81" - }, - "_from": "sockjs-client@~>0.1.3", - "_resolved": "https://registry.npmjs.org/sockjs-client/-/sockjs-client-0.1.3.tgz" -} diff --git a/node_modules/coalesce/node_modules/sockjs/.npmignore b/node_modules/coalesce/node_modules/sockjs/.npmignore deleted file mode 100644 index 28b91266..00000000 --- a/node_modules/coalesce/node_modules/sockjs/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.gitignore -lib/.placeholder -VERSION-GEN -src -node_modules -*~ diff --git a/node_modules/coalesce/node_modules/sockjs/COPYING b/node_modules/coalesce/node_modules/sockjs/COPYING deleted file mode 100644 index a71ebfdf..00000000 --- a/node_modules/coalesce/node_modules/sockjs/COPYING +++ /dev/null @@ -1,6 +0,0 @@ -Parts of the code are derived from various open source projects. - -For code derived from Socket.IO by Guillermo Rauch see -https://github.com/LearnBoost/socket.io/tree/0.6.17#readme. - -All other code is released on MIT license, see LICENSE-MIT-SockJS. diff --git a/node_modules/coalesce/node_modules/sockjs/Changelog b/node_modules/coalesce/node_modules/sockjs/Changelog deleted file mode 100644 index 309e4320..00000000 --- a/node_modules/coalesce/node_modules/sockjs/Changelog +++ /dev/null @@ -1,179 +0,0 @@ -0.3.8 -===== - - * #118 - Allow servers to specify a base URL in /info - * #131 - Don't look up session id undefined - * #124 - Small grammar updates for ReadMe - * Upgrade Faye to 0.7.0 from 0.4.0 - -0.3.7 -===== - - * Expose "protocol" on raw websocket connection instance, correctly - -0.3.6 -===== - - * When the server closes a connection, make sure the send buffer still - gets flushed. - * Expose "protocol" on raw websocket connection instance - * #105, #109, #113 - expose 'host', 'user-agent', and 'accept-language' - headers - * Serve SockJS over https CDN by default - * Upgrade Faye to 0.4.4 from 0.4.0 - -0.3.5 -===== - - * #103 - connection.protocol might have been empty on some rare - occasions. - * #99 - faye-websocket was leaking sockets in "closed" state - when dealing with rfc websockets - - -0.3.4 -===== - - * #73 - apparently 'package' is a reserved keyword (use 'pkg' instead) - * #93 - Coffescript can leak a variable when the same name is used - in catch statement. Let's always use 'x' as the variable in catch. - * #76 - decorateConnection could throw an error if remote connection - was closed before setup was complete - * #90 - Fix "TypeError: 'addListener'" exception (via @pl). - * remove 'optionalDependencies' section from package.json, - 'rbytes' was always optional. - * #91 - Fix rare null exception. - - -0.3.3 -===== - - * sockjs/sockjs-protocol#56, #88 Fix for iOS 6 caching POSTs - - -0.3.1 -===== - - * #58 - websocket transport emitted an array instead of a string - during onmessage event. - * Running under node.js 0.7 caused infinite recursion (Stephan Kochen) - * #59 - restrict characters allowed in callback parameter - * Updated readme - rbytes package is optional - * Updated readme WRT deployments on heroku - * Add minimalistic license block to every source file. - - -0.3.0 -===== - - * Sending JSESSIONID cookie is now *disabled* by default. - * sockjs/sockjs-protocol#46 - introduce new service - required for protocol tests "/cookie_needed_echo" - * Initial work towards better integration with - "connect" (Stephan Kochen). See discusion: - https://github.com/senchalabs/connect/pull/506 - * More documentation about the Cookie and Origin headers. - * #51 - expose "readyState" on connection instance - * #53 - expose "protocol" on connection instance - * #52 - Some protocols may not emit 'close' event with IE. - * sockjs/sockjs-client#49 - Support 'null' origin - aka: allow SockJS - client to be served from file:// paths. - - -0.2.1 -===== - - * Bumped "faye-websocket" dependency to 0.4. Updated - code to take advantage of introduced changes. - * Pinned "node-static" and bumped "node-uuid" dependencies. - * Removed "Origin" header list of headers exposed to the user. - This header is not really meaningful in sockjs context. - * Header "Access-Control-Allow-Methods" was misspelled. - - -0.2.0 -===== - - * #36, #3 - Replace a custom WebSocket server implementation - with faye-websocket-node. - * Multiple changes to support SockJS-protocol 0.2. - * The session is now closed on network errors immediately - (instead of waiting 5 seconds) - * Raw websocket interface available - to make it easier - to write command line SockJS clients. - * Support '/info' url. - * The test server got moved from SockJS-client to SockJS-node. - * Dropped deprecated Server API (use createServer method instead). - * Option `websocket` is now used instead of `disabled_transports`. - - -0.1.2 -===== - - * #27 - Allow all unicode characters to be send over SockJS. - * #14 - Make it possible to customize JSESSIONID cookie logic. - - -0.1.1 -===== - - * #32 Expose various request headers on connection. - * #30 Expose request path on connection. - - -0.1.0 -===== - - * The API changed, there is now an idiomatic API, modelled on node.js - Stream API. The old API is deprecated and there is a dummy wrapper - that emulates it. Please do upgrade to the new idiomatic API. - * #22 Initial support for hybi13 (stephank) - * New options accepted by the `Server` constructor: `log`, - `heartbeat_delay` and `disconnect_delay`. - * SockJS is now not able to send rich data structures - all data - passed to `write` is converted to a string. - * #23 `Connection.remoteAddress` property introduced (Stéphan Kochen) - * Loads of small changes in order to adhere to protocol spec. - - -0.0.5 -===== - - * #20: `npm submodule sockjs` didn't work due to outdated github - path. - - -0.0.4 -===== - - * Support for htmlfile transport, used by IE in a deployment - dependent on cookies. - * Added /chunking_test API, used to detect support for HTTP chunking - on client side. - * Unified code logic for all the chunking transports - the same code - is reused for polling versions. - * All the chunking transports are closed by the server after 128K was - send, in order to force client to GC and reconnect. - * Don't distribute source coffeescript with npm. - * Minor fixes in websocket code. - * Dropped jQuery dependency. - * Unicode encoding could been garbled during XHR upload. - * Other minor fixes. - - -0.0.3 -====== - - * EventSource transport didn't emit 'close' event. - - -0.0.2 -===== - - * By default set JSESSIONID cookie, useful for load balancing. - - -0.0.1 -===== - - * Initial release. diff --git a/node_modules/coalesce/node_modules/sockjs/LICENSE-MIT-SockJS b/node_modules/coalesce/node_modules/sockjs/LICENSE-MIT-SockJS deleted file mode 100644 index a8971671..00000000 --- a/node_modules/coalesce/node_modules/sockjs/LICENSE-MIT-SockJS +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011 VMware, Inc. - -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/Makefile b/node_modules/coalesce/node_modules/sockjs/Makefile deleted file mode 100644 index ea939b87..00000000 --- a/node_modules/coalesce/node_modules/sockjs/Makefile +++ /dev/null @@ -1,55 +0,0 @@ -.PHONY: all serve clean - -COFFEE:=./node_modules/.bin/coffee - -#### General - -all: build - -build: src/*coffee - @$(COFFEE) -v > /dev/null - $(COFFEE) -o lib/ -c src/*.coffee - -clean: - rm -f lib/*.js - - -#### Testing - -test_server: - node examples/test_server/server.js - -serve: - @if [ -e .pidfile.pid ]; then \ - kill `cat .pidfile.pid`; \ - rm .pidfile.pid; \ - fi - - @while [ 1 ]; do \ - make build; \ - echo " [*] Running http server"; \ - make test_server & \ - SRVPID=$$!; \ - echo $$SRVPID > .pidfile.pid; \ - echo " [*] Server pid: $$SRVPID"; \ - inotifywait -r -q -e modify .; \ - kill `cat .pidfile.pid`; \ - rm -f .pidfile.pid; \ - sleep 0.1; \ - done - -#### Release process -# 1) commit everything -# 2) amend version in package.json -# 3) run 'make tag' and run suggested 'git push' variants -# 4) run 'npm publish' - -RVER:=$(shell grep "version" package.json|tr '\t"' ' \t'|cut -f 4) -VER:=$(shell ./VERSION-GEN) - -.PHONY: tag -tag: all - git commit $(TAG_OPTS) package.json Changelog -m "Release $(RVER)" - git tag v$(RVER) -m "Release $(RVER)" - @echo ' [*] Now run' - @echo 'git push; git push --tag' diff --git a/node_modules/coalesce/node_modules/sockjs/README.md b/node_modules/coalesce/node_modules/sockjs/README.md deleted file mode 100644 index 7f373e24..00000000 --- a/node_modules/coalesce/node_modules/sockjs/README.md +++ /dev/null @@ -1,458 +0,0 @@ -SockJS family: - - * [SockJS-client](https://github.com/sockjs/sockjs-client) JavaScript client library - * [SockJS-node](https://github.com/sockjs/sockjs-node) Node.js server - * [SockJS-erlang](https://github.com/sockjs/sockjs-erlang) Erlang server - * [SockJS-tornado](https://github.com/MrJoes/sockjs-tornado) Python/Tornado server - * [vert.x](https://github.com/purplefox/vert.x) Java/vert.x server - -Work in progress: - - * [SockJS-ruby](https://github.com/nyarly/sockjs-ruby) - * [SockJS-netty](https://github.com/cgbystrom/sockjs-netty) - * [SockJS-gevent](https://github.com/sdiehl/sockjs-gevent) ([and a fork](https://github.com/njoyce/sockjs-gevent)) - * [pyramid-SockJS](https://github.com/fafhrd91/pyramid_sockjs) - * [wildcloud-websockets](https://github.com/wildcloud/wildcloud-websockets) - * [SockJS-cyclone](https://github.com/flaviogrossi/sockjs-cyclone) - * [SockJS-twisted](https://github.com/Fugiman/sockjs-twisted/) - * [wai-SockJS](https://github.com/Palmik/wai-sockjs) - * [SockJS-perl](https://github.com/vti/sockjs-perl) - * [SockJS-go](https://github.com/igm/sockjs-go/) - -What is SockJS? -=============== - -SockJS is a JavaScript library (for browsers) that provides a WebSocket-like -object. 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, with WebSockets or without. -This necessitates the use of a server, which this is one version of, for Node.js. - - -SockJS-node server -================== - -SockJS-node is a Node.js server side counterpart of -[SockJS-client browser library](https://github.com/sockjs/sockjs-client) -written in CoffeeScript. - -To install `sockjs-node` run: - - npm install sockjs - -For additional security (true random numbers) you might want to -install `rbytes` package - SockJS will use it if available: - - npm install rbytes - - -A simplified echo SockJS server could look more or less like: - -```javascript -var http = require('http'); -var sockjs = require('sockjs'); - -var echo = sockjs.createServer(); -echo.on('connection', function(conn) { - conn.on('data', function(message) { - conn.write(message); - }); - conn.on('close', function() {}); -}); - -var server = http.createServer(); -echo.installHandlers(server, {prefix:'/echo'}); -server.listen(9999, '0.0.0.0'); -``` - -(Take look at -[examples](https://github.com/sockjs/sockjs-node/tree/master/examples/echo) -directory for a complete version.) - -Subscribe to -[SockJS mailing list](https://groups.google.com/forum/#!forum/sockjs) for -discussions and support. - - -Live QUnit tests and smoke tests --------------------------------- - -[SockJS-client](https://github.com/sockjs/sockjs-client) comes with -some QUnit tests and a few smoke tests that are using SockJS-node. At -the moment they are deployed in few places, just click to see if -SockJS is working in your browser: - - * http://sockjs.popcnt.org/ and https://sockjs.popcnt.org/ (hosted in Europe) - * http://sockjs.cloudfoundry.com/ (CloudFoundry, websockets disabled, loadbalanced) - * https://sockjs.cloudfoundry.com/ (CloudFoundry SSL, websockets disabled, loadbalanced) - - -SockJS-node API ---------------- - -The API design is based on the common Node API's like -[Streams API](http://nodejs.org/docs/v0.5.8/api/streams.html) or -[Http.Server API](http://nodejs.org/docs/v0.5.8/api/http.html#http.Server). - -### Server class - -SockJS module is generating a `Server` class, similar to -[Node.js http.createServer](http://nodejs.org/docs/v0.5.8/api/http.html#http.createServer) -module. - -```javascript -var sockjs_server = sockjs.createServer(options); -``` - -Where `options` is a hash which can contain: - -
-
sockjs_url (string, required)
-
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").
- -
Property: url (string)
-
Url - property copied from last request.
- -
Property: pathname (string)
-
`pathname` from parsed url, for convenience.
- -
Property: prefix (string)
-
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 @@ - - - - - - -

SockJS Echo example

- -
-
-
-
- - - diff --git a/node_modules/coalesce/node_modules/sockjs/examples/echo/package.json b/node_modules/coalesce/node_modules/sockjs/examples/echo/package.json deleted file mode 100644 index 5fb7acb3..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/echo/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "sockjs-echo", - "version": "0.0.0-unreleasable", - "dependencies": { - "node-static": "0.5.9", - "sockjs": "*" - } -} diff --git a/node_modules/coalesce/node_modules/sockjs/examples/echo/server.js b/node_modules/coalesce/node_modules/sockjs/examples/echo/server.js deleted file mode 100644 index 39b61efe..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/echo/server.js +++ /dev/null @@ -1,30 +0,0 @@ -var http = require('http'); -var sockjs = require('sockjs'); -var node_static = require('node-static'); - -// 1. Echo sockjs server -var sockjs_opts = {sockjs_url: "http://cdn.sockjs.org/sockjs-0.3.min.js"}; - -var sockjs_echo = sockjs.createServer(sockjs_opts); -sockjs_echo.on('connection', function(conn) { - conn.on('data', function(message) { - conn.write(message); - }); -}); - -// 2. Static files server -var static_directory = new node_static.Server(__dirname); - -// 3. Usual http stuff -var server = http.createServer(); -server.addListener('request', function(req, res) { - static_directory.serve(req, res); -}); -server.addListener('upgrade', function(req,res){ - res.end(); -}); - -sockjs_echo.installHandlers(server, {prefix:'/echo'}); - -console.log(' [*] Listening on 0.0.0.0:9999' ); -server.listen(9999, '0.0.0.0'); diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/index.html b/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/index.html deleted file mode 100644 index 3766bcd5..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -

SockJS Express example

- -
-
-
-
- - - diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/package.json b/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/package.json deleted file mode 100644 index 9c6a19f3..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "sockjs-express", - "version": "0.0.0-unreleasable", - "dependencies": { - "express": "~3*", - "sockjs": "*" - } -} diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/server.js b/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/server.js deleted file mode 100644 index 2169a353..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express-3.x/server.js +++ /dev/null @@ -1,26 +0,0 @@ -var express = require('express'); -var sockjs = require('sockjs'); -var http = require('http'); - -// 1. Echo sockjs server -var sockjs_opts = {sockjs_url: "http://cdn.sockjs.org/sockjs-0.3.min.js"}; - -var sockjs_echo = sockjs.createServer(sockjs_opts); -sockjs_echo.on('connection', function(conn) { - conn.on('data', function(message) { - conn.write(message); - }); -}); - -// 2. Express server -var app = express(); /* express.createServer will not work here */ -var server = http.createServer(app); - -sockjs_echo.installHandlers(server, {prefix:'/echo'}); - -console.log(' [*] Listening on 0.0.0.0:9999' ); -server.listen(9999, '0.0.0.0'); - -app.get('/', function (req, res) { - res.sendfile(__dirname + '/index.html'); -}); diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express/index.html b/node_modules/coalesce/node_modules/sockjs/examples/express/index.html deleted file mode 100644 index 3766bcd5..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - -

SockJS Express example

- -
-
-
-
- - - diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express/package.json b/node_modules/coalesce/node_modules/sockjs/examples/express/package.json deleted file mode 100644 index 9aba351b..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "sockjs-express", - "version": "0.0.0-unreleasable", - "dependencies": { - "express": "<3", - "sockjs": "*" - } -} diff --git a/node_modules/coalesce/node_modules/sockjs/examples/express/server.js b/node_modules/coalesce/node_modules/sockjs/examples/express/server.js deleted file mode 100644 index 81410aed..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/express/server.js +++ /dev/null @@ -1,23 +0,0 @@ -var express = require('express'); -var sockjs = require('sockjs'); - -// 1. Echo sockjs server -var sockjs_opts = {sockjs_url: "http://cdn.sockjs.org/sockjs-0.3.min.js"}; - -var sockjs_echo = sockjs.createServer(sockjs_opts); -sockjs_echo.on('connection', function(conn) { - conn.on('data', function(message) { - conn.write(message); - }); -}); - -// 2. Express server -var app = express.createServer(); -sockjs_echo.installHandlers(app, {prefix:'/echo'}); - -console.log(' [*] Listening on 0.0.0.0:9999' ); -app.listen(9999, '0.0.0.0'); - -app.get('/', function (req, res) { - res.sendfile(__dirname + '/index.html'); -}); diff --git a/node_modules/coalesce/node_modules/sockjs/examples/haproxy.cfg b/node_modules/coalesce/node_modules/sockjs/examples/haproxy.cfg deleted file mode 100644 index 95cf195c..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/haproxy.cfg +++ /dev/null @@ -1,42 +0,0 @@ -# Requires recent Haproxy to work with websockets (for example 1.4.16). -defaults - mode http - # Set timeouts to your needs - timeout client 5s - timeout connect 5s - timeout server 5s - -frontend all 0.0.0.0:8888 - mode http - timeout client 120s - - option forwardfor - # Fake connection:close, required in this setup. - option http-server-close - option http-pretend-keepalive - - acl is_sockjs path_beg /echo /broadcast /close - acl is_stats path_beg /stats - - use_backend sockjs if is_sockjs - use_backend stats if is_stats - default_backend static - - -backend sockjs - # Load-balance according to hash created from first two - # directories in url path. For example requests going to /1/ - # should be handled by single server (assuming resource prefix is - # one-level deep, like "/echo"). - balance uri depth 2 - timeout server 120s - server srv_sockjs1 127.0.0.1:9999 - # server srv_sockjs2 127.0.0.1:9998 - -backend static - balance roundrobin - server srv_static 127.0.0.1:8000 - -backend stats - stats uri /stats - stats enable diff --git a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/README.md b/node_modules/coalesce/node_modules/sockjs/examples/multiplex/README.md deleted file mode 100644 index fac30c3e..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/README.md +++ /dev/null @@ -1,26 +0,0 @@ -WebSocket-multiplex SockJS example -================================== - -This example is a copy of example from -[websocket-multiplex](https://github.com/sockjs/websocket-multiplex/) -project: - - * https://github.com/sockjs/websocket-multiplex/ - - -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 -service (under the [/multiplex](http://127.0.0.1:9999/multiplex) -path). - -With that set up, WebSocket-multiplex is able to push three virtual -connections over a single SockJS connection. See the code for details. diff --git a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/index.html b/node_modules/coalesce/node_modules/sockjs/examples/multiplex/index.html deleted file mode 100644 index f3be5c3e..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/index.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -

SockJS Multiplex example

- -
-
-
-
- -
-
-
-
- -
-
-
-
- - - diff --git a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/package.json b/node_modules/coalesce/node_modules/sockjs/examples/multiplex/package.json deleted file mode 100644 index 46ab6b17..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "sockjs-multiplex", - "version": "0.0.0-unreleasable", - "dependencies": { - "express": "2.5.8", - "sockjs": "*", - "websocket-multiplex" : "0.1.x" - } -} diff --git a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/server.js b/node_modules/coalesce/node_modules/sockjs/examples/multiplex/server.js deleted file mode 100644 index 1cc84a06..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/multiplex/server.js +++ /dev/null @@ -1,52 +0,0 @@ -var express = require('express'); -var sockjs = require('sockjs'); - -var websocket_multiplex = require('websocket-multiplex'); - - -// 1. Setup SockJS server -var sockjs_opts = {sockjs_url: "http://cdn.sockjs.org/sockjs-0.3.min.js"}; -var service = sockjs.createServer(sockjs_opts); - - -// 2. Setup multiplexing -var multiplexer = new websocket_multiplex.MultiplexServer(service); - -var ann = multiplexer.registerChannel('ann'); -ann.on('connection', function(conn) { - conn.write('Ann says hi!'); - conn.on('data', function(data) { - conn.write('Ann nods: ' + data); - }); -}); - -var bob = multiplexer.registerChannel('bob'); -bob.on('connection', function(conn) { - conn.write('Bob doesn\'t agree.'); - conn.on('data', function(data) { - conn.write('Bob says no to: ' + data); - }); -}); - -var carl = multiplexer.registerChannel('carl'); -carl.on('connection', function(conn) { - conn.write('Carl says goodbye!'); - // Explicitly cancel connection - conn.end(); -}); - - -// 3. Express server -var app = express.createServer(); -service.installHandlers(app, {prefix:'/multiplex'}); - -console.log(' [*] Listening on 0.0.0.0:9999' ); -app.listen(9999, '0.0.0.0'); - -app.get('/', function (req, res) { - res.sendfile(__dirname + '/index.html'); -}); - -app.get('/multiplex.js', function (req, res) { - res.sendfile(__dirname + '/multiplex.js'); -}); diff --git a/node_modules/coalesce/node_modules/sockjs/examples/test_server/README.md b/node_modules/coalesce/node_modules/sockjs/examples/test_server/README.md deleted file mode 100644 index 95ef079b..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/test_server/README.md +++ /dev/null @@ -1,30 +0,0 @@ -SockJS test server -================== - -In order to test sockjs server implementation the server needs to -provide a standarized sockjs endpoint that will can used by various -sockjs-related tests. For example by QUnit or -[Sockjs-protocol](https://github.com/sockjs/sockjs-protocol) tests. - -This small code does exactly that - runs a simple server that supports -the following SockJS services: - - * `/echo` - * `/disabled_websocket_echo` - * `/cookie_needed_echo` - * `/close` - * `/ticker` - * `/amplify` - * `/broadcast` - -If you just want to quickly run it: - - npm install - node server.js - - -If you want to run do development it's recommended to run `make -test_server` from the top `sockjs-node` directory: - - cd ../.. - make test_server diff --git a/node_modules/coalesce/node_modules/sockjs/examples/test_server/config.js b/node_modules/coalesce/node_modules/sockjs/examples/test_server/config.js deleted file mode 100644 index 415e1eb4..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/test_server/config.js +++ /dev/null @@ -1,9 +0,0 @@ -exports.config = { - server_opts: { - sockjs_url: 'http://localhost:8080/lib/sockjs.js', - websocket: true - }, - - port: 8081, - host: '0.0.0.0' -}; diff --git a/node_modules/coalesce/node_modules/sockjs/examples/test_server/package.json b/node_modules/coalesce/node_modules/sockjs/examples/test_server/package.json deleted file mode 100644 index a467750c..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/test_server/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "sockjs-test-server", - "version": "0.0.0-unreleasable", - "dependencies": { - "sockjs": "*" - } -} diff --git a/node_modules/coalesce/node_modules/sockjs/examples/test_server/server.js b/node_modules/coalesce/node_modules/sockjs/examples/test_server/server.js deleted file mode 100644 index 497090a2..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/test_server/server.js +++ /dev/null @@ -1,19 +0,0 @@ -var http = require('http'); -var config = require('./config').config; -var sockjs_app = require('./sockjs_app'); - - -var server = http.createServer(); -server.addListener('request', function(req, res) { - res.setHeader('content-type', 'text/plain'); - res.writeHead(404); - res.end('404 - Nothing here (via sockjs-node test_server)'); -}); -server.addListener('upgrade', function(req, res){ - res.end(); -}); - -sockjs_app.install(config.server_opts, server); - -console.log(" [*] Listening on", config.host + ':' + config.port); -server.listen(config.port, config.host); diff --git a/node_modules/coalesce/node_modules/sockjs/examples/test_server/sockjs_app.js b/node_modules/coalesce/node_modules/sockjs/examples/test_server/sockjs_app.js deleted file mode 100644 index 5c77221f..00000000 --- a/node_modules/coalesce/node_modules/sockjs/examples/test_server/sockjs_app.js +++ /dev/null @@ -1,85 +0,0 @@ -var sockjs = require('sockjs'); - -exports.install = function(opts, server) { - var sjs_echo = sockjs.createServer(opts); - sjs_echo.on('connection', function(conn) { - console.log(' [+] echo open ' + conn); - conn.on('close', function() { - console.log(' [-] echo close ' + conn); - }); - conn.on('data', function(m) { - var d = JSON.stringify(m); - console.log(' [ ] echo message ' + conn, - d.slice(0,64)+ - ((d.length > 64) ? '...' : '')); - conn.write(m); - }); - }); - - var sjs_close = sockjs.createServer(opts); - sjs_close.on('connection', function(conn) { - console.log(' [+] clos open ' + conn); - conn.close(3000, "Go away!"); - conn.on('close', function() { - console.log(' [-] clos close ' + conn); - }); - }); - - var sjs_ticker = sockjs.createServer(opts); - sjs_ticker.on('connection', function(conn) { - console.log(' [+] ticker open ' + conn); - var tref; - var schedule = function() { - conn.write('tick!'); - tref = setTimeout(schedule, 1000); - }; - tref = setTimeout(schedule, 1000); - conn.on('close', function() { - clearTimeout(tref); - console.log(' [-] ticker close ' + conn); - }); - }); - - var broadcast = {}; - var sjs_broadcast = sockjs.createServer(opts); - sjs_broadcast.on('connection', function(conn) { - console.log(' [+] broadcast open ' + conn); - broadcast[conn.id] = conn; - conn.on('close', function() { - delete broadcast[conn.id]; - console.log(' [-] broadcast close' + conn); - }); - conn.on('data', function(m) { - console.log(' [-] broadcast message', m); - for(var id in broadcast) { - broadcast[id].write(m); - } - }); - }); - - var sjs_amplify = sockjs.createServer(opts); - sjs_amplify.on('connection', function(conn) { - console.log(' [+] amp open ' + conn); - conn.on('close', function() { - console.log(' [-] amp close ' + conn); - }); - conn.on('data', function(m) { - var n = Math.floor(Number(m)); - n = (n > 0 && n < 19) ? n : 1; - console.log(' [ ] amp message: 2^' + n); - conn.write(Array(Math.pow(2, n)+1).join('x')); - }); - }); - - - sjs_echo.installHandlers(server, {prefix:'/echo', - response_limit: 4096}), - sjs_echo.installHandlers(server, {prefix:'/disabled_websocket_echo', - websocket: false}); - sjs_echo.installHandlers(server, {prefix:'/cookie_needed_echo', - jsessionid: true}); - sjs_close.installHandlers(server, {prefix:'/close'}); - sjs_ticker.installHandlers(server, {prefix:'/ticker'}); - sjs_amplify.installHandlers(server, {prefix:'/amplify'}); - sjs_broadcast.installHandlers(server, {prefix:'/broadcast'}); -}; diff --git a/node_modules/coalesce/node_modules/sockjs/index.js b/node_modules/coalesce/node_modules/sockjs/index.js deleted file mode 100644 index ba4063be..00000000 --- a/node_modules/coalesce/node_modules/sockjs/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/sockjs'); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/chunking-test.js b/node_modules/coalesce/node_modules/sockjs/lib/chunking-test.js deleted file mode 100644 index 8b209825..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/chunking-test.js +++ /dev/null @@ -1,78 +0,0 @@ -(function() { - var utils; - - utils = require('./utils'); - - exports.app = { - chunking_test: function(req, res, _, next_filter) { - var write, - _this = this; - res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); - res.writeHead(200); - write = function(payload) { - try { - return res.write(payload + '\n'); - } catch (x) { - - } - }; - utils.timeout_chain([ - [ - 0, function() { - return write('h'); - } - ], [ - 1, function() { - return write(Array(2049).join(' ') + 'h'); - } - ], [ - 5, function() { - return write('h'); - } - ], [ - 25, function() { - return write('h'); - } - ], [ - 125, function() { - return write('h'); - } - ], [ - 625, function() { - return write('h'); - } - ], [ - 3125, function() { - write('h'); - return res.end(); - } - ] - ]); - return true; - }, - info: function(req, res, _) { - var info; - info = { - websocket: this.options.websocket, - origins: ['*:*'], - cookie_needed: !!this.options.jsessionid, - entropy: utils.random32() - }; - if (typeof this.options.base_url === 'function') { - info.base_url = this.options.base_url(); - } else if (this.options.base_url) { - info.base_url = this.options.base_url; - } - res.setHeader('Content-Type', 'application/json; charset=UTF-8'); - res.writeHead(200); - return res.end(JSON.stringify(info)); - }, - info_options: function(req, res) { - res.statusCode = 204; - res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET'); - res.setHeader('Access-Control-Max-Age', res.cache_for); - return ''; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/iframe.js b/node_modules/coalesce/node_modules/sockjs/lib/iframe.js deleted file mode 100644 index 7adaedac..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/iframe.js +++ /dev/null @@ -1,29 +0,0 @@ -(function() { - var iframe_template, utils; - - utils = require('./utils'); - - iframe_template = "\n\n\n \n \n \n \n\n\n

Don't panic!

\n

This is a SockJS hidden iframe. It's used for cross domain magic.

\n\n"; - - exports.app = { - iframe: function(req, res) { - var content, context, k, quoted_md5; - context = { - '{{ sockjs_url }}': this.options.sockjs_url - }; - content = iframe_template; - for (k in context) { - content = content.replace(k, context[k]); - } - quoted_md5 = '"' + utils.md5_hex(content) + '"'; - if ('if-none-match' in req.headers && req.headers['if-none-match'] === quoted_md5) { - res.statusCode = 304; - return ''; - } - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - res.setHeader('ETag', quoted_md5); - return content; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/sockjs.js b/node_modules/coalesce/node_modules/sockjs/lib/sockjs.js deleted file mode 100644 index 1fe18aa0..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/sockjs.js +++ /dev/null @@ -1,216 +0,0 @@ -(function() { - var App, Listener, Server, chunking_test, events, fs, generate_dispatcher, iframe, sockjsVersion, trans_eventsource, trans_htmlfile, trans_jsonp, trans_websocket, trans_xhr, utils, webjs, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - - events = require('events'); - - fs = require('fs'); - - webjs = require('./webjs'); - - utils = require('./utils'); - - trans_websocket = require('./trans-websocket'); - - trans_jsonp = require('./trans-jsonp'); - - trans_xhr = require('./trans-xhr'); - - iframe = require('./iframe'); - - trans_eventsource = require('./trans-eventsource'); - - trans_htmlfile = require('./trans-htmlfile'); - - chunking_test = require('./chunking-test'); - - sockjsVersion = function() { - var pkg; - try { - pkg = fs.readFileSync(__dirname + '/../package.json', 'utf-8'); - } catch (x) { - - } - if (pkg) { - return JSON.parse(pkg).version; - } else { - return null; - } - }; - - App = (function(_super) { - - __extends(App, _super); - - function App() { - App.__super__.constructor.apply(this, arguments); - } - - App.prototype.welcome_screen = function(req, res) { - res.setHeader('content-type', 'text/plain; charset=UTF-8'); - res.writeHead(200); - res.end("Welcome to SockJS!\n"); - return true; - }; - - App.prototype.handle_404 = function(req, res) { - res.setHeader('content-type', 'text/plain; charset=UTF-8'); - res.writeHead(404); - res.end('404 Error: Page not found\n'); - return true; - }; - - App.prototype.disabled_transport = function(req, res, data) { - return this.handle_404(req, res, data); - }; - - App.prototype.h_sid = function(req, res, data) { - var jsid; - req.cookies = utils.parseCookie(req.headers.cookie); - if (typeof this.options.jsessionid === 'function') { - this.options.jsessionid(req, res); - } else if (this.options.jsessionid && res.setHeader) { - jsid = req.cookies['JSESSIONID'] || 'dummy'; - res.setHeader('Set-Cookie', 'JSESSIONID=' + jsid + '; path=/'); - } - return data; - }; - - App.prototype.log = function(severity, line) { - return this.options.log(severity, line); - }; - - return App; - - })(webjs.GenericApp); - - utils.objectExtend(App.prototype, iframe.app); - - utils.objectExtend(App.prototype, chunking_test.app); - - utils.objectExtend(App.prototype, trans_websocket.app); - - utils.objectExtend(App.prototype, trans_jsonp.app); - - utils.objectExtend(App.prototype, trans_xhr.app); - - utils.objectExtend(App.prototype, trans_eventsource.app); - - utils.objectExtend(App.prototype, trans_htmlfile.app); - - generate_dispatcher = function(options) { - var dispatcher, opts_filters, p, t, - _this = this; - p = function(s) { - return new RegExp('^' + options.prefix + s + '[/]?$'); - }; - t = function(s) { - return [p('/([^/.]+)/([^/.]+)' + s), 'server', 'session']; - }; - opts_filters = function(options_filter) { - if (options_filter == null) options_filter = 'xhr_options'; - return ['h_sid', 'xhr_cors', 'cache_for', options_filter, 'expose']; - }; - dispatcher = [['GET', p(''), ['welcome_screen']], ['GET', p('/iframe[0-9-.a-z_]*.html'), ['iframe', 'cache_for', 'expose']], ['OPTIONS', p('/info'), opts_filters('info_options')], ['GET', p('/info'), ['xhr_cors', 'h_no_cache', 'info', 'expose']], ['OPTIONS', p('/chunking_test'), opts_filters()], ['POST', p('/chunking_test'), ['xhr_cors', 'expect_xhr', 'chunking_test']], ['GET', p('/websocket'), ['raw_websocket']], ['GET', t('/jsonp'), ['h_sid', 'h_no_cache', 'jsonp']], ['POST', t('/jsonp_send'), ['h_sid', 'h_no_cache', 'expect_form', 'jsonp_send']], ['POST', t('/xhr'), ['h_sid', 'h_no_cache', 'xhr_cors', 'xhr_poll']], ['OPTIONS', t('/xhr'), opts_filters()], ['POST', t('/xhr_send'), ['h_sid', 'h_no_cache', 'xhr_cors', 'expect_xhr', 'xhr_send']], ['OPTIONS', t('/xhr_send'), opts_filters()], ['POST', t('/xhr_streaming'), ['h_sid', 'h_no_cache', 'xhr_cors', 'xhr_streaming']], ['OPTIONS', t('/xhr_streaming'), opts_filters()], ['GET', t('/eventsource'), ['h_sid', 'h_no_cache', 'eventsource']], ['GET', t('/htmlfile'), ['h_sid', 'h_no_cache', 'htmlfile']]]; - if (options.websocket) { - dispatcher.push(['GET', t('/websocket'), ['sockjs_websocket']]); - } else { - dispatcher.push(['GET', t('/websocket'), ['cache_for', 'disabled_transport']]); - } - return dispatcher; - }; - - Listener = (function() { - - function Listener(options, emit) { - this.options = options; - this.handler = __bind(this.handler, this); - this.app = new App(); - this.app.options = options; - this.app.emit = emit; - this.app.log('debug', 'SockJS v' + sockjsVersion() + ' ' + 'bound to ' + JSON.stringify(options.prefix)); - this.dispatcher = generate_dispatcher(this.options); - this.webjs_handler = webjs.generateHandler(this.app, this.dispatcher); - this.path_regexp = new RegExp('^' + this.options.prefix + '([/].+|[/]?)$'); - } - - Listener.prototype.handler = function(req, res, extra) { - if (!req.url.match(this.path_regexp)) return false; - this.webjs_handler(req, res, extra); - return true; - }; - - Listener.prototype.getHandler = function() { - var _this = this; - return function(a, b, c) { - return _this.handler(a, b, c); - }; - }; - - return Listener; - - })(); - - Server = (function(_super) { - - __extends(Server, _super); - - function Server(user_options) { - this.options = { - prefix: '', - response_limit: 128 * 1024, - websocket: true, - jsessionid: false, - heartbeat_delay: 25000, - disconnect_delay: 5000, - log: function(severity, line) { - return console.log(line); - }, - sockjs_url: 'https://d1fxtkz8shb9d2.cloudfront.net/sockjs-0.3.min.js' - }; - if (user_options) utils.objectExtend(this.options, user_options); - } - - Server.prototype.listener = function(handler_options) { - var options, - _this = this; - options = utils.objectExtend({}, this.options); - if (handler_options) utils.objectExtend(options, handler_options); - return new Listener(options, function() { - return _this.emit.apply(_this, arguments); - }); - }; - - Server.prototype.installHandlers = function(http_server, handler_options) { - var handler; - handler = this.listener(handler_options).getHandler(); - utils.overshadowListeners(http_server, 'request', handler); - utils.overshadowListeners(http_server, 'upgrade', handler); - return true; - }; - - Server.prototype.middleware = function(handler_options) { - var handler; - handler = this.listener(handler_options).getHandler(); - handler.upgrade = handler; - return handler; - }; - - return Server; - - })(events.EventEmitter); - - exports.createServer = function(options) { - return new Server(options); - }; - - exports.listen = function(http_server, options) { - var srv; - srv = exports.createServer(options); - if (http_server) srv.installHandlers(http_server); - return srv; - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/trans-eventsource.js b/node_modules/coalesce/node_modules/sockjs/lib/trans-eventsource.js deleted file mode 100644 index 1ed3f765..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/trans-eventsource.js +++ /dev/null @@ -1,40 +0,0 @@ -(function() { - var EventSourceReceiver, transport, utils, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - utils = require('./utils'); - - transport = require('./transport'); - - EventSourceReceiver = (function(_super) { - - __extends(EventSourceReceiver, _super); - - function EventSourceReceiver() { - EventSourceReceiver.__super__.constructor.apply(this, arguments); - } - - EventSourceReceiver.prototype.protocol = "eventsource"; - - EventSourceReceiver.prototype.doSendFrame = function(payload) { - var data; - data = ['data: ', utils.escape_selected(payload, '\r\n\x00'), '\r\n\r\n']; - return EventSourceReceiver.__super__.doSendFrame.call(this, data.join('')); - }; - - return EventSourceReceiver; - - })(transport.ResponseReceiver); - - exports.app = { - eventsource: function(req, res) { - res.setHeader('Content-Type', 'text/event-stream; charset=UTF-8'); - res.writeHead(200); - res.write('\r\n'); - transport.register(req, this, new EventSourceReceiver(req, res, this.options)); - return true; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/trans-htmlfile.js b/node_modules/coalesce/node_modules/sockjs/lib/trans-htmlfile.js deleted file mode 100644 index cd905736..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/trans-htmlfile.js +++ /dev/null @@ -1,58 +0,0 @@ -(function() { - var HtmlFileReceiver, iframe_template, transport, utils, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - utils = require('./utils'); - - transport = require('./transport'); - - iframe_template = "\n\n \n \n

Don't panic!

\n "; - - iframe_template += Array(1024 - iframe_template.length + 14).join(' '); - - iframe_template += '\r\n\r\n'; - - HtmlFileReceiver = (function(_super) { - - __extends(HtmlFileReceiver, _super); - - function HtmlFileReceiver() { - HtmlFileReceiver.__super__.constructor.apply(this, arguments); - } - - HtmlFileReceiver.prototype.protocol = "htmlfile"; - - HtmlFileReceiver.prototype.doSendFrame = function(payload) { - return HtmlFileReceiver.__super__.doSendFrame.call(this, '\r\n'); - }; - - return HtmlFileReceiver; - - })(transport.ResponseReceiver); - - exports.app = { - htmlfile: function(req, res) { - var callback; - if (!('c' in req.query || 'callback' in req.query)) { - throw { - status: 500, - message: '"callback" parameter required' - }; - } - callback = 'c' in req.query ? req.query['c'] : req.query['callback']; - if (/[^a-zA-Z0-9-_.]/.test(callback)) { - throw { - status: 500, - message: 'invalid "callback" parameter' - }; - } - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - res.writeHead(200); - res.write(iframe_template.replace(/{{ callback }}/g, callback)); - transport.register(req, this, new HtmlFileReceiver(req, res, this.options)); - return true; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/trans-jsonp.js b/node_modules/coalesce/node_modules/sockjs/lib/trans-jsonp.js deleted file mode 100644 index 2d1f073b..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/trans-jsonp.js +++ /dev/null @@ -1,104 +0,0 @@ -(function() { - var JsonpReceiver, transport, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - transport = require('./transport'); - - JsonpReceiver = (function(_super) { - - __extends(JsonpReceiver, _super); - - JsonpReceiver.prototype.protocol = "jsonp-polling"; - - JsonpReceiver.prototype.max_response_size = 1; - - function JsonpReceiver(req, res, options, callback) { - this.callback = callback; - JsonpReceiver.__super__.constructor.call(this, req, res, options); - } - - JsonpReceiver.prototype.doSendFrame = function(payload) { - return JsonpReceiver.__super__.doSendFrame.call(this, this.callback + "(" + JSON.stringify(payload) + ");\r\n"); - }; - - return JsonpReceiver; - - })(transport.ResponseReceiver); - - exports.app = { - jsonp: function(req, res, _, next_filter) { - var callback; - if (!('c' in req.query || 'callback' in req.query)) { - throw { - status: 500, - message: '"callback" parameter required' - }; - } - callback = 'c' in req.query ? req.query['c'] : req.query['callback']; - if (/[^a-zA-Z0-9-_.]/.test(callback)) { - throw { - status: 500, - message: 'invalid "callback" parameter' - }; - } - res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); - res.writeHead(200); - transport.register(req, this, new JsonpReceiver(req, res, this.options, callback)); - return true; - }, - jsonp_send: function(req, res, query) { - var d, jsonp, message, _i, _len; - if (!query) { - throw { - status: 500, - message: 'Payload expected.' - }; - } - if (typeof query === 'string') { - try { - d = JSON.parse(query); - } catch (x) { - throw { - status: 500, - message: 'Broken JSON encoding.' - }; - } - } else { - d = query.d; - } - if (typeof d === 'string' && d) { - try { - d = JSON.parse(d); - } catch (x) { - throw { - status: 500, - message: 'Broken JSON encoding.' - }; - } - } - if (!d || d.__proto__.constructor !== Array) { - throw { - status: 500, - message: 'Payload expected.' - }; - } - jsonp = transport.Session.bySessionId(req.session); - if (jsonp === null) { - throw { - status: 404 - }; - } - for (_i = 0, _len = d.length; _i < _len; _i++) { - message = d[_i]; - jsonp.didMessage(message); - } - res.setHeader('Content-Length', '2'); - res.setHeader('Content-Type', 'text/plain; charset=UTF-8'); - res.writeHead(200); - res.end('ok'); - return true; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/trans-websocket.js b/node_modules/coalesce/node_modules/sockjs/lib/trans-websocket.js deleted file mode 100644 index b57ee7ee..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/trans-websocket.js +++ /dev/null @@ -1,205 +0,0 @@ -(function() { - var FayeWebsocket, RawWebsocketSessionReceiver, Transport, WebSocketReceiver, transport, utils, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - FayeWebsocket = require('faye-websocket'); - - utils = require('./utils'); - - transport = require('./transport'); - - exports.app = { - _websocket_check: function(req, connection, head) { - var conn; - if ((req.headers.upgrade || '').toLowerCase() !== 'websocket') { - throw { - status: 400, - message: 'Can "Upgrade" only to "WebSocket".' - }; - } - conn = (req.headers.connection || '').toLowerCase(); - if ((conn.split(/, */)).indexOf('upgrade') === -1) { - throw { - status: 400, - message: '"Connection" must be "Upgrade".' - }; - } - }, - sockjs_websocket: function(req, connection, head) { - var ws, - _this = this; - this._websocket_check(req, connection, head); - ws = new FayeWebsocket(req, connection, head); - ws.onopen = function() { - return transport.registerNoSession(req, _this, new WebSocketReceiver(ws, connection)); - }; - return true; - }, - raw_websocket: function(req, connection, head) { - var ver, ws, - _this = this; - this._websocket_check(req, connection, head); - ver = req.headers['sec-websocket-version'] || ''; - if (['8', '13'].indexOf(ver) === -1) { - throw { - status: 400, - message: 'Only supported WebSocket protocol is RFC 6455.' - }; - } - ws = new FayeWebsocket(req, connection, head); - ws.onopen = function() { - return new RawWebsocketSessionReceiver(req, connection, _this, ws); - }; - return true; - } - }; - - WebSocketReceiver = (function(_super) { - - __extends(WebSocketReceiver, _super); - - WebSocketReceiver.prototype.protocol = "websocket"; - - function WebSocketReceiver(ws, connection) { - var _this = this; - this.ws = ws; - this.connection = connection; - try { - this.connection.setKeepAlive(true, 5000); - this.connection.setNoDelay(true); - } catch (x) { - - } - this.ws.addEventListener('message', function(m) { - return _this.didMessage(m.data); - }); - WebSocketReceiver.__super__.constructor.call(this, this.connection); - } - - WebSocketReceiver.prototype.setUp = function() { - WebSocketReceiver.__super__.setUp.apply(this, arguments); - return this.ws.addEventListener('close', this.thingy_end_cb); - }; - - WebSocketReceiver.prototype.tearDown = function() { - this.ws.removeEventListener('close', this.thingy_end_cb); - return WebSocketReceiver.__super__.tearDown.apply(this, arguments); - }; - - WebSocketReceiver.prototype.didMessage = function(payload) { - var message, msg, _i, _len, _results; - if (this.ws && this.session && payload.length > 0) { - try { - message = JSON.parse(payload); - } catch (x) { - return this.didClose(1002, 'Broken framing.'); - } - if (payload[0] === '[') { - _results = []; - for (_i = 0, _len = message.length; _i < _len; _i++) { - msg = message[_i]; - _results.push(this.session.didMessage(msg)); - } - return _results; - } else { - return this.session.didMessage(message); - } - } - }; - - WebSocketReceiver.prototype.doSendFrame = function(payload) { - if (this.ws) { - try { - this.ws.send(payload); - return true; - } catch (x) { - - } - } - return false; - }; - - WebSocketReceiver.prototype.didClose = function() { - WebSocketReceiver.__super__.didClose.apply(this, arguments); - try { - this.ws.close(1000, "Normal closure", false); - } catch (x) { - - } - this.ws = null; - return this.connection = null; - }; - - return WebSocketReceiver; - - })(transport.GenericReceiver); - - Transport = transport.Transport; - - RawWebsocketSessionReceiver = (function(_super) { - - __extends(RawWebsocketSessionReceiver, _super); - - function RawWebsocketSessionReceiver(req, conn, server, ws) { - var _this = this; - this.ws = ws; - this.prefix = server.options.prefix; - this.readyState = Transport.OPEN; - this.recv = { - connection: conn, - protocol: "websocket-raw" - }; - this.connection = new transport.SockJSConnection(this); - this.decorateConnection(req); - server.emit('connection', this.connection); - this._end_cb = function() { - return _this.didClose(); - }; - this.ws.addEventListener('close', this._end_cb); - this._message_cb = function(m) { - return _this.didMessage(m); - }; - this.ws.addEventListener('message', this._message_cb); - } - - RawWebsocketSessionReceiver.prototype.didMessage = function(m) { - if (this.readyState === Transport.OPEN) this.connection.emit('data', m.data); - }; - - RawWebsocketSessionReceiver.prototype.send = function(payload) { - if (this.readyState !== Transport.OPEN) return false; - this.ws.send(payload); - return true; - }; - - RawWebsocketSessionReceiver.prototype.close = function(status, reason) { - if (status == null) status = 1000; - if (reason == null) reason = "Normal closure"; - if (this.readyState !== Transport.OPEN) return false; - this.readyState = Transport.CLOSING; - this.ws.close(status, reason, false); - return true; - }; - - RawWebsocketSessionReceiver.prototype.didClose = function() { - if (!this.ws) return; - this.ws.removeEventListener('message', this._message_cb); - this.ws.removeEventListener('close', this._end_cb); - try { - this.ws.close(1000, "Normal closure", false); - } catch (x) { - - } - this.ws = null; - this.readyState = Transport.CLOSED; - this.connection.emit('end'); - this.connection.emit('close'); - return this.connection = null; - }; - - return RawWebsocketSessionReceiver; - - })(transport.Session); - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/trans-xhr.js b/node_modules/coalesce/node_modules/sockjs/lib/trans-xhr.js deleted file mode 100644 index 409cb3c1..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/trans-xhr.js +++ /dev/null @@ -1,116 +0,0 @@ -(function() { - var XhrPollingReceiver, XhrStreamingReceiver, transport, utils, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - transport = require('./transport'); - - utils = require('./utils'); - - XhrStreamingReceiver = (function(_super) { - - __extends(XhrStreamingReceiver, _super); - - function XhrStreamingReceiver() { - XhrStreamingReceiver.__super__.constructor.apply(this, arguments); - } - - XhrStreamingReceiver.prototype.protocol = "xhr-streaming"; - - XhrStreamingReceiver.prototype.doSendFrame = function(payload) { - return XhrStreamingReceiver.__super__.doSendFrame.call(this, payload + '\n'); - }; - - return XhrStreamingReceiver; - - })(transport.ResponseReceiver); - - XhrPollingReceiver = (function(_super) { - - __extends(XhrPollingReceiver, _super); - - function XhrPollingReceiver() { - XhrPollingReceiver.__super__.constructor.apply(this, arguments); - } - - XhrPollingReceiver.prototype.protocol = "xhr-polling"; - - XhrPollingReceiver.prototype.max_response_size = 1; - - return XhrPollingReceiver; - - })(XhrStreamingReceiver); - - exports.app = { - xhr_options: function(req, res) { - res.statusCode = 204; - res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, POST'); - res.setHeader('Access-Control-Max-Age', res.cache_for); - return ''; - }, - xhr_send: function(req, res, data) { - var d, jsonp, message, _i, _len; - if (!data) { - throw { - status: 500, - message: 'Payload expected.' - }; - } - try { - d = JSON.parse(data); - } catch (x) { - throw { - status: 500, - message: 'Broken JSON encoding.' - }; - } - if (!d || d.__proto__.constructor !== Array) { - throw { - status: 500, - message: 'Payload expected.' - }; - } - jsonp = transport.Session.bySessionId(req.session); - if (!jsonp) { - throw { - status: 404 - }; - } - for (_i = 0, _len = d.length; _i < _len; _i++) { - message = d[_i]; - jsonp.didMessage(message); - } - res.setHeader('Content-Type', 'text/plain; charset=UTF-8'); - res.writeHead(204); - res.end(); - return true; - }, - xhr_cors: function(req, res, content) { - var headers, origin; - if (!req.headers['origin'] || req.headers['origin'] === 'null') { - origin = '*'; - } else { - origin = req.headers['origin']; - } - res.setHeader('Access-Control-Allow-Origin', origin); - headers = req.headers['access-control-request-headers']; - if (headers) res.setHeader('Access-Control-Allow-Headers', headers); - res.setHeader('Access-Control-Allow-Credentials', 'true'); - return content; - }, - xhr_poll: function(req, res, _, next_filter) { - res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); - res.writeHead(200); - transport.register(req, this, new XhrPollingReceiver(req, res, this.options)); - return true; - }, - xhr_streaming: function(req, res, _, next_filter) { - res.setHeader('Content-Type', 'application/javascript; charset=UTF-8'); - res.writeHead(200); - res.write(Array(2049).join('h') + '\n'); - transport.register(req, this, new XhrStreamingReceiver(req, res, this.options)); - return true; - } - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/transport.js b/node_modules/coalesce/node_modules/sockjs/lib/transport.js deleted file mode 100644 index 12be7b2c..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/transport.js +++ /dev/null @@ -1,387 +0,0 @@ -(function() { - var GenericReceiver, MAP, ResponseReceiver, Session, SockJSConnection, Transport, closeFrame, register, stream, utils, uuid, - __hasProp = Object.prototype.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; - - stream = require('stream'); - - uuid = require('node-uuid'); - - utils = require('./utils'); - - Transport = (function() { - - function Transport() {} - - return Transport; - - })(); - - Transport.CONNECTING = 0; - - Transport.OPEN = 1; - - Transport.CLOSING = 2; - - Transport.CLOSED = 3; - - closeFrame = function(status, reason) { - return 'c' + JSON.stringify([status, reason]); - }; - - SockJSConnection = (function(_super) { - - __extends(SockJSConnection, _super); - - function SockJSConnection(_session) { - this._session = _session; - this.id = uuid(); - this.headers = {}; - this.prefix = this._session.prefix; - } - - SockJSConnection.prototype.toString = function() { - return ''; - }; - - SockJSConnection.prototype.write = function(string) { - return this._session.send('' + string); - }; - - SockJSConnection.prototype.end = function(string) { - if (string) this.write(string); - this.close(); - return null; - }; - - SockJSConnection.prototype.close = function(code, reason) { - return this._session.close(code, reason); - }; - - SockJSConnection.prototype.destroy = function() { - this.removeAllListeners(); - return this.end(); - }; - - SockJSConnection.prototype.destroySoon = function() { - return this.destroy(); - }; - - return SockJSConnection; - - })(stream.Stream); - - SockJSConnection.prototype.__defineGetter__('readable', function() { - return this._session.readyState === Transport.OPEN; - }); - - SockJSConnection.prototype.__defineGetter__('writable', function() { - return this._session.readyState === Transport.OPEN; - }); - - SockJSConnection.prototype.__defineGetter__('readyState', function() { - return this._session.readyState; - }); - - MAP = {}; - - Session = (function() { - - function Session(session_id, server) { - var _this = this; - this.session_id = session_id; - this.heartbeat_delay = server.options.heartbeat_delay; - this.disconnect_delay = server.options.disconnect_delay; - this.prefix = server.options.prefix; - this.send_buffer = []; - this.is_closing = false; - this.readyState = Transport.CONNECTING; - if (this.session_id) MAP[this.session_id] = this; - this.timeout_cb = function() { - return _this.didTimeout(); - }; - this.to_tref = setTimeout(this.timeout_cb, this.disconnect_delay); - this.connection = new SockJSConnection(this); - this.emit_open = function() { - _this.emit_open = null; - return server.emit('connection', _this.connection); - }; - } - - Session.prototype.register = function(req, recv) { - if (this.recv) { - recv.doSendFrame(closeFrame(2010, "Another connection still open")); - recv.didClose(); - return; - } - if (this.to_tref) { - clearTimeout(this.to_tref); - this.to_tref = null; - } - if (this.readyState === Transport.CLOSING) { - this.flushToRecv(recv); - recv.doSendFrame(this.close_frame); - recv.didClose(); - this.to_tref = setTimeout(this.timeout_cb, this.disconnect_delay); - return; - } - this.recv = recv; - this.recv.session = this; - this.decorateConnection(req); - if (this.readyState === Transport.CONNECTING) { - this.recv.doSendFrame('o'); - this.readyState = Transport.OPEN; - process.nextTick(this.emit_open); - } - if (!this.recv) return; - this.tryFlush(); - }; - - Session.prototype.decorateConnection = function(req) { - var address, headers, key, remoteAddress, remotePort, socket, _i, _len, _ref; - if (!(socket = this.recv.connection)) socket = this.recv.response.connection; - try { - remoteAddress = socket.remoteAddress; - remotePort = socket.remotePort; - address = socket.address(); - } catch (x) { - - } - if (remoteAddress) { - this.connection.remoteAddress = remoteAddress; - this.connection.remotePort = remotePort; - this.connection.address = address; - } - this.connection.url = req.url; - this.connection.pathname = req.pathname; - this.connection.protocol = this.recv.protocol; - headers = {}; - _ref = ['referer', 'x-client-ip', 'x-forwarded-for', 'x-cluster-client-ip', 'via', 'x-real-ip', 'host', 'user-agent', 'accept-language']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - if (req.headers[key]) headers[key] = req.headers[key]; - } - if (headers) return this.connection.headers = headers; - }; - - Session.prototype.unregister = function() { - this.recv.session = null; - this.recv = null; - if (this.to_tref) clearTimeout(this.to_tref); - return this.to_tref = setTimeout(this.timeout_cb, this.disconnect_delay); - }; - - Session.prototype.flushToRecv = function(recv) { - var sb, _ref; - if (this.send_buffer.length > 0) { - _ref = [this.send_buffer, []], sb = _ref[0], this.send_buffer = _ref[1]; - recv.doSendBulk(sb); - return true; - } - return false; - }; - - Session.prototype.tryFlush = function() { - var x, - _this = this; - if (!this.flushToRecv(this.recv)) { - if (this.to_tref) clearTimeout(this.to_tref); - x = function() { - if (_this.recv) { - _this.to_tref = setTimeout(x, _this.heartbeat_delay); - return _this.recv.doSendFrame("h"); - } - }; - this.to_tref = setTimeout(x, this.heartbeat_delay); - } - }; - - Session.prototype.didTimeout = function() { - if (this.to_tref) { - clearTimeout(this.to_tref); - this.to_tref = null; - } - if (this.readyState !== Transport.CONNECTING && this.readyState !== Transport.OPEN && this.readyState !== Transport.CLOSING) { - throw Error('INVALID_STATE_ERR'); - } - if (this.recv) throw Error('RECV_STILL_THERE'); - this.readyState = Transport.CLOSED; - this.connection.emit('end'); - this.connection.emit('close'); - this.connection = null; - if (this.session_id) { - delete MAP[this.session_id]; - return this.session_id = null; - } - }; - - Session.prototype.didMessage = function(payload) { - if (this.readyState === Transport.OPEN) { - this.connection.emit('data', payload); - } - }; - - Session.prototype.send = function(payload) { - if (this.readyState !== Transport.OPEN) return false; - this.send_buffer.push('' + payload); - if (this.recv) this.tryFlush(); - return true; - }; - - Session.prototype.close = function(status, reason) { - if (status == null) status = 1000; - if (reason == null) reason = "Normal closure"; - if (this.readyState !== Transport.OPEN) return false; - this.readyState = Transport.CLOSING; - this.close_frame = closeFrame(status, reason); - if (this.recv) { - this.recv.doSendFrame(this.close_frame); - if (this.recv) this.recv.didClose(); - if (this.recv) this.unregister(); - } - return true; - }; - - return Session; - - })(); - - Session.bySessionId = function(session_id) { - if (!session_id) return null; - return MAP[session_id] || null; - }; - - register = function(req, server, session_id, receiver) { - var session; - session = Session.bySessionId(session_id); - if (!session) session = new Session(session_id, server); - session.register(req, receiver); - return session; - }; - - exports.register = function(req, server, receiver) { - return register(req, server, req.session, receiver); - }; - - exports.registerNoSession = function(req, server, receiver) { - return register(req, server, void 0, receiver); - }; - - GenericReceiver = (function() { - - function GenericReceiver(thingy) { - this.thingy = thingy; - this.setUp(this.thingy); - } - - GenericReceiver.prototype.setUp = function() { - var _this = this; - this.thingy_end_cb = function() { - return _this.didAbort(1006, "Connection closed"); - }; - this.thingy.addListener('close', this.thingy_end_cb); - return this.thingy.addListener('end', this.thingy_end_cb); - }; - - GenericReceiver.prototype.tearDown = function() { - this.thingy.removeListener('close', this.thingy_end_cb); - this.thingy.removeListener('end', this.thingy_end_cb); - return this.thingy_end_cb = null; - }; - - GenericReceiver.prototype.didAbort = function(status, reason) { - var session; - session = this.session; - this.didClose(status, reason); - if (session) return session.didTimeout(); - }; - - GenericReceiver.prototype.didClose = function(status, reason) { - if (this.thingy) { - this.tearDown(this.thingy); - this.thingy = null; - } - if (this.session) return this.session.unregister(status, reason); - }; - - GenericReceiver.prototype.doSendBulk = function(messages) { - var m, q_msgs; - q_msgs = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = messages.length; _i < _len; _i++) { - m = messages[_i]; - _results.push(utils.quote(m)); - } - return _results; - })(); - return this.doSendFrame('a' + '[' + q_msgs.join(',') + ']'); - }; - - return GenericReceiver; - - })(); - - ResponseReceiver = (function(_super) { - - __extends(ResponseReceiver, _super); - - ResponseReceiver.prototype.max_response_size = void 0; - - function ResponseReceiver(request, response, options) { - this.request = request; - this.response = response; - this.options = options; - this.curr_response_size = 0; - try { - this.request.connection.setKeepAlive(true, 5000); - } catch (x) { - - } - ResponseReceiver.__super__.constructor.call(this, this.request.connection); - if (this.max_response_size === void 0) { - this.max_response_size = this.options.response_limit; - } - } - - ResponseReceiver.prototype.doSendFrame = function(payload) { - var r; - this.curr_response_size += payload.length; - r = false; - try { - this.response.write(payload); - r = true; - } catch (x) { - - } - if (this.max_response_size && this.curr_response_size >= this.max_response_size) { - this.didClose(); - } - return r; - }; - - ResponseReceiver.prototype.didClose = function() { - ResponseReceiver.__super__.didClose.apply(this, arguments); - try { - this.response.end(); - } catch (x) { - - } - return this.response = null; - }; - - return ResponseReceiver; - - })(GenericReceiver); - - exports.GenericReceiver = GenericReceiver; - - exports.Transport = Transport; - - exports.Session = Session; - - exports.ResponseReceiver = ResponseReceiver; - - exports.SockJSConnection = SockJSConnection; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/utils.js b/node_modules/coalesce/node_modules/sockjs/lib/utils.js deleted file mode 100644 index 16743f0c..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/utils.js +++ /dev/null @@ -1,154 +0,0 @@ -(function() { - var array_intersection, crypto, escapable, lookup, rbytes, unroll_lookup; - - crypto = require('crypto'); - - try { - rbytes = require('rbytes'); - } catch (x) { - - } - - exports.array_intersection = array_intersection = function(arr_a, arr_b) { - var a, r, _i, _len; - r = []; - for (_i = 0, _len = arr_a.length; _i < _len; _i++) { - a = arr_a[_i]; - if (arr_b.indexOf(a) !== -1) r.push(a); - } - return r; - }; - - exports.escape_selected = function(str, chars) { - var c, i, map, parts, r, v, _i, _len, _ref; - map = {}; - chars = '%' + chars; - for (_i = 0, _len = chars.length; _i < _len; _i++) { - c = chars[_i]; - map[c] = escape(c); - } - r = new RegExp('([' + chars + '])'); - parts = str.split(r); - for (i = 0, _ref = parts.length; 0 <= _ref ? i < _ref : i > _ref; 0 <= _ref ? i++ : i--) { - v = parts[i]; - if (v.length === 1 && v in map) parts[i] = map[v]; - } - return parts.join(''); - }; - - exports.buffer_concat = function(buf_a, buf_b) { - var dst; - dst = new Buffer(buf_a.length + buf_b.length); - buf_a.copy(dst); - buf_b.copy(dst, buf_a.length); - return dst; - }; - - exports.md5_hex = function(data) { - return crypto.createHash('md5').update(data).digest('hex'); - }; - - exports.sha1_base64 = function(data) { - return crypto.createHash('sha1').update(data).digest('base64'); - }; - - exports.timeout_chain = function(arr) { - var fun, timeout, user_fun, _ref, - _this = this; - arr = arr.slice(0); - if (!arr.length) return; - _ref = arr.shift(), timeout = _ref[0], user_fun = _ref[1]; - fun = function() { - user_fun(); - return exports.timeout_chain(arr); - }; - return setTimeout(fun, timeout); - }; - - exports.objectExtend = function(dst, src) { - var k; - for (k in src) { - if (src.hasOwnProperty(k)) dst[k] = src[k]; - } - return dst; - }; - - exports.overshadowListeners = function(ee, event, handler) { - var new_handler, old_listeners; - old_listeners = ee.listeners(event).slice(0); - ee.removeAllListeners(event); - new_handler = function() { - var listener, _i, _len; - if (handler.apply(this, arguments) !== true) { - for (_i = 0, _len = old_listeners.length; _i < _len; _i++) { - listener = old_listeners[_i]; - listener.apply(this, arguments); - } - return false; - } - return true; - }; - return ee.addListener(event, new_handler); - }; - - escapable = /[\x00-\x1f\ud800-\udfff\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufff0-\uffff]/g; - - unroll_lookup = function(escapable) { - var c, i, unrolled; - unrolled = {}; - c = (function() { - var _results; - _results = []; - for (i = 0; i < 65536; i++) { - _results.push(String.fromCharCode(i)); - } - return _results; - })(); - escapable.lastIndex = 0; - c.join('').replace(escapable, function(a) { - return unrolled[a] = '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - return unrolled; - }; - - lookup = unroll_lookup(escapable); - - exports.quote = function(string) { - var quoted; - quoted = JSON.stringify(string); - escapable.lastIndex = 0; - if (!escapable.test(quoted)) return quoted; - return quoted.replace(escapable, function(a) { - return lookup[a]; - }); - }; - - exports.parseCookie = function(cookie_header) { - var cookie, cookies, parts, _i, _len, _ref; - cookies = {}; - if (cookie_header) { - _ref = cookie_header.split(';'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - cookie = _ref[_i]; - parts = cookie.split('='); - cookies[parts[0].trim()] = (parts[1] || '').trim(); - } - } - return cookies; - }; - - exports.random32 = function() { - var foo, v; - if (rbytes) { - foo = rbytes.randomBytes(4); - v = [foo[0], foo[1], foo[2], foo[3]]; - } else { - foo = function() { - return Math.floor(Math.random() * 256); - }; - v = [foo(), foo(), foo(), foo()]; - } - return v[0] + (v[1] * 256) + (v[2] * 256 * 256) + (v[3] * 256 * 256 * 256); - }; - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/lib/webjs.js b/node_modules/coalesce/node_modules/sockjs/lib/webjs.js deleted file mode 100644 index e4b9f668..00000000 --- a/node_modules/coalesce/node_modules/sockjs/lib/webjs.js +++ /dev/null @@ -1,283 +0,0 @@ -(function() { - var GenericApp, execute_request, fake_response, fs, http, querystring, url, utils; - - url = require('url'); - - querystring = require('querystring'); - - fs = require('fs'); - - http = require('http'); - - utils = require('./utils'); - - execute_request = function(app, funs, req, res, data) { - var fun, _results; - try { - _results = []; - while (funs.length > 0) { - fun = funs.shift(); - req.last_fun = fun; - _results.push(data = app[fun](req, res, data, req.next_filter)); - } - return _results; - } catch (x) { - if (typeof x === 'object' && 'status' in x) { - if (x.status === 0) { - return; - } else if ('handle_' + x.status in app) { - app['handle_' + x.status](req, res, x); - } else { - app['handle_error'](req, res, x); - } - } else { - app['handle_error'](req, res, x); - } - return app['log_request'](req, res, true); - } - }; - - fake_response = function(req, res) { - var headers; - headers = { - 'Connection': 'close' - }; - res.writeHead = function(status, user_headers) { - var k, r; - if (user_headers == null) user_headers = {}; - r = []; - r.push('HTTP/' + req.httpVersion + ' ' + status + ' ' + http.STATUS_CODES[status]); - utils.objectExtend(headers, user_headers); - for (k in headers) { - r.push(k + ': ' + headers[k]); - } - r = r.concat(['', '']); - try { - res.write(r.join('\r\n')); - } catch (x) { - - } - try { - return res.end(); - } catch (x) { - - } - }; - return res.setHeader = function(k, v) { - return headers[k] = v; - }; - }; - - exports.generateHandler = function(app, dispatcher) { - return function(req, res, head) { - var allowed_methods, found, funs, i, m, method, path, row, _i, _len, _ref; - if (typeof res.writeHead === "undefined") fake_response(req, res); - utils.objectExtend(req, url.parse(req.url, true)); - req.start_date = new Date(); - found = false; - allowed_methods = []; - for (_i = 0, _len = dispatcher.length; _i < _len; _i++) { - row = dispatcher[_i]; - method = row[0], path = row[1], funs = row[2]; - if (path.constructor !== Array) path = [path]; - m = req.pathname.match(path[0]); - if (!m) continue; - if (!req.method.match(new RegExp(method))) { - allowed_methods.push(method); - continue; - } - for (i = 1, _ref = path.length; 1 <= _ref ? i < _ref : i > _ref; 1 <= _ref ? i++ : i--) { - req[path[i]] = m[i]; - } - funs = funs.slice(0); - funs.push('log_request'); - req.next_filter = function(data) { - return execute_request(app, funs, req, res, data); - }; - req.next_filter(head); - found = true; - break; - } - if (!found) { - if (allowed_methods.length !== 0) { - app['handle_405'](req, res, allowed_methods); - } else { - app['handle_404'](req, res); - } - app['log_request'](req, res, true); - } - }; - }; - - exports.GenericApp = GenericApp = (function() { - - function GenericApp() {} - - GenericApp.prototype.handle_404 = function(req, res, x) { - if (res.finished) return x; - res.writeHead(404, {}); - res.end(); - return true; - }; - - GenericApp.prototype.handle_405 = function(req, res, methods) { - res.writeHead(405, { - 'Allow': methods.join(', ') - }); - res.end(); - return true; - }; - - GenericApp.prototype.handle_error = function(req, res, x) { - if (res.finished) return x; - if (typeof x === 'object' && 'status' in x) { - res.writeHead(x.status, {}); - res.end(x.message || ""); - } else { - try { - res.writeHead(500, {}); - res.end("500 - Internal Server Error"); - } catch (x) { - - } - this.log('error', 'Exception on "' + req.method + ' ' + req.href + '" in filter "' + req.last_fun + '":\n' + (x.stack || x)); - } - return true; - }; - - GenericApp.prototype.log_request = function(req, res, data) { - var td; - td = (new Date()) - req.start_date; - this.log('info', req.method + ' ' + req.url + ' ' + td + 'ms ' + (res.finished ? res._header.split('\r')[0].split(' ')[1] : '(unfinished)')); - return data; - }; - - GenericApp.prototype.log = function(severity, line) { - return console.log(line); - }; - - GenericApp.prototype.expose_html = function(req, res, content) { - if (res.finished) return content; - if (!res.getHeader('Content-Type')) { - res.setHeader('Content-Type', 'text/html; charset=UTF-8'); - } - return this.expose(req, res, content); - }; - - GenericApp.prototype.expose_json = function(req, res, content) { - if (res.finished) return content; - if (!res.getHeader('Content-Type')) { - res.setHeader('Content-Type', 'application/json'); - } - return this.expose(req, res, JSON.stringify(content)); - }; - - GenericApp.prototype.expose = function(req, res, content) { - if (res.finished) return content; - if (content && !res.getHeader('Content-Type')) { - res.setHeader('Content-Type', 'text/plain'); - } - if (content) res.setHeader('Content-Length', content.length); - res.writeHead(res.statusCode); - res.end(content, 'utf8'); - return true; - }; - - GenericApp.prototype.serve_file = function(req, res, filename, next_filter) { - var a; - a = function(error, content) { - if (error) { - res.writeHead(500); - res.end("can't read file"); - } else { - res.setHeader('Content-length', content.length); - res.writeHead(res.statusCode, res.headers); - res.end(content, 'utf8'); - } - return next_filter(true); - }; - fs.readFile(filename, a); - throw { - status: 0 - }; - }; - - GenericApp.prototype.cache_for = function(req, res, content) { - var exp; - res.cache_for = res.cache_for || 365 * 24 * 60 * 60; - res.setHeader('Cache-Control', 'public, max-age=' + res.cache_for); - exp = new Date(); - exp.setTime(exp.getTime() + res.cache_for * 1000); - res.setHeader('Expires', exp.toGMTString()); - return content; - }; - - GenericApp.prototype.h_no_cache = function(req, res, content) { - res.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0'); - return content; - }; - - GenericApp.prototype.expect_form = function(req, res, _data, next_filter) { - var data, - _this = this; - data = new Buffer(0); - req.on('data', function(d) { - return data = utils.buffer_concat(data, new Buffer(d, 'binary')); - }); - req.on('end', function() { - var q; - data = data.toString('utf-8'); - switch ((req.headers['content-type'] || '').split(';')[0]) { - case 'application/x-www-form-urlencoded': - q = querystring.parse(data); - break; - case 'text/plain': - case '': - q = data; - break; - default: - _this.log('error', "Unsupported content-type " + req.headers['content-type']); - q = void 0; - } - return next_filter(q); - }); - throw { - status: 0 - }; - }; - - GenericApp.prototype.expect_xhr = function(req, res, _data, next_filter) { - var data, - _this = this; - data = new Buffer(0); - req.on('data', function(d) { - return data = utils.buffer_concat(data, new Buffer(d, 'binary')); - }); - req.on('end', function() { - var q; - data = data.toString('utf-8'); - switch ((req.headers['content-type'] || '').split(';')[0]) { - case 'text/plain': - case 'T': - case 'application/json': - case 'application/xml': - case '': - case 'text/xml': - q = data; - break; - default: - _this.log('error', 'Unsupported content-type ' + req.headers['content-type']); - q = void 0; - } - return next_filter(q); - }); - throw { - status: 0 - }; - }; - - return GenericApp; - - })(); - -}).call(this); diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/CHANGELOG.md b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/CHANGELOG.md deleted file mode 100644 index 2302cbaa..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/CHANGELOG.md +++ /dev/null @@ -1,84 +0,0 @@ -### 0.7.0 / 2013-09-09 - -* Allow the server to send custom headers with EventSource responses - - -### 0.6.1 / 2013-07-05 - -* Add `ca` option to the client for specifying certificate authorities -* Start the server driver asynchronously so that `onopen` handlers can be added - - -### 0.6.0 / 2013-05-12 - -* Add support for custom headers - - -### 0.5.0 / 2013-05-05 - -* Extract the protocol handlers into the `websocket-driver` library -* Support the Node streaming API - - -### 0.4.4 / 2013-02-14 - -* Emit the `close` event if TCP is closed before CLOSE frame is acked - - -### 0.4.3 / 2012-07-09 - -* Add `Connection: close` to EventSource response -* Handle situations where `request.socket` is undefined - - -### 0.4.2 / 2012-04-06 - -* Add WebSocket error code `1011`. -* Handle URLs with no path correctly by sending `GET /` - - -### 0.4.1 / 2012-02-26 - -* Treat anything other than a `Buffer` as a string when calling `send()` - - -### 0.4.0 / 2012-02-13 - -* Add `ping()` method to server-side `WebSocket` and `EventSource` -* Buffer `send()` calls until the draft-76 handshake is complete -* Fix HTTPS problems on Node 0.7 - - -### 0.3.1 / 2012-01-16 - -* Call `setNoDelay(true)` on `net.Socket` objects to reduce latency - - -### 0.3.0 / 2012-01-13 - -* Add support for `EventSource` connections - - -### 0.2.0 / 2011-12-21 - -* Add support for `Sec-WebSocket-Protocol` negotiation -* Support `hixie-76` close frames and 75/76 ignored segments -* Improve performance of HyBi parsing/framing functions -* Decouple parsers from TCP and reduce write volume - - -### 0.1.2 / 2011-12-05 - -* Detect closed sockets on the server side when TCP connection breaks -* Make `hixie-76` sockets work through HAProxy - - -### 0.1.1 / 2011-11-30 - -* Fix `addEventListener()` interface methods - - -### 0.1.0 / 2011-11-27 - -* Initial release, based on WebSocket components from Faye - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/README.md b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/README.md deleted file mode 100644 index 207be834..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/README.md +++ /dev/null @@ -1,293 +0,0 @@ -# faye-websocket - -* Travis CI build: [![Build - status](https://secure.travis-ci.org/faye/faye-websocket-node.png)](http://travis-ci.org/faye/faye-websocket-node) -* Autobahn tests: [server](http://faye.jcoglan.com/autobahn/servers/), - [client](http://faye.jcoglan.com/autobahn/clients/) - -This is a general-purpose WebSocket implementation extracted from the -[Faye](http://faye.jcoglan.com) project. It provides classes for easily -building WebSocket servers and clients in Node. It does not provide a server -itself, but rather makes it easy to handle WebSocket connections within an -existing [Node](http://nodejs.org/) application. It does not provide any -abstraction other than the standard [WebSocket -API](http://dev.w3.org/html5/websockets/). - -It also provides an abstraction for handling -[EventSource](http://dev.w3.org/html5/eventsource/) connections, which are -one-way connections that allow the server to push data to the client. They are -based on streaming HTTP responses and can be easier to access via proxies than -WebSockets. - - -## Installation - -``` -$ npm install faye-websocket -``` - - -## Handling WebSocket connections in Node - -You can handle WebSockets on the server side by listening for HTTP Upgrade -requests, and creating a new socket for the request. This socket object exposes -the usual WebSocket methods for receiving and sending messages. For example this -is how you'd implement an echo server: - -```js -var WebSocket = require('faye-websocket'), - http = require('http'); - -var server = http.createServer(); - -server.on('upgrade', function(request, socket, body) { - if (WebSocket.isWebSocket(request)) { - var ws = new WebSocket(request, socket, body); - - ws.on('message', function(event) { - ws.send(event.data); - }); - - ws.on('close', function(event) { - console.log('close', event.code, event.reason); - ws = null; - }); - } -}); - -server.listen(8000); -``` - -`WebSocket` objects are also duplex streams, so you could replace the -`ws.on('message', ...)` line with: - -```js - ws.pipe(ws); -``` - -Note that under certain circumstances (notably a draft-76 client connecting -through an HTTP proxy), the WebSocket handshake will not be complete after you -call `new WebSocket()` because the server will not have received the entire -handshake from the client yet. In this case, calls to `ws.send()` will buffer -the message in memory until the handshake is complete, at which point any -buffered messages will be sent to the client. - -If you need to detect when the WebSocket handshake is complete, you can use the -`onopen` event. - -If the connection's protocol version supports it, you can call `ws.ping()` to -send a ping message and wait for the client's response. This method takes a -message string, and an optional callback that fires when a matching pong -message is received. It returns `true` iff a ping message was sent. If the -client does not support ping/pong, this method sends no data and returns -`false`. - -```js -ws.ping('Mic check, one, two', function() { - // fires when pong is received -}); -``` - - -## Using the WebSocket client - -The client supports both the plain-text `ws` protocol and the encrypted `wss` -protocol, and has exactly the same interface as a socket you would use in a web -browser. On the wire it identifies itself as `hybi-13`. - -```js -var WebSocket = require('faye-websocket'), - ws = new WebSocket.Client('ws://www.example.com/'); - -ws.on('open', function(event) { - console.log('open'); - ws.send('Hello, world!'); -}); - -ws.on('message', function(event) { - console.log('message', event.data); -}); - -ws.on('close', function(event) { - console.log('close', event.code, event.reason); - ws = null; -}); -``` - -The WebSocket client also lets you inspect the status and headers of the -handshake response via its `statusCode` and `headers` properties. - - -## Subprotocol negotiation - -The WebSocket protocol allows peers to select and identify the application -protocol to use over the connection. On the client side, you can set which -protocols the client accepts by passing a list of protocol names when you -construct the socket: - -```js -var ws = new WebSocket.Client('ws://www.example.com/', ['irc', 'amqp']); -``` - -On the server side, you can likewise pass in the list of protocols the server -supports after the other constructor arguments: - -```js -var ws = new WebSocket(request, socket, body, ['irc', 'amqp']); -``` - -If the client and server agree on a protocol, both the client- and server-side -socket objects expose the selected protocol through the `ws.protocol` property. - - -## Initialization options - -Both the server- and client-side classes allow an options object to be passed -in at initialization time, for example: - -```js -var ws = new WebSocket(request, socket, body, protocols, options); -var ws = new WebSocket.Client(url, protocols, options); -``` - -`protocols` is an array of subprotocols as described above, or `null`. -`options` is an optional object containing any of these fields: - -* `headers` - an object containing key-value pairs representing HTTP headers to - be sent during the handshake process -* `ping` - an integer that sets how often the WebSocket should send ping - frames, measured in seconds - - -## WebSocket API - -Both server- and client-side `WebSocket` objects support the following API. - -* `on('open', function(event) {})` fires when the socket connection is - established. Event has no attributes. -* `on('message', function(event) {})` fires when the socket receives a - message. Event has one attribute, `data`, which is either a `String` - (for text frames) or a `Buffer` (for binary frames). -* `on('error', function(event) {})` fires when there is a protocol error - due to bad data sent by the other peer. This event is purely informational, - you do not need to implement error recover. -* `on('close', function(event) {})` fires when either the client or the - server closes the connection. Event has two optional attributes, - `code` and `reason`, that expose the status code and message - sent by the peer that closed the connection. -* `send(message)` accepts either a `String` or a `Buffer` and sends a - text or binary message over the connection to the other peer. -* `ping(message = '', function() {})` sends a ping frame with an - optional message and fires the callback when a matching pong is received. -* `close(code, reason)` closes the connection, sending the given status - code and reason text, both of which are optional. -* `version` is a string containing the version of the `WebSocket` - protocol the connection is using. -* `protocol` is a string (which may be empty) identifying the - subprotocol the socket is using. - - -## Handling EventSource connections in Node - -EventSource connections provide a very similar interface, although because they -only allow the server to send data to the client, there is no `onmessage` API. -EventSource allows the server to push text messages to the client, where each -message has an optional event-type and ID. - -```js -var WebSocket = require('faye-websocket'), - EventSource = WebSocket.EventSource, - http = require('http'); - -var server = http.createServer(); - -server.on('request', function(request, response) { - if (EventSource.isEventSource(request)) { - var es = new EventSource(request, response); - console.log('open', es.url, es.lastEventId); - - // Periodically send messages - var loop = setInterval(function() { es.send('Hello') }, 1000); - - es.on('close', function() { - clearInterval(loop); - es = null; - }); - - } else { - // Normal HTTP request - response.writeHead(200, {'Content-Type': 'text/plain'}); - response.end('Hello'); - } -}); - -server.listen(8000); -``` - -The `send` method takes two optional parameters, `event` and `id`. The default -event-type is `'message'` with no ID. For example, to send a `notification` -event with ID `99`: - -```js -es.send('Breaking News!', {event: 'notification', id: '99'}); -``` - -The `EventSource` object exposes the following properties: - -* `url` is a string containing the URL the client used to create the - EventSource. -* `lastEventId` is a string containing the last event ID received by the - client. You can use this when the client reconnects after a dropped - connection to determine which messages need resending. - -When you initialize an EventSource with ` new EventSource()`, you can pass -configuration options after the `response` parameter. Available options are: - -* `headers` is an object containing custom headers to be set on the - EventSource response. -* `retry` is a number that tells the client how long (in seconds) it - should wait after a dropped connection before attempting to reconnect. -* `ping` is a number that tells the server how often (in seconds) to - send 'ping' packets to the client to keep the connection open, to defeat - timeouts set by proxies. The client will ignore these messages. - -For example, this creates a connection that allows access from any origin, pings -every 15 seconds and is retryable every 10 seconds if the connection is broken: - -```js -var es = new EventSource(request, response, { - headers: {'Access-Control-Allow-Origin': '*'}, - ping: 15, - retry: 10 -}); -``` - -You can send a ping message at any time by calling `es.ping()`. Unlike -WebSocket, the client does not send a response to this; it is merely to send -some data over the wire to keep the connection alive. - - -## 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/examples/autobahn_client.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/autobahn_client.js deleted file mode 100644 index af3490f9..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/autobahn_client.js +++ /dev/null @@ -1,38 +0,0 @@ -var WebSocket = require('../lib/faye/websocket'), - pace = require('pace'); - -var host = 'ws://localhost:9001', - agent = 'Node ' + process.version, - cases = 0, - skip = []; - -var socket = new WebSocket.Client(host + '/getCaseCount'), - progress; - -socket.onmessage = function(event) { - console.log('Total cases to run: ' + event.data); - cases = parseInt(event.data); - progress = pace(cases); -}; - -socket.onclose = function() { - var runCase = function(n) { - progress.op(); - - if (n > cases) { - socket = new WebSocket.Client(host + '/updateReports?agent=' + encodeURIComponent(agent)); - socket.onclose = process.exit; - - } else if (skip.indexOf(n) >= 0) { - runCase(n + 1); - - } else { - socket = new WebSocket.Client(host + '/runCase?case=' + n + '&agent=' + encodeURIComponent(agent)); - socket.pipe(socket); - socket.on('close', function() { runCase(n + 1) }); - } - }; - - runCase(1); -}; - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/client.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/client.js deleted file mode 100644 index 58d58c90..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/client.js +++ /dev/null @@ -1,24 +0,0 @@ -var WebSocket = require('../lib/faye/websocket'), - port = process.argv[2] || 7000, - secure = process.argv[3] === 'ssl', - scheme = secure ? 'wss' : 'ws', - url = scheme + '://localhost:' + port + '/', - headers = {Origin: 'http://faye.jcoglan.com'}, - ws = new WebSocket.Client(url, null, {headers: headers}); - -console.log('Connecting to ' + ws.url); - -ws.onopen = function(event) { - console.log('open'); - ws.send('Hello, WebSocket!'); -}; - -ws.onmessage = function(event) { - console.log('message', event.data); - // ws.close(1002, 'Going away'); -}; - -ws.onclose = function(event) { - console.log('close', event.code, event.reason); -}; - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/haproxy.conf b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/haproxy.conf deleted file mode 100644 index 9bfc57ff..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/haproxy.conf +++ /dev/null @@ -1,21 +0,0 @@ -defaults - mode http - timeout client 5s - timeout connect 5s - timeout server 5s - -frontend all 0.0.0.0:3000 - mode http - timeout client 120s - - option forwardfor - option http-server-close - option http-pretend-keepalive - - default_backend sockets - -backend sockets - balance uri depth 2 - timeout server 120s - server socket1 127.0.0.1:7000 - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/server.js b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/server.js deleted file mode 100644 index 83f4ea3d..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/server.js +++ /dev/null @@ -1,68 +0,0 @@ -var WebSocket = require('../lib/faye/websocket'), - fs = require('fs'), - http = require('http'), - https = require('https'); - -var port = process.argv[2] || 7000, - secure = process.argv[3] === 'ssl'; - -var upgradeHandler = function(request, socket, head) { - var ws = new WebSocket(request, socket, head, ['irc', 'xmpp'], {ping: 5}); - console.log('open', ws.url, ws.version, ws.protocol); - - ws.pipe(ws); - - ws.onclose = function(event) { - console.log('close', event.code, event.reason); - ws = null; - }; -}; - -var requestHandler = function(request, response) { - if (!WebSocket.EventSource.isEventSource(request)) - return staticHandler(request, response); - - var es = new WebSocket.EventSource(request, response), - time = parseInt(es.lastEventId, 10) || 0; - - console.log('open', es.url, es.lastEventId); - - var loop = setInterval(function() { - time += 1; - es.send('Time: ' + time); - setTimeout(function() { - if (es) es.send('Update!!', {event: 'update', id: time}); - }, 1000); - }, 2000); - - fs.createReadStream(__dirname + '/haproxy.conf').pipe(es, {end: false}); - - es.onclose = function() { - clearInterval(loop); - console.log('close', es.url); - es = null; - }; -}; - -var staticHandler = function(request, response) { - var path = request.url; - - fs.readFile(__dirname + path, function(err, content) { - var status = err ? 404 : 200; - response.writeHead(status, {'Content-Type': 'text/html'}); - response.write(content || 'Not found'); - response.end(); - }); -}; - -var server = secure - ? https.createServer({ - key: fs.readFileSync(__dirname + '/../spec/server.key'), - cert: fs.readFileSync(__dirname + '/../spec/server.crt') - }) - : http.createServer(); - -server.on('request', requestHandler); -server.on('upgrade', upgradeHandler); -server.listen(port); - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/sse.html b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/sse.html deleted file mode 100644 index 2afa273c..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/sse.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - EventSource test - - - -

EventSource test

-
    - - - - - - diff --git a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/ws.html b/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/ws.html deleted file mode 100644 index e322f2aa..00000000 --- a/node_modules/coalesce/node_modules/sockjs/node_modules/faye-websocket/examples/ws.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - WebSocket test - - - -

    WebSocket test

    -
      - - - - - - 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 [![Build Status](https://travis-ci.org/faye/websocket-driver-node.png)](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 [![Build Status](https://travis-ci.org/faye/websocket-driver-node.png)](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: [![Build\n status](https://secure.travis-ci.org/faye/faye-websocket-node.png)](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\").
      \n\n
      Property: url (string)
      \n
      Url\n property copied from last request.
      \n\n
      Property: pathname (string)
      \n
      `pathname` from parsed url, for convenience.
      \n\n
      Property: prefix (string)
      \n
      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[![The Tech Talk](http://dl.dropboxusercontent.com/u/4374976/screenshots/coalesce.png)](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\tHello !\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. - -[![NPM Version](https://nodei.co/npm/fakeredis.png?downloads=true)](https://npmjs.org/package/fakeredis) -[![Build Status](https://secure.travis-ci.org/hdachev/fakeredis.png?branch=master)](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[![NPM Version](https://nodei.co/npm/fakeredis.png?downloads=true)](https://npmjs.org/package/fakeredis)\n[![Build Status](https://secure.travis-ci.org/hdachev/fakeredis.png?branch=master)](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 @@ -[![Build Status](https://travis-ci.org/pietern/hiredis-node.png?branch=master)](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": "[![Build Status](https://travis-ci.org/pietern/hiredis-node.png?branch=master)](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 target) { - HandleScope scope; - hiredis::Reader::Initialize(target); - } - NODE_MODULE(hiredis, init); -} diff --git a/node_modules/hiredis/src/reader.cc b/node_modules/hiredis/src/reader.cc deleted file mode 100644 index 00e59d0a..00000000 --- a/node_modules/hiredis/src/reader.cc +++ /dev/null @@ -1,221 +0,0 @@ -#include -#include -#include -#include -#include -#include "reader.h" - -using namespace hiredis; - -static void *tryParentize(const redisReadTask *task, const Local &v) { - Reader *r = reinterpret_cast(task->privdata); - size_t pidx, vidx; - - if (task->parent != NULL) { - pidx = (size_t)task->parent->obj; - assert(pidx > 0 && pidx < 9); - - /* When there is a parent, it should be an array. */ - assert(r->handle[pidx]->IsArray()); - Local parent = Local::Cast(r->handle[pidx]->ToObject()); - parent->Set(task->idx,v); - - /* Store the handle when this is an inner array. Otherwise, hiredis - * doesn't care about the return value as long as the value is set in - * its parent array. */ - vidx = pidx+1; - if (v->IsArray()) { - r->handle[vidx].Dispose(); - r->handle[vidx].Clear(); - r->handle[vidx] = Persistent::New(v); - return (void*)vidx; - } else { - /* Return value doesn't matter for inner value, as long as it is - * not NULL (which means OOM for hiredis). */ - return (void*)0xcafef00d; - } - } else { - /* There is no parent, so this value is the root object. */ - r->handle[1] = Persistent::New(v); - return (void*)1; - } -} - -static void *createArray(const redisReadTask *task, int size) { - Local v(Array::New(size)); - return tryParentize(task,v); -} - -static void *createString(const redisReadTask *task, char *str, size_t len) { - Reader *r = reinterpret_cast(task->privdata); - Local v(r->createString(str,len)); - - if (task->type == REDIS_REPLY_ERROR) - v = Exception::Error(v->ToString()); - return tryParentize(task,v); -} - -static void *createInteger(const redisReadTask *task, long long value) { - Local v(Number::New(value)); - return tryParentize(task,v); -} - -static void *createNil(const redisReadTask *task) { - Local v(Local::New(Null())); - return tryParentize(task,v); -} - -static redisReplyObjectFunctions v8ReplyFunctions = { - createString, - createArray, - createInteger, - createNil, - NULL /* No free function: cleanup is done in Reader::Get. */ -}; - -Reader::Reader(bool return_buffers) : - return_buffers(return_buffers) -{ - reader = redisReaderCreate(); - reader->fn = &v8ReplyFunctions; - reader->privdata = this; - - if (return_buffers) { - Local global = Context::GetCurrent()->Global(); - Local bv = global->Get(String::NewSymbol("Buffer")); - assert(bv->IsFunction()); - Local bf = Local::Cast(bv); - buffer_fn = Persistent::New(bf); - - buffer_pool_length = 8*1024; /* Same as node */ - buffer_pool_offset = 0; - - Buffer *b = Buffer::New(buffer_pool_length); - buffer_pool = Persistent::New(b->handle_); - } -} - -Reader::~Reader() { - redisReaderFree(reader); -} - -/* Don't use a HandleScope here, so the objects are created within the scope of - * the caller (Reader::Get) and we don't have to the pay the overhead. */ -Local Reader::createString(char *str, size_t len) { - if (return_buffers) { - if (len > buffer_pool_length) { - Buffer *b = Buffer::New(str,len); - return Local::New(b->handle_); - } else { - return createBufferFromPool(str,len); - } - } else { - return String::New(str,len); - } -} - -Local Reader::createBufferFromPool(char *str, size_t len) { - HandleScope scope; - Local argv[3]; - Local instance; - - assert(len <= buffer_pool_length); - if (buffer_pool_length - buffer_pool_offset < len) { - Buffer *b = Buffer::New(buffer_pool_length); - buffer_pool.Dispose(); - buffer_pool = Persistent::New(b->handle_); - buffer_pool_offset = 0; - } - - memcpy(Buffer::Data(buffer_pool)+buffer_pool_offset,str,len); - - argv[0] = Local::New(buffer_pool); - argv[1] = Integer::New(len); - argv[2] = Integer::New(buffer_pool_offset); - instance = buffer_fn->NewInstance(3,argv); - buffer_pool_offset += len; - return scope.Close(instance); -} - -Handle Reader::New(const Arguments& args) { - HandleScope scope; - bool return_buffers = false; - - if (args.Length() > 0 && args[0]->IsObject()) { - Local bv = args[0]->ToObject()->Get(String::New("return_buffers")); - if (bv->IsBoolean()) - return_buffers = bv->ToBoolean()->Value(); - } - - Reader *r = new Reader(return_buffers); - r->Wrap(args.This()); - return scope.Close(args.This()); -} - -void Reader::Initialize(Handle target) { - HandleScope scope; - - Local t = FunctionTemplate::New(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_PROTOTYPE_METHOD(t, "feed", Feed); - NODE_SET_PROTOTYPE_METHOD(t, "get", Get); - target->Set(String::NewSymbol("Reader"), t->GetFunction()); -} - -Handle Reader::Feed(const Arguments &args) { - HandleScope scope; - Reader *r = ObjectWrap::Unwrap(args.This()); - - if (args.Length() == 0) { - return ThrowException(Exception::Error( - String::New("First argument must be a string or buffer"))); - } else { - if (Buffer::HasInstance(args[0])) { - Local buffer_object = args[0]->ToObject(); - char *data; - size_t length; - - data = Buffer::Data(buffer_object); - length = Buffer::Length(buffer_object); - - /* Can't handle OOM for now. */ - assert(redisReaderFeed(r->reader, data, length) == REDIS_OK); - } else if (args[0]->IsString()) { - String::Utf8Value str(args[0]->ToString()); - redisReplyReaderFeed(r->reader, *str, str.length()); - } else { - return ThrowException(Exception::Error( - String::New("Invalid argument"))); - } - } - - return args.This(); -} - -Handle Reader::Get(const Arguments &args) { - HandleScope scope; - Reader *r = ObjectWrap::Unwrap(args.This()); - void *index = NULL; - Local reply; - int i; - - if (redisReaderGetReply(r->reader,&index) == REDIS_OK) { - if (index == 0) { - return Undefined(); - } else { - /* Complete replies should always have a root object at index 1. */ - assert((size_t)index == 1); - reply = Local::New(r->handle[1]); - - /* Dispose and clear used handles. */ - for (i = 1; i < 3; i++) { - r->handle[i].Dispose(); - r->handle[i].Clear(); - } - } - } else { - return ThrowException(Exception::Error(String::New(r->reader->errstr))); - } - - return scope.Close(reply); -} diff --git a/node_modules/hiredis/src/reader.h b/node_modules/hiredis/src/reader.h deleted file mode 100644 index 948ecfb5..00000000 --- a/node_modules/hiredis/src/reader.h +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include -#include -#include - -namespace hiredis { - -using namespace v8; -using namespace node; - -class Reader : ObjectWrap { -public: - Reader(bool); - ~Reader(); - - static void Initialize(Handle target); - static Handle New(const Arguments& args); - static Handle Feed(const Arguments &args); - static Handle Get(const Arguments &args); - - /* Objects created by the reply object functions need to get back to the - * reader when the reply is requested via Reader::Get(). Keep temporary - * objects in this handle. Use an array of handles because replies may - * include nested multi bulks and child-elements need to be added to the - * right respective parent. handle[0] will be unused, so the real index of - * an object in this array can be returned from the reply object functions. - * The returned value needs to be non-zero to distinguish complete replies - * from incomplete replies. These are persistent handles because - * Reader::Get might not return a full reply and the objects need to be - * kept around for subsequent calls. */ - Persistent handle[9]; - - /* Helper function to create string/buffer objects. */ - Local createString(char *str, size_t len); - -private: - redisReader *reader; - - /* Determines whether to return strings or buffers for single line and bulk - * replies. This defaults to false, so strings are returned by default. */ - bool return_buffers; - - /* Use a buffer pool like the fast buffers. */ - Local createBufferFromPool(char *str, size_t len); - Persistent buffer_fn; - Persistent buffer_pool; - size_t buffer_pool_length; - size_t buffer_pool_offset; -}; - -}; - diff --git a/node_modules/hiredis/test/reader.js b/node_modules/hiredis/test/reader.js deleted file mode 100644 index eca654a2..00000000 --- a/node_modules/hiredis/test/reader.js +++ /dev/null @@ -1,197 +0,0 @@ -var assert = require("assert"), - hiredis = require("../hiredis"); - -var passed = 0; -var failed = 0; - -function test(str, fn) { - try { - fn(); - passed++; - } catch (err) { - console.log("\x1B[1;31m" + str + " failed!\x1B[0m"); - console.log(err.stack + "\n"); - failed++; - } -} - -test("CreateReader", function() { - var reader = new hiredis.Reader(); - assert.notEqual(reader, null); -}); - -test("StatusReply", function() { - var reader = new hiredis.Reader(); - reader.feed("+OK\r\n"); - assert.equal("OK", reader.get()); -}); - -test("StatusReplyAsBuffer", function() { - var reader = new hiredis.Reader({ return_buffers: true }); - reader.feed("+OK\r\n"); - var reply = reader.get(); - assert.ok(Buffer.isBuffer(reply)); - assert.equal("OK", reply.toString()); -}); - -test("IntegerReply", function() { - var reader = new hiredis.Reader(); - reader.feed(":1\r\n"); - assert.equal(1, reader.get()); -}); - -// This test fails since v8 doesn't to 64-bit integers... -test("LargeIntegerReply", function() { - var reader = new hiredis.Reader(); - reader.feed(":9223372036854775807\r\n"); - assert.equal("9223372036854775807", String(reader.get())); -}); - -test("ErrorReply", function() { - var reader = new hiredis.Reader(); - reader.feed("-ERR foo\r\n"); - var reply = reader.get(); - assert.equal(Error, reply.constructor); - assert.equal("ERR foo", reply.message); -}); - -test("ErrorReplyWithReturnBuffers", function() { - var reader = new hiredis.Reader({ return_buffers: true }); - reader.feed("-ERR foo\r\n"); - var reply = reader.get(); - assert.equal(Error, reply.constructor); - assert.equal("ERR foo", reply.message); -}); - -test("NullBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("$-1\r\n"); - assert.equal(null, reader.get()); -}); - -test("EmptyBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("$0\r\n\r\n"); - assert.equal("", reader.get()); -}); - -test("BulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("$3\r\nfoo\r\n"); - assert.equal("foo", reader.get()); -}); - -test("BulkReplyAsBuffer", function() { - var reader = new hiredis.Reader({ return_buffers: true }); - reader.feed("$3\r\nfoo\r\n"); - var reply = reader.get(); - assert.ok(Buffer.isBuffer(reply)); - assert.equal("foo", reply.toString()); -}); - -test("BulkReplyWithEncoding", function() { - var reader = new hiredis.Reader(); - reader.feed("$" + Buffer.byteLength("☃") + "\r\n☃\r\n"); - assert.equal("☃", reader.get()); -}); - -test("NullMultiBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("*-1\r\n"); - assert.equal(null, reader.get()); -}); - -test("EmptyMultiBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("*0\r\n"); - assert.deepEqual([], reader.get()); -}); - -test("MultiBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("*2\r\n$3\r\nfoo\r\n$3\r\nbar\r\n"); - assert.deepEqual(["foo", "bar"], reader.get()); -}); - -test("NestedMultiBulkReply", function() { - var reader = new hiredis.Reader(); - reader.feed("*2\r\n*2\r\n$3\r\nfoo\r\n$3\r\nbar\r\n$3\r\nqux\r\n"); - assert.deepEqual([["foo", "bar"], "qux"], reader.get()); -}); - -test("DeeplyNestedMultiBulkReply", function() { - var i; - var reader = new hiredis.Reader(); - var expected = 1; - - for (i = 0; i < 8; i++) { - reader.feed("*1\r\n"); - expected = [expected]; - } - - reader.feed(":1\r\n"); - - assert.deepEqual(reader.get(), expected); -}); - -test("TooDeeplyNestedMultiBulkReply", function() { - var i; - var reader = new hiredis.Reader(); - - for (i = 0; i < 9; i++) { - reader.feed("*1\r\n"); - } - - reader.feed(":1\r\n"); - - assert.throws( - function() { - reader.get(); - }, - /nested multi/ - ); -}); - -test("MultiBulkReplyWithNonStringValues", function() { - var reader = new hiredis.Reader(); - reader.feed("*3\r\n:1\r\n+OK\r\n$-1\r\n"); - assert.deepEqual([1, "OK", null], reader.get()); -}); - -test("FeedWithBuffer", function() { - var reader = new hiredis.Reader(); - reader.feed(new Buffer("$3\r\nfoo\r\n")); - assert.deepEqual("foo", reader.get()); -}); - -test("UndefinedReplyOnIncompleteFeed", function() { - var reader = new hiredis.Reader(); - reader.feed("$3\r\nfoo"); - assert.deepEqual(undefined, reader.get()); - reader.feed("\r\n"); - assert.deepEqual("foo", reader.get()); -}); - -test("Leaks", function(beforeExit) { - /* The "leaks" utility is only available on OSX. */ - if (process.platform != "darwin") return; - - var done = 0; - var leaks = require('child_process').spawn("leaks", [process.pid]); - leaks.stdout.on("data", function(data) { - var str = data.toString(); - var notice = "Node 0.2.5 always leaks 16 bytes (this is " + process.versions.node + ")"; - var matches; - if ((matches = /(\d+) leaks?/i.exec(str)) != null) { - if (parseInt(matches[1]) > 0) { - console.log(str); - console.log('\x1B[31mNotice: ' + notice + '\x1B[0m'); - } - } - done = 1; - }); - - process.on('exit', function() { - assert.ok(done, "Leaks test should have completed"); - }); -}); diff --git a/node_modules/mime/LICENSE b/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -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/mime/README.md b/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/mime/mime.js b/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/mime/package.json b/node_modules/mime/package.json deleted file mode 100644 index 388cfe43..00000000 --- a/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~>1.2.11" -} diff --git a/node_modules/mime/test.js b/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/mime/types/mime.types b/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/mime/types/node.types b/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/redis/.npmignore b/node_modules/redis/.npmignore deleted file mode 100644 index 6a59b3d6..00000000 --- a/node_modules/redis/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -.tern-port diff --git a/node_modules/redis/README.md b/node_modules/redis/README.md deleted file mode 100644 index d8bd75ae..00000000 --- a/node_modules/redis/README.md +++ /dev/null @@ -1,754 +0,0 @@ -redis - a node.js redis client -=========================== - -This is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from -experimental Redis server branches. - - -Install with: - - npm install redis - -Pieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do: - - npm install hiredis redis - -If `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used. - -If you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can -happen between node and native code modules after a node upgrade. - - -## Usage - -Simple example, included as `examples/simple.js`: - -```js - var redis = require("redis"), - client = redis.createClient(); - - // if you'd like to select database 3, instead of 0 (default), call - // client.select(3, function() { /* ... */ }); - - client.on("error", function (err) { - console.log("Error " + err); - }); - - client.set("string key", "string val", redis.print); - client.hset("hash key", "hashtest 1", "some value", redis.print); - client.hset(["hash key", "hashtest 2", "some other value"], redis.print); - client.hkeys("hash key", function (err, replies) { - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); - client.quit(); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node example.js - Reply: OK - Reply: 0 - Reply: 0 - 2 replies: - 0: hashtest 1 - 1: hashtest 2 - mjr:~/work/node_redis (master)$ - - -## Performance - -Here are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution. -It uses 50 concurrent connections with no pipelining. - -JavaScript parser: - - PING: 20000 ops 42283.30 ops/sec 0/5/1.182 - SET: 20000 ops 32948.93 ops/sec 1/7/1.515 - GET: 20000 ops 28694.40 ops/sec 0/9/1.740 - INCR: 20000 ops 39370.08 ops/sec 0/8/1.269 - LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370 - LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048 - LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072 - -hiredis parser: - - PING: 20000 ops 46189.38 ops/sec 1/4/1.082 - SET: 20000 ops 41237.11 ops/sec 0/6/1.210 - GET: 20000 ops 39682.54 ops/sec 1/7/1.257 - INCR: 20000 ops 40080.16 ops/sec 0/8/1.242 - LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212 - LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363 - LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287 - -The performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs. - - -### Sending Commands - -Each Redis command is exposed as a function on the `client` object. -All functions take either an `args` Array plus optional `callback` Function or -a variable number of individual arguments followed by an optional callback. -Here is an example of passing an array of arguments and a callback: - - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], function (err, res) {}); - -Here is that same call in the second style: - - client.mset("test keys 1", "test val 1", "test keys 2", "test val 2", function (err, res) {}); - -Note that in either form the `callback` is optional: - - client.set("some key", "some val"); - client.set(["some other key", "some val"]); - -If the key is missing, reply will be null (probably): - - client.get("missingkey", function(err, reply) { - // reply is null when the key is missing - console.log(reply); - }); - -For a list of Redis commands, see [Redis Command Reference](http://redis.io/commands) - -The commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`. - -Minimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings, -integer replies return JavaScript Numbers, "bulk" replies return node Buffers, and "multi bulk" replies return a -JavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys. - -# API - -## Connection Events - -`client` will emit some events about the state of the connection to the Redis server. - -### "ready" - -`client` will emit `ready` a connection is established to the Redis server and the server reports -that it is ready to receive commands. Commands issued before the `ready` event are queued, -then replayed just before this event is emitted. - -### "connect" - -`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check` -is set. If this options is set, `connect` will be emitted when the stream is connected, and then -you are free to try to send commands. - -### "error" - -`client` will emit `error` when encountering an error connecting to the Redis server. - -Note that "error" is a special event type in node. If there are no listeners for an -"error" event, node will exit. This is usually what you want, but it can lead to some -cryptic error messages like this: - - mjr:~/work/node_redis (master)$ node example.js - - node.js:50 - throw e; - ^ - Error: ECONNREFUSED, Connection refused - at IOWatcher.callback (net:870:22) - at node.js:607:9 - -Not very useful in diagnosing the problem, but if your program isn't ready to handle this, -it is probably the right thing to just exit. - -`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason. -It would be nice to distinguish these two cases. - -### "end" - -`client` will emit `end` when an established Redis server connection has closed. - -### "drain" - -`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now -writable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now, -you need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can -resume sending when you get `drain`. - -### "idle" - -`client` will emit `idle` when there are no outstanding commands that are awaiting a response. - -## redis.createClient(port, host, options) - -Create a new client connection. `port` defaults to `6379` and `host` defaults -to `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for -port and host are probably fine. `options` in an object with the following possible properties: - -* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed. -This may also be set to `javascript`. -* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer -objects instead of JavaScript Strings. -* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects -if any of the input arguments to the original command were Buffer objects. -This option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to -every command on a client. -* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the -Nagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the -cost of more latency. Most applications will want this set to `true`. -* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still -be loading the database from disk. While loading, the server not respond to any commands. To work around this, -`node_redis` has a "ready check" which sends the `INFO` command to the server. The response from the `INFO` command -indicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event. -Setting `no_ready_check` to `true` will inhibit this check. -* `enable_offline_queue`: defaults to `true`. By default, if there is no active -connection to the redis server, commands are added to a queue and are executed -once the connection has been established. Setting `enable_offline_queue` to -`false` will disable this feature and the callback will be execute immediately -with an error, or an error will be thrown if no callback is specified. -* `retry_max_delay`: defaults to `null`. By default every time the client tries to connect and fails time before -reconnection (delay) almost doubles. This delay normally grows infinitely, but setting `retry_max_delay` limits delay -to maximum value, provided in milliseconds. -* `connect_timeout` defaults to `false`. By default client will try reconnecting until connected. Setting `connect_timeout` -limits total time for client to reconnect. Value is provided in milliseconds and is counted once the disconnect occured. -* `max_attempts` defaults to `null`. By default client will try reconnecting until connected. Setting `max_attempts` -limits total amount of reconnects. -* `auth_pass` defaults to `null`. By default client will try connecting without auth. If set, client will run redis auth command on connect. - -```js - var redis = require("redis"), - client = redis.createClient(null, null, {detect_buffers: true}); - - client.set("foo_rand000000000000", "OK"); - - // This will return a JavaScript String - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); // Will print `OK` - }); - - // This will return a Buffer since original key is specified as a Buffer - client.get(new Buffer("foo_rand000000000000"), function (err, reply) { - console.log(reply.toString()); // Will print `` - }); - client.end(); -``` - -`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here. - -### Unix Domain Socket - -You can also create a connection to Redis server via the unix domain socket if the server -has it enabled: - -```js -var redis = require("redis"); -var client = redis.createClient("/tmp/redis.sock"); -``` - -Sample `redis.conf` configuration to enable unix domain socket listening: - -```conf -unixsocket /tmp/redis.sock -unixsocketperm 755 -``` - -See [issue #204](https://github.com/mranney/node_redis/issues/204) for more information. - -## client.auth(password, callback) - -When connecting to Redis servers that require authentication, the `AUTH` command must be sent as the -first command after connecting. This can be tricky to coordinate with reconnections, the ready check, -etc. To make this easier, `client.auth()` stashes `password` and will send it after each connection, -including reconnections. `callback` is invoked only once, after the response to the very first -`AUTH` command sent. -NOTE: Your call to `client.auth()` should not be inside the ready handler. If -you are doing this wrong, `client` will emit an error that looks -something like this `Error: Ready check failed: ERR operation not permitted`. - -## client.end() - -Forcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed. -If you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies. - -This example closes the connection to the Redis server before the replies have been read. You probably don't -want to do this: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.set("foo_rand000000000000", "some fantastic value"); - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); - }); - client.end(); -``` - -`client.end()` is useful for timeout cases where something is stuck or taking too long and you want -to start over. - -## client.unref() - -Call `unref()` on the underlying socket connection to the Redis server, allowing the program to exit once no more commands are pending. - -This is an **experimental** feature, and only supports a subset of the Redis protocol. Any commands where client state is saved on the Redis server, e.g. `*SUBSCRIBE` or the blocking `BL*` commands will *NOT* work with `.unref()`. - -```js -var redis = require("redis") -var client = redis.createClient() - -/* - Calling unref() will allow this program to exit immediately after the get command finishes. Otherwise the client would hang as long as the client-server connection is alive. -*/ -client.unref() -client.get("foo", function (err, value){ - if (err) throw(err) - console.log(value) -}) -``` - -## Friendlier hash commands - -Most Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings. -When dealing with hash values, there are a couple of useful exceptions to this. - -### client.hgetall(hash) - -The reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact -with the responses using JavaScript syntax. - -Example: - - client.hmset("hosts", "mjr", "1", "another", "23", "home", "1234"); - client.hgetall("hosts", function (err, obj) { - console.dir(obj); - }); - -Output: - - { mjr: '1', another: '23', home: '1234' } - -### client.hmset(hash, obj, [callback]) - -Multiple values in a hash can be set by supplying an object: - - client.HMSET(key2, { - "0123456789": "abcdefghij", // NOTE: key and value will be coerced to strings - "some manner of key": "a type of value" - }); - -The properties and values of this Object will be set as keys and values in the Redis hash. - -### client.hmset(hash, key1, val1, ... keyn, valn, [callback]) - -Multiple values may also be set by supplying a list: - - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value"); - - -## Publish / Subscribe - -Here is a simple example of the API for publish / subscribe. This program opens two -client connections, subscribes to a channel on one of them, and publishes to that -channel on the other: - -```js - var redis = require("redis"), - client1 = redis.createClient(), client2 = redis.createClient(), - msg_count = 0; - - client1.on("subscribe", function (channel, count) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("a nice channel", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - }); - - client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - client1.end(); - client2.end(); - } - }); - - client1.incr("did a thing"); - client1.subscribe("a nice channel"); -``` - -When a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into a "subscriber" mode. -At that point, only commands that modify the subscription set are valid. When the subscription -set is empty, the connection is put back into regular mode. - -If you need to send regular commands to Redis while in subscriber mode, just open another connection. - -## Subscriber Events - -If a client has subscriptions active, it may emit these events: - -### "message" (channel, message) - -Client will emit `message` for every message received that matches an active subscription. -Listeners are passed the channel name as `channel` and the message Buffer as `message`. - -### "pmessage" (pattern, channel, message) - -Client will emit `pmessage` for every message received that matches an active subscription pattern. -Listeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel -name as `channel`, and the message Buffer as `message`. - -### "subscribe" (channel, count) - -Client will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. - -### "psubscribe" (pattern, count) - -Client will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the -original pattern as `pattern`, and the new count of subscriptions for this client as `count`. - -### "unsubscribe" (channel, count) - -Client will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left subscriber mode and no more subscriber events will be emitted. - -### "punsubscribe" (pattern, count) - -Client will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left subscriber mode and no more subscriber events will be emitted. - -## client.multi([commands]) - -`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by -Redis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`. - -```js - var redis = require("./index"), - client = redis.createClient(), set_size = 20; - - client.sadd("bigset", "a member"); - client.sadd("bigset", "another member"); - - while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; - } - - // multi chain with an individual callback - client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - // NOTE: code in this callback is NOT atomic - // this only happens after the the .exec call finishes. - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); -``` - -### Multi.exec( callback ) - -`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the -same command methods as `client` objects do. Commands are queued up inside the `Multi` object -until `Multi.exec()` is invoked. - -The `callback` of `.exec()` will get invoked with two arguments: - -* `err` **type:** `null | Array` err is either null or an array of Error Objects corresponding the the sequence the commands where chained. The last item of the array will always be an `EXECABORT` type of error originating from the `.exec()` itself. -* `results` **type:** `null | Array` results is an array of responses corresponding the the sequence the commands where chained. - -You can either chain together `MULTI` commands as in the above example, or you can queue individual -commands while still sending regular client command as in this example: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - // start a separate multi command queue - multi = client.multi(); - multi.incr("incr thing", redis.print); - multi.incr("incr other thing", redis.print); - - // runs immediately - client.mset("incr thing", 100, "incr other thing", 1, redis.print); - - // drains multi queue and runs atomically - multi.exec(function (err, replies) { - console.log(replies); // 101, 2 - }); - - // you can re-run the same transaction if you like - multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); - }); -``` - -In addition to adding commands to the `MULTI` queue individually, you can also pass an array -of commands and arguments to the constructor: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] - ]).exec(function (err, replies) { - console.log(replies); - }); -``` - - -## Monitor mode - -Redis supports the `MONITOR` command, which lets you see all commands received by the Redis server -across all client connections, including from other client libraries and other computers. - -After you send the `MONITOR` command, no other commands are valid on that connection. `node_redis` -will emit a `monitor` event for every new monitor message that comes across. The callback for the -`monitor` event takes a timestamp from the Redis server and an array of command arguments. - -Here is a simple example: - -```js - var client = require("redis").createClient(), - util = require("util"); - - client.monitor(function (err, res) { - console.log("Entering monitoring mode."); - }); - - client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); - }); -``` - -# Extras - -Some other things you might like to know about. - -## client.server_info - -After the ready probe completes, the results from the INFO command are saved in the `client.server_info` -object. - -The `versions` key contains an array of the elements of the version string for easy comparison. - - > client.server_info.redis_version - '2.3.0' - > client.server_info.versions - [ 2, 3, 0 ] - -## redis.print() - -A handy callback function for displaying return values when testing. Example: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value", redis.print); - client.get("foo_rand000000000000", redis.print); - }); -``` - -This will print: - - Reply: OK - Reply: some fantastic value - -Note that this program will not exit cleanly because the client is still connected. - -## redis.debug_mode - -Boolean to enable debug mode and protocol tracing. - -```js - var redis = require("redis"), - client = redis.createClient(); - - redis.debug_mode = true; - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value"); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node ~/example.js - send command: *3 - $3 - SET - $20 - foo_rand000000000000 - $20 - some fantastic value - - on_data: +OK - -`send command` is data sent into Redis and `on_data` is data received from Redis. - -## Multi-word commands - -To execute redis multi-word commands like `SCRIPT LOAD` or `CLIENT LIST` pass -the second word as first parameter: - - client.script('load', 'return 1'); - client.multi().script('load', 'return 1').exec(...); - client.multi([['script', 'load', 'return 1']]).exec(...); - -## client.send_command(command_name, args, callback) - -Used internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis -Wiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before -this library is updated, you can use `send_command()` to send arbitrary commands to Redis. - -All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted. - -## client.connected - -Boolean tracking the state of the connection to the Redis server. - -## client.command_queue.length - -The number of commands that have been sent to the Redis server but not yet replied to. You can use this to -enforce some kind of maximum queue depth for commands while connected. - -Don't mess with `client.command_queue` though unless you really know what you are doing. - -## client.offline_queue.length - -The number of commands that have been queued up for a future connection. You can use this to enforce -some kind of maximum queue depth for pre-connection commands. - -## client.retry_delay - -Current delay in milliseconds before a connection retry will be attempted. This starts at `250`. - -## client.retry_backoff - -Multiplier for future retry timeouts. This should be larger than 1 to add more time between retries. -Defaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc. - -### Commands with Optional and Keyword arguments - -This applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation. - -Example: -```js -var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ]; -client.zadd(args, function (err, response) { - if (err) throw err; - console.log('added '+response+' items.'); - - // -Infinity and +Infinity also work - var args1 = [ 'myzset', '+inf', '-inf' ]; - client.zrevrangebyscore(args1, function (err, response) { - if (err) throw err; - console.log('example1', response); - // write your code here - }); - - var max = 3, min = 1, offset = 1, count = 2; - var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ]; - client.zrevrangebyscore(args2, function (err, response) { - if (err) throw err; - console.log('example2', response); - // write your code here - }); -}); -``` - -## TODO - -Better tests for auth, disconnect/reconnect, and all combinations thereof. - -Stream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory. - -Performance can be better for very large values. - -I think there are more performance improvements left in there for smaller values, especially for large lists of small values. - -## How to Contribute -- open a pull request and then wait for feedback (if - [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days, - comment again with indignation!) - -## Contributors -Some people have have added features and fixed bugs in `node_redis` other than me. - -Ordered by date of first contribution. -[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT). - -- [Matt Ranney aka `mranney`](https://github.com/mranney) -- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart) -- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia) -- [rick aka `technoweenie`](https://github.com/technoweenie) -- [Orion Henry aka `orionz`](https://github.com/orionz) -- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas) -- [Hank Sims aka `hanksims`](https://github.com/hanksims) -- [Paul Carey aka `paulcarey`](https://github.com/paulcarey) -- [Pieter Noordhuis aka `pietern`](https://github.com/pietern) -- [nithesh aka `nithesh`](https://github.com/nithesh) -- [Andy Ray aka `andy2ray`](https://github.com/andy2ray) -- [unknown aka `unknowdna`](https://github.com/unknowdna) -- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel) -- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv) -- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique) -- [Louis-Philippe Perron aka `lp`](https://github.com/lp) -- [Mark Dawson aka `markdaws`](https://github.com/markdaws) -- [Ian Babrou aka `bobrik`](https://github.com/bobrik) -- [Felix Geisendörfer aka `felixge`](https://github.com/felixge) -- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined) -- [Maksim Lin aka `maks`](https://github.com/maks) -- [Owen Smith aka `orls`](https://github.com/orls) -- [Zachary Scott aka `zzak`](https://github.com/zzak) -- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK) -- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs) -- [David Trejo aka `DTrejo`](https://github.com/DTrejo) -- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi) -- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon) -- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2) -- [Jed Schmidt aka `jed`](https://github.com/jed) -- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3) -- [Trae Robrock aka `trobrock`](https://github.com/trobrock) -- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306) -- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio) - -Thanks. - -## LICENSE - "MIT License" - -Copyright (c) 2010 Matthew Ranney, http://ranney.com/ - -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. - -![spacer](http://ranney.com/1px.gif) diff --git a/node_modules/redis/benches/buffer_bench.js b/node_modules/redis/benches/buffer_bench.js deleted file mode 100644 index a504fbc0..00000000 --- a/node_modules/redis/benches/buffer_bench.js +++ /dev/null @@ -1,89 +0,0 @@ -var source = new Buffer(100), - dest = new Buffer(100), i, j, k, tmp, count = 1000000, bytes = 100; - -for (i = 99 ; i >= 0 ; i--) { - source[i] = 120; -} - -var str = "This is a nice String.", - buf = new Buffer("This is a lovely Buffer."); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(str)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(str) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(buf)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(buf) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (str instanceof Buffer) {} -} -var end = new Date(); -console.log("str instanceof Buffer " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (buf instanceof Buffer) {} -} -var end = new Date(); -console.log("buf instanceof Buffer " + (end - start) + " ms"); - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = source.toString("ascii", 0, bytes); - } - var end = new Date(); - console.log("toString() " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = ""; - for (k = 0; k <= i ; k++) { - tmp += String.fromCharCode(source[k]); - } - } - var end = new Date(); - console.log("manual string " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = source[k]; - } - } - var end = new Date(); - console.log("Manual copy " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = 120; - } - } - var end = new Date(); - console.log("Direct assignment " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - source.copy(dest, 0, 0, i); - } - var end = new Date(); - console.log("Buffer.copy() " + i + " bytes " + (end - start) + " ms"); -} diff --git a/node_modules/redis/benches/hiredis_parser.js b/node_modules/redis/benches/hiredis_parser.js deleted file mode 100644 index f1515b11..00000000 --- a/node_modules/redis/benches/hiredis_parser.js +++ /dev/null @@ -1,38 +0,0 @@ -var Parser = require('../lib/parser/hiredis').Parser; -var assert = require('assert'); - -/* -This test makes sure that exceptions thrown inside of "reply" event handlers -are not trapped and mistakenly emitted as parse errors. -*/ -(function testExecuteDoesNotCatchReplyCallbackExceptions() { - var parser = new Parser(); - var replies = [{}]; - - parser.reader = { - feed: function() {}, - get: function() { - return replies.shift(); - } - }; - - var emittedError = false; - var caughtException = false; - - parser - .on('error', function() { - emittedError = true; - }) - .on('reply', function() { - throw new Error('bad'); - }); - - try { - parser.execute(); - } catch (err) { - caughtException = true; - } - - assert.equal(caughtException, true); - assert.equal(emittedError, false); -})(); diff --git a/node_modules/redis/benches/re_sub_test.js b/node_modules/redis/benches/re_sub_test.js deleted file mode 100644 index 64b8f312..00000000 --- a/node_modules/redis/benches/re_sub_test.js +++ /dev/null @@ -1,14 +0,0 @@ -var client = require('../index').createClient() - , client2 = require('../index').createClient() - , assert = require('assert'); - -client.once('subscribe', function (channel, count) { - client.unsubscribe('x'); - client.subscribe('x', function () { - client.quit(); - client2.quit(); - }); - client2.publish('x', 'hi'); -}); - -client.subscribe('x'); diff --git a/node_modules/redis/benches/reconnect_test.js b/node_modules/redis/benches/reconnect_test.js deleted file mode 100644 index 7abdd516..00000000 --- a/node_modules/redis/benches/reconnect_test.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("../index").createClient(null, null, { -// max_attempts: 4 -}); - -redis.on("error", function (err) { - console.log("Redis says: " + err); -}); - -redis.on("ready", function () { - console.log("Redis ready."); -}); - -redis.on("reconnecting", function (arg) { - console.log("Redis reconnecting: " + JSON.stringify(arg)); -}); -redis.on("connect", function () { - console.log("Redis connected."); -}); - -setInterval(function () { - var now = Date.now(); - redis.set("now", now, function (err, res) { - if (err) { - console.log(now + " Redis reply error: " + err); - } else { - console.log(now + " Redis reply: " + res); - } - }); -}, 100); diff --git a/node_modules/redis/benches/stress/codec.js b/node_modules/redis/benches/stress/codec.js deleted file mode 100644 index 7d764f60..00000000 --- a/node_modules/redis/benches/stress/codec.js +++ /dev/null @@ -1,16 +0,0 @@ -var json = { - encode: JSON.stringify, - decode: JSON.parse -}; - -var MsgPack = require('node-msgpack'); -msgpack = { - encode: MsgPack.pack, - decode: function(str) { return MsgPack.unpack(new Buffer(str)); } -}; - -bison = require('bison'); - -module.exports = json; -//module.exports = msgpack; -//module.exports = bison; diff --git a/node_modules/redis/benches/stress/pubsub/pub.js b/node_modules/redis/benches/stress/pubsub/pub.js deleted file mode 100644 index 0acde7a6..00000000 --- a/node_modules/redis/benches/stress/pubsub/pub.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.publish('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - profiler.takeSnapshot('s_' + sent); - console.error('sent', sent, 'free', freemem(), 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length); -}, 2000); diff --git a/node_modules/redis/benches/stress/pubsub/run b/node_modules/redis/benches/stress/pubsub/run deleted file mode 100644 index bd9ac392..00000000 --- a/node_modules/redis/benches/stress/pubsub/run +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node --debug pub.js diff --git a/node_modules/redis/benches/stress/pubsub/server.js b/node_modules/redis/benches/stress/pubsub/server.js deleted file mode 100644 index 035e6b74..00000000 --- a/node_modules/redis/benches/stress/pubsub/server.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var sub = require('redis').createClient() - .on('ready', function() { - this.subscribe('timeline'); - }) - .on('message', function(channel, message) { - var self = this; - if (message) { - message = codec.decode(message); - ++recv; - } - }); - -setInterval(function() { - console.error('id', id, 'received', recv, 'free', freemem()); -}, 2000); diff --git a/node_modules/redis/benches/stress/rpushblpop/pub.js b/node_modules/redis/benches/stress/rpushblpop/pub.js deleted file mode 100644 index 9caf1d0b..00000000 --- a/node_modules/redis/benches/stress/rpushblpop/pub.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -//var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.del('timeline'); - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.rpush('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -//profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - //var ss = profiler.takeSnapshot('s_' + sent); - //console.error(ss.stringify()); - pub.llen('timeline', function(err, result) { - console.error('sent', sent, 'free', freemem(), - 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length, - 'llen', result - ); - }); -}, 2000); - -/*setTimeout(function() { - process.exit(); -}, 30000);*/ diff --git a/node_modules/redis/benches/stress/rpushblpop/run b/node_modules/redis/benches/stress/rpushblpop/run deleted file mode 100644 index 8045ae80..00000000 --- a/node_modules/redis/benches/stress/rpushblpop/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -node server.js & -#node server.js & -#node server.js & -#node server.js & -node --debug pub.js diff --git a/node_modules/redis/benches/stress/rpushblpop/server.js b/node_modules/redis/benches/stress/rpushblpop/server.js deleted file mode 100644 index 9cbcdd9e..00000000 --- a/node_modules/redis/benches/stress/rpushblpop/server.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var cmd = require('redis').createClient(); -var sub = require('redis').createClient() - .on('ready', function() { - this.emit('timeline'); - }) - .on('timeline', function() { - var self = this; - this.blpop('timeline', 0, function(err, result) { - var message = result[1]; - if (message) { - message = codec.decode(message); - ++recv; - } - self.emit('timeline'); - }); - }); - -setInterval(function() { - cmd.llen('timeline', function(err, result) { - console.error('id', id, 'received', recv, 'free', freemem(), 'llen', result); - }); -}, 2000); diff --git a/node_modules/redis/benches/stress/speed/00 b/node_modules/redis/benches/stress/speed/00 deleted file mode 100644 index 29d7bf7c..00000000 --- a/node_modules/redis/benches/stress/speed/00 +++ /dev/null @@ -1,13 +0,0 @@ -# size JSON msgpack bison -26602 2151.0170848180414 -25542 ? 2842.589272665782 -24835 ? ? 7280.4538397469805 -6104 6985.234528557929 -5045 ? 7217.461392841478 -4341 ? ? 14261.406335354604 -4180 15864.633685636572 -4143 ? 12954.806235781925 -4141 ? ? 44650.70733912719 -75 114227.07313350472 -40 ? 30162.440062810834 -39 ? ? 119815.66013519121 diff --git a/node_modules/redis/benches/stress/speed/plot b/node_modules/redis/benches/stress/speed/plot deleted file mode 100644 index 2563797c..00000000 --- a/node_modules/redis/benches/stress/speed/plot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -gnuplot >size-rate.jpg << _EOF_ - -set terminal png nocrop enhanced font verdana 12 size 640,480 -set logscale x -set logscale y -set grid -set xlabel 'Serialized object size, octets' -set ylabel 'decode(encode(obj)) rate, 1/sec' -plot '00' using 1:2 title 'json' smooth bezier, '00' using 1:3 title 'msgpack' smooth bezier, '00' using 1:4 title 'bison' smooth bezier - -_EOF_ diff --git a/node_modules/redis/benches/stress/speed/size-rate.png b/node_modules/redis/benches/stress/speed/size-rate.png deleted file mode 100644 index c9c2bee6..00000000 Binary files a/node_modules/redis/benches/stress/speed/size-rate.png and /dev/null differ diff --git a/node_modules/redis/benches/stress/speed/speed.js b/node_modules/redis/benches/stress/speed/speed.js deleted file mode 100644 index 8e43cbc0..00000000 --- a/node_modules/redis/benches/stress/speed/speed.js +++ /dev/null @@ -1,84 +0,0 @@ -var msgpack = require('node-msgpack'); -var bison = require('bison'); -var codec = { - JSON: { - encode: JSON.stringify, - decode: JSON.parse - }, - msgpack: { - encode: msgpack.pack, - decode: msgpack.unpack - }, - bison: bison -}; - -var obj, l; - -var s = '0'; -for (var i = 0; i < 12; ++i) s += s; - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [], - a: s, - ccc: s, - b: s + s + s -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -obj = { - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -function run(obj, codec) { - var t1 = Date.now(); - var n = 10000; - for (var i = 0; i < n; ++i) { - codec.decode(l = codec.encode(obj)); - } - var t2 = Date.now(); - //console.log('DONE', n*1000/(t2-t1), 'codecs/sec, length=', l.length); - return [n*1000/(t2-t1), l.length]; -} - -function series(obj, cname, n) { - var rate = 0; - var len = 0; - for (var i = 0; i < n; ++i) { - var r = run(obj, codec[cname]); - rate += r[0]; - len += r[1]; - } - rate /= n; - len /= n; - console.log(cname + ' ' + rate + ' ' + len); - return [rate, len]; -} - -function forObj(obj) { - var r = { - JSON: series(obj, 'JSON', 20), - msgpack: series(obj, 'msgpack', 20), - bison: series(obj, 'bison', 20) - }; - return r; -} diff --git a/node_modules/redis/benches/sub_quit_test.js b/node_modules/redis/benches/sub_quit_test.js deleted file mode 100644 index ad1f4132..00000000 --- a/node_modules/redis/benches/sub_quit_test.js +++ /dev/null @@ -1,18 +0,0 @@ -var client = require("redis").createClient(), - client2 = require("redis").createClient(); - -client.subscribe("something"); -client.on("subscribe", function (channel, count) { - console.log("Got sub: " + channel); - client.unsubscribe("something"); -}); - -client.on("unsubscribe", function (channel, count) { - console.log("Got unsub: " + channel + ", quitting"); - client.quit(); -}); - -// exercise unsub before sub -client2.unsubscribe("something"); -client2.subscribe("another thing"); -client2.quit(); diff --git a/node_modules/redis/changelog.md b/node_modules/redis/changelog.md deleted file mode 100644 index cc46a5d6..00000000 --- a/node_modules/redis/changelog.md +++ /dev/null @@ -1,310 +0,0 @@ -Changelog -========= - -## v0.10.1 - February 17, 2014 - -* Skip plucking redis version from the INFO stream if INFO results weren't provided. (Robert Sköld) - -## v0.10.0 - December 21, 2013 - -* Instead of throwing errors asynchronously, emit errors on client. (Bryce Baril) - -## v0.9.2 - December 15, 2013 - -* Regenerate commands for new 2.8.x Redis commands. (Marek Ventur) -* Correctly time reconnect counts when using 'auth'. (William Hockey) - -## v0.9.1 - November 23, 2013 - -* Allow hmset to accept numeric keys. (Alex Stokes) -* Fix TypeError for multiple MULTI/EXEC errors. (Kwangsu Kim) - -## v0.9.0 - October 17, 2013 - -* Domains support. (Forrest L Norvell) - -## v0.8.6 - October 2, 2013 - -* If error is already an Error, don't wrap it in another Error. (Mathieu M-Gosselin) -* Fix retry delay logic (Ian Babrou) -* Return Errors instead of strings where Errors are expected (Ian Babrou) -* Add experimental `.unref()` method to RedisClient (Bryce Baril / Olivier Lalonde) -* Strengthen checking of reply to prevent conflating "message" or "pmessage" fields with pub_sub replies. (Bryce Baril) - -## v0.8.5 - September 26, 2013 - -* Add `auth_pass` option to connect and immediately authenticate (Henrik Peinar) - -## v0.8.4 - June 24, 2013 - -Many contributed features and fixes, including: -* Ignore password set if not needed. (jbergknoff) -* Improved compatibility with 0.10.X for tests and client.end() (Bryce Baril) -* Protect connection retries from application exceptions. (Amos Barreto) -* Better exception handling for Multi/Exec (Thanasis Polychronakis) -* Renamed pubsub mode to subscriber mode (Luke Plaster) -* Treat SREM like SADD when passed an array (Martin Ciparelli) -* Fix empty unsub/punsub TypeError (Jeff Barczewski) -* Only attempt to run a callback if it one was provided (jifeng) - -## v0.8.3 - April 09, 2013 - -Many contributed features and fixes, including: -* Fix some tests for Node.js version 0.9.x+ changes (Roman Ivanilov) -* Fix error when commands submitted after idle event handler (roamm) -* Bypass Redis for no-op SET/SETEX commands (jifeng) -* Fix HMGET + detect_buffers (Joffrey F) -* Fix CLIENT LOAD functionality (Jonas Dohse) -* Add percentage outputs to diff_multi_bench_output.js (Bryce Baril) -* Add retry_max_delay option (Tomasz Durka) -* Fix parser off-by-one errors with nested multi-bulk replies (Bryce Baril) -* Prevent parser from sinking application-side exceptions (Bryce Baril) -* Fix parser incorrect buffer skip when parsing multi-bulk errors (Bryce Baril) -* Reverted previous change with throwing on non-string values with HMSET (David Trejo) -* Fix command queue sync issue when using pubsub (Tom Leach) -* Fix compatibility with two-word Redis commands (Jonas Dohse) -* Add EVAL with array syntax (dmoena) -* Fix tests due to Redis reply order changes in 2.6.5+ (Bryce Baril) -* Added a test for the SLOWLOG command (Nitesh Sinha) -* Fix SMEMBERS order dependency in test broken by Redis changes (Garrett Johnson) -* Update commands for new Redis commands (David Trejo) -* Prevent exception from SELECT on subscriber reconnection (roamm) - - -## v0.8.2 - November 11, 2012 - -Another version bump because 0.8.1 didn't get applied properly for some mysterious reason. -Sorry about that. - -Changed name of "faster" parser to "javascript". - -## v0.8.1 - September 11, 2012 - -Important bug fix for null responses (Jerry Sievert) - -## v0.8.0 - September 10, 2012 - -Many contributed features and fixes, including: - -* Pure JavaScript reply parser that is usually faster than hiredis (Jerry Sievert) -* Remove hiredis as optionalDependency from package.json. It still works if you want it. -* Restore client state on reconnect, including select, subscribe, and monitor. (Ignacio Burgueño) -* Fix idle event (Trae Robrock) -* Many documentation improvements and bug fixes (David Trejo) - -## v0.7.2 - April 29, 2012 - -Many contributed fixes. Thank you, contributors. - -* [GH-190] - pub/sub mode fix (Brian Noguchi) -* [GH-165] - parser selection fix (TEHEK) -* numerous documentation and examples updates -* auth errors emit Errors instead of Strings (David Trejo) - -## v0.7.1 - November 15, 2011 - -Fix regression in reconnect logic. - -Very much need automated tests for reconnection and queue logic. - -## v0.7.0 - November 14, 2011 - -Many contributed fixes. Thanks everybody. - -* [GH-127] - properly re-initialize parser on reconnect -* [GH-136] - handle passing undefined as callback (Ian Babrou) -* [GH-139] - properly handle exceptions thrown in pub/sub event handlers (Felix Geisendörfer) -* [GH-141] - detect closing state on stream error (Felix Geisendörfer) -* [GH-142] - re-select database on reconnection (Jean-Hugues Pinson) -* [GH-146] - add sort example (Maksim Lin) - -Some more goodies: - -* Fix bugs with node 0.6 -* Performance improvements -* New version of `multi_bench.js` that tests more realistic scenarios -* [GH-140] - support optional callback for subscribe commands -* Properly flush and error out command queue when connection fails -* Initial work on reconnection thresholds - -## v0.6.7 - July 30, 2011 - -(accidentally skipped v0.6.6) - -Fix and test for [GH-123] - -Passing an Array as as the last argument should expand as users -expect. The old behavior was to coerce the arguments into Strings, -which did surprising things with Arrays. - -## v0.6.5 - July 6, 2011 - -Contributed changes: - -* Support SlowBuffers (Umair Siddique) -* Add Multi to exports (Louis-Philippe Perron) -* Fix for drain event calculation (Vladimir Dronnikov) - -Thanks! - -## v0.6.4 - June 30, 2011 - -Fix bug with optional callbacks for hmset. - -## v0.6.2 - June 30, 2011 - -Bugs fixed: - -* authentication retry while server is loading db (danmaz74) [GH-101] -* command arguments processing issue with arrays - -New features: - -* Auto update of new commands from redis.io (Dave Hoover) -* Performance improvements and backpressure controls. -* Commands now return the true/false value from the underlying socket write(s). -* Implement command_queue high water and low water for more better control of queueing. - -See `examples/backpressure_drain.js` for more information. - -## v0.6.1 - June 29, 2011 - -Add support and tests for Redis scripting through EXEC command. - -Bug fix for monitor mode. (forddg) - -Auto update of new commands from redis.io (Dave Hoover) - -## v0.6.0 - April 21, 2011 - -Lots of bugs fixed. - -* connection error did not properly trigger reconnection logic [GH-85] -* client.hmget(key, [val1, val2]) was not expanding properly [GH-66] -* client.quit() while in pub/sub mode would throw an error [GH-87] -* client.multi(['hmset', 'key', {foo: 'bar'}]) fails [GH-92] -* unsubscribe before subscribe would make things very confused [GH-88] -* Add BRPOPLPUSH [GH-79] - -## v0.5.11 - April 7, 2011 - -Added DISCARD - -I originally didn't think DISCARD would do anything here because of the clever MULTI interface, but somebody -pointed out to me that DISCARD can be used to flush the WATCH set. - -## v0.5.10 - April 6, 2011 - -Added HVALS - -## v0.5.9 - March 14, 2011 - -Fix bug with empty Array arguments - Andy Ray - -## v0.5.8 - March 14, 2011 - -Add `MONITOR` command and special monitor command reply parsing. - -## v0.5.7 - February 27, 2011 - -Add magical auth command. - -Authentication is now remembered by the client and will be automatically sent to the server -on every connection, including any reconnections. - -## v0.5.6 - February 22, 2011 - -Fix bug in ready check with `return_buffers` set to `true`. - -Thanks to Dean Mao and Austin Chau. - -## v0.5.5 - February 16, 2011 - -Add probe for server readiness. - -When a Redis server starts up, it might take a while to load the dataset into memory. -During this time, the server will accept connections, but will return errors for all non-INFO -commands. Now node_redis will send an INFO command whenever it connects to a server. -If the info command indicates that the server is not ready, the client will keep trying until -the server is ready. Once it is ready, the client will emit a "ready" event as well as the -"connect" event. The client will queue up all commands sent before the server is ready, just -like it did before. When the server is ready, all offline/non-ready commands will be replayed. -This should be backward compatible with previous versions. - -To disable this ready check behavior, set `options.no_ready_check` when creating the client. - -As a side effect of this change, the key/val params from the info command are available as -`client.server_options`. Further, the version string is decomposed into individual elements -in `client.server_options.versions`. - -## v0.5.4 - February 11, 2011 - -Fix excess memory consumption from Queue backing store. - -Thanks to Gustaf Sjöberg. - -## v0.5.3 - February 5, 2011 - -Fix multi/exec error reply callback logic. - -Thanks to Stella Laurenzo. - -## v0.5.2 - January 18, 2011 - -Fix bug where unhandled error replies confuse the parser. - -## v0.5.1 - January 18, 2011 - -Fix bug where subscribe commands would not handle redis-server startup error properly. - -## v0.5.0 - December 29, 2010 - -Some bug fixes: - -* An important bug fix in reconnection logic. Previously, reply callbacks would be invoked twice after - a reconnect. -* Changed error callback argument to be an actual Error object. - -New feature: - -* Add friendly syntax for HMSET using an object. - -## v0.4.1 - December 8, 2010 - -Remove warning about missing hiredis. You probably do want it though. - -## v0.4.0 - December 5, 2010 - -Support for multiple response parsers and hiredis C library from Pieter Noordhuis. -Return Strings instead of Buffers by default. -Empty nested mb reply bug fix. - -## v0.3.9 - November 30, 2010 - -Fix parser bug on failed EXECs. - -## v0.3.8 - November 10, 2010 - -Fix for null MULTI response when WATCH condition fails. - -## v0.3.7 - November 9, 2010 - -Add "drain" and "idle" events. - -## v0.3.6 - November 3, 2010 - -Add all known Redis commands from Redis master, even ones that are coming in 2.2 and beyond. - -Send a friendlier "error" event message on stream errors like connection refused / reset. - -## v0.3.5 - October 21, 2010 - -A few bug fixes. - -* Fixed bug with `nil` multi-bulk reply lengths that showed up with `BLPOP` timeouts. -* Only emit `end` once when connection goes away. -* Fixed bug in `test.js` where driver finished before all tests completed. - -## unversioned wasteland - -See the git history for what happened before. diff --git a/node_modules/redis/diff_multi_bench_output.js b/node_modules/redis/diff_multi_bench_output.js deleted file mode 100644 index 73964720..00000000 --- a/node_modules/redis/diff_multi_bench_output.js +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env node - -var colors = require('colors'), - fs = require('fs'), - _ = require('underscore'), - metrics = require('metrics'), - - // `node diff_multi_bench_output.js before.txt after.txt` - before = process.argv[2], - after = process.argv[3]; - -if (!before || !after) { - console.log('Please supply two file arguments:'); - var n = __filename; - n = n.substring(n.lastIndexOf('/', n.length)); - console.log(' ./' + n + ' multiBenchBefore.txt multiBenchAfter.txt'); - console.log('To generate multiBenchBefore.txt, run'); - console.log(' node multi_bench.js > multiBenchBefore.txt'); - console.log('Thank you for benchmarking responsibly.'); - return; -} - -var before_lines = fs.readFileSync(before, 'utf8').split('\n'), - after_lines = fs.readFileSync(after, 'utf8').split('\n'); - -console.log('Comparing before,', before.green, '(', before_lines.length, - 'lines)', 'to after,', after.green, '(', after_lines.length, 'lines)'); - -var total_ops = new metrics.Histogram.createUniformHistogram(); - -before_lines.forEach(function(b, i) { - var a = after_lines[i]; - if (!a || !b || !b.trim() || !a.trim()) { - // console.log('#ignored#', '>'+a+'<', '>'+b+'<'); - return; - } - - b_words = b.split(' ').filter(is_whitespace); - a_words = a.split(' ').filter(is_whitespace); - - var ops = - [b_words, a_words] - .map(function(words) { - // console.log(words); - return parseInt10(words.slice(-2, -1)); - }).filter(function(num) { - var isNaN = !num && num !== 0; - return !isNaN; - }); - if (ops.length != 2) return - - var delta = ops[1] - ops[0]; - var pct = ((delta / ops[0]) * 100).toPrecision(3); - - total_ops.update(delta); - - delta = humanize_diff(delta); - pct = humanize_diff(pct, '%'); - console.log( - // name of test - command_name(a_words) == command_name(b_words) - ? command_name(a_words) + ':' - : '404:', - // results of test - ops.join(' -> '), 'ops/sec (∆', delta, pct, ')'); -}); - -console.log('Mean difference in ops/sec:', humanize_diff(total_ops.mean().toPrecision(6))); - -function is_whitespace(s) { - return !!s.trim(); -} - -function parseInt10(s) { - return parseInt(s, 10); -} - -// green if greater than 0, red otherwise -function humanize_diff(num, unit) { - unit = unit || ""; - if (num > 0) { - return ('+' + num + unit).green; - } - return ('' + num + unit).red; -} - -function command_name(words) { - var line = words.join(' '); - return line.substr(0, line.indexOf(',')); -} diff --git a/node_modules/redis/examples/auth.js b/node_modules/redis/examples/auth.js deleted file mode 100644 index 6c0a563c..00000000 --- a/node_modules/redis/examples/auth.js +++ /dev/null @@ -1,5 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// This command is magical. Client stashes the password and will issue on every connect. -client.auth("somepass"); diff --git a/node_modules/redis/examples/backpressure_drain.js b/node_modules/redis/examples/backpressure_drain.js deleted file mode 100644 index 3488ef4d..00000000 --- a/node_modules/redis/examples/backpressure_drain.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("../index"), - client = redis.createClient(null, null, { - command_queue_high_water: 5, - command_queue_low_water: 1 - }), - remaining_ops = 100000, paused = false; - -function op() { - if (remaining_ops <= 0) { - console.error("Finished."); - process.exit(0); - } - - remaining_ops--; - if (client.hset("test hash", "val " + remaining_ops, remaining_ops) === false) { - console.log("Pausing at " + remaining_ops); - paused = true; - } else { - process.nextTick(op); - } -} - -client.on("drain", function () { - if (paused) { - console.log("Resuming at " + remaining_ops); - paused = false; - process.nextTick(op); - } else { - console.log("Got drain while not paused at " + remaining_ops); - } -}); - -op(); diff --git a/node_modules/redis/examples/eval.js b/node_modules/redis/examples/eval.js deleted file mode 100644 index a3ff6b07..00000000 --- a/node_modules/redis/examples/eval.js +++ /dev/null @@ -1,14 +0,0 @@ -var redis = require("../index"), - client = redis.createClient(); - -redis.debug_mode = true; - -client.eval("return 100.5", 0, function (err, res) { - console.dir(err); - console.dir(res); -}); - -client.eval([ "return 100.5", 0 ], function (err, res) { - console.dir(err); - console.dir(res); -}); diff --git a/node_modules/redis/examples/extend.js b/node_modules/redis/examples/extend.js deleted file mode 100644 index 488b8c2d..00000000 --- a/node_modules/redis/examples/extend.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// Extend the RedisClient prototype to add a custom method -// This one converts the results from "INFO" into a JavaScript Object - -redis.RedisClient.prototype.parse_info = function (callback) { - this.info(function (err, res) { - var lines = res.toString().split("\r\n").sort(); - var obj = {}; - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - callback(obj) - }); -}; - -client.parse_info(function (info) { - console.dir(info); - client.quit(); -}); diff --git a/node_modules/redis/examples/file.js b/node_modules/redis/examples/file.js deleted file mode 100644 index 4d2b5d1c..00000000 --- a/node_modules/redis/examples/file.js +++ /dev/null @@ -1,32 +0,0 @@ -// Read a file from disk, store it in Redis, then read it back from Redis. - -var redis = require("redis"), - client = redis.createClient(), - fs = require("fs"), - filename = "kids_in_cart.jpg"; - -// Get the file I use for testing like this: -// curl http://ranney.com/kids_in_cart.jpg -o kids_in_cart.jpg -// or just use your own file. - -// Read a file from fs, store it in Redis, get it back from Redis, write it back to fs. -fs.readFile(filename, function (err, data) { - if (err) throw err - console.log("Read " + data.length + " bytes from filesystem."); - - client.set(filename, data, redis.print); // set entire file - client.get(filename, function (err, reply) { // get entire file - if (err) { - console.log("Get error: " + err); - } else { - fs.writeFile("duplicate_" + filename, reply, function (err) { - if (err) { - console.log("Error on write: " + err) - } else { - console.log("File written."); - } - client.end(); - }); - } - }); -}); diff --git a/node_modules/redis/examples/mget.js b/node_modules/redis/examples/mget.js deleted file mode 100644 index 936740d3..00000000 --- a/node_modules/redis/examples/mget.js +++ /dev/null @@ -1,5 +0,0 @@ -var client = require("redis").createClient(); - -client.mget(["sessions started", "sessions started", "foo"], function (err, res) { - console.dir(res); -}); \ No newline at end of file diff --git a/node_modules/redis/examples/monitor.js b/node_modules/redis/examples/monitor.js deleted file mode 100644 index 2cb6a4e1..00000000 --- a/node_modules/redis/examples/monitor.js +++ /dev/null @@ -1,10 +0,0 @@ -var client = require("../index").createClient(), - util = require("util"); - -client.monitor(function (err, res) { - console.log("Entering monitoring mode."); -}); - -client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); -}); diff --git a/node_modules/redis/examples/multi.js b/node_modules/redis/examples/multi.js deleted file mode 100644 index 35c08e18..00000000 --- a/node_modules/redis/examples/multi.js +++ /dev/null @@ -1,46 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), set_size = 20; - -client.sadd("bigset", "a member"); -client.sadd("bigset", "another member"); - -while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; -} - -// multi chain with an individual callback -client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); - -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// start a separate multi command queue -var multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.get("incr thing", redis.print); // 100 - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); diff --git a/node_modules/redis/examples/multi2.js b/node_modules/redis/examples/multi2.js deleted file mode 100644 index 8be4d731..00000000 --- a/node_modules/redis/examples/multi2.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), multi; - -// start a separate command queue for multi -multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); - -client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] -]).exec(function (err, replies) { - console.log(replies.toString()); -}); diff --git a/node_modules/redis/examples/psubscribe.js b/node_modules/redis/examples/psubscribe.js deleted file mode 100644 index c57117b8..00000000 --- a/node_modules/redis/examples/psubscribe.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), - client2 = redis.createClient(), - client3 = redis.createClient(), - client4 = redis.createClient(), - msg_count = 0; - -redis.debug_mode = false; - -client1.on("psubscribe", function (pattern, count) { - console.log("client1 psubscribed to " + pattern + ", " + count + " total subscriptions"); - client2.publish("channeltwo", "Me!"); - client3.publish("channelthree", "Me too!"); - client4.publish("channelfour", "And me too!"); -}); - -client1.on("punsubscribe", function (pattern, count) { - console.log("client1 punsubscribed from " + pattern + ", " + count + " total subscriptions"); - client4.end(); - client3.end(); - client2.end(); - client1.end(); -}); - -client1.on("pmessage", function (pattern, channel, message) { - console.log("("+ pattern +")" + " client1 received message on " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.punsubscribe(); - } -}); - -client1.psubscribe("channel*"); diff --git a/node_modules/redis/examples/pub_sub.js b/node_modules/redis/examples/pub_sub.js deleted file mode 100644 index aa508d6c..00000000 --- a/node_modules/redis/examples/pub_sub.js +++ /dev/null @@ -1,41 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), msg_count = 0, - client2 = redis.createClient(); - -redis.debug_mode = false; - -// Most clients probably don't do much on "subscribe". This example uses it to coordinate things within one program. -client1.on("subscribe", function (channel, count) { - console.log("client1 subscribed to " + channel + ", " + count + " total subscriptions"); - if (count === 2) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("another one", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - } -}); - -client1.on("unsubscribe", function (channel, count) { - console.log("client1 unsubscribed from " + channel + ", " + count + " total subscriptions"); - if (count === 0) { - client2.end(); - client1.end(); - } -}); - -client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - } -}); - -client1.on("ready", function () { - // if you need auth, do it here - client1.incr("did a thing"); - client1.subscribe("a nice channel", "another one"); -}); - -client2.on("ready", function () { - // if you need auth, do it here -}); diff --git a/node_modules/redis/examples/simple.js b/node_modules/redis/examples/simple.js deleted file mode 100644 index f1f2e320..00000000 --- a/node_modules/redis/examples/simple.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.on("error", function (err) { - console.log("error event - " + client.host + ":" + client.port + " - " + err); -}); - -client.set("string key", "string val", redis.print); -client.hset("hash key", "hashtest 1", "some value", redis.print); -client.hset(["hash key", "hashtest 2", "some other value"], redis.print); -client.hkeys("hash key", function (err, replies) { - if (err) { - return console.error("error response - " + err); - } - - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); -}); - -client.quit(function (err, res) { - console.log("Exiting from quit command."); -}); diff --git a/node_modules/redis/examples/sort.js b/node_modules/redis/examples/sort.js deleted file mode 100644 index e7c6249e..00000000 --- a/node_modules/redis/examples/sort.js +++ /dev/null @@ -1,17 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.sadd("mylist", 1); -client.sadd("mylist", 2); -client.sadd("mylist", 3); - -client.set("weight_1", 5); -client.set("weight_2", 500); -client.set("weight_3", 1); - -client.set("object_1", "foo"); -client.set("object_2", "bar"); -client.set("object_3", "qux"); - -client.sort("mylist", "by", "weight_*", "get", "object_*", redis.print); -// Prints Reply: qux,foo,bar \ No newline at end of file diff --git a/node_modules/redis/examples/subqueries.js b/node_modules/redis/examples/subqueries.js deleted file mode 100644 index 560db240..00000000 --- a/node_modules/redis/examples/subqueries.js +++ /dev/null @@ -1,15 +0,0 @@ -// Sending commands in response to other commands. -// This example runs "type" against every key in the database -// -var client = require("redis").createClient(); - -client.keys("*", function (err, keys) { - keys.forEach(function (key, pos) { - client.type(key, function (err, keytype) { - console.log(key + " is " + keytype); - if (pos === (keys.length - 1)) { - client.quit(); - } - }); - }); -}); diff --git a/node_modules/redis/examples/subquery.js b/node_modules/redis/examples/subquery.js deleted file mode 100644 index 861657e1..00000000 --- a/node_modules/redis/examples/subquery.js +++ /dev/null @@ -1,19 +0,0 @@ -var client = require("redis").createClient(); - -function print_results(obj) { - console.dir(obj); -} - -// build a map of all keys and their types -client.keys("*", function (err, all_keys) { - var key_types = {}; - - all_keys.forEach(function (key, pos) { // use second arg of forEach to get pos - client.type(key, function (err, type) { - key_types[key] = type; - if (pos === all_keys.length - 1) { // callbacks all run in order - print_results(key_types); - } - }); - }); -}); diff --git a/node_modules/redis/examples/unix_socket.js b/node_modules/redis/examples/unix_socket.js deleted file mode 100644 index 4a5e0bb0..00000000 --- a/node_modules/redis/examples/unix_socket.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient("/tmp/redis.sock"), - profiler = require("v8-profiler"); - -client.on("connect", function () { - console.log("Got Unix socket connection.") -}); - -client.on("error", function (err) { - console.log(err.message); -}); - -client.set("space chars", "space value"); - -setInterval(function () { - client.get("space chars"); -}, 100); - -function done() { - client.info(function (err, reply) { - console.log(reply.toString()); - client.quit(); - }); -} - -setTimeout(function () { - console.log("Taking snapshot."); - var snap = profiler.takeSnapshot(); -}, 5000); diff --git a/node_modules/redis/examples/web_server.js b/node_modules/redis/examples/web_server.js deleted file mode 100644 index 9fd85923..00000000 --- a/node_modules/redis/examples/web_server.js +++ /dev/null @@ -1,31 +0,0 @@ -// A simple web server that generates dyanmic content based on responses from Redis - -var http = require("http"), server, - redis_client = require("redis").createClient(); - -server = http.createServer(function (request, response) { - response.writeHead(200, { - "Content-Type": "text/plain" - }); - - var redis_info, total_requests; - - redis_client.info(function (err, reply) { - redis_info = reply; // stash response in outer scope - }); - redis_client.incr("requests", function (err, reply) { - total_requests = reply; // stash response in outer scope - }); - redis_client.hincrby("ip", request.connection.remoteAddress, 1); - redis_client.hgetall("ip", function (err, reply) { - // This is the last reply, so all of the previous replies must have completed already - response.write("This page was generated after talking to redis.\n\n" + - "Redis info:\n" + redis_info + "\n" + - "Total requests: " + total_requests + "\n\n" + - "IP count: \n"); - Object.keys(reply).forEach(function (ip) { - response.write(" " + ip + ": " + reply[ip] + "\n"); - }); - response.end(); - }); -}).listen(80); diff --git a/node_modules/redis/generate_commands.js b/node_modules/redis/generate_commands.js deleted file mode 100644 index e6949d3a..00000000 --- a/node_modules/redis/generate_commands.js +++ /dev/null @@ -1,39 +0,0 @@ -var http = require("http"), - fs = require("fs"); - -function prettyCurrentTime() { - var date = new Date(); - return date.toLocaleString(); -} - -function write_file(commands, path) { - var file_contents, out_commands; - - console.log("Writing " + Object.keys(commands).length + " commands to " + path); - - file_contents = "// This file was generated by ./generate_commands.js on " + prettyCurrentTime() + "\n"; - - out_commands = Object.keys(commands).map(function (key) { - return key.toLowerCase(); - }); - - file_contents += "module.exports = " + JSON.stringify(out_commands, null, " ") + ";\n"; - - fs.writeFile(path, file_contents); -} - -http.get({host: "redis.io", path: "/commands.json"}, function (res) { - var body = ""; - - console.log("Response from redis.io/commands.json: " + res.statusCode); - - res.on('data', function (chunk) { - body += chunk; - }); - - res.on('end', function () { - write_file(JSON.parse(body), "lib/commands.js"); - }); -}).on('error', function (e) { - console.log("Error fetching command list from redis.io: " + e.message); -}); diff --git a/node_modules/redis/index.js b/node_modules/redis/index.js deleted file mode 100644 index 6e87bb12..00000000 --- a/node_modules/redis/index.js +++ /dev/null @@ -1,1203 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -var net = require("net"), - util = require("./lib/util"), - Queue = require("./lib/queue"), - to_array = require("./lib/to_array"), - events = require("events"), - crypto = require("crypto"), - parsers = [], commands, - connection_id = 0, - default_port = 6379, - default_host = "127.0.0.1"; - -// can set this to true to enable for all connections -exports.debug_mode = false; - -var arraySlice = Array.prototype.slice -function trace() { - if (!exports.debug_mode) return; - console.log.apply(null, arraySlice.call(arguments)) -} - -// hiredis might not be installed -try { - require("./lib/parser/hiredis"); - parsers.push(require("./lib/parser/hiredis")); -} catch (err) { - if (exports.debug_mode) { - console.warn("hiredis parser not installed."); - } -} - -parsers.push(require("./lib/parser/javascript")); - -function RedisClient(stream, options) { - this.stream = stream; - this.options = options = options || {}; - - this.connection_id = ++connection_id; - this.connected = false; - this.ready = false; - this.connections = 0; - if (this.options.socket_nodelay === undefined) { - this.options.socket_nodelay = true; - } - this.should_buffer = false; - this.command_queue_high_water = this.options.command_queue_high_water || 1000; - this.command_queue_low_water = this.options.command_queue_low_water || 0; - this.max_attempts = null; - if (options.max_attempts && !isNaN(options.max_attempts) && options.max_attempts > 0) { - this.max_attempts = +options.max_attempts; - } - this.command_queue = new Queue(); // holds sent commands to de-pipeline them - this.offline_queue = new Queue(); // holds commands issued but not able to be sent - this.commands_sent = 0; - this.connect_timeout = false; - if (options.connect_timeout && !isNaN(options.connect_timeout) && options.connect_timeout > 0) { - this.connect_timeout = +options.connect_timeout; - } - this.enable_offline_queue = true; - if (typeof this.options.enable_offline_queue === "boolean") { - this.enable_offline_queue = this.options.enable_offline_queue; - } - this.retry_max_delay = null; - if (options.retry_max_delay !== undefined && !isNaN(options.retry_max_delay) && options.retry_max_delay > 0) { - this.retry_max_delay = options.retry_max_delay; - } - - this.initialize_retry_vars(); - this.pub_sub_mode = false; - this.subscription_set = {}; - this.monitoring = false; - this.closing = false; - this.server_info = {}; - this.auth_pass = null; - if (options.auth_pass !== undefined) { - this.auth_pass = options.auth_pass; - } - this.parser_module = null; - this.selected_db = null; // save the selected db here, used when reconnecting - - this.old_state = null; - - var self = this; - - this.stream.on("connect", function () { - self.on_connect(); - }); - - this.stream.on("data", function (buffer_from_socket) { - self.on_data(buffer_from_socket); - }); - - this.stream.on("error", function (msg) { - self.on_error(msg.message); - }); - - this.stream.on("close", function () { - self.connection_gone("close"); - }); - - this.stream.on("end", function () { - self.connection_gone("end"); - }); - - this.stream.on("drain", function () { - self.should_buffer = false; - self.emit("drain"); - }); - - events.EventEmitter.call(this); -} -util.inherits(RedisClient, events.EventEmitter); -exports.RedisClient = RedisClient; - -RedisClient.prototype.initialize_retry_vars = function () { - this.retry_timer = null; - this.retry_totaltime = 0; - this.retry_delay = 150; - this.retry_backoff = 1.7; - this.attempts = 1; -}; - -RedisClient.prototype.unref = function () { - trace("User requesting to unref the connection"); - if (this.connected) { - trace("unref'ing the socket connection"); - this.stream.unref(); - } - else { - trace("Not connected yet, will unref later"); - this.once("connect", function () { - this.unref(); - }) - } -}; - -// flush offline_queue and command_queue, erroring any items with a callback first -RedisClient.prototype.flush_and_error = function (message) { - var command_obj, error; - - error = new Error(message); - - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (typeof command_obj.callback === "function") { - try { - command_obj.callback(error); - } catch (callback_err) { - this.emit("error", callback_err); - } - } - } - this.offline_queue = new Queue(); - - while (this.command_queue.length > 0) { - command_obj = this.command_queue.shift(); - if (typeof command_obj.callback === "function") { - try { - command_obj.callback(error); - } catch (callback_err) { - this.emit("error", callback_err); - } - } - } - this.command_queue = new Queue(); -}; - -RedisClient.prototype.on_error = function (msg) { - var message = "Redis connection to " + this.host + ":" + this.port + " failed - " + msg; - - if (this.closing) { - return; - } - - if (exports.debug_mode) { - console.warn(message); - } - - this.flush_and_error(message); - - this.connected = false; - this.ready = false; - - this.emit("error", new Error(message)); - // "error" events get turned into exceptions if they aren't listened for. If the user handled this error - // then we should try to reconnect. - this.connection_gone("error"); -}; - -RedisClient.prototype.do_auth = function () { - var self = this; - - if (exports.debug_mode) { - console.log("Sending auth to " + self.host + ":" + self.port + " id " + self.connection_id); - } - self.send_anyway = true; - self.send_command("auth", [this.auth_pass], function (err, res) { - if (err) { - if (err.toString().match("LOADING")) { - // if redis is still loading the db, it will not authenticate and everything else will fail - console.log("Redis still loading, trying to authenticate later"); - setTimeout(function () { - self.do_auth(); - }, 2000); // TODO - magic number alert - return; - } else if (err.toString().match("no password is set")) { - console.log("Warning: Redis server does not require a password, but a password was supplied.") - err = null; - res = "OK"; - } else { - return self.emit("error", new Error("Auth error: " + err.message)); - } - } - if (res.toString() !== "OK") { - return self.emit("error", new Error("Auth failed: " + res.toString())); - } - if (exports.debug_mode) { - console.log("Auth succeeded " + self.host + ":" + self.port + " id " + self.connection_id); - } - if (self.auth_callback) { - self.auth_callback(err, res); - self.auth_callback = null; - } - - // now we are really connected - self.emit("connect"); - self.initialize_retry_vars(); - - if (self.options.no_ready_check) { - self.on_ready(); - } else { - self.ready_check(); - } - }); - self.send_anyway = false; -}; - -RedisClient.prototype.on_connect = function () { - if (exports.debug_mode) { - console.log("Stream connected " + this.host + ":" + this.port + " id " + this.connection_id); - } - - this.connected = true; - this.ready = false; - this.connections += 1; - this.command_queue = new Queue(); - this.emitted_end = false; - if (this.options.socket_nodelay) { - this.stream.setNoDelay(); - } - this.stream.setTimeout(0); - - this.init_parser(); - - if (this.auth_pass) { - this.do_auth(); - } else { - this.emit("connect"); - this.initialize_retry_vars(); - - if (this.options.no_ready_check) { - this.on_ready(); - } else { - this.ready_check(); - } - } -}; - -RedisClient.prototype.init_parser = function () { - var self = this; - - if (this.options.parser) { - if (! parsers.some(function (parser) { - if (parser.name === self.options.parser) { - self.parser_module = parser; - if (exports.debug_mode) { - console.log("Using parser module: " + self.parser_module.name); - } - return true; - } - })) { - throw new Error("Couldn't find named parser " + self.options.parser + " on this system"); - } - } else { - if (exports.debug_mode) { - console.log("Using default parser module: " + parsers[0].name); - } - this.parser_module = parsers[0]; - } - - this.parser_module.debug_mode = exports.debug_mode; - - // return_buffers sends back Buffers from parser to callback. detect_buffers sends back Buffers from parser, but - // converts to Strings if the input arguments are not Buffers. - this.reply_parser = new this.parser_module.Parser({ - return_buffers: self.options.return_buffers || self.options.detect_buffers || false - }); - - // "reply error" is an error sent back by Redis - this.reply_parser.on("reply error", function (reply) { - if (reply instanceof Error) { - self.return_error(reply); - } else { - self.return_error(new Error(reply)); - } - }); - this.reply_parser.on("reply", function (reply) { - self.return_reply(reply); - }); - // "error" is bad. Somehow the parser got confused. It'll try to reset and continue. - this.reply_parser.on("error", function (err) { - self.emit("error", new Error("Redis reply parser error: " + err.stack)); - }); -}; - -RedisClient.prototype.on_ready = function () { - var self = this; - - this.ready = true; - - if (this.old_state !== null) { - this.monitoring = this.old_state.monitoring; - this.pub_sub_mode = this.old_state.pub_sub_mode; - this.selected_db = this.old_state.selected_db; - this.old_state = null; - } - - // magically restore any modal commands from a previous connection - if (this.selected_db !== null) { - // this trick works if and only if the following send_command - // never goes into the offline queue - var pub_sub_mode = this.pub_sub_mode; - this.pub_sub_mode = false; - this.send_command('select', [this.selected_db]); - this.pub_sub_mode = pub_sub_mode; - } - if (this.pub_sub_mode === true) { - // only emit "ready" when all subscriptions were made again - var callback_count = 0; - var callback = function () { - callback_count--; - if (callback_count === 0) { - self.emit("ready"); - } - }; - Object.keys(this.subscription_set).forEach(function (key) { - var parts = key.split(" "); - if (exports.debug_mode) { - console.warn("sending pub/sub on_ready " + parts[0] + ", " + parts[1]); - } - callback_count++; - self.send_command(parts[0] + "scribe", [parts[1]], callback); - }); - return; - } else if (this.monitoring) { - this.send_command("monitor"); - } else { - this.send_offline_queue(); - } - this.emit("ready"); -}; - -RedisClient.prototype.on_info_cmd = function (err, res) { - var self = this, obj = {}, lines, retry_time; - - if (err) { - return self.emit("error", new Error("Ready check failed: " + err.message)); - } - - lines = res.toString().split("\r\n"); - - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - - obj.versions = []; - if( obj.redis_version ){ - obj.redis_version.split('.').forEach(function (num) { - obj.versions.push(+num); - }); - } - - // expose info key/vals to users - this.server_info = obj; - - if (!obj.loading || (obj.loading && obj.loading === "0")) { - if (exports.debug_mode) { - console.log("Redis server ready."); - } - this.on_ready(); - } else { - retry_time = obj.loading_eta_seconds * 1000; - if (retry_time > 1000) { - retry_time = 1000; - } - if (exports.debug_mode) { - console.log("Redis server still loading, trying again in " + retry_time); - } - setTimeout(function () { - self.ready_check(); - }, retry_time); - } -}; - -RedisClient.prototype.ready_check = function () { - var self = this; - - if (exports.debug_mode) { - console.log("checking server ready state..."); - } - - this.send_anyway = true; // secret flag to send_command to send something even if not "ready" - this.info(function (err, res) { - self.on_info_cmd(err, res); - }); - this.send_anyway = false; -}; - -RedisClient.prototype.send_offline_queue = function () { - var command_obj, buffered_writes = 0; - - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (exports.debug_mode) { - console.log("Sending offline command: " + command_obj.command); - } - buffered_writes += !this.send_command(command_obj.command, command_obj.args, command_obj.callback); - } - this.offline_queue = new Queue(); - // Even though items were shifted off, Queue backing store still uses memory until next add, so just get a new Queue - - if (!buffered_writes) { - this.should_buffer = false; - this.emit("drain"); - } -}; - -RedisClient.prototype.connection_gone = function (why) { - var self = this; - - // If a retry is already in progress, just let that happen - if (this.retry_timer) { - return; - } - - if (exports.debug_mode) { - console.warn("Redis connection is gone from " + why + " event."); - } - this.connected = false; - this.ready = false; - - if (this.old_state === null) { - var state = { - monitoring: this.monitoring, - pub_sub_mode: this.pub_sub_mode, - selected_db: this.selected_db - }; - this.old_state = state; - this.monitoring = false; - this.pub_sub_mode = false; - this.selected_db = null; - } - - // since we are collapsing end and close, users don't expect to be called twice - if (! this.emitted_end) { - this.emit("end"); - this.emitted_end = true; - } - - this.flush_and_error("Redis connection gone from " + why + " event."); - - // If this is a requested shutdown, then don't retry - if (this.closing) { - this.retry_timer = null; - if (exports.debug_mode) { - console.warn("connection ended from quit command, not retrying."); - } - return; - } - - var nextDelay = Math.floor(this.retry_delay * this.retry_backoff); - if (this.retry_max_delay !== null && nextDelay > this.retry_max_delay) { - this.retry_delay = this.retry_max_delay; - } else { - this.retry_delay = nextDelay; - } - - if (exports.debug_mode) { - console.log("Retry connection in " + this.retry_delay + " ms"); - } - - if (this.max_attempts && this.attempts >= this.max_attempts) { - this.retry_timer = null; - // TODO - some people need a "Redis is Broken mode" for future commands that errors immediately, and others - // want the program to exit. Right now, we just log, which doesn't really help in either case. - console.error("node_redis: Couldn't get Redis connection after " + this.max_attempts + " attempts."); - return; - } - - this.attempts += 1; - this.emit("reconnecting", { - delay: self.retry_delay, - attempt: self.attempts - }); - this.retry_timer = setTimeout(function () { - if (exports.debug_mode) { - console.log("Retrying connection..."); - } - - self.retry_totaltime += self.retry_delay; - - if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) { - self.retry_timer = null; - // TODO - engage Redis is Broken mode for future commands, or whatever - console.error("node_redis: Couldn't get Redis connection after " + self.retry_totaltime + "ms."); - return; - } - - self.stream.connect(self.port, self.host); - self.retry_timer = null; - }, this.retry_delay); -}; - -RedisClient.prototype.on_data = function (data) { - if (exports.debug_mode) { - console.log("net read " + this.host + ":" + this.port + " id " + this.connection_id + ": " + data.toString()); - } - - try { - this.reply_parser.execute(data); - } catch (err) { - // This is an unexpected parser problem, an exception that came from the parser code itself. - // Parser should emit "error" events if it notices things are out of whack. - // Callbacks that throw exceptions will land in return_reply(), below. - // TODO - it might be nice to have a different "error" event for different types of errors - this.emit("error", err); - } -}; - -RedisClient.prototype.return_error = function (err) { - var command_obj = this.command_queue.shift(), queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.command_queue = new Queue(); - this.emit("idle"); - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && typeof command_obj.callback === "function") { - try { - command_obj.callback(err); - } catch (callback_err) { - this.emit("error", callback_err); - } - } else { - console.log("node_redis: no callback to send error: " + err.message); - this.emit("error", err); - } -}; - -// if a callback throws an exception, re-throw it on a new stack so the parser can keep going. -// if a domain is active, emit the error on the domain, which will serve the same function. -// put this try/catch in its own function because V8 doesn't optimize this well yet. -function try_callback(client, callback, reply) { - try { - callback(null, reply); - } catch (err) { - if (process.domain) { - process.domain.emit('error', err); - process.domain.exit(); - } else { - client.emit("error", err); - } - } -} - -// 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; -} - -function reply_to_strings(reply) { - var i; - - if (Buffer.isBuffer(reply)) { - return reply.toString(); - } - - if (Array.isArray(reply)) { - for (i = 0; i < reply.length; i++) { - if (reply[i] !== null && reply[i] !== undefined) { - reply[i] = reply[i].toString(); - } - } - return reply; - } - - return reply; -} - -RedisClient.prototype.return_reply = function (reply) { - var command_obj, len, type, timestamp, argindex, args, queue_len; - - // If the "reply" here is actually a message received asynchronously due to a - // pubsub subscription, don't pop the command queue as we'll only be consuming - // the head command prematurely. - if (Array.isArray(reply) && reply.length > 0 && reply[0]) { - type = reply[0].toString(); - } - - if (this.pub_sub_mode && (type == 'message' || type == 'pmessage')) { - trace("received pubsub message"); - } - else { - command_obj = this.command_queue.shift(); - } - - queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.command_queue = new Queue(); // explicitly reclaim storage from old Queue - this.emit("idle"); - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && !command_obj.sub_command) { - if (typeof command_obj.callback === "function") { - if (this.options.detect_buffers && command_obj.buffer_args === false) { - // If detect_buffers option was specified, then the reply from the parser will be Buffers. - // If this command did not use Buffer arguments, then convert the reply to Strings here. - reply = reply_to_strings(reply); - } - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && 'hgetall' === command_obj.command.toLowerCase()) { - reply = reply_to_object(reply); - } - - try_callback(this, command_obj.callback, reply); - } else if (exports.debug_mode) { - console.log("no callback for reply: " + (reply && reply.toString && reply.toString())); - } - } else if (this.pub_sub_mode || (command_obj && command_obj.sub_command)) { - if (Array.isArray(reply)) { - type = reply[0].toString(); - - if (type === "message") { - this.emit("message", reply[1].toString(), reply[2]); // channel, message - } else if (type === "pmessage") { - this.emit("pmessage", reply[1].toString(), reply[2].toString(), reply[3]); // pattern, channel, message - } else if (type === "subscribe" || type === "unsubscribe" || type === "psubscribe" || type === "punsubscribe") { - if (reply[2] === 0) { - this.pub_sub_mode = false; - if (this.debug_mode) { - console.log("All subscriptions removed, exiting pub/sub mode"); - } - } else { - this.pub_sub_mode = true; - } - // subscribe commands take an optional callback and also emit an event, but only the first response is included in the callback - // TODO - document this or fix it so it works in a more obvious way - // reply[1] can be null - var reply1String = (reply[1] === null) ? null : reply[1].toString(); - if (command_obj && typeof command_obj.callback === "function") { - try_callback(this, command_obj.callback, reply1String); - } - this.emit(type, reply1String, reply[2]); // channel, count - } else { - throw new Error("subscriptions are active but got unknown reply type " + type); - } - } else if (! this.closing) { - throw new Error("subscriptions are active but got an invalid reply: " + reply); - } - } else if (this.monitoring) { - len = reply.indexOf(" "); - timestamp = reply.slice(0, len); - argindex = reply.indexOf('"'); - args = reply.slice(argindex + 1, -1).split('" "').map(function (elem) { - return elem.replace(/\\"/g, '"'); - }); - this.emit("monitor", timestamp, args); - } else { - throw new Error("node_redis command queue state error. If you can reproduce this, please report it."); - } -}; - -// This Command constructor is ever so slightly faster than using an object literal, but more importantly, using -// a named constructor helps it show up meaningfully in the V8 CPU profiler and in heap snapshots. -function Command(command, args, sub_command, buffer_args, callback) { - this.command = command; - this.args = args; - this.sub_command = sub_command; - this.buffer_args = buffer_args; - this.callback = callback; -} - -RedisClient.prototype.send_command = function (command, args, callback) { - var arg, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type, lcaseCommand; - - 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]); - 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 (callback && process.domain) callback = process.domain.bind(callback); - - // if the last argument is an array and command is sadd or srem, expand it out: - // client.sadd(arg1, [arg2, arg3, arg4], cb); - // converts to: - // client.sadd(arg1, arg2, arg3, arg4, cb); - lcaseCommand = command.toLowerCase(); - if ((lcaseCommand === 'sadd' || lcaseCommand === 'srem') && args.length > 0 && Array.isArray(args[args.length - 1])) { - args = args.slice(0, -1).concat(args[args.length - 1]); - } - - // if the value is undefined or null and command is set or setx, need not to send message to redis - if (command === 'set' || command === 'setex') { - if(args[args.length - 1] === undefined || args[args.length - 1] === null) { - var err = new Error('send_command: ' + command + ' value must not be undefined or null'); - return callback && callback(err); - } - } - - buffer_args = false; - for (i = 0, il = args.length, arg; i < il; i += 1) { - if (Buffer.isBuffer(args[i])) { - buffer_args = true; - } - } - - command_obj = new Command(command, args, false, buffer_args, callback); - - if ((!this.ready && !this.send_anyway) || !stream.writable) { - if (exports.debug_mode) { - if (!stream.writable) { - console.log("send command: stream is not writeable."); - } - } - - if (this.enable_offline_queue) { - if (exports.debug_mode) { - console.log("Queueing " + command + " for next server connection."); - } - this.offline_queue.push(command_obj); - this.should_buffer = true; - } else { - var not_writeable_error = new Error('send_command: stream not writeable. enable_offline_queue is false'); - if (command_obj.callback) { - command_obj.callback(not_writeable_error); - } else { - throw not_writeable_error; - } - } - - return false; - } - - if (command === "subscribe" || command === "psubscribe" || command === "unsubscribe" || command === "punsubscribe") { - this.pub_sub_command(command_obj); - } else if (command === "monitor") { - this.monitoring = true; - } else if (command === "quit") { - this.closing = true; - } else if (this.pub_sub_mode === true) { - throw new Error("Connection in subscriber mode, only subscriber commands may be used"); - } - this.command_queue.push(command_obj); - this.commands_sent += 1; - - elem_count = args.length + 1; - - // Always use "Multi bulk commands", but if passed any Buffer args, then do multiple writes, one for each arg. - // This means that using Buffers in commands is going to be slower, so use Strings if you don't already have a Buffer. - - command_str = "*" + elem_count + "\r\n$" + command.length + "\r\n" + command + "\r\n"; - - if (! buffer_args) { // Build up a string and send entire command in one write - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (typeof arg !== "string") { - arg = String(arg); - } - command_str += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; - } - if (exports.debug_mode) { - console.log("send " + this.host + ":" + this.port + " id " + this.connection_id + ": " + command_str); - } - buffered_writes += !stream.write(command_str); - } else { - if (exports.debug_mode) { - console.log("send command (" + command_str + ") has Buffer arguments"); - } - buffered_writes += !stream.write(command_str); - - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (!(Buffer.isBuffer(arg) || arg instanceof String)) { - arg = String(arg); - } - - if (Buffer.isBuffer(arg)) { - if (arg.length === 0) { - if (exports.debug_mode) { - console.log("send_command: using empty string for 0 length buffer"); - } - buffered_writes += !stream.write("$0\r\n\r\n"); - } else { - buffered_writes += !stream.write("$" + arg.length + "\r\n"); - buffered_writes += !stream.write(arg); - buffered_writes += !stream.write("\r\n"); - if (exports.debug_mode) { - console.log("send_command: buffer send " + arg.length + " bytes"); - } - } - } else { - if (exports.debug_mode) { - console.log("send_command: string send " + Buffer.byteLength(arg) + " bytes: " + arg); - } - buffered_writes += !stream.write("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); - } - } - } - if (exports.debug_mode) { - console.log("send_command buffered_writes: " + buffered_writes, " should_buffer: " + this.should_buffer); - } - if (buffered_writes || this.command_queue.getLength() >= this.command_queue_high_water) { - this.should_buffer = true; - } - return !this.should_buffer; -}; - -RedisClient.prototype.pub_sub_command = function (command_obj) { - var i, key, command, args; - - if (this.pub_sub_mode === false && exports.debug_mode) { - console.log("Entering pub/sub mode from " + command_obj.command); - } - this.pub_sub_mode = true; - command_obj.sub_command = true; - - command = command_obj.command; - args = command_obj.args; - if (command === "subscribe" || command === "psubscribe") { - if (command === "subscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - this.subscription_set[key + " " + args[i]] = true; - } - } else { - if (command === "unsubscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - delete this.subscription_set[key + " " + args[i]]; - } - } -}; - -RedisClient.prototype.end = function () { - this.stream._events = {}; - this.connected = false; - this.ready = false; - this.closing = true; - return this.stream.destroySoon(); -}; - -function Multi(client, args) { - this._client = client; - this.queue = [["MULTI"]]; - if (Array.isArray(args)) { - this.queue = this.queue.concat(args); - } -} - -exports.Multi = Multi; - -// take 2 arrays and return the union of their elements -function set_union(seta, setb) { - var obj = {}; - - seta.forEach(function (val) { - obj[val] = true; - }); - setb.forEach(function (val) { - obj[val] = true; - }); - return Object.keys(obj); -} - -// This static list of commands is updated from time to time. ./lib/commands.js can be updated with generate_commands.js -commands = set_union(["get", "set", "setnx", "setex", "append", "strlen", "del", "exists", "setbit", "getbit", "setrange", "getrange", "substr", - "incr", "decr", "mget", "rpush", "lpush", "rpushx", "lpushx", "linsert", "rpop", "lpop", "brpop", "brpoplpush", "blpop", "llen", "lindex", - "lset", "lrange", "ltrim", "lrem", "rpoplpush", "sadd", "srem", "smove", "sismember", "scard", "spop", "srandmember", "sinter", "sinterstore", - "sunion", "sunionstore", "sdiff", "sdiffstore", "smembers", "zadd", "zincrby", "zrem", "zremrangebyscore", "zremrangebyrank", "zunionstore", - "zinterstore", "zrange", "zrangebyscore", "zrevrangebyscore", "zcount", "zrevrange", "zcard", "zscore", "zrank", "zrevrank", "hset", "hsetnx", - "hget", "hmset", "hmget", "hincrby", "hdel", "hlen", "hkeys", "hvals", "hgetall", "hexists", "incrby", "decrby", "getset", "mset", "msetnx", - "randomkey", "select", "move", "rename", "renamenx", "expire", "expireat", "keys", "dbsize", "auth", "ping", "echo", "save", "bgsave", - "bgrewriteaof", "shutdown", "lastsave", "type", "multi", "exec", "discard", "sync", "flushdb", "flushall", "sort", "info", "monitor", "ttl", - "persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster", - "restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands")); - -commands.forEach(function (fullCommand) { - var command = fullCommand.split(' ')[0]; - - RedisClient.prototype[command] = function (args, callback) { - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command(command, args, callback); - } else { - return this.send_command(command, to_array(arguments)); - } - }; - RedisClient.prototype[command.toUpperCase()] = RedisClient.prototype[command]; - - Multi.prototype[command] = function () { - this.queue.push([command].concat(to_array(arguments))); - return this; - }; - Multi.prototype[command.toUpperCase()] = Multi.prototype[command]; -}); - -// store db in this.select_db to restore it on reconnect -RedisClient.prototype.select = function (db, callback) { - var self = this; - - this.send_command('select', [db], function (err, res) { - if (err === null) { - self.selected_db = db; - } - if (typeof(callback) === 'function') { - callback(err, res); - } - }); -}; -RedisClient.prototype.SELECT = RedisClient.prototype.select; - -// Stash auth for connect and reconnect. Send immediately if already connected. -RedisClient.prototype.auth = function () { - var args = to_array(arguments); - this.auth_pass = args[0]; - this.auth_callback = args[1]; - if (exports.debug_mode) { - console.log("Saving auth as " + this.auth_pass); - } - - if (this.connected) { - this.send_command("auth", args); - } -}; -RedisClient.prototype.AUTH = RedisClient.prototype.auth; - -RedisClient.prototype.hmget = function (arg1, arg2, arg3) { - if (Array.isArray(arg2) && typeof arg3 === "function") { - return this.send_command("hmget", [arg1].concat(arg2), arg3); - } else if (Array.isArray(arg1) && typeof arg2 === "function") { - return this.send_command("hmget", arg1, arg2); - } else { - return this.send_command("hmget", to_array(arguments)); - } -}; -RedisClient.prototype.HMGET = RedisClient.prototype.hmget; - -RedisClient.prototype.hmset = function (args, callback) { - var tmp_args, tmp_keys, i, il, key; - - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command("hmset", args, callback); - } - - args = to_array(arguments); - if (typeof args[args.length - 1] === "function") { - callback = args[args.length - 1]; - args.length -= 1; - } else { - callback = null; - } - - if (args.length === 2 && (typeof args[0] === "string" || typeof args[0] === "number") && typeof args[1] === "object") { - // User does: client.hmset(key, {key1: val1, key2: val2}) - // assuming key is a string, i.e. email address - - // if key is a number, i.e. timestamp, convert to string - if (typeof args[0] === "number") { - args[0] = args[0].toString(); - } - - tmp_args = [ args[0] ]; - tmp_keys = Object.keys(args[1]); - for (i = 0, il = tmp_keys.length; i < il ; i++) { - key = tmp_keys[i]; - tmp_args.push(key); - tmp_args.push(args[1][key]); - } - args = tmp_args; - } - - return this.send_command("hmset", args, callback); -}; -RedisClient.prototype.HMSET = RedisClient.prototype.hmset; - -Multi.prototype.hmset = function () { - var args = to_array(arguments), tmp_args; - if (args.length >= 2 && typeof args[0] === "string" && typeof args[1] === "object") { - tmp_args = [ "hmset", args[0] ]; - Object.keys(args[1]).map(function (key) { - tmp_args.push(key); - tmp_args.push(args[1][key]); - }); - if (args[2]) { - tmp_args.push(args[2]); - } - args = tmp_args; - } else { - args.unshift("hmset"); - } - - this.queue.push(args); - return this; -}; -Multi.prototype.HMSET = Multi.prototype.hmset; - -Multi.prototype.exec = function (callback) { - var self = this; - var errors = []; - // drain queue, callback will catch "QUEUED" or error - // TODO - get rid of all of these anonymous functions which are elegant but slow - this.queue.forEach(function (args, index) { - var command = args[0], obj; - if (typeof args[args.length - 1] === "function") { - args = args.slice(1, -1); - } else { - args = args.slice(1); - } - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - if (command.toLowerCase() === 'hmset' && typeof args[1] === 'object') { - obj = args.pop(); - Object.keys(obj).forEach(function (key) { - args.push(key); - args.push(obj[key]); - }); - } - this._client.send_command(command, args, function (err, reply) { - if (err) { - var cur = self.queue[index]; - if (typeof cur[cur.length - 1] === "function") { - cur[cur.length - 1](err); - } else { - errors.push(new Error(err)); - } - } - }); - }, this); - - // TODO - make this callback part of Multi.prototype instead of creating it each time - return this._client.send_command("EXEC", [], function (err, replies) { - if (err) { - if (callback) { - errors.push(new Error(err)); - callback(errors); - return; - } else { - throw new Error(err); - } - } - - var i, il, reply, args; - - if (replies) { - for (i = 1, il = self.queue.length; i < il; i += 1) { - reply = replies[i - 1]; - args = self.queue[i]; - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && args[0].toLowerCase() === "hgetall") { - replies[i - 1] = reply = reply_to_object(reply); - } - - if (typeof args[args.length - 1] === "function") { - args[args.length - 1](null, reply); - } - } - } - - if (callback) { - callback(null, replies); - } - }); -}; -Multi.prototype.EXEC = Multi.prototype.exec; - -RedisClient.prototype.multi = function (args) { - return new Multi(this, args); -}; -RedisClient.prototype.MULTI = function (args) { - return new Multi(this, args); -}; - - -// stash original eval method -var eval_orig = RedisClient.prototype.eval; -// hook eval with an attempt to evalsha for cached scripts -RedisClient.prototype.eval = RedisClient.prototype.EVAL = function () { - var self = this, - args = to_array(arguments), - callback; - - if (typeof args[args.length - 1] === "function") { - callback = args.pop(); - } - - if (Array.isArray(args[0])) { - args = args[0]; - } - - // replace script source with sha value - var source = args[0]; - args[0] = crypto.createHash("sha1").update(source).digest("hex"); - - self.evalsha(args, function (err, reply) { - if (err && /NOSCRIPT/.test(err.message)) { - args[0] = source; - eval_orig.call(self, args, callback); - - } else if (callback) { - callback(err, reply); - } - }); -}; - - -exports.createClient = function (port_arg, host_arg, options) { - var port = port_arg || default_port, - host = host_arg || default_host, - redis_client, net_client; - - net_client = net.createConnection(port, host); - - redis_client = new RedisClient(net_client, options); - - redis_client.port = port; - redis_client.host = host; - - return redis_client; -}; - -exports.print = function (err, reply) { - if (err) { - console.log("Error: " + err); - } else { - console.log("Reply: " + reply); - } -}; diff --git a/node_modules/redis/lib/commands.js b/node_modules/redis/lib/commands.js deleted file mode 100644 index 669afe41..00000000 --- a/node_modules/redis/lib/commands.js +++ /dev/null @@ -1,155 +0,0 @@ -// This file was generated by ./generate_commands.js on Sun Dec 15 2013 15:58:20 GMT+0000 (GMT) -module.exports = [ - "append", - "auth", - "bgrewriteaof", - "bgsave", - "bitcount", - "bitop", - "blpop", - "brpop", - "brpoplpush", - "client kill", - "client list", - "client getname", - "client setname", - "config get", - "config rewrite", - "config set", - "config resetstat", - "dbsize", - "debug object", - "debug segfault", - "decr", - "decrby", - "del", - "discard", - "dump", - "echo", - "eval", - "evalsha", - "exec", - "exists", - "expire", - "expireat", - "flushall", - "flushdb", - "get", - "getbit", - "getrange", - "getset", - "hdel", - "hexists", - "hget", - "hgetall", - "hincrby", - "hincrbyfloat", - "hkeys", - "hlen", - "hmget", - "hmset", - "hset", - "hsetnx", - "hvals", - "incr", - "incrby", - "incrbyfloat", - "info", - "keys", - "lastsave", - "lindex", - "linsert", - "llen", - "lpop", - "lpush", - "lpushx", - "lrange", - "lrem", - "lset", - "ltrim", - "mget", - "migrate", - "monitor", - "move", - "mset", - "msetnx", - "multi", - "object", - "persist", - "pexpire", - "pexpireat", - "ping", - "psetex", - "psubscribe", - "pubsub", - "pttl", - "publish", - "punsubscribe", - "quit", - "randomkey", - "rename", - "renamenx", - "restore", - "rpop", - "rpoplpush", - "rpush", - "rpushx", - "sadd", - "save", - "scard", - "script exists", - "script flush", - "script kill", - "script load", - "sdiff", - "sdiffstore", - "select", - "set", - "setbit", - "setex", - "setnx", - "setrange", - "shutdown", - "sinter", - "sinterstore", - "sismember", - "slaveof", - "slowlog", - "smembers", - "smove", - "sort", - "spop", - "srandmember", - "srem", - "strlen", - "subscribe", - "sunion", - "sunionstore", - "sync", - "time", - "ttl", - "type", - "unsubscribe", - "unwatch", - "watch", - "zadd", - "zcard", - "zcount", - "zincrby", - "zinterstore", - "zrange", - "zrangebyscore", - "zrank", - "zrem", - "zremrangebyrank", - "zremrangebyscore", - "zrevrange", - "zrevrangebyscore", - "zrevrank", - "zscore", - "zunionstore", - "scan", - "sscan", - "hscan", - "zscan" -]; diff --git a/node_modules/redis/lib/parser/hiredis.js b/node_modules/redis/lib/parser/hiredis.js deleted file mode 100644 index 940bfeeb..00000000 --- a/node_modules/redis/lib/parser/hiredis.js +++ /dev/null @@ -1,46 +0,0 @@ -var events = require("events"), - util = require("../util"), - hiredis = require("hiredis"); - -exports.debug_mode = false; -exports.name = "hiredis"; - -function HiredisReplyParser(options) { - this.name = exports.name; - this.options = options || {}; - this.reset(); - events.EventEmitter.call(this); -} - -util.inherits(HiredisReplyParser, events.EventEmitter); - -exports.Parser = HiredisReplyParser; - -HiredisReplyParser.prototype.reset = function () { - this.reader = new hiredis.Reader({ - return_buffers: this.options.return_buffers || false - }); -}; - -HiredisReplyParser.prototype.execute = function (data) { - var reply; - this.reader.feed(data); - while (true) { - try { - reply = this.reader.get(); - } catch (err) { - this.emit("error", err); - break; - } - - if (reply === undefined) { - break; - } - - if (reply && reply.constructor === Error) { - this.emit("reply error", reply); - } else { - this.emit("reply", reply); - } - } -}; diff --git a/node_modules/redis/lib/parser/javascript.js b/node_modules/redis/lib/parser/javascript.js deleted file mode 100644 index 0990cc09..00000000 --- a/node_modules/redis/lib/parser/javascript.js +++ /dev/null @@ -1,301 +0,0 @@ -var events = require("events"), - util = require("../util"); - -function Packet(type, size) { - this.type = type; - this.size = +size; -} - -exports.name = "javascript"; -exports.debug_mode = false; - -function ReplyParser(options) { - this.name = exports.name; - this.options = options || { }; - - this._buffer = null; - this._offset = 0; - this._encoding = "utf-8"; - this._debug_mode = options.debug_mode; - this._reply_type = null; -} - -util.inherits(ReplyParser, events.EventEmitter); - -exports.Parser = ReplyParser; - -function IncompleteReadBuffer(message) { - this.name = "IncompleteReadBuffer"; - this.message = message; -} -util.inherits(IncompleteReadBuffer, Error); - -// Buffer.toString() is quite slow for small strings -function small_toString(buf, start, end) { - var tmp = "", i; - - for (i = start; i < end; i++) { - tmp += String.fromCharCode(buf[i]); - } - - return tmp; -} - -ReplyParser.prototype._parseResult = function (type) { - var start, end, offset, packetHeader; - - if (type === 43 || type === 45) { // + or - - // up to the delimiter - end = this._packetEndOffset() - 1; - start = this._offset; - - // include the delimiter - this._offset = end + 2; - - if (end > this._buffer.length) { - this._offset = start; - throw new IncompleteReadBuffer("Wait for more data."); - } - - if (this.options.return_buffers) { - return this._buffer.slice(start, end); - } else { - if (end - start < 65536) { // completely arbitrary - return small_toString(this._buffer, start, end); - } else { - return this._buffer.toString(this._encoding, start, end); - } - } - } else if (type === 58) { // : - // up to the delimiter - end = this._packetEndOffset() - 1; - start = this._offset; - - // include the delimiter - this._offset = end + 2; - - if (end > this._buffer.length) { - this._offset = start; - throw new IncompleteReadBuffer("Wait for more data."); - } - - if (this.options.return_buffers) { - return this._buffer.slice(start, end); - } - - // return the coerced numeric value - return +small_toString(this._buffer, start, end); - } else if (type === 36) { // $ - // set a rewind point, as the packet could be larger than the - // buffer in memory - offset = this._offset - 1; - - packetHeader = new Packet(type, this.parseHeader()); - - // packets with a size of -1 are considered null - if (packetHeader.size === -1) { - return undefined; - } - - end = this._offset + packetHeader.size; - start = this._offset; - - // set the offset to after the delimiter - this._offset = end + 2; - - if (end > this._buffer.length) { - this._offset = offset; - throw new IncompleteReadBuffer("Wait for more data."); - } - - if (this.options.return_buffers) { - return this._buffer.slice(start, end); - } else { - return this._buffer.toString(this._encoding, start, end); - } - } else if (type === 42) { // * - offset = this._offset; - packetHeader = new Packet(type, this.parseHeader()); - - if (packetHeader.size < 0) { - return null; - } - - if (packetHeader.size > this._bytesRemaining()) { - this._offset = offset - 1; - throw new IncompleteReadBuffer("Wait for more data."); - } - - var reply = [ ]; - var ntype, i, res; - - offset = this._offset - 1; - - for (i = 0; i < packetHeader.size; i++) { - ntype = this._buffer[this._offset++]; - - if (this._offset > this._buffer.length) { - throw new IncompleteReadBuffer("Wait for more data."); - } - res = this._parseResult(ntype); - if (res === undefined) { - res = null; - } - reply.push(res); - } - - return reply; - } -}; - -ReplyParser.prototype.execute = function (buffer) { - this.append(buffer); - - var type, ret, offset; - - while (true) { - offset = this._offset; - try { - // at least 4 bytes: :1\r\n - if (this._bytesRemaining() < 4) { - break; - } - - type = this._buffer[this._offset++]; - - if (type === 43) { // + - ret = this._parseResult(type); - - if (ret === null) { - break; - } - - this.send_reply(ret); - } else if (type === 45) { // - - ret = this._parseResult(type); - - if (ret === null) { - break; - } - - this.send_error(ret); - } else if (type === 58) { // : - ret = this._parseResult(type); - - if (ret === null) { - break; - } - - this.send_reply(ret); - } else if (type === 36) { // $ - ret = this._parseResult(type); - - if (ret === null) { - break; - } - - // check the state for what is the result of - // a -1, set it back up for a null reply - if (ret === undefined) { - ret = null; - } - - this.send_reply(ret); - } else if (type === 42) { // * - // set a rewind point. if a failure occurs, - // wait for the next execute()/append() and try again - offset = this._offset - 1; - - ret = this._parseResult(type); - - this.send_reply(ret); - } - } catch (err) { - // catch the error (not enough data), rewind, and wait - // for the next packet to appear - if (! (err instanceof IncompleteReadBuffer)) { - throw err; - } - this._offset = offset; - break; - } - } -}; - -ReplyParser.prototype.append = function (newBuffer) { - if (!newBuffer) { - return; - } - - // first run - if (this._buffer === null) { - this._buffer = newBuffer; - - return; - } - - // out of data - if (this._offset >= this._buffer.length) { - this._buffer = newBuffer; - this._offset = 0; - - return; - } - - // very large packet - // check for concat, if we have it, use it - if (Buffer.concat !== undefined) { - this._buffer = Buffer.concat([this._buffer.slice(this._offset), newBuffer]); - } else { - var remaining = this._bytesRemaining(), - newLength = remaining + newBuffer.length, - tmpBuffer = new Buffer(newLength); - - this._buffer.copy(tmpBuffer, 0, this._offset); - newBuffer.copy(tmpBuffer, remaining, 0); - - this._buffer = tmpBuffer; - } - - this._offset = 0; -}; - -ReplyParser.prototype.parseHeader = function () { - var end = this._packetEndOffset(), - value = small_toString(this._buffer, this._offset, end - 1); - - this._offset = end + 1; - - return value; -}; - -ReplyParser.prototype._packetEndOffset = function () { - var offset = this._offset; - - while (this._buffer[offset] !== 0x0d && this._buffer[offset + 1] !== 0x0a) { - offset++; - - if (offset >= this._buffer.length) { - throw new IncompleteReadBuffer("didn't see LF after NL reading multi bulk count (" + offset + " => " + this._buffer.length + ", " + this._offset + ")"); - } - } - - offset++; - return offset; -}; - -ReplyParser.prototype._bytesRemaining = function () { - return (this._buffer.length - this._offset) < 0 ? 0 : (this._buffer.length - this._offset); -}; - -ReplyParser.prototype.parser_error = function (message) { - this.emit("error", message); -}; - -ReplyParser.prototype.send_error = function (reply) { - this.emit("reply error", reply); -}; - -ReplyParser.prototype.send_reply = function (reply) { - this.emit("reply", reply); -}; diff --git a/node_modules/redis/lib/queue.js b/node_modules/redis/lib/queue.js deleted file mode 100644 index 3fc87ab1..00000000 --- a/node_modules/redis/lib/queue.js +++ /dev/null @@ -1,59 +0,0 @@ -// Queue class adapted from Tim Caswell's pattern library -// http://github.com/creationix/pattern/blob/master/lib/pattern/queue.js - -function Queue() { - this.tail = []; - this.head = []; - this.offset = 0; -} - -Queue.prototype.shift = function () { - if (this.offset === this.head.length) { - var tmp = this.head; - tmp.length = 0; - this.head = this.tail; - this.tail = tmp; - this.offset = 0; - if (this.head.length === 0) { - return; - } - } - return this.head[this.offset++]; // sorry, JSLint -}; - -Queue.prototype.push = function (item) { - return this.tail.push(item); -}; - -Queue.prototype.forEach = function (fn, thisv) { - var array = this.head.slice(this.offset), i, il; - - array.push.apply(array, this.tail); - - if (thisv) { - for (i = 0, il = array.length; i < il; i += 1) { - fn.call(thisv, array[i], i, array); - } - } else { - for (i = 0, il = array.length; i < il; i += 1) { - fn(array[i], i, array); - } - } - - return array; -}; - -Queue.prototype.getLength = function () { - return this.head.length - this.offset + this.tail.length; -}; - -Object.defineProperty(Queue.prototype, "length", { - get: function () { - return this.getLength(); - } -}); - - -if (typeof module !== "undefined" && module.exports) { - module.exports = Queue; -} diff --git a/node_modules/redis/lib/to_array.js b/node_modules/redis/lib/to_array.js deleted file mode 100644 index 88a57e18..00000000 --- a/node_modules/redis/lib/to_array.js +++ /dev/null @@ -1,12 +0,0 @@ -function to_array(args) { - var len = args.length, - arr = new Array(len), i; - - for (i = 0; i < len; i += 1) { - arr[i] = args[i]; - } - - return arr; -} - -module.exports = to_array; diff --git a/node_modules/redis/lib/util.js b/node_modules/redis/lib/util.js deleted file mode 100644 index fc255ae9..00000000 --- a/node_modules/redis/lib/util.js +++ /dev/null @@ -1,11 +0,0 @@ -// Support for very old versions of node where the module was called "sys". At some point, we should abandon this. - -var util; - -try { - util = require("util"); -} catch (err) { - util = require("sys"); -} - -module.exports = util; diff --git a/node_modules/redis/multi_bench.js b/node_modules/redis/multi_bench.js deleted file mode 100644 index 3a0d92da..00000000 --- a/node_modules/redis/multi_bench.js +++ /dev/null @@ -1,222 +0,0 @@ -var redis = require("./index"), - metrics = require("metrics"), - num_clients = parseInt(process.argv[2], 10) || 5, - num_requests = 20000, - tests = [], - versions_logged = false, - client_options = { - return_buffers: false - }, - small_str, large_str, small_buf, large_buf; - -redis.debug_mode = false; - -function lpad(input, len, chr) { - var str = input.toString(); - chr = chr || " "; - - while (str.length < len) { - str = chr + str; - } - return str; -} - -metrics.Histogram.prototype.print_line = function () { - var obj = this.printObj(); - - return lpad(obj.min, 4) + "/" + lpad(obj.max, 4) + "/" + lpad(obj.mean.toFixed(2), 7) + "/" + lpad(obj.p95.toFixed(2), 7); -}; - -function Test(args) { - this.args = args; - - this.callback = null; - this.clients = []; - this.clients_ready = 0; - this.commands_sent = 0; - this.commands_completed = 0; - this.max_pipeline = this.args.pipeline || num_requests; - this.client_options = args.client_options || client_options; - - this.connect_latency = new metrics.Histogram(); - this.ready_latency = new metrics.Histogram(); - this.command_latency = new metrics.Histogram(); -} - -Test.prototype.run = function (callback) { - var i; - - this.callback = callback; - - for (i = 0; i < num_clients ; i++) { - this.new_client(i); - } -}; - -Test.prototype.new_client = function (id) { - var self = this, new_client; - - new_client = redis.createClient(6379, "127.0.0.1", this.client_options); - new_client.create_time = Date.now(); - - new_client.on("connect", function () { - self.connect_latency.update(Date.now() - new_client.create_time); - }); - - new_client.on("ready", function () { - if (! versions_logged) { - console.log("Client count: " + num_clients + ", node version: " + process.versions.node + ", server version: " + - new_client.server_info.redis_version + ", parser: " + new_client.reply_parser.name); - versions_logged = true; - } - self.ready_latency.update(Date.now() - new_client.create_time); - self.clients_ready++; - if (self.clients_ready === self.clients.length) { - self.on_clients_ready(); - } - }); - - self.clients[id] = new_client; -}; - -Test.prototype.on_clients_ready = function () { - process.stdout.write(lpad(this.args.descr, 13) + ", " + lpad(this.args.pipeline, 5) + "/" + this.clients_ready + " "); - this.test_start = Date.now(); - - this.fill_pipeline(); -}; - -Test.prototype.fill_pipeline = function () { - var pipeline = this.commands_sent - this.commands_completed; - - while (this.commands_sent < num_requests && pipeline < this.max_pipeline) { - this.commands_sent++; - pipeline++; - this.send_next(); - } - - if (this.commands_completed === num_requests) { - this.print_stats(); - this.stop_clients(); - } -}; - -Test.prototype.stop_clients = function () { - var self = this; - - this.clients.forEach(function (client, pos) { - if (pos === self.clients.length - 1) { - client.quit(function (err, res) { - self.callback(); - }); - } else { - client.quit(); - } - }); -}; - -Test.prototype.send_next = function () { - var self = this, - cur_client = this.commands_sent % this.clients.length, - start = Date.now(); - - this.clients[cur_client][this.args.command](this.args.args, function (err, res) { - if (err) { - throw err; - } - self.commands_completed++; - self.command_latency.update(Date.now() - start); - self.fill_pipeline(); - }); -}; - -Test.prototype.print_stats = function () { - var duration = Date.now() - this.test_start; - - console.log("min/max/avg/p95: " + this.command_latency.print_line() + " " + lpad(duration, 6) + "ms total, " + - lpad((num_requests / (duration / 1000)).toFixed(2), 8) + " ops/sec"); -}; - -small_str = "1234"; -small_buf = new Buffer(small_str); -large_str = (new Array(4097).join("-")); -large_buf = new Buffer(large_str); - -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 1})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 50})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 200})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 20000})); - -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 1})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 50})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 200})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 1})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 50})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 200})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 1})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 50})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 200})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 1})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 50})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 200})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 1})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 50})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 200})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 20000})); - -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 1})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 50})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 200})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 20000})); - -function next() { - var test = tests.shift(); - if (test) { - test.run(function () { - next(); - }); - } else { - console.log("End of tests."); - process.exit(0); - } -} - -next(); diff --git a/node_modules/redis/package.json b/node_modules/redis/package.json deleted file mode 100644 index 7ea9425b..00000000 --- a/node_modules/redis/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "redis", - "version": "0.10.1", - "description": "Redis client library", - "keywords": [ - "redis", - "database" - ], - "author": { - "name": "Matt Ranney", - "email": "mjr@ranney.com" - }, - "main": "./index.js", - "scripts": { - "test": "node ./test.js" - }, - "devDependencies": { - "metrics": ">=0.1.5", - "colors": "~0.6.0-1", - "underscore": "~1.4.4" - }, - "repository": { - "type": "git", - "url": "git://github.com/mranney/node_redis.git" - }, - "readme": "redis - a node.js redis client\n===========================\n\nThis is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from\nexperimental Redis server branches.\n\n\nInstall with:\n\n npm install redis\n\nPieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do:\n\n npm install hiredis redis\n\nIf `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used.\n\nIf you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can\nhappen between node and native code modules after a node upgrade.\n\n\n## Usage\n\nSimple example, included as `examples/simple.js`:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n // if you'd like to select database 3, instead of 0 (default), call\n // client.select(3, function() { /* ... */ });\n\n client.on(\"error\", function (err) {\n console.log(\"Error \" + err);\n });\n\n client.set(\"string key\", \"string val\", redis.print);\n client.hset(\"hash key\", \"hashtest 1\", \"some value\", redis.print);\n client.hset([\"hash key\", \"hashtest 2\", \"some other value\"], redis.print);\n client.hkeys(\"hash key\", function (err, replies) {\n console.log(replies.length + \" replies:\");\n replies.forEach(function (reply, i) {\n console.log(\" \" + i + \": \" + reply);\n });\n client.quit();\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node example.js\n Reply: OK\n Reply: 0\n Reply: 0\n 2 replies:\n 0: hashtest 1\n 1: hashtest 2\n mjr:~/work/node_redis (master)$\n\n\n## Performance\n\nHere are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution.\nIt uses 50 concurrent connections with no pipelining.\n\nJavaScript parser:\n\n PING: 20000 ops 42283.30 ops/sec 0/5/1.182\n SET: 20000 ops 32948.93 ops/sec 1/7/1.515\n GET: 20000 ops 28694.40 ops/sec 0/9/1.740\n INCR: 20000 ops 39370.08 ops/sec 0/8/1.269\n LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370\n LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048\n LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072\n\nhiredis parser:\n\n PING: 20000 ops 46189.38 ops/sec 1/4/1.082\n SET: 20000 ops 41237.11 ops/sec 0/6/1.210\n GET: 20000 ops 39682.54 ops/sec 1/7/1.257\n INCR: 20000 ops 40080.16 ops/sec 0/8/1.242\n LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212\n LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363\n LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287\n\nThe performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs.\n\n\n### Sending Commands\n\nEach Redis command is exposed as a function on the `client` object.\nAll functions take either an `args` Array plus optional `callback` Function or\na variable number of individual arguments followed by an optional callback.\nHere is an example of passing an array of arguments and a callback:\n\n client.mset([\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\"], function (err, res) {});\n\nHere is that same call in the second style:\n\n client.mset(\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\", function (err, res) {});\n\nNote that in either form the `callback` is optional:\n\n client.set(\"some key\", \"some val\");\n client.set([\"some other key\", \"some val\"]);\n\nIf the key is missing, reply will be null (probably):\n\n client.get(\"missingkey\", function(err, reply) {\n // reply is null when the key is missing\n console.log(reply);\n });\n\nFor a list of Redis commands, see [Redis Command Reference](http://redis.io/commands)\n\nThe commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`.\n\nMinimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings,\ninteger replies return JavaScript Numbers, \"bulk\" replies return node Buffers, and \"multi bulk\" replies return a\nJavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys.\n\n# API\n\n## Connection Events\n\n`client` will emit some events about the state of the connection to the Redis server.\n\n### \"ready\"\n\n`client` will emit `ready` a connection is established to the Redis server and the server reports\nthat it is ready to receive commands. Commands issued before the `ready` event are queued,\nthen replayed just before this event is emitted.\n\n### \"connect\"\n\n`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check`\nis set. If this options is set, `connect` will be emitted when the stream is connected, and then\nyou are free to try to send commands.\n\n### \"error\"\n\n`client` will emit `error` when encountering an error connecting to the Redis server.\n\nNote that \"error\" is a special event type in node. If there are no listeners for an\n\"error\" event, node will exit. This is usually what you want, but it can lead to some\ncryptic error messages like this:\n\n mjr:~/work/node_redis (master)$ node example.js\n\n node.js:50\n throw e;\n ^\n Error: ECONNREFUSED, Connection refused\n at IOWatcher.callback (net:870:22)\n at node.js:607:9\n\nNot very useful in diagnosing the problem, but if your program isn't ready to handle this,\nit is probably the right thing to just exit.\n\n`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason.\nIt would be nice to distinguish these two cases.\n\n### \"end\"\n\n`client` will emit `end` when an established Redis server connection has closed.\n\n### \"drain\"\n\n`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now\nwritable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now,\nyou need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can\nresume sending when you get `drain`.\n\n### \"idle\"\n\n`client` will emit `idle` when there are no outstanding commands that are awaiting a response.\n\n## redis.createClient(port, host, options)\n\nCreate a new client connection. `port` defaults to `6379` and `host` defaults\nto `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for\nport and host are probably fine. `options` in an object with the following possible properties:\n\n* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed.\nThis may also be set to `javascript`.\n* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer\nobjects instead of JavaScript Strings.\n* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects\nif any of the input arguments to the original command were Buffer objects.\nThis option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to\nevery command on a client.\n* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the\nNagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the\ncost of more latency. Most applications will want this set to `true`.\n* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still\nbe loading the database from disk. While loading, the server not respond to any commands. To work around this,\n`node_redis` has a \"ready check\" which sends the `INFO` command to the server. The response from the `INFO` command\nindicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event.\nSetting `no_ready_check` to `true` will inhibit this check.\n* `enable_offline_queue`: defaults to `true`. By default, if there is no active\nconnection to the redis server, commands are added to a queue and are executed\nonce the connection has been established. Setting `enable_offline_queue` to\n`false` will disable this feature and the callback will be execute immediately\nwith an error, or an error will be thrown if no callback is specified.\n* `retry_max_delay`: defaults to `null`. By default every time the client tries to connect and fails time before\nreconnection (delay) almost doubles. This delay normally grows infinitely, but setting `retry_max_delay` limits delay\nto maximum value, provided in milliseconds.\n* `connect_timeout` defaults to `false`. By default client will try reconnecting until connected. Setting `connect_timeout`\nlimits total time for client to reconnect. Value is provided in milliseconds and is counted once the disconnect occured.\n* `max_attempts` defaults to `null`. By default client will try reconnecting until connected. Setting `max_attempts`\nlimits total amount of reconnects.\n* `auth_pass` defaults to `null`. By default client will try connecting without auth. If set, client will run redis auth command on connect.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(null, null, {detect_buffers: true});\n\n client.set(\"foo_rand000000000000\", \"OK\");\n\n // This will return a JavaScript String\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString()); // Will print `OK`\n });\n\n // This will return a Buffer since original key is specified as a Buffer\n client.get(new Buffer(\"foo_rand000000000000\"), function (err, reply) {\n console.log(reply.toString()); // Will print ``\n });\n client.end();\n```\n\n`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here.\n\n### Unix Domain Socket\n\nYou can also create a connection to Redis server via the unix domain socket if the server\nhas it enabled:\n\n```js\nvar redis = require(\"redis\");\nvar client = redis.createClient(\"/tmp/redis.sock\");\n```\n\nSample `redis.conf` configuration to enable unix domain socket listening:\n\n```conf\nunixsocket /tmp/redis.sock\nunixsocketperm 755\n```\n\nSee [issue #204](https://github.com/mranney/node_redis/issues/204) for more information.\n\n## client.auth(password, callback)\n\nWhen connecting to Redis servers that require authentication, the `AUTH` command must be sent as the\nfirst command after connecting. This can be tricky to coordinate with reconnections, the ready check,\netc. To make this easier, `client.auth()` stashes `password` and will send it after each connection,\nincluding reconnections. `callback` is invoked only once, after the response to the very first\n`AUTH` command sent.\nNOTE: Your call to `client.auth()` should not be inside the ready handler. If\nyou are doing this wrong, `client` will emit an error that looks\nsomething like this `Error: Ready check failed: ERR operation not permitted`.\n\n## client.end()\n\nForcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed.\nIf you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies.\n\nThis example closes the connection to the Redis server before the replies have been read. You probably don't\nwant to do this:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString());\n });\n client.end();\n```\n\n`client.end()` is useful for timeout cases where something is stuck or taking too long and you want\nto start over.\n\n## client.unref()\n\nCall `unref()` on the underlying socket connection to the Redis server, allowing the program to exit once no more commands are pending.\n\nThis is an **experimental** feature, and only supports a subset of the Redis protocol. Any commands where client state is saved on the Redis server, e.g. `*SUBSCRIBE` or the blocking `BL*` commands will *NOT* work with `.unref()`.\n\n```js\nvar redis = require(\"redis\")\nvar client = redis.createClient()\n\n/*\n Calling unref() will allow this program to exit immediately after the get command finishes. Otherwise the client would hang as long as the client-server connection is alive.\n*/\nclient.unref()\nclient.get(\"foo\", function (err, value){\n if (err) throw(err)\n console.log(value)\n})\n```\n\n## Friendlier hash commands\n\nMost Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings.\nWhen dealing with hash values, there are a couple of useful exceptions to this.\n\n### client.hgetall(hash)\n\nThe reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact\nwith the responses using JavaScript syntax.\n\nExample:\n\n client.hmset(\"hosts\", \"mjr\", \"1\", \"another\", \"23\", \"home\", \"1234\");\n client.hgetall(\"hosts\", function (err, obj) {\n console.dir(obj);\n });\n\nOutput:\n\n { mjr: '1', another: '23', home: '1234' }\n\n### client.hmset(hash, obj, [callback])\n\nMultiple values in a hash can be set by supplying an object:\n\n client.HMSET(key2, {\n \"0123456789\": \"abcdefghij\", // NOTE: key and value will be coerced to strings\n \"some manner of key\": \"a type of value\"\n });\n\nThe properties and values of this Object will be set as keys and values in the Redis hash.\n\n### client.hmset(hash, key1, val1, ... keyn, valn, [callback])\n\nMultiple values may also be set by supplying a list:\n\n client.HMSET(key1, \"0123456789\", \"abcdefghij\", \"some manner of key\", \"a type of value\");\n\n\n## Publish / Subscribe\n\nHere is a simple example of the API for publish / subscribe. This program opens two\nclient connections, subscribes to a channel on one of them, and publishes to that\nchannel on the other:\n\n```js\n var redis = require(\"redis\"),\n client1 = redis.createClient(), client2 = redis.createClient(),\n msg_count = 0;\n\n client1.on(\"subscribe\", function (channel, count) {\n client2.publish(\"a nice channel\", \"I am sending a message.\");\n client2.publish(\"a nice channel\", \"I am sending a second message.\");\n client2.publish(\"a nice channel\", \"I am sending my last message.\");\n });\n\n client1.on(\"message\", function (channel, message) {\n console.log(\"client1 channel \" + channel + \": \" + message);\n msg_count += 1;\n if (msg_count === 3) {\n client1.unsubscribe();\n client1.end();\n client2.end();\n }\n });\n\n client1.incr(\"did a thing\");\n client1.subscribe(\"a nice channel\");\n```\n\nWhen a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into a \"subscriber\" mode.\nAt that point, only commands that modify the subscription set are valid. When the subscription\nset is empty, the connection is put back into regular mode.\n\nIf you need to send regular commands to Redis while in subscriber mode, just open another connection.\n\n## Subscriber Events\n\nIf a client has subscriptions active, it may emit these events:\n\n### \"message\" (channel, message)\n\nClient will emit `message` for every message received that matches an active subscription.\nListeners are passed the channel name as `channel` and the message Buffer as `message`.\n\n### \"pmessage\" (pattern, channel, message)\n\nClient will emit `pmessage` for every message received that matches an active subscription pattern.\nListeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel\nname as `channel`, and the message Buffer as `message`.\n\n### \"subscribe\" (channel, count)\n\nClient will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`.\n\n### \"psubscribe\" (pattern, count)\n\nClient will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the\noriginal pattern as `pattern`, and the new count of subscriptions for this client as `count`.\n\n### \"unsubscribe\" (channel, count)\n\nClient will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left subscriber mode and no more subscriber events will be emitted.\n\n### \"punsubscribe\" (pattern, count)\n\nClient will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left subscriber mode and no more subscriber events will be emitted.\n\n## client.multi([commands])\n\n`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by\nRedis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`.\n\n```js\n var redis = require(\"./index\"),\n client = redis.createClient(), set_size = 20;\n\n client.sadd(\"bigset\", \"a member\");\n client.sadd(\"bigset\", \"another member\");\n\n while (set_size > 0) {\n client.sadd(\"bigset\", \"member \" + set_size);\n set_size -= 1;\n }\n\n // multi chain with an individual callback\n client.multi()\n .scard(\"bigset\")\n .smembers(\"bigset\")\n .keys(\"*\", function (err, replies) {\n // NOTE: code in this callback is NOT atomic\n // this only happens after the the .exec call finishes.\n client.mget(replies, redis.print);\n })\n .dbsize()\n .exec(function (err, replies) {\n console.log(\"MULTI got \" + replies.length + \" replies\");\n replies.forEach(function (reply, index) {\n console.log(\"Reply \" + index + \": \" + reply.toString());\n });\n });\n```\n\n### Multi.exec( callback )\n\n`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the\nsame command methods as `client` objects do. Commands are queued up inside the `Multi` object\nuntil `Multi.exec()` is invoked.\n\nThe `callback` of `.exec()` will get invoked with two arguments:\n\n* `err` **type:** `null | Array` err is either null or an array of Error Objects corresponding the the sequence the commands where chained. The last item of the array will always be an `EXECABORT` type of error originating from the `.exec()` itself.\n* `results` **type:** `null | Array` results is an array of responses corresponding the the sequence the commands where chained.\n\nYou can either chain together `MULTI` commands as in the above example, or you can queue individual\ncommands while still sending regular client command as in this example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n // start a separate multi command queue\n multi = client.multi();\n multi.incr(\"incr thing\", redis.print);\n multi.incr(\"incr other thing\", redis.print);\n\n // runs immediately\n client.mset(\"incr thing\", 100, \"incr other thing\", 1, redis.print);\n\n // drains multi queue and runs atomically\n multi.exec(function (err, replies) {\n console.log(replies); // 101, 2\n });\n\n // you can re-run the same transaction if you like\n multi.exec(function (err, replies) {\n console.log(replies); // 102, 3\n client.quit();\n });\n```\n\nIn addition to adding commands to the `MULTI` queue individually, you can also pass an array\nof commands and arguments to the constructor:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n client.multi([\n [\"mget\", \"multifoo\", \"multibar\", redis.print],\n [\"incr\", \"multifoo\"],\n [\"incr\", \"multibar\"]\n ]).exec(function (err, replies) {\n console.log(replies);\n });\n```\n\n\n## Monitor mode\n\nRedis supports the `MONITOR` command, which lets you see all commands received by the Redis server\nacross all client connections, including from other client libraries and other computers.\n\nAfter you send the `MONITOR` command, no other commands are valid on that connection. `node_redis`\nwill emit a `monitor` event for every new monitor message that comes across. The callback for the\n`monitor` event takes a timestamp from the Redis server and an array of command arguments.\n\nHere is a simple example:\n\n```js\n var client = require(\"redis\").createClient(),\n util = require(\"util\");\n\n client.monitor(function (err, res) {\n console.log(\"Entering monitoring mode.\");\n });\n\n client.on(\"monitor\", function (time, args) {\n console.log(time + \": \" + util.inspect(args));\n });\n```\n\n# Extras\n\nSome other things you might like to know about.\n\n## client.server_info\n\nAfter the ready probe completes, the results from the INFO command are saved in the `client.server_info`\nobject.\n\nThe `versions` key contains an array of the elements of the version string for easy comparison.\n\n > client.server_info.redis_version\n '2.3.0'\n > client.server_info.versions\n [ 2, 3, 0 ]\n\n## redis.print()\n\nA handy callback function for displaying return values when testing. Example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\", redis.print);\n client.get(\"foo_rand000000000000\", redis.print);\n });\n```\n\nThis will print:\n\n Reply: OK\n Reply: some fantastic value\n\nNote that this program will not exit cleanly because the client is still connected.\n\n## redis.debug_mode\n\nBoolean to enable debug mode and protocol tracing.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n redis.debug_mode = true;\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node ~/example.js\n send command: *3\n $3\n SET\n $20\n foo_rand000000000000\n $20\n some fantastic value\n\n on_data: +OK\n\n`send command` is data sent into Redis and `on_data` is data received from Redis.\n\n## Multi-word commands\n\nTo execute redis multi-word commands like `SCRIPT LOAD` or `CLIENT LIST` pass\nthe second word as first parameter:\n\n client.script('load', 'return 1');\n client.multi().script('load', 'return 1').exec(...);\n client.multi([['script', 'load', 'return 1']]).exec(...);\n\n## client.send_command(command_name, args, callback)\n\nUsed internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis\nWiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before\nthis library is updated, you can use `send_command()` to send arbitrary commands to Redis.\n\nAll commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted.\n\n## client.connected\n\nBoolean tracking the state of the connection to the Redis server.\n\n## client.command_queue.length\n\nThe number of commands that have been sent to the Redis server but not yet replied to. You can use this to\nenforce some kind of maximum queue depth for commands while connected.\n\nDon't mess with `client.command_queue` though unless you really know what you are doing.\n\n## client.offline_queue.length\n\nThe number of commands that have been queued up for a future connection. You can use this to enforce\nsome kind of maximum queue depth for pre-connection commands.\n\n## client.retry_delay\n\nCurrent delay in milliseconds before a connection retry will be attempted. This starts at `250`.\n\n## client.retry_backoff\n\nMultiplier for future retry timeouts. This should be larger than 1 to add more time between retries.\nDefaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc.\n\n### Commands with Optional and Keyword arguments\n\nThis applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation.\n\nExample:\n```js\nvar args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];\nclient.zadd(args, function (err, response) {\n if (err) throw err;\n console.log('added '+response+' items.');\n\n // -Infinity and +Infinity also work\n var args1 = [ 'myzset', '+inf', '-inf' ];\n client.zrevrangebyscore(args1, function (err, response) {\n if (err) throw err;\n console.log('example1', response);\n // write your code here\n });\n\n var max = 3, min = 1, offset = 1, count = 2;\n var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];\n client.zrevrangebyscore(args2, function (err, response) {\n if (err) throw err;\n console.log('example2', response);\n // write your code here\n });\n});\n```\n\n## TODO\n\nBetter tests for auth, disconnect/reconnect, and all combinations thereof.\n\nStream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory.\n\nPerformance can be better for very large values.\n\nI think there are more performance improvements left in there for smaller values, especially for large lists of small values.\n\n## How to Contribute\n- open a pull request and then wait for feedback (if\n [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days,\n comment again with indignation!)\n\n## Contributors\nSome people have have added features and fixed bugs in `node_redis` other than me.\n\nOrdered by date of first contribution.\n[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT).\n\n- [Matt Ranney aka `mranney`](https://github.com/mranney)\n- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart)\n- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia)\n- [rick aka `technoweenie`](https://github.com/technoweenie)\n- [Orion Henry aka `orionz`](https://github.com/orionz)\n- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas)\n- [Hank Sims aka `hanksims`](https://github.com/hanksims)\n- [Paul Carey aka `paulcarey`](https://github.com/paulcarey)\n- [Pieter Noordhuis aka `pietern`](https://github.com/pietern)\n- [nithesh aka `nithesh`](https://github.com/nithesh)\n- [Andy Ray aka `andy2ray`](https://github.com/andy2ray)\n- [unknown aka `unknowdna`](https://github.com/unknowdna)\n- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel)\n- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv)\n- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique)\n- [Louis-Philippe Perron aka `lp`](https://github.com/lp)\n- [Mark Dawson aka `markdaws`](https://github.com/markdaws)\n- [Ian Babrou aka `bobrik`](https://github.com/bobrik)\n- [Felix Geisendörfer aka `felixge`](https://github.com/felixge)\n- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined)\n- [Maksim Lin aka `maks`](https://github.com/maks)\n- [Owen Smith aka `orls`](https://github.com/orls)\n- [Zachary Scott aka `zzak`](https://github.com/zzak)\n- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK)\n- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs)\n- [David Trejo aka `DTrejo`](https://github.com/DTrejo)\n- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi)\n- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon)\n- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2)\n- [Jed Schmidt aka `jed`](https://github.com/jed)\n- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3)\n- [Trae Robrock aka `trobrock`](https://github.com/trobrock)\n- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306)\n- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio)\n\nThanks.\n\n## LICENSE - \"MIT License\"\n\nCopyright (c) 2010 Matthew Ranney, http://ranney.com/\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![spacer](http://ranney.com/1px.gif)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mranney/node_redis/issues" - }, - "homepage": "https://github.com/mranney/node_redis", - "_id": "redis@0.10.1", - "_from": "redis@~>0.10.1" -} diff --git a/node_modules/redis/test-unref.js b/node_modules/redis/test-unref.js deleted file mode 100644 index 4a3cc362..00000000 --- a/node_modules/redis/test-unref.js +++ /dev/null @@ -1,12 +0,0 @@ -var redis = require("./") -//redis.debug_mode = true -var PORT = process.argv[2] || 6379; -var HOST = process.argv[3] || '127.0.0.1'; - -var c = redis.createClient(PORT, HOST) -c.unref() -c.info(function (err, reply) { - if (err) process.exit(-1) - if (!reply.length) process.exit(-1) - process.stdout.write(reply.length.toString()) -}) \ No newline at end of file diff --git a/node_modules/redis/test.js b/node_modules/redis/test.js deleted file mode 100644 index b6850440..00000000 --- a/node_modules/redis/test.js +++ /dev/null @@ -1,2231 +0,0 @@ -/*global require console setTimeout process Buffer */ -var PORT = 6379; -var HOST = '127.0.0.1'; - -var redis = require("./index"), - client = redis.createClient(PORT, HOST), - client2 = redis.createClient(PORT, HOST), - client3 = redis.createClient(PORT, HOST), - bclient = redis.createClient(PORT, HOST, { return_buffers: true }), - assert = require("assert"), - crypto = require("crypto"), - util = require("./lib/util"), - fork = require("child_process").fork, - test_db_num = 15, // this DB will be flushed and used for testing - tests = {}, - connected = false, - ended = false, - next, cur_start, run_next_test, all_tests, all_start, test_count; - - -// Set this to truthy to see the wire protocol and other debugging info -redis.debug_mode = process.argv[2]; - -function server_version_at_least(connection, desired_version) { - // Return true if the server version >= desired_version - var version = connection.server_info.versions; - for (var i = 0; i < 3; i++) { - if (version[i] > desired_version[i]) return true; - if (version[i] < desired_version[i]) return false; - } - return true; -} - -function buffers_to_strings(arr) { - return arr.map(function (val) { - return val.toString(); - }); -} - -function require_number(expected, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected " + expected + ", got error: " + err); - assert.strictEqual(expected, results, label + " " + expected + " !== " + results); - assert.strictEqual(typeof results, "number", label); - return true; - }; -} - -function require_number_any(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected any number, got error: " + err); - assert.strictEqual(typeof results, "number", label + " " + results + " is not a number"); - return true; - }; -} - -function require_number_pos(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected positive number, got error: " + err); - assert.strictEqual(true, (results > 0), label + " " + results + " is not a positive number"); - return true; - }; -} - -function require_string(str, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected string '" + str + "', got error: " + err); - assert.equal(str, results, label + " " + str + " does not match " + results); - return true; - }; -} - -function require_null(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected null, got error: " + err); - assert.strictEqual(null, results, label + ": " + results + " is not null"); - return true; - }; -} - -function require_error(label) { - return function (err, results) { - assert.notEqual(err, null, label + " err is null, but an error is expected here."); - return true; - }; -} - -function is_empty_array(obj) { - return Array.isArray(obj) && obj.length === 0; -} - -function last(name, fn) { - return function (err, results) { - fn(err, results); - next(name); - }; -} - -// Wraps the given callback in a timeout. If the returned function -// is not called within the timeout period, we fail the named test. -function with_timeout(name, cb, millis) { - var timeoutId = setTimeout(function() { - assert.fail("Callback timed out!", name); - }, millis); - return function() { - clearTimeout(timeoutId); - cb.apply(this, arguments); - }; -} - -next = function next(name) { - console.log(" \x1b[33m" + (Date.now() - cur_start) + "\x1b[0m ms"); - run_next_test(); -}; - -// Tests are run in the order they are defined, so FLUSHDB should always be first. - -tests.FLUSHDB = function () { - var name = "FLUSHDB"; - client.select(test_db_num, require_string("OK", name)); - client2.select(test_db_num, require_string("OK", name)); - client3.select(test_db_num, require_string("OK", name)); - client.mset("flush keys 1", "flush val 1", "flush keys 2", "flush val 2", require_string("OK", name)); - client.FLUSHDB(require_string("OK", name)); - client.dbsize(last(name, require_number(0, name))); -}; - -tests.INCR = function () { - var name = "INCR"; - - if (bclient.reply_parser.name == "hiredis") { - console.log("Skipping INCR buffer test with hiredis"); - return next(name); - } - - // Test incr with the maximum JavaScript number value. Since we are - // returning buffers we should get back one more as a Buffer. - bclient.set("seq", "9007199254740992", function (err, result) { - assert.strictEqual(result.toString(), "OK"); - bclient.incr("seq", function (err, result) { - assert.strictEqual("9007199254740993", result.toString()); - next(name); - }); - }); -}; - -tests.MULTI_1 = function () { - var name = "MULTI_1", multi1, multi2; - - // Provoke an error at queue time - multi1 = client.multi(); - multi1.mset("multifoo", "10", "multibar", "20", require_string("OK", name)); - multi1.set("foo2", require_error(name)); - multi1.incr("multifoo", require_number(11, name)); - multi1.incr("multibar", require_number(21, name)); - multi1.exec(function () { - require_error(name); - - // Redis 2.6.5+ will abort transactions with errors - // see: http://redis.io/topics/transactions - var multibar_expected = 22; - var multifoo_expected = 12; - if (server_version_at_least(client, [2, 6, 5])) { - multibar_expected = 1; - multifoo_expected = 1; - } - - // Confirm that the previous command, while containing an error, still worked. - multi2 = client.multi(); - multi2.incr("multibar", require_number(multibar_expected, name)); - multi2.incr("multifoo", require_number(multifoo_expected, name)); - multi2.exec(function (err, replies) { - assert.strictEqual(multibar_expected, replies[0]); - assert.strictEqual(multifoo_expected, replies[1]); - next(name); - }); - }); -}; - -tests.MULTI_2 = function () { - var name = "MULTI_2"; - - // test nested multi-bulk replies - client.multi([ - ["mget", "multifoo", "multibar", function (err, res) { - assert.strictEqual(2, res.length, name); - assert.strictEqual("12", res[0].toString(), name); - assert.strictEqual("22", res[1].toString(), name); - }], - ["set", "foo2", require_error(name)], - ["incr", "multifoo", require_number(13, name)], - ["incr", "multibar", require_number(23, name)] - - ]).exec(function (err, replies) { - - if (server_version_at_least(client, [2, 6, 5])) { - assert.notEqual(err, null, name); - assert.equal(replies, undefined, name); - } else { - assert.strictEqual(2, replies[0].length, name); - assert.strictEqual("12", replies[0][0].toString(), name); - assert.strictEqual("22", replies[0][1].toString(), name); - - assert.strictEqual("13", replies[1].toString()); - assert.strictEqual("23", replies[2].toString()); - } - next(name); - }); -}; - -tests.MULTI_3 = function () { - var name = "MULTI_3"; - - client.sadd("some set", "mem 1"); - client.sadd("some set", "mem 2"); - client.sadd("some set", "mem 3"); - client.sadd("some set", "mem 4"); - - // make sure empty mb reply works - client.del("some missing set"); - client.smembers("some missing set", function (err, reply) { - // make sure empty mb reply works - assert.strictEqual(true, is_empty_array(reply), name); - }); - - // test nested multi-bulk replies with empty mb elements. - client.multi([ - ["smembers", "some set"], - ["del", "some set"], - ["smembers", "some set"] - ]) - .scard("some set") - .exec(function (err, replies) { - assert.strictEqual(true, is_empty_array(replies[2]), name); - next(name); - }); -}; - -tests.MULTI_4 = function () { - var name = "MULTI_4"; - - client.multi() - .mset('some', '10', 'keys', '20') - .incr('some') - .incr('keys') - .mget('some', 'keys') - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal('OK', replies[0]); - assert.equal(11, replies[1]); - assert.equal(21, replies[2]); - assert.equal(11, replies[3][0].toString()); - assert.equal(21, replies[3][1].toString()); - next(name); - }); -}; - -tests.MULTI_5 = function () { - var name = "MULTI_5"; - - // test nested multi-bulk replies with nulls. - client.multi([ - ["mget", ["multifoo", "some", "random value", "keys"]], - ["incr", "multifoo"] - ]) - .exec(function (err, replies) { - assert.strictEqual(replies.length, 2, name); - assert.strictEqual(replies[0].length, 4, name); - next(name); - }); -}; - -tests.MULTI_6 = function () { - var name = "MULTI_6"; - - client.multi() - .hmset("multihash", "a", "foo", "b", 1) - .hmset("multihash", { - extra: "fancy", - things: "here" - }) - .hgetall("multihash") - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal("OK", replies[0]); - assert.equal(Object.keys(replies[2]).length, 4); - assert.equal("foo", replies[2].a); - assert.equal("1", replies[2].b); - assert.equal("fancy", replies[2].extra); - assert.equal("here", replies[2].things); - next(name); - }); -}; - -tests.MULTI_7 = function () { - var name = "MULTI_7"; - - if (bclient.reply_parser.name != "javascript") { - console.log("Skipping wire-protocol test for 3rd-party parser"); - return next(name); - } - - var p = require("./lib/parser/javascript"); - var parser = new p.Parser(false); - var reply_count = 0; - function check_reply(reply) { - assert.deepEqual(reply, [['a']], "Expecting multi-bulk reply of [['a']]"); - reply_count++; - assert.notEqual(reply_count, 4, "Should only parse 3 replies"); - } - parser.on("reply", check_reply); - - parser.execute(new Buffer('*1\r\n*1\r\n$1\r\na\r\n')); - - parser.execute(new Buffer('*1\r\n*1\r')); - parser.execute(new Buffer('\n$1\r\na\r\n')); - - parser.execute(new Buffer('*1\r\n*1\r\n')); - parser.execute(new Buffer('$1\r\na\r\n')); - - next(name); -}; - - -tests.MULTI_EXCEPTION_1 = function() { - var name = "MULTI_EXCEPTION_1"; - - if (!server_version_at_least(client, [2, 6, 5])) { - console.log("Skipping " + name + " for old Redis server version < 2.6.5"); - return next(name); - } - - client.multi().set("foo").exec(function (err, reply) { - assert(Array.isArray(err), "err should be an array"); - assert.equal(2, err.length, "err should have 2 items"); - assert(err[0].message.match(/ERR/), "First error message should contain ERR"); - assert(err[1].message.match(/EXECABORT/), "First error message should contain EXECABORT"); - next(name); - }); -}; - -tests.MULTI_8 = function () { - var name = "MULTI_8", multi1, multi2; - - // Provoke an error at queue time - multi1 = client.multi(); - multi1.mset("multifoo_8", "10", "multibar_8", "20", require_string("OK", name)); - multi1.set("foo2", require_error(name)); - multi1.set("foo3", require_error(name)); - multi1.incr("multifoo_8", require_number(11, name)); - multi1.incr("multibar_8", require_number(21, name)); - multi1.exec(function () { - require_error(name); - - // Redis 2.6.5+ will abort transactions with errors - // see: http://redis.io/topics/transactions - var multibar_expected = 22; - var multifoo_expected = 12; - if (server_version_at_least(client, [2, 6, 5])) { - multibar_expected = 1; - multifoo_expected = 1; - } - - // Confirm that the previous command, while containing an error, still worked. - multi2 = client.multi(); - multi2.incr("multibar_8", require_number(multibar_expected, name)); - multi2.incr("multifoo_8", require_number(multifoo_expected, name)); - multi2.exec(function (err, replies) { - assert.strictEqual(multibar_expected, replies[0]); - assert.strictEqual(multifoo_expected, replies[1]); - next(name); - }); - }); -}; - -tests.FWD_ERRORS_1 = function () { - var name = "FWD_ERRORS_1"; - - var toThrow = new Error("Forced exception"); - var recordedError = null; - - var originalHandlers = client3.listeners("error"); - client3.removeAllListeners("error"); - client3.once("error", function (err) { - recordedError = err; - }); - - client3.on("message", function (channel, data) { - console.log("incoming"); - if (channel == name) { - assert.equal(data, "Some message"); - throw toThrow; - } - }); - client3.subscribe(name); - - client.publish(name, "Some message"); - setTimeout(function () { - client3.listeners("error").push(originalHandlers); - assert.equal(recordedError, toThrow, "Should have caught our forced exception"); - next(name); - }, 150); -}; - -tests.FWD_ERRORS_2 = function () { - var name = "FWD_ERRORS_2"; - - var toThrow = new Error("Forced exception"); - var recordedError = null; - - var originalHandler = client.listeners("error").pop(); - client.removeAllListeners("error"); - client.once("error", function (err) { - recordedError = err; - }); - - client.get("no_such_key", function (err, reply) { - throw toThrow; - }); - - setTimeout(function () { - client.listeners("error").push(originalHandler); - assert.equal(recordedError, toThrow, "Should have caught our forced exception"); - next(name); - }, 150); -}; - -tests.FWD_ERRORS_3 = function () { - var name = "FWD_ERRORS_3"; - - var recordedError = null; - - var originalHandler = client.listeners("error").pop(); - client.removeAllListeners("error"); - client.once("error", function (err) { - recordedError = err; - }); - - client.send_command("no_such_command", []); - - setTimeout(function () { - client.listeners("error").push(originalHandler); - assert.ok(recordedError instanceof Error); - next(name); - }, 150); -}; - -tests.FWD_ERRORS_4 = function () { - var name = "FWD_ERRORS_4"; - - var toThrow = new Error("Forced exception"); - var recordedError = null; - - var originalHandler = client.listeners("error").pop(); - client.removeAllListeners("error"); - client.once("error", function (err) { - recordedError = err; - }); - - client.send_command("no_such_command", [], function () { - throw toThrow; - }); - - setTimeout(function () { - client.listeners("error").push(originalHandler); - assert.equal(recordedError, toThrow, "Should have caught our forced exception"); - next(name); - }, 150); -}; - -tests.EVAL_1 = function () { - var name = "EVAL_1"; - - if (!server_version_at_least(client, [2, 5, 0])) { - console.log("Skipping " + name + " for old Redis server version < 2.5.x"); - return next(name); - } - - // test {EVAL - Lua integer -> Redis protocol type conversion} - client.eval("return 100.5", 0, require_number(100, name)); - // test {EVAL - Lua string -> Redis protocol type conversion} - client.eval("return 'hello world'", 0, require_string("hello world", name)); - // test {EVAL - Lua true boolean -> Redis protocol type conversion} - client.eval("return true", 0, require_number(1, name)); - // test {EVAL - Lua false boolean -> Redis protocol type conversion} - client.eval("return false", 0, require_null(name)); - // test {EVAL - Lua status code reply -> Redis protocol type conversion} - client.eval("return {ok='fine'}", 0, require_string("fine", name)); - // test {EVAL - Lua error reply -> Redis protocol type conversion} - client.eval("return {err='this is an error'}", 0, require_error(name)); - // test {EVAL - Lua table -> Redis protocol type conversion} - client.eval("return {1,2,3,'ciao',{1,2}}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual(1, res[0], name); - assert.strictEqual(2, res[1], name); - assert.strictEqual(3, res[2], name); - assert.strictEqual("ciao", res[3], name); - assert.strictEqual(2, res[4].length, name); - assert.strictEqual(1, res[4][0], name); - assert.strictEqual(2, res[4][1], name); - }); - // test {EVAL - Are the KEYS and ARGS arrays populated correctly?} - client.eval("return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", 2, "a", "b", "c", "d", function (err, res) { - assert.strictEqual(4, res.length, name); - assert.strictEqual("a", res[0], name); - assert.strictEqual("b", res[1], name); - assert.strictEqual("c", res[2], name); - assert.strictEqual("d", res[3], name); - }); - - // test {EVAL - parameters in array format gives same result} - client.eval(["return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", 2, "a", "b", "c", "d"], function (err, res) { - assert.strictEqual(4, res.length, name); - assert.strictEqual("a", res[0], name); - assert.strictEqual("b", res[1], name); - assert.strictEqual("c", res[2], name); - assert.strictEqual("d", res[3], name); - }); - - // prepare sha sum for evalsha cache test - var source = "return redis.call('get', 'sha test')", - sha = crypto.createHash('sha1').update(source).digest('hex'); - - client.set("sha test", "eval get sha test", function (err, res) { - if (err) throw err; - // test {EVAL - is Lua able to call Redis API?} - client.eval(source, 0, function (err, res) { - require_string("eval get sha test", name)(err, res); - // test {EVALSHA - Can we call a SHA1 if already defined?} - client.evalsha(sha, 0, require_string("eval get sha test", name)); - // test {EVALSHA - Do we get an error on non defined SHA1?} - client.evalsha("ffffffffffffffffffffffffffffffffffffffff", 0, require_error(name)); - }); - }); - - // test {EVAL - Redis integer -> Lua type conversion} - client.set("incr key", 0, function (err, reply) { - if (err) throw err; - client.eval("local foo = redis.call('incr','incr key')\n" + "return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("number", res[0], name); - assert.strictEqual(1, res[1], name); - }); - }); - - client.set("bulk reply key", "bulk reply value", function (err, res) { - // test {EVAL - Redis bulk -> Lua type conversion} - client.eval("local foo = redis.call('get','bulk reply key'); return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("string", res[0], name); - assert.strictEqual("bulk reply value", res[1], name); - }); - }); - - // test {EVAL - Redis multi bulk -> Lua type conversion} - client.multi() - .del("mylist") - .rpush("mylist", "a") - .rpush("mylist", "b") - .rpush("mylist", "c") - .exec(function (err, replies) { - if (err) throw err; - client.eval("local foo = redis.call('lrange','mylist',0,-1); return {type(foo),foo[1],foo[2],foo[3],# foo}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("a", res[1], name); - assert.strictEqual("b", res[2], name); - assert.strictEqual("c", res[3], name); - assert.strictEqual(3, res[4], name); - }); - }); - // test {EVAL - Redis status reply -> Lua type conversion} - client.eval("local foo = redis.call('set','mykey','myval'); return {type(foo),foo['ok']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("OK", res[1], name); - }); - // test {EVAL - Redis error reply -> Lua type conversion} - client.set("error reply key", "error reply value", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.pcall('incr','error reply key'); return {type(foo),foo['err']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("ERR value is not an integer or out of range", res[1], name); - }); - }); - // test {EVAL - Redis nil bulk reply -> Lua type conversion} - client.del("nil reply key", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.call('get','nil reply key'); return {type(foo),foo == false}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("boolean", res[0], name); - assert.strictEqual(1, res[1], name); - next(name); - }); - }); -}; - -tests.SCRIPT_LOAD = function() { - var name = "SCRIPT_LOAD", - command = "return 1", - commandSha = crypto.createHash('sha1').update(command).digest('hex'); - - if (!server_version_at_least(client, [2, 6, 0])) { - console.log("Skipping " + name + " for old Redis server version < 2.6.x"); - return next(name); - } - - bclient.script("load", command, function(err, result) { - assert.strictEqual(result.toString(), commandSha); - client.multi().script("load", command).exec(function(err, result) { - assert.strictEqual(result[0].toString(), commandSha); - client.multi([['script', 'load', command]]).exec(function(err, result) { - assert.strictEqual(result[0].toString(), commandSha); - next(name); - }); - }); - }); -}; - -tests.CLIENT_LIST = function() { - var name = "CLIENT_LIST"; - - if (!server_version_at_least(client, [2, 4, 0])) { - console.log("Skipping " + name + " for old Redis server version < 2.4.x"); - return next(name); - } - - function checkResult(result) { - var lines = result.toString().split('\n').slice(0, -1); - assert.strictEqual(lines.length, 4); - assert(lines.every(function(line) { - return line.match(/^addr=/); - })); - } - - bclient.client("list", function(err, result) { - console.log(result.toString()); - checkResult(result); - client.multi().client("list").exec(function(err, result) { - console.log(result.toString()); - checkResult(result); - client.multi([['client', 'list']]).exec(function(err, result) { - console.log(result.toString()); - checkResult(result); - next(name); - }); - }); - }); -}; - -tests.WATCH_MULTI = function () { - var name = 'WATCH_MULTI', multi; - if (!server_version_at_least(client, [2, 2, 0])) { - console.log("Skipping " + name + " for old Redis server version < 2.2.x"); - return next(name); - } - - client.watch(name); - client.incr(name); - multi = client.multi(); - multi.incr(name); - multi.exec(last(name, require_null(name))); -}; - -tests.WATCH_TRANSACTION = function () { - var name = "WATCH_TRANSACTION"; - - if (!server_version_at_least(client, [2, 1, 0])) { - console.log("Skipping " + name + " because server version isn't new enough."); - return next(name); - } - - // Test WATCH command aborting transactions, look for parser offset errors. - - client.set("unwatched", 200); - - client.set(name, 0); - client.watch(name); - client.incr(name); - var multi = client.multi() - .incr(name) - .exec(function (err, replies) { - // Failure expected because of pre-multi incr - assert.strictEqual(replies, null, "Aborted transaction multi-bulk reply should be null."); - - client.get("unwatched", function (err, reply) { - assert.equal(err, null, name); - assert.equal(reply, 200, "Expected 200, got " + reply); - next(name); - }); - }); - - client.set("unrelated", 100, function (err, reply) { - assert.equal(err, null, name); - assert.equal(reply, "OK", "Expected 'OK', got " + reply); - }); -}; - - -tests.detect_buffers = function () { - var name = "detect_buffers", detect_client = redis.createClient(null, null, {detect_buffers: true}); - - detect_client.on("ready", function () { - // single Buffer or String - detect_client.set("string key 1", "string value"); - detect_client.get("string key 1", require_string("string value", name)); - detect_client.get(new Buffer("string key 1"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Buffer.isBuffer(reply), name); - assert.strictEqual("", reply.inspect(), name); - }); - - detect_client.hmset("hash key 2", "key 1", "val 1", "key 2", "val 2"); - // array of Buffers or Strings - detect_client.hmget("hash key 2", "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply), name); - assert.strictEqual(2, reply.length, name); - assert.strictEqual("val 1", reply[0], name); - assert.strictEqual("val 2", reply[1], name); - }); - detect_client.hmget(new Buffer("hash key 2"), "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply)); - assert.strictEqual(2, reply.length, name); - assert.strictEqual(true, Buffer.isBuffer(reply[0])); - assert.strictEqual(true, Buffer.isBuffer(reply[1])); - assert.strictEqual("", reply[0].inspect(), name); - assert.strictEqual("", reply[1].inspect(), name); - }); - - // array of strings with undefined values (repro #344) - detect_client.hmget("hash key 2", "key 3", "key 4", function(err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply), name); - assert.strictEqual(2, reply.length, name); - assert.equal(null, reply[0], name); - assert.equal(null, reply[1], name); - }); - - // Object of Buffers or Strings - detect_client.hgetall("hash key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual("val 1", reply["key 1"], name); - assert.strictEqual("val 2", reply["key 2"], name); - }); - detect_client.hgetall(new Buffer("hash key 2"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual(true, Buffer.isBuffer(reply["key 1"])); - assert.strictEqual(true, Buffer.isBuffer(reply["key 2"])); - assert.strictEqual("", reply["key 1"].inspect(), name); - assert.strictEqual("", reply["key 2"].inspect(), name); - }); - - detect_client.quit(function (err, res) { - next(name); - }); - }); -}; - -tests.socket_nodelay = function () { - var name = "socket_nodelay", c1, c2, c3, ready_count = 0, quit_count = 0; - - c1 = redis.createClient(null, null, {socket_nodelay: true}); - c2 = redis.createClient(null, null, {socket_nodelay: false}); - c3 = redis.createClient(null, null); - - function quit_check() { - quit_count++; - - if (quit_count === 3) { - next(name); - } - } - - function run() { - assert.strictEqual(true, c1.options.socket_nodelay, name); - assert.strictEqual(false, c2.options.socket_nodelay, name); - assert.strictEqual(true, c3.options.socket_nodelay, name); - - c1.set(["set key 1", "set val"], require_string("OK", name)); - c1.set(["set key 2", "set val"], require_string("OK", name)); - c1.get(["set key 1"], require_string("set val", name)); - c1.get(["set key 2"], require_string("set val", name)); - - c2.set(["set key 3", "set val"], require_string("OK", name)); - c2.set(["set key 4", "set val"], require_string("OK", name)); - c2.get(["set key 3"], require_string("set val", name)); - c2.get(["set key 4"], require_string("set val", name)); - - c3.set(["set key 5", "set val"], require_string("OK", name)); - c3.set(["set key 6", "set val"], require_string("OK", name)); - c3.get(["set key 5"], require_string("set val", name)); - c3.get(["set key 6"], require_string("set val", name)); - - c1.quit(quit_check); - c2.quit(quit_check); - c3.quit(quit_check); - } - - function ready_check() { - ready_count++; - if (ready_count === 3) { - run(); - } - } - - c1.on("ready", ready_check); - c2.on("ready", ready_check); - c3.on("ready", ready_check); -}; - -tests.reconnect = function () { - var name = "reconnect"; - - client.set("recon 1", "one"); - client.set("recon 2", "two", function (err, res) { - // Do not do this in normal programs. This is to simulate the server closing on us. - // For orderly shutdown in normal programs, do client.quit() - client.stream.destroy(); - }); - - client.on("reconnecting", function on_recon(params) { - client.on("connect", function on_connect() { - client.select(test_db_num, require_string("OK", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 2", require_string("two", name)); - client.get("recon 2", require_string("two", name)); - client.removeListener("connect", on_connect); - client.removeListener("reconnecting", on_recon); - next(name); - }); - }); -}; - -tests.reconnect_select_db_after_pubsub = function() { - var name = "reconnect_select_db_after_pubsub"; - - client.select(test_db_num); - client.set(name, "one"); - client.subscribe('ChannelV', function (err, res) { - client.stream.destroy(); - }); - - client.on("reconnecting", function on_recon(params) { - client.on("ready", function on_connect() { - client.unsubscribe('ChannelV', function (err, res) { - client.get(name, require_string("one", name)); - client.removeListener("connect", on_connect); - client.removeListener("reconnecting", on_recon); - next(name); - }); - }); - }); -}; - -tests.idle = function () { - var name = "idle"; - - client.on("idle", function on_idle() { - client.removeListener("idle", on_idle); - next(name); - }); - - client.set("idle", "test"); -}; - -tests.HSET = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET"; - - client.HSET(key, field1, value1, require_number(1, name)); - client.HGET(key, field1, require_string(value1.toString(), name)); - - // Empty value - client.HSET(key, field1, value2, require_number(0, name)); - client.HGET([key, field1], require_string("", name)); - - // Empty key, empty value - client.HSET([key, field2, value1], require_number(1, name)); - client.HSET(key, field2, value2, last(name, require_number(0, name))); -}; - -tests.HLEN = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET", - timeout = 1000; - - client.HSET(key, field1, value1, function (err, results) { - client.HLEN(key, function (err, len) { - assert.ok(2 === +len); - next(name); - }); - }); -}; - -tests.HMSET_BUFFER_AND_ARRAY = function () { - // Saving a buffer and an array to the same key should not error - var key = "test hash", - field1 = "buffer", - value1 = new Buffer("abcdefghij"), - field2 = "array", - value2 = ["array contents"], - name = "HSET"; - - client.HMSET(key, field1, value1, field2, value2, last(name, require_string("OK", name))); -}; - -// TODO - add test for HMSET with optional callbacks - -tests.HMGET = function () { - var key1 = "test hash 1", key2 = "test hash 2", key3 = 123456789, name = "HMGET"; - - // redis-like hmset syntax - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value", require_string("OK", name)); - - // fancy hmset syntax - client.HMSET(key2, { - "0123456789": "abcdefghij", - "some manner of key": "a type of value" - }, require_string("OK", name)); - - // test for numeric key - client.HMSET(key3, { - "0123456789": "abcdefghij", - "some manner of key": "a type of value" - }, require_string("OK", name)); - - client.HMGET(key1, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key2, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key3, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key1, ["0123456789"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - }); - - client.HMGET(key1, ["0123456789", "some manner of key"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - assert.strictEqual("a type of value", reply[1], name); - }); - - client.HMGET(key1, "missing thing", "another missing thing", function (err, reply) { - assert.strictEqual(null, reply[0], name); - assert.strictEqual(null, reply[1], name); - next(name); - }); -}; - -tests.HINCRBY = function () { - var name = "HINCRBY"; - client.hset("hash incr", "value", 10, require_number(1, name)); - client.HINCRBY("hash incr", "value", 1, require_number(11, name)); - client.HINCRBY("hash incr", "value 2", 1, last(name, require_number(1, name))); -}; - -tests.SUBSCRIBE = function () { - var client1 = client, msg_count = 0, name = "SUBSCRIBE"; - - client1.on("subscribe", function (channel, count) { - if (channel === "chan1") { - client2.publish("chan1", "message 1", require_number(1, name)); - client2.publish("chan2", "message 2", require_number(1, name)); - client2.publish("chan1", "message 3", require_number(1, name)); - } - }); - - client1.on("unsubscribe", function (channel, count) { - if (count === 0) { - // make sure this connection can go into and out of pub/sub mode - client1.incr("did a thing", last(name, require_number(2, name))); - } - }); - - client1.on("message", function (channel, message) { - msg_count += 1; - assert.strictEqual("message " + msg_count, message.toString()); - if (msg_count === 3) { - client1.unsubscribe("chan1", "chan2"); - } - }); - - client1.set("did a thing", 1, require_string("OK", name)); - client1.subscribe("chan1", "chan2", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual("chan1", results.toString(), name); - }); -}; - -tests.UNSUB_EMPTY = function () { - // test situation where unsubscribe reply[1] is null - var name = "UNSUB_EMPTY"; - client3.unsubscribe(); // unsubscribe from all so can test null - client3.unsubscribe(); // reply[1] will be null - next(name); -}; - -tests.PUNSUB_EMPTY = function () { - // test situation where punsubscribe reply[1] is null - var name = "PUNSUB_EMPTY"; - client3.punsubscribe(); // punsubscribe from all so can test null - client3.punsubscribe(); // reply[1] will be null - next(name); -}; - -tests.UNSUB_EMPTY_CB = function () { - var name = "UNSUB_EMPTY_CB"; - // test hangs on older versions of redis, so skip - if (!server_version_at_least(client, [2, 6, 11])) return next(name); - - // test situation where unsubscribe reply[1] is null - client3.unsubscribe(); // unsubscribe from all so can test null - client3.unsubscribe(function (err, results) { - // reply[1] will be null - assert.strictEqual(null, err, "unexpected error: " + err); - next(name); - }); -}; - -tests.PUNSUB_EMPTY_CB = function () { - var name = "PUNSUB_EMPTY_CB"; - // test hangs on older versions of redis, so skip - if (!server_version_at_least(client, [2, 6, 11])) return next(name); - - // test situation where punsubscribe reply[1] is null - client3.punsubscribe(); // punsubscribe from all so can test null - client3.punsubscribe(function (err, results) { - // reply[1] will be null - assert.strictEqual(null, err, "unexpected error: " + err); - next(name); - }); -}; - -tests.SUB_UNSUB_SUB = function () { - var name = "SUB_UNSUB_SUB"; - // test hangs on older versions of redis, so skip - if (!server_version_at_least(client, [2, 6, 11])) return next(name); - - client3.subscribe('chan3'); - client3.unsubscribe('chan3'); - client3.subscribe('chan3', function (err, results) { - assert.strictEqual(null, err, "unexpected error: " + err); - client2.publish('chan3', 'foo'); - }); - client3.on('message', function (channel, message) { - assert.strictEqual(channel, 'chan3'); - assert.strictEqual(message, 'foo'); - client3.removeAllListeners(); - next(name); - }); -}; - -tests.SUB_UNSUB_MSG_SUB = function () { - var name = "SUB_UNSUB_MSG_SUB"; - // test hangs on older versions of redis, so skip - if (!server_version_at_least(client, [2, 6, 11])) return next(name); - - client3.subscribe('chan8'); - client3.subscribe('chan9'); - client3.unsubscribe('chan9'); - client2.publish('chan8', 'something'); - client3.subscribe('chan9', with_timeout(name, function (err, results) { - next(name); - }, 2000)); -}; - -tests.PSUB_UNSUB_PMSG_SUB = function () { - var name = "PSUB_UNSUB_PMSG_SUB"; - // test hangs on older versions of redis, so skip - if (!server_version_at_least(client, [2, 6, 11])) return next(name); - - client3.psubscribe('abc*'); - client3.subscribe('xyz'); - client3.unsubscribe('xyz'); - client2.publish('abcd', 'something'); - client3.subscribe('xyz', with_timeout(name, function (err, results) { - next(name); - }, 2000)); -}; - -tests.SUBSCRIBE_QUIT = function () { - var name = "SUBSCRIBE_QUIT"; - client3.on("end", function () { - next(name); - }); - client3.on("subscribe", function (channel, count) { - client3.quit(); - }); - client3.subscribe("chan3"); -}; - -tests.SUBSCRIBE_CLOSE_RESUBSCRIBE = function () { - var name = "SUBSCRIBE_CLOSE_RESUBSCRIBE"; - var c1 = redis.createClient(); - var c2 = redis.createClient(); - var count = 0; - - /* Create two clients. c1 subscribes to two channels, c2 will publish to them. - c2 publishes the first message. - c1 gets the message and drops its connection. It must resubscribe itself. - When it resubscribes, c2 publishes the second message, on the same channel - c1 gets the message and drops its connection. It must resubscribe itself, again. - When it resubscribes, c2 publishes the third message, on the second channel - c1 gets the message and drops its connection. When it reconnects, the test ends. - */ - - c1.on("message", function(channel, message) { - if (channel === "chan1") { - assert.strictEqual(message, "hi on channel 1"); - c1.stream.end(); - - } else if (channel === "chan2") { - assert.strictEqual(message, "hi on channel 2"); - c1.stream.end(); - - } else { - c1.quit(); - c2.quit(); - assert.fail("test failed"); - } - }); - - c1.subscribe("chan1", "chan2"); - - c2.once("ready", function() { - console.log("c2 is ready"); - c1.on("ready", function(err, results) { - console.log("c1 is ready", count); - - count++; - if (count == 1) { - c2.publish("chan1", "hi on channel 1"); - return; - - } else if (count == 2) { - c2.publish("chan2", "hi on channel 2"); - - } else { - c1.quit(function() { - c2.quit(function() { - next(name); - }); - }); - } - }); - - c2.publish("chan1", "hi on channel 1"); - - }); -}; - -tests.EXISTS = function () { - var name = "EXISTS"; - client.del("foo", "foo2", require_number_any(name)); - client.set("foo", "bar", require_string("OK", name)); - client.EXISTS("foo", require_number(1, name)); - client.EXISTS("foo2", last(name, require_number(0, name))); -}; - -tests.DEL = function () { - var name = "DEL"; - client.DEL("delkey", require_number_any(name)); - client.set("delkey", "delvalue", require_string("OK", name)); - client.DEL("delkey", require_number(1, name)); - client.exists("delkey", require_number(0, name)); - client.DEL("delkey", require_number(0, name)); - client.mset("delkey", "delvalue", "delkey2", "delvalue2", require_string("OK", name)); - client.DEL("delkey", "delkey2", last(name, require_number(2, name))); -}; - -tests.TYPE = function () { - var name = "TYPE"; - client.set(["string key", "should be a string"], require_string("OK", name)); - client.rpush(["list key", "should be a list"], require_number_pos(name)); - client.sadd(["set key", "should be a set"], require_number_any(name)); - client.zadd(["zset key", "10.0", "should be a zset"], require_number_any(name)); - client.hset(["hash key", "hashtest", "should be a hash"], require_number_any(0, name)); - - client.TYPE(["string key"], require_string("string", name)); - client.TYPE(["list key"], require_string("list", name)); - client.TYPE(["set key"], require_string("set", name)); - client.TYPE(["zset key"], require_string("zset", name)); - client.TYPE("not here yet", require_string("none", name)); - client.TYPE(["hash key"], last(name, require_string("hash", name))); -}; - -tests.KEYS = function () { - var name = "KEYS"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.KEYS(["test keys*"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(2, results.length, name); - assert.ok(~results.indexOf("test keys 1")); - assert.ok(~results.indexOf("test keys 2")); - next(name); - }); -}; - -tests.MULTIBULK = function() { - var name = "MULTIBULK", - keys_values = []; - - for (var i = 0; i < 200; i++) { - var key_value = [ - "multibulk:" + crypto.randomBytes(256).toString("hex"), // use long strings as keys to ensure generation of large packet - "test val " + i - ]; - keys_values.push(key_value); - } - - client.mset(keys_values.reduce(function(a, b) { - return a.concat(b); - }), require_string("OK", name)); - - client.KEYS("multibulk:*", function(err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.deepEqual(keys_values.map(function(val) { - return val[0]; - }).sort(), results.sort(), name); - }); - - next(name); -}; - -tests.MULTIBULK_ZERO_LENGTH = function () { - var name = "MULTIBULK_ZERO_LENGTH"; - client.KEYS(['users:*'], function (err, results) { - assert.strictEqual(null, err, 'error on empty multibulk reply'); - assert.strictEqual(true, is_empty_array(results), "not an empty array"); - next(name); - }); -}; - -tests.RANDOMKEY = function () { - var name = "RANDOMKEY"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.RANDOMKEY([], function (err, results) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(true, /\w+/.test(results), name); - next(name); - }); -}; - -tests.RENAME = function () { - var name = "RENAME"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.RENAME(["foo", "new foo"], require_string("OK", name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["new foo"], last(name, require_number(1, name))); -}; - -tests.RENAMENX = function () { - var name = "RENAMENX"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.set(['foo2', 'bar2'], require_string("OK", name)); - client.RENAMENX(["foo", "foo2"], require_number(0, name)); - client.exists(["foo"], require_number(1, name)); - client.exists(["foo2"], require_number(1, name)); - client.del(["foo2"], require_number(1, name)); - client.RENAMENX(["foo", "foo2"], require_number(1, name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["foo2"], last(name, require_number(1, name))); -}; - -tests.DBSIZE = function () { - var name = "DBSIZE"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.DBSIZE([], last(name, require_number_pos("DBSIZE"))); -}; - -tests.GET_1 = function () { - var name = "GET_1"; - client.set(["get key", "get val"], require_string("OK", name)); - client.GET(["get key"], last(name, require_string("get val", name))); -}; - -tests.GET_2 = function() { - var name = "GET_2"; - - // tests handling of non-existent keys - client.GET('this_key_shouldnt_exist', last(name, require_null(name))); -}; - -tests.SET = function () { - var name = "SET"; - client.SET(["set key", "set val"], require_string("OK", name)); - client.get(["set key"], last(name, require_string("set val", name))); - client.SET(["set key", undefined], require_error(name)); -}; - -tests.GETSET = function () { - var name = "GETSET"; - client.set(["getset key", "getset val"], require_string("OK", name)); - client.GETSET(["getset key", "new getset val"], require_string("getset val", name)); - client.get(["getset key"], last(name, require_string("new getset val", name))); -}; - -tests.MGET = function () { - var name = "MGET"; - client.mset(["mget keys 1", "mget val 1", "mget keys 2", "mget val 2", "mget keys 3", "mget val 3"], require_string("OK", name)); - client.MGET("mget keys 1", "mget keys 2", "mget keys 3", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "some random shit", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(4, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual(null, results[1], name); - assert.strictEqual("mget val 2", results[2].toString(), name); - assert.strictEqual("mget val 3", results[3].toString(), name); - next(name); - }); -}; - -tests.SETNX = function () { - var name = "SETNX"; - client.set(["setnx key", "setnx value"], require_string("OK", name)); - client.SETNX(["setnx key", "new setnx value"], require_number(0, name)); - client.del(["setnx key"], require_number(1, name)); - client.exists(["setnx key"], require_number(0, name)); - client.SETNX(["setnx key", "new setnx value"], require_number(1, name)); - client.exists(["setnx key"], last(name, require_number(1, name))); -}; - -tests.SETEX = function () { - var name = "SETEX"; - client.SETEX(["setex key", "100", "setex val"], require_string("OK", name)); - client.exists(["setex key"], require_number(1, name)); - client.ttl(["setex key"], last(name, require_number_pos(name))); - client.SETEX(["setex key", "100", undefined], require_error(name)); -}; - -tests.MSETNX = function () { - var name = "MSETNX"; - client.mset(["mset1", "val1", "mset2", "val2", "mset3", "val3"], require_string("OK", name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(0, name)); - client.del(["mset3"], require_number(1, name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(1, name)); - client.exists(["mset3"], require_number(1, name)); - client.exists(["mset4"], last(name, require_number(1, name))); -}; - -tests.HGETALL = function () { - var name = "HGETALL"; - client.hmset(["hosts", "mjr", "1", "another", "23", "home", "1234"], require_string("OK", name)); - client.HGETALL(["hosts"], function (err, obj) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(3, Object.keys(obj).length, name); - assert.strictEqual("1", obj.mjr.toString(), name); - assert.strictEqual("23", obj.another.toString(), name); - assert.strictEqual("1234", obj.home.toString(), name); - next(name); - }); -}; - -tests.HGETALL_MESSAGE = function () { - var name = "HGETALL_MESSAGE"; - client.hmset("msg_test", {message: "hello"}, require_string("OK", name)); - client.hgetall("msg_test", function (err, obj) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(1, Object.keys(obj).length, name); - assert.strictEqual(obj.message, "hello") - next(name); - }); -}; - -tests.HGETALL_NULL = function () { - var name = "HGETALL_NULL"; - - client.hgetall("missing", function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(null, obj); - next(name); - }); -}; - -tests.UTF8 = function () { - var name = "UTF8", - utf8_sample = "ಠ_ಠ"; - - client.set(["utf8test", utf8_sample], require_string("OK", name)); - client.get(["utf8test"], function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(utf8_sample, obj); - next(name); - }); -}; - -// Set tests were adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SADD = function () { - var name = "SADD"; - - client.del('set0'); - client.SADD('set0', 'member0', require_number(1, name)); - client.sadd('set0', 'member0', last(name, require_number(0, name))); -}; - -tests.SADD2 = function () { - var name = "SADD2"; - - client.del("set0"); - client.sadd("set0", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set0", function (err, res) { - assert.strictEqual(res.length, 3); - assert.ok(~res.indexOf("member0")); - assert.ok(~res.indexOf("member1")); - assert.ok(~res.indexOf("member2")); - }); - client.SADD("set1", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set1", function (err, res) { - assert.strictEqual(res.length, 3); - assert.ok(~res.indexOf("member0")); - assert.ok(~res.indexOf("member1")); - assert.ok(~res.indexOf("member2")); - next(name); - }); -}; - -tests.SISMEMBER = function () { - var name = "SISMEMBER"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member1', last(name, require_number(0, name))); -}; - -tests.SCARD = function () { - var name = "SCARD"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.scard('set0', require_number(1, name)); - client.sadd('set0', 'member1', require_number(1, name)); - client.scard('set0', last(name, require_number(2, name))); -}; - -tests.SREM = function () { - var name = "SREM"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.srem('set0', 'foobar', require_number(0, name)); - client.srem('set0', 'member0', require_number(1, name)); - client.scard('set0', last(name, require_number(0, name))); -}; - - -tests.SREM2 = function () { - var name = "SREM2"; - client.del("set0"); - client.sadd("set0", ["member0", "member1", "member2"], require_number(3, name)); - client.SREM("set0", ["member1", "member2"], require_number(2, name)); - client.smembers("set0", function (err, res) { - assert.strictEqual(res.length, 1); - assert.ok(~res.indexOf("member0")); - }); - client.sadd("set0", ["member3", "member4", "member5"], require_number(3, name)); - client.srem("set0", ["member0", "member6"], require_number(1, name)); - client.smembers("set0", function (err, res) { - assert.strictEqual(res.length, 3); - assert.ok(~res.indexOf("member3")); - assert.ok(~res.indexOf("member4")); - assert.ok(~res.indexOf("member5")); - next(name); - }); -}; - -tests.SPOP = function () { - var name = "SPOP"; - - client.del('zzz'); - client.sadd('zzz', 'member0', require_number(1, name)); - client.scard('zzz', require_number(1, name)); - - client.spop('zzz', function (err, value) { - if (err) { - assert.fail(err); - } - assert.equal(value, 'member0', name); - }); - - client.scard('zzz', last(name, require_number(0, name))); -}; - -tests.SDIFF = function () { - var name = "SDIFF"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - client.sdiff('foo', 'bar', 'baz', function (err, values) { - if (err) { - assert.fail(err, name); - } - values.sort(); - assert.equal(values.length, 2, name); - assert.equal(values[0], 'b', name); - assert.equal(values[1], 'x', name); - next(name); - }); -}; - -tests.SDIFFSTORE = function () { - var name = "SDIFFSTORE"; - - client.del('foo'); - client.del('bar'); - client.del('baz'); - client.del('quux'); - - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - // NB: SDIFFSTORE returns the number of elements in the dstkey - - client.sdiffstore('quux', 'foo', 'bar', 'baz', require_number(2, name)); - - client.smembers('quux', function (err, values) { - if (err) { - assert.fail(err, name); - } - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'b', 'x' ], name); - next(name); - }); -}; - -tests.SMEMBERS = function () { - var name = "SMEMBERS"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'x' ], name); - }); - - client.sadd('foo', 'y', require_number(1, name)); - - client.smembers('foo', function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.equal(values.length, 2, name); - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'x', 'y' ], name); - next(name); - }); -}; - -tests.SMOVE = function () { - var name = "SMOVE"; - - client.del('foo'); - client.del('bar'); - - client.sadd('foo', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', require_number(1, name)); - client.sismember('foo', 'x', require_number(0, name)); - client.sismember('bar', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', last(name, require_number(0, name))); -}; - -tests.SINTER = function () { - var name = "SINTER"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinter('sa', 'sb', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'b', 'c' ], name); - }); - - client.sinter('sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'c', 'd' ], name); - }); - - client.sinter('sa', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - }); - - // 3-way - - client.sinter('sa', 'sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - next(name); - }); -}; - -tests.SINTERSTORE = function () { - var name = "SINTERSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinterstore('foo', 'sa', 'sb', 'sc', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'c' ], name); - next(name); - }); -}; - -tests.SUNION = function () { - var name = "SUNION"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunion('sa', 'sb', 'sc', function (err, union) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(union).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -tests.SUNIONSTORE = function () { - var name = "SUNIONSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunionstore('foo', 'sa', 'sb', 'sc', function (err, cardinality) { - if (err) { - assert.fail(err, name); - } - assert.equal(cardinality, 5, name); - }); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.equal(members.length, 5, name); - assert.deepEqual(buffers_to_strings(members).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -// SORT test adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SORT = function () { - var name = "SORT"; - - client.del('y'); - client.del('x'); - - client.rpush('y', 'd', require_number(1, name)); - client.rpush('y', 'b', require_number(2, name)); - client.rpush('y', 'a', require_number(3, name)); - client.rpush('y', 'c', require_number(4, name)); - - client.rpush('x', '3', require_number(1, name)); - client.rpush('x', '9', require_number(2, name)); - client.rpush('x', '2', require_number(3, name)); - client.rpush('x', '4', require_number(4, name)); - - client.set('w3', '4', require_string("OK", name)); - client.set('w9', '5', require_string("OK", name)); - client.set('w2', '12', require_string("OK", name)); - client.set('w4', '6', require_string("OK", name)); - - client.set('o2', 'buz', require_string("OK", name)); - client.set('o3', 'foo', require_string("OK", name)); - client.set('o4', 'baz', require_string("OK", name)); - client.set('o9', 'bar', require_string("OK", name)); - - client.set('p2', 'qux', require_string("OK", name)); - client.set('p3', 'bux', require_string("OK", name)); - client.set('p4', 'lux', require_string("OK", name)); - client.set('p9', 'tux', require_string("OK", name)); - - // Now the data has been setup, we can test. - - // But first, test basic sorting. - - // y = [ d b a c ] - // sort y ascending = [ a b c d ] - // sort y descending = [ d c b a ] - - client.sort('y', 'asc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['a', 'b', 'c', 'd'], name); - }); - - client.sort('y', 'desc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['d', 'c', 'b', 'a'], name); - }); - - // Now try sorting numbers in a list. - // x = [ 3, 9, 2, 4 ] - - client.sort('x', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [2, 3, 4, 9], name); - }); - - client.sort('x', 'desc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [9, 4, 3, 2], name); - }); - - // Try sorting with a 'by' pattern. - - client.sort('x', 'by', 'w*', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [3, 9, 4, 2], name); - }); - - // Try sorting with a 'by' pattern and 1 'get' pattern. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bar', 'baz', 'buz'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - // Instead of getting back the sorted set/list, store the values to a list. - // Then check that the values are there in the expected order. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', 'store', 'bacon', function (err) { - if (err) { - assert.fail(err, name); - } - }); - - client.lrange('bacon', 0, -1, function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(values), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - next(name); - }); - - // TODO - sort by hash value -}; - -tests.MONITOR = function () { - var name = "MONITOR", responses = [], monitor_client; - - if (!server_version_at_least(client, [2, 6, 0])) { - console.log("Skipping " + name + " for old Redis server version < 2.6.x"); - return next(name); - } - - monitor_client = redis.createClient(); - monitor_client.monitor(function (err, res) { - client.mget("some", "keys", "foo", "bar"); - client.set("json", JSON.stringify({ - foo: "123", - bar: "sdflkdfsjk", - another: false - })); - }); - monitor_client.on("monitor", function (time, args) { - // skip monitor command for Redis <= 2.4.16 - if (args[0] === "monitor") return; - - responses.push(args); - if (responses.length === 2) { - assert.strictEqual(5, responses[0].length); - assert.strictEqual("mget", responses[0][0]); - assert.strictEqual("some", responses[0][1]); - assert.strictEqual("keys", responses[0][2]); - assert.strictEqual("foo", responses[0][3]); - assert.strictEqual("bar", responses[0][4]); - assert.strictEqual(3, responses[1].length); - assert.strictEqual("set", responses[1][0]); - assert.strictEqual("json", responses[1][1]); - assert.strictEqual('{"foo":"123","bar":"sdflkdfsjk","another":false}', responses[1][2]); - monitor_client.quit(function (err, res) { - next(name); - }); - } - }); -}; - -tests.BLPOP = function () { - var name = "BLPOP"; - - client.rpush("blocking list", "initial value", function (err, res) { - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("initial value", res[1].toString()); - - client.rpush("blocking list", "wait for this value"); - }); - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("wait for this value", res[1].toString()); - next(name); - }); - }); -}; - -tests.BLPOP_TIMEOUT = function () { - var name = "BLPOP_TIMEOUT"; - - // try to BLPOP the list again, which should be empty. This should timeout and return null. - client2.BLPOP("blocking list", 1, function (err, res) { - if (err) { - throw err; - } - - assert.strictEqual(res, null); - next(name); - }); -}; - -tests.EXPIRE = function () { - var name = "EXPIRE"; - client.set(['expiry key', 'bar'], require_string("OK", name)); - client.EXPIRE(["expiry key", "1"], require_number_pos(name)); - setTimeout(function () { - client.exists(["expiry key"], last(name, require_number(0, name))); - }, 2000); -}; - -tests.TTL = function () { - var name = "TTL"; - client.set(["ttl key", "ttl val"], require_string("OK", name)); - client.expire(["ttl key", "100"], require_number_pos(name)); - setTimeout(function () { - client.TTL(["ttl key"], last(name, require_number_pos(0, name))); - }, 500); -}; - -tests.OPTIONAL_CALLBACK = function () { - var name = "OPTIONAL_CALLBACK"; - client.del("op_cb1"); - client.set("op_cb1", "x"); - client.get("op_cb1", last(name, require_string("x", name))); -}; - -tests.OPTIONAL_CALLBACK_UNDEFINED = function () { - var name = "OPTIONAL_CALLBACK_UNDEFINED"; - client.del("op_cb2"); - client.set("op_cb2", "y", undefined); - client.get("op_cb2", last(name, require_string("y", name))); - - client.set("op_cb_undefined", undefined, undefined); -}; - -tests.ENABLE_OFFLINE_QUEUE_TRUE = function () { - var name = "ENABLE_OFFLINE_QUEUE_TRUE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1 - // default :) - // enable_offline_queue: true - }); - cli.on('error', function(e) { - // ignore, b/c expecting a "can't connect" error - }); - return setTimeout(function() { - cli.set(name, name, function(err, result) { - assert.ifError(err); - }); - - return setTimeout(function(){ - assert.strictEqual(cli.offline_queue.length, 1); - return next(name); - }, 25); - }, 50); -}; - -tests.ENABLE_OFFLINE_QUEUE_FALSE = function () { - var name = "ENABLE_OFFLINE_QUEUE_FALSE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1, - enable_offline_queue: false - }); - cli.on('error', function() { - // ignore, see above - }); - assert.throws(function () { - cli.set(name, name) - }) - assert.doesNotThrow(function () { - cli.set(name, name, function (err) { - // should callback with an error - assert.ok(err); - setTimeout(function () { - next(name); - }, 50); - }); - }); -}; - -tests.SLOWLOG = function () { - var name = "SLOWLOG"; - client.config("set", "slowlog-log-slower-than", 0, require_string("OK", name)); - client.slowlog("reset", require_string("OK", name)); - client.set("foo", "bar", require_string("OK", name)); - client.get("foo", require_string("bar", name)); - client.slowlog("get", function (err, res) { - assert.equal(res.length, 3, name); - assert.equal(res[0][3].length, 2, name); - assert.deepEqual(res[1][3], ["set", "foo", "bar"], name); - assert.deepEqual(res[2][3], ["slowlog", "reset"], name); - client.config("set", "slowlog-log-slower-than", 10000, require_string("OK", name)); - next(name); - }); -} - -tests.DOMAIN = function () { - var name = "DOMAIN"; - - var domain; - try { - domain = require('domain').create(); - } catch (err) { - console.log("Skipping " + name + " because this version of node doesn't have domains."); - next(name); - } - - if (domain) { - domain.run(function () { - client.set('domain', 'value', function (err, res) { - assert.ok(process.domain); - var notFound = res.not.existing.thing; // ohhh nooooo - }); - }); - - // this is the expected and desired behavior - domain.on('error', function (err) { next(name); }); - } -}; - -// TODO - need a better way to test auth, maybe auto-config a local Redis server or something. -// Yes, this is the real password. Please be nice, thanks. -tests.auth = function () { - var name = "AUTH", client4, ready_count = 0; - - client4 = redis.createClient(9006, "filefish.redistogo.com"); - client4.auth("664b1b6aaf134e1ec281945a8de702a9", function (err, res) { - assert.strictEqual(null, err, name); - assert.strictEqual("OK", res.toString(), name); - }); - - // test auth, then kill the connection so it'll auto-reconnect and auto-re-auth - client4.on("ready", function () { - ready_count++; - if (ready_count === 1) { - client4.stream.destroy(); - } else { - client4.quit(function (err, res) { - next(name); - }); - } - }); -}; - -tests.auth2 = function () { - var name = "AUTH2", client4, ready_count = 0; - - client4 = redis.createClient(9006, "filefish.redistogo.com", {auth_pass: "664b1b6aaf134e1ec281945a8de702a9"}); - - // test auth, then kill the connection so it'll auto-reconnect and auto-re-auth - client4.on("ready", function () { - ready_count++; - if (ready_count === 1) { - client4.stream.destroy(); - } else { - client4.quit(function (err, res) { - next(name); - }); - } - }); -}; - -tests.reconnectRetryMaxDelay = function() { - var time = new Date().getTime(), - name = 'reconnectRetryMaxDelay', - reconnecting = false; - var client = redis.createClient(PORT, HOST, { - retry_max_delay: 1 - }); - client.on('ready', function() { - if (!reconnecting) { - reconnecting = true; - client.retry_delay = 1000; - client.retry_backoff = 1; - client.stream.end(); - } else { - client.end(); - var lasted = new Date().getTime() - time; - assert.ok(lasted < 1000); - next(name); - } - }); -}; - -tests.unref = function () { - var name = "unref"; - var external = fork("./test-unref.js"); - var done = false; - external.on("close", function (code) { - assert(code == 0, "test-unref.js failed"); - done = true; - }) - setTimeout(function () { - if (!done) { - external.kill(); - } - assert(done, "test-unref.js didn't finish in time."); - next(name); - }, 500); -}; - -all_tests = Object.keys(tests); -all_start = new Date(); -test_count = 0; - -run_next_test = function run_next_test() { - var test_name = all_tests.shift(); - if (typeof tests[test_name] === "function") { - util.print('- \x1b[1m' + test_name.toLowerCase() + '\x1b[0m:'); - cur_start = new Date(); - test_count += 1; - tests[test_name](); - } else { - console.log('\n completed \x1b[32m%d\x1b[0m tests in \x1b[33m%d\x1b[0m ms\n', test_count, new Date() - all_start); - client.quit(); - client2.quit(); - bclient.quit(); - } -}; - -client.once("ready", function start_tests() { - console.log("Connected to " + client.host + ":" + client.port + ", Redis server version " + client.server_info.redis_version + "\n"); - console.log("Using reply parser " + client.reply_parser.name); - - run_next_test(); - - connected = true; -}); - -client.on('end', function () { - ended = true; -}); - -// Exit immediately on connection failure, which triggers "exit", below, which fails the test -client.on("error", function (err) { - console.error("client: " + err.stack); - process.exit(); -}); -client2.on("error", function (err) { - console.error("client2: " + err.stack); - process.exit(); -}); -client3.on("error", function (err) { - console.error("client3: " + err.stack); - process.exit(); -}); -bclient.on("error", function (err) { - console.error("bclient: " + err.stack); - process.exit(); -}); - -client.on("reconnecting", function (params) { - console.log("reconnecting: " + util.inspect(params)); -}); - -process.on('uncaughtException', function (err) { - console.error("Uncaught exception: " + err.stack); - process.exit(1); -}); - -process.on('exit', function (code) { - assert.equal(true, connected); - assert.equal(true, ended); -}); diff --git a/node_modules/theory/README.md b/node_modules/theory/README.md deleted file mode 100644 index f3373089..00000000 --- a/node_modules/theory/README.md +++ /dev/null @@ -1,771 +0,0 @@ -Theory -====== - -Theory is an abstraction layer for server side and client side JavaScript. - -Motivation -========== - -1. **Deep existence**. It all started because a program would crash via - `if(obj.x.y.z)` rather than `if(obj && obj.x && obj.x.y && obj.x.y.z)`, so I - wanted an elegant way to check and access deeply nested objects in a safe - yet concise manner. - -2. **Dependency management**. You should not have to declare dependencies in - another language (HTML) to import required code or rely on globals. Other - tools that solve this foolishly break Node's style in order to make it work - asynchronously. - -3. **Universal normalization**. Write once, run everywhere. This dream gets - broken when you discover different implementations of JavaScript behave in - unique ways, whether browsers or phones and tablets, or IE6 versus server - side. I needed a reliable yet tiny library (at **7KB** gzipped) that would - normalize everything so any code written would literally work everywhere. - -Require -======= - -As simple as `npm install theory` on Node and a single `` client side. The brilliant thing is that you do not -have to declare anything else after that, you can handle the rest within your -module. - - module.exports=require('theory') - ('hello', function(a){ - - var say = "Hello World!"; - console.log(say); - return say; - - }, ['./needed', './dependency']); - -This is the beautiful fix that works everywhere. You get your own closure which -executes only after all your dependencies (and all of their sub-dependencies) -have loaded - then whatever you return from your closure gets exported out! - -Say you name this file as 'world.js', all you have to do is run `node world.js` -on the server or put `require('world')` on the client inside the 'theory.js' -script tag (or have a normal 'world.js' script tag below theory.js). All -dependencies are relative to your file, not the HTML page or the parent module! - -If the dependency you require uses some global variable, you can access it from -there (such as `jQuery`) as usual. You can access `theory` as a global, but you -should not use it globally - theory copies itself into the scope of each module -(the `a` argument, henceforth used for the rest of this documentation). - -All dependencies that use exports (normal Node modules and theory specific -modules) get attached to your module's local scope with their base filename -(`a.needed` and `a.dependency` in the example above). If you have conflicting -names or just want a different name then use an object to declare dependencies -instead of an array (`{'./needed': 'foo', './dependency': 'bar'}` become `a.foo` -and `a.bar`). Theory modules also attach to their own namespace, such as -`theory.hello` in above. - -You can also specify sub dependencies, such as `{'./jquery':['./jquery-ui', -'./jquery-ext']}`. Define environment specific dependencies by checking for -`root.page` or `root.node`. Finally, [imports.js](https://gist.github.com/amark/6291429) -is an unmaintained version of just the require feature, without anything below. - -*Now let's dive into the API.* - -Binary -====== - -- **is** `a.bi.is(what)` - - - determines to see if what is a boolean or not. - - - Examples - - - `a.bi.is(false)` → `true` - - - `a.bi.is(true)` → `true` - - - `a.bi.is(0)` → `false` - - - `a.bi.is('yes')` → `false` - -Numbers -======= - -- **is** `a.num.is(what)` - - - determines to see if what is a number or not. - - - Examples - - - `a.num.is(0)` → `true` - - - `a.num.is(NaN)` → `false` - - - `a.num.is(1.1)` → `true` - - - `a.num.is(Infinity)` → `true` - -- **ify** `a.num.ify(what, opt)` - - - what is the number, text, whatever that needs to be converted into a - number. - - - opt is options parameter. - - - `[]` indicates you want a list of numbers returned. - - - Examples - - - `a.num.ify("A37")` → `37` - - - `a.num("It is -22.7 degrees").ify()` → `-22.7` - - - `a.num("My values are 33, -2.2, and 6.").ify([])` → `[33, -2.2, 6]` - -- **random** `a.num.random(what)` or `a.num.r(what)` - - - if what is a number, it represents how many digits long you want your - random number. - - - if what is a list, it represents the inclusive range you want your - random number to be in. - - - *Note:* Maximum length is 14, what defaults to 6. - - - Examples - - - `a.num.random()` → `583587` - - - `a.num(2).r()` → `64` - - - `a.num([-10,10]).random()` → `-7` - - - `a.num.r([1,99])` → `99` - -Text -==== - -- **is** `a.text.is(what)` - - - determines to see if what is text or not. - - - Examples - - - `a.text.is("")` → `true` - - - `a.text.is([])` → `false` - - - `a.text.is("Hello World!")` → `true` - -- **ify** `a.text.ify(what)` - - - what is the number, text, list, object, whatever you want to turn into - text. - - - *Note:* Essentially just a wrapper for `JSON.stringify()` for now. - - - Examples - - - `a.text.ify({a:0,b:'1',c:[0,'1'],d:{e:'f'}})` → - `"{a:0,b:'1',c:[0,'1'],d:{e:'f'}}"` - -- **random** `a.text.random(what, length)` or `a.text.r(what, length)` - - - what is a text of allowed characters to be used. Defaults to - alpha-numeric characters. - - - length is how many characters long you want your random text. Defaults - to 16. - - - *Note:* Does not matter what order you call the parameters in. - - - Examples - - - `a.text.random()` → `"uTkphuTCmzQ7Pl3e"` - - - `a.text.r("AaSsDdFf",4)` → `"fDds"` - - - `a.text(4).random("j$k4")` → `"kj$k"` - - - `a.text("randomize").r()` → `"oadomneradnimarz"` - -- **clip** `a.text(what).clip(split, start, end)` - - - what is the text to clip. - - - split is the text or regex to split and rejoin upon. - - - start is the start position of the slice. - - - end is the end position of the slice. - - - Examples - - - `a.text('A B C D').clip(' ',0,-1)` → `"A B C"` - - - `a.text.clip("path/to/awesome.js",'.',-1)` → `"js"` - -- **caps** `a.text.caps(what)` - - - what is the text you want to capitalize. - - - Examples - - - `a.text.caps("shout1")` → `"SHOUT1"` - -- **low** `a.text.low(what)` - - - what is the text you want to make lower case. - - - Examples - - - `a.text.low("HUSH!")` → `"hush!"` - -- **find** a collection of Regular Expressions. - - - *Note:* No guarantee of these working or being available in future - versions. - -Lists -===== - -- **is** `a.list.is(what)` - - - determines to see if what is a list or not. - - - Examples - - - `a.list.is([])` → `true` - - - `a.list.is("list")` → `false` - - - `a.list.is([0,false])` → `true` - -- **ify** `a.list.ify(what, opt)` - - - what is the text or object that you want to convert into a list. - - - opt is the options parameter. - - - split: what to divide upon for text, whitespace auto handled. `','` - is default. - - - wedge: what token to use as the divider between an object’s key and - value. `':'` default. - - - Examples - - - `a.list.ify("Bob, Joe,Isaac , Fred")` → - `["Bob","Joe","Isaac","Fred"]` - - - `a.list({a:1,b:'c',d:[1,2,3]}).ify()` → `['a:1','b:c','d:0,1,2']` - - - `a.list({session:'AK41795'}).ify({wedge:'='})` → - `['session=AK41795']` - - - `a.list.ify("1,2,3 ; 4,5,6",{split:';'})` → `["1,2,3", "4,5,6"]` - -- **at** `a.list.at(what, index, opt)` - - - what is the list you want to access. - - - index is the where in the list you want to retrieve the value. - - - opt is the options parameter. - - - ebb: causes an over reaching index to cascade till it finds the - closest item. - - - Examples - - - `a.list.at([5,6,7,8,9],-2)` → `8` - - - `a.list([5,6,7,8,9]).at(2)` → `6` - - - `a.list.at([2,3,4],9,{ebb:true})` → `4` - - - `a.list([0,1,2]).at(-9,{ebb:true})` → `0` - - - `a.list.at([5,6,7],-2,{ebb:true})` → `6` - -- **fuse** `a.list.fuse(what, ...)` - - - what is the list that other lists will fuse into. - - - … any number of extra list parameters. - - - Examples - - - `a.list.fuse([2,3],[4,5],[6,7])` → `[2,3,4,5,6,7]` - - - `a.list([2,3]).fuse([3,4],[4,5])` → `[2,3,3,4,4,5]` - -- **less** `a.list.less(what, ...)` - - - what is the list you want to subtract items from. - - - … the items you want to remove from the list, - - - Examples - - - `a.list.less([0,1,false,'a',false],false)` → `[0,1,'a']` - - - `a.list([2,2,7,['a'],1,9,0,31]).less(0,['a'],2)` → `[7, 1, 9, 31]` - - - *Note:* An option to pass a list of items to be removed exists by - indicating you only want `2` parameters, such that - `a.list(2).less([0,1,2,2,3,4],[0,2])` → `[1,3,4]`. - -- **find** `a.list.find(list, what)` - - - list is the list you want to search. - - - what is the item you are looking for. - - - Examples - - - `a.list([4,5]).find(9)` → `0` - - - `a.list([4,5]).find(5)` → `2` - - - `a.list.find([4,5],4)` → `1` - -- **each** `a.list.each(list, function, this)` - - - list is the list you want to iterate through each of its items. - - - function is your callback which gets executed sequentially, on each - item. - - - the first parameter is the current item’s value. - - - the second parameter is the current index of that value in the list. - - - the third parameter is a map function, which when called pushes its - argument into a list that is returned by default by `each`. - - - `return;` or `return undefined;` immediately proceeds to the next - item. - - - return anything else and the loop breaks, then `each` returns the - value you returned instead. - - - this is an optional argument that will become the `this` inside the - function. - - - Examples - - - `a.list([1,2,3]).each(function(val, i, map){ map(val + i) })` → `[2, - 4, 6]` - - - `a.list([1,2,3]).each(function(){ return "Hello World!"; })` → - `"Hello World!"` - - - `a.list([1,2,3]).each(function(val, i, map){ if(val == 2){ return } - map(val); })` → `[1,3]` - - - `a.list([1,2,3]).each(function(val, i, map){ map(val); if(val == 2){ - return val } })` → `2` - - - `a.list([{name:'joe',age:27},{name:'bob',age:42}]).each(function(val, - i, map){ map(val.name) })` → `['joe','bob']` - - - `a.list(['a','b','c']).each(function(){ return this })` → `// - current context` - - - `a.list(['a','b','c']).each(function(){ return this }, {z:1})` → - `{z:1}` - -Notes ------ - -Theory uses lists and index notation, not arrays and offset notation. Offset -notation is the common practice of describing the position of an element in an -array by its corresponding location in the physically allocated space of -contiguous memory, which logically starts at a zeroth initial. This is otherwise -shortened to "0 based index arrays", despite the misnomer of it actually being -an offset. The author of this library has chosen index notation instead because -it offers the following advantages: - -1. Naturally, the first element in a list cardinally corresponds to `1`. - Contrarily, even official documentation of JavaScript has explicit - disclaimers that the "first element of an array is actually at index 0" - - this is easily forgotten, especially by novices, and can lead to errors. - -2. Mathematically, a closed interval is properly represented in code as `for(i - = 1; i <= items.length; i++)`, because it includes its endpoints. Offset - notation instead is technically a left-closed right-open interval set, - represented in code as `for(i = 0; i < items.length; i++)`. This matters - because code deals with integer intervals, because all elements have a fixed - size - you can not access a fractional part of an element. Integer intervals - are closed intervals, thus conclusively proving this importance. - -3. Mathematically, matrix notation also starts with `1`. - -4. The last element in a list cardinally corresponds to the length of the list, - thus allowing easy access with `items.length` rather than having frustrating - `(items.length - 1)` arithmetic everywhere in your code. - -5. Negative indices are symmetric with positive indices. Such that `-1` and `1` - respectively refer to the last and first element, and in the case where - there is only one item in the list, it matches the same element. This - convenience allows for simple left and right access that offset notation - does not provide. - -6. Non existence of an element can be represented by `0`, which would - conveniently code elegantly as `if( !items.indexOf('z') ) return;`. Rather, - one must decide upon whether `if( items.indexOf('z') == -1 ) return;` is - philosophically more meaningful than `if( items.indexOf('z') < 0 ) return;` - with offset notation despite ignoring the asymmetry of the equation. - -Still irrational? Then switch it back via `a.list.index = 0` in your closure. - -Objects -======= - -- **is** `a.obj.is(what)` - - - determines to see if what is an object or not. - - - Examples - - - `a.obj.is({})` → `true` - - - `a.obj.is(function(){})` → `false` - - - `a.obj.is([])` → `false` - -- **ify** `a.obj.ify(what)` - - - what is the text-ified object you want to parse into an object. - - - *Note:* Essentially just a wrapper for `JSON.parse()` for now. - - - Examples - - - `a.obj.ify('[0,1]')` → `[0,1]` - - - `a.obj('{"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}').ify()` → - `{"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}` - -- **has** `a.obj.has(what, key)` - - - what is the object you want to test the existence of a key or property - on. - - - key is the property you want to see if exists in what. - - - Examples - - - `a.obj.has({yay:false},'yay')` → `true` - - - `a.obj({yay:false}).has('toString')` → `false` - -- **empty** `a.obj.empty(what)` - - - what is the object you want to test to see if it is empty. - - - Examples - - - `a.obj.empty({})` → `true` - - - `a.obj({a:0}).empty()` → `false` - -- **copy** `a.obj.copy(what)` - - - what is the object or list that you want to make a deep duplicate of. - - - Examples - - - `a.obj.copy({a:[0,1],b:function(){ return 1 }})` → - `{a:[0,1],b:function(){ return 1 }}` - - - `a.obj([{a:1},{b:2}]).copy()` → `[{a:1},{b:2}]` - -- **union** `a.obj.union(what, ...)` or `a.obj(what).u(...)` - - - what is the object you want to merge into, or a list of objects to - merge. - - - ... are more objects to be merged. - - - *Note:* You can provide a list of objects instead, which will be merged. - - - Examples - - - `a.obj.union({a:'b',c:'d'},{c:1,z:2})` → `{a:'b',c:'d',z:2}` - - - `a.obj([{a:1},{b:2}]).union()` → `{a:1,b:2}` - - - `a.obj({a:'b',c:'d'}).u({c:1,z:2},{x:3,y:4})` → - `{a:'b',c:'d',x:3,y:4,z:2}` - - - `a.obj.u([{a:1,b:2},{b:3,x:4},{y:5}])` → `{a:1,b:2,x:4,y:5}` - -- **get** `a.obj.get(what, where)` or `a(what, where)` - - - what is the object you want to get something from. - - - where is a dot separated text of keys to the thing you want to get. - - - numbers indicate a list index, if not specified it will scan through - the list. - - - "-\>" postfix indicates you will be calling a function, but if not - found it will return a fail safe function. - - - *Note:* Warning, fails if the property name itself contains a '.' dot in - it. - - - Examples - - - `a.obj.get({a:4,b:6,c:8},'b')` → `6` - - - `a.obj({a:4,b:6,c:8}).get('z')` → `undefined` - - - `a.obj({a:{z:{b:{y:{c:{x:'deep'}}}}}}).get('a.z.b.y.c.x')` → - `'deep'` - - - `a.obj({a:[1,[2,{b:{c:'scan'}},3],4]}).get('a.b.c')` → `'scan'` - - - `a.obj({a:[1,{b:'index'},3]}).get('a.2.b')` → `'index'` - - - `a.obj({a:[1,{b:'index'},3]}).get('a.-2.b')` → `'index'` - - - `a.obj({a:{b:function(c){return c*c}}}).get('a.b->')(2)` → `4` - - - `a.obj({a:1}).get('a.b->')(2)` → `undefined // fail safe` - - - `a.obj({a:1}).get('a.b')(2)` → `TypeError: undefined is not a - function` - -- **each** `a.obj.each(object, function, this)` - - - object is the object you want to iterate through each of its key/value - pairs. - - - function is your callback which gets executed on each pair. - - - the first parameter is the current value. - - - the second parameter is the key of the value in the object. - - - the third parameter is a map function, which when called adds a - key/value pair to the object that is returned by default by `each`. - - - `return;` or `return undefined;` immediately proceeds to the next - pair. - - - return anything else and the loop breaks, then `each` returns the - value you returned instead. - - - this is an optional argument that will become the `this` inside the - function. - - - Examples - - - `a.obj({a:'z',b:'y'}).each(function(val, key, map){ map(val,key) })` - → `{y:'b',z:'a'}` - - - `a.obj({a:'z',b:'y'}).each(function(){ return "Hello World!"; })` → - `"Hello World!"` - - - `a.obj({a:1,b:2,c:3}).each(function(val, key, map){ if(val == 2){ - return } map(key,val); })` → `{a:1,c:3}` - - - `a.obj({a:1,b:2,c:3}).each(function(val, key, map){ map(key,val); - if(val == 2){ return val } })` → `2` - - - `a.obj({z:4}).each(function(){ return this })` → `// current - context` - - - `a.obj({z:4}).each(function(){ return this }, [1,2])` → `[1,2]` - -Functions -========= - -- **is** `a.fns.is(what)` - - - determines to see if what is a function or not. - - - Examples - - - `a.fns.is(function(){})` → `true` - - - `a.fns.is({})` → `false` - -- **pass** `a.fns.pass(function, this)` - - - function is the function that you want this bound to. - - - this will become the `this` inside the function. - - - *Note:* The original function is returned for you to then immediately - call. - - - Examples - - - `a.fns.pass(function(z){ return this.b + z },{b:1})(2)` → `3` - - - `a.fns(function(z){ return this.b + z }).pass({b:2})(3)` → `5` - -- **sort** `a.fns.sort(what)` - - - what is the arguments object of the function you want sorted. - - - *Note:* An object containing the first letter of each type is returned. - The value of these keys is a list with the corresponding arguments of - that type, in the same order as they appeared in the original function - call. - - - *Note:* If something goes wrong, an error type is included, with a text - value explaining why. - - - Examples - - - `(function(){ return a.fns.sort(arguments) })("a",0,"b",1,{z:2})` → - `{b:[],n:[0,1],t:['a','b'],l:[],o:[{z:2}],f:[]}` - - - `a.fns.sort()` → `{e:"Empty"}` - -- **flow** `a.fns.flow(what, function)` - - - what is a sequential list of functions to asynchronously iterate - through. - - - the last parameter of each function is the next function in the - list. - - - at any point, the flow can be canceled by calling `.end()` on the - last parameter. - - - function is the callback to be executed at the end of the operations. - - - Examples - - - `a.fns.flow([function(next){ next(6) },function(six, next){ next(six - / 3) }],function(two){ alert(two) })` - - - `a.fns.flow([function(next){ next.end(2) },function(){ /* skipped */ - }],function(two){ alert(two) })` - -Events -====== - -- **event** `a.on(what).event(function)` - - - what is a string name of the event you want to listen on. - - - function is the callback function that will be called when the event is - emitted. - - - the `this` object of the callback is the listener object. - - - returns the listener, which you can call `.off()` on to stop receiving - events. - - - Examples - - - `a.on('alarm').event(function(task){ alert('Remember to ' + task); - this.off(); })` - -- **emit** `a.on(what).emit(data, ...)` - - - what is a string name of the event you want to emit on. - - - data and ... are your parameters to emit to the receivers. - - - Examples - - - `a.on('alarm').emit('exercise!')` - -Time -==== - -- **is** `a.time.is()` - - - timestamp wrapper for `new Date().getTime()`, but if a parameter is - provided it will test if it is an instance of `Date`. - - - Examples - - - `a.time.is()` → `1357457565462` - - - `a.time(new Date()).is()` → `true` - -- **now** `a.time.now()` - - - hyper precise timestamp, up to four decimals longer than the above. - - - Examples - - - `a.time.now()` → `1357457866774.292` - -- **loop** `a.time.loop(function, interval)` - - - repeatedly calls function every interval millisecond, wrapper for - `setInterval`. - - - *Note:* Does not matter what order you call the parameters in. - - - Examples - - - `a.time.loop(function(){ alert('loop') },1000)` → `// returns ID for - clearing` - -- **wait** `a.time.wait(function, delay)` - - - calls function after waiting millisecond delay, wrapper for - `setTimeout`. - - - *Note:* Does not matter what order you call the parameters in. - - - Examples - - - `a.time.wait(1000,function(){ alert('wait') })` → `// returns ID for - clearing` - -- **stop** `a.time.stop(ID)` - - - stops the wait or loop associated with the ID from further being - executed. - - - Examples - - - `a.time.stop(1111)` → `true` - -Tests -===== - -- **is** `a.test.is(what, thing)` - - - what is what you want to compare equivalency against thing. - - - thing is the thing you want to compare equivalency to what. - - - Examples - - - `a.test.is({a:1,b:'c',d:{f:function(){return - false}}},{a:1,b:'c',d:{f:function(){return false}}})` → `true` - - - `a.test(NaN).is(NaN)` → `true` - - - `a.test.is(function(){return true},function(){ return true; })` → - `false` - - - `a.test(undefined).is(null)` → `false` - -- **test** `a.test(function)()` - - - function is the function that might break, and you want to test. - - - *Note:* all this does is wrap it in a `try{}catch(){}` block. - - - Examples - - - `a.test(function(){ explode_with_spam })()` → `// error object` - - - `a.test(function(){ return 'ok'; })()` → `'ok'` - -Run them! Using mocha, just `mocha` with Node or `./test/mocha.html` in any -browser. - -Crafted with love by Mark Nadal, whom is not responsible for any liabilities -from the use of this code. diff --git a/node_modules/theory/package.json b/node_modules/theory/package.json deleted file mode 100644 index 57d82bfd..00000000 --- a/node_modules/theory/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "theory", - "version": "0.2.6", - "author": { - "name": "Mark Nadal" - }, - "description": "Abstraction layer for server side and client side JavaScript.", - "homepage": "http://github.com/amark/theory", - "engines": [ - "node >= 0.6.6" - ], - "main": "theory", - "readme": "Theory\n======\n\nTheory is an abstraction layer for server side and client side JavaScript.\n\nMotivation\n==========\n\n1. **Deep existence**. It all started because a program would crash via\n `if(obj.x.y.z)` rather than `if(obj && obj.x && obj.x.y && obj.x.y.z)`, so I\n wanted an elegant way to check and access deeply nested objects in a safe\n yet concise manner.\n\n2. **Dependency management**. You should not have to declare dependencies in\n another language (HTML) to import required code or rely on globals. Other\n tools that solve this foolishly break Node's style in order to make it work\n asynchronously.\n\n3. **Universal normalization**. Write once, run everywhere. This dream gets\n broken when you discover different implementations of JavaScript behave in\n unique ways, whether browsers or phones and tablets, or IE6 versus server\n side. I needed a reliable yet tiny library (at **7KB** gzipped) that would\n normalize everything so any code written would literally work everywhere.\n\nRequire\n=======\n\nAs simple as `npm install theory` on Node and a single `` client side. The brilliant thing is that you do not\nhave to declare anything else after that, you can handle the rest within your\nmodule.\n\n\tmodule.exports=require('theory')\n\t('hello', function(a){\n\t\t\n\t\tvar say = \"Hello World!\";\n\t\tconsole.log(say);\n\t\treturn say;\n\t\t\n\t}, ['./needed', './dependency']);\n\nThis is the beautiful fix that works everywhere. You get your own closure which\nexecutes only after all your dependencies (and all of their sub-dependencies)\nhave loaded - then whatever you return from your closure gets exported out!\n\nSay you name this file as 'world.js', all you have to do is run `node world.js`\non the server or put `require('world')` on the client inside the 'theory.js'\nscript tag (or have a normal 'world.js' script tag below theory.js). All\ndependencies are relative to your file, not the HTML page or the parent module!\n\nIf the dependency you require uses some global variable, you can access it from\nthere (such as `jQuery`) as usual. You can access `theory` as a global, but you\nshould not use it globally - theory copies itself into the scope of each module\n(the `a` argument, henceforth used for the rest of this documentation).\n\nAll dependencies that use exports (normal Node modules and theory specific\nmodules) get attached to your module's local scope with their base filename\n(`a.needed` and `a.dependency` in the example above). If you have conflicting\nnames or just want a different name then use an object to declare dependencies\ninstead of an array (`{'./needed': 'foo', './dependency': 'bar'}` become `a.foo`\nand `a.bar`). Theory modules also attach to their own namespace, such as\n`theory.hello` in above.\n\nYou can also specify sub dependencies, such as `{'./jquery':['./jquery-ui',\n'./jquery-ext']}`. Define environment specific dependencies by checking for\n`root.page` or `root.node`. Finally, [imports.js](https://gist.github.com/amark/6291429) \nis an unmaintained version of just the require feature, without anything below.\n\n*Now let's dive into the API.*\n\nBinary\n======\n\n- **is** `a.bi.is(what)`\n\n - determines to see if what is a boolean or not.\n\n - Examples\n\n - `a.bi.is(false)` → `true`\n\n - `a.bi.is(true)` → `true`\n\n - `a.bi.is(0)` → `false`\n\n - `a.bi.is('yes')` → `false`\n\nNumbers\n=======\n\n- **is** `a.num.is(what)`\n\n - determines to see if what is a number or not.\n\n - Examples\n\n - `a.num.is(0)` → `true`\n\n - `a.num.is(NaN)` → `false`\n\n - `a.num.is(1.1)` → `true`\n\n - `a.num.is(Infinity)` → `true`\n\n- **ify** `a.num.ify(what, opt)`\n\n - what is the number, text, whatever that needs to be converted into a\n number.\n\n - opt is options parameter.\n\n - `[]` indicates you want a list of numbers returned.\n\n - Examples\n\n - `a.num.ify(\"A37\")` → `37`\n\n - `a.num(\"It is -22.7 degrees\").ify()` → `-22.7`\n\n - `a.num(\"My values are 33, -2.2, and 6.\").ify([])` → `[33, -2.2, 6]`\n\n- **random** `a.num.random(what)` or `a.num.r(what)`\n\n - if what is a number, it represents how many digits long you want your\n random number.\n\n - if what is a list, it represents the inclusive range you want your\n random number to be in.\n\n - *Note:* Maximum length is 14, what defaults to 6.\n\n - Examples\n\n - `a.num.random()` → `583587`\n\n - `a.num(2).r()` → `64`\n\n - `a.num([-10,10]).random()` → `-7`\n\n - `a.num.r([1,99])` → `99`\n\nText\n====\n\n- **is** `a.text.is(what)`\n\n - determines to see if what is text or not.\n\n - Examples\n\n - `a.text.is(\"\")` → `true`\n\n - `a.text.is([])` → `false`\n\n - `a.text.is(\"Hello World!\")` → `true`\n\n- **ify** `a.text.ify(what)`\n\n - what is the number, text, list, object, whatever you want to turn into\n text.\n\n - *Note:* Essentially just a wrapper for `JSON.stringify()` for now.\n\n - Examples\n\n - `a.text.ify({a:0,b:'1',c:[0,'1'],d:{e:'f'}})` →\n `\"{a:0,b:'1',c:[0,'1'],d:{e:'f'}}\"`\n\n- **random** `a.text.random(what, length)` or `a.text.r(what, length)`\n\n - what is a text of allowed characters to be used. Defaults to\n alpha-numeric characters.\n\n - length is how many characters long you want your random text. Defaults\n to 16.\n\n - *Note:* Does not matter what order you call the parameters in.\n\n - Examples\n\n - `a.text.random()` → `\"uTkphuTCmzQ7Pl3e\"`\n\n - `a.text.r(\"AaSsDdFf\",4)` → `\"fDds\"`\n\n - `a.text(4).random(\"j$k4\")` → `\"kj$k\"`\n\n - `a.text(\"randomize\").r()` → `\"oadomneradnimarz\"`\n\n- **clip** `a.text(what).clip(split, start, end)`\n\n - what is the text to clip.\n\n - split is the text or regex to split and rejoin upon.\n\n - start is the start position of the slice.\n\n - end is the end position of the slice.\n\n - Examples\n\n - `a.text('A B C D').clip(' ',0,-1)` → `\"A B C\"`\n\n - `a.text.clip(\"path/to/awesome.js\",'.',-1)` → `\"js\"`\n\n- **caps** `a.text.caps(what)`\n\n - what is the text you want to capitalize.\n\n - Examples\n\n - `a.text.caps(\"shout1\")` → `\"SHOUT1\"`\n\n- **low** `a.text.low(what)`\n\n - what is the text you want to make lower case.\n\n - Examples\n\n - `a.text.low(\"HUSH!\")` → `\"hush!\"`\n\n- **find** a collection of Regular Expressions.\n\n - *Note:* No guarantee of these working or being available in future\n versions.\n\nLists\n=====\n\n- **is** `a.list.is(what)`\n\n - determines to see if what is a list or not.\n\n - Examples\n\n - `a.list.is([])` → `true`\n\n - `a.list.is(\"list\")` → `false`\n\n - `a.list.is([0,false])` → `true`\n\n- **ify** `a.list.ify(what, opt)`\n\n - what is the text or object that you want to convert into a list.\n\n - opt is the options parameter.\n\n - split: what to divide upon for text, whitespace auto handled. `','`\n is default.\n\n - wedge: what token to use as the divider between an object’s key and\n value. `':'` default.\n\n - Examples\n\n - `a.list.ify(\"Bob, Joe,Isaac , Fred\")` →\n `[\"Bob\",\"Joe\",\"Isaac\",\"Fred\"]`\n\n - `a.list({a:1,b:'c',d:[1,2,3]}).ify()` → `['a:1','b:c','d:0,1,2']`\n\n - `a.list({session:'AK41795'}).ify({wedge:'='})` →\n `['session=AK41795']`\n\n - `a.list.ify(\"1,2,3 ; 4,5,6\",{split:';'})` → `[\"1,2,3\", \"4,5,6\"]`\n\n- **at** `a.list.at(what, index, opt)`\n\n - what is the list you want to access.\n\n - index is the where in the list you want to retrieve the value.\n\n - opt is the options parameter.\n\n - ebb: causes an over reaching index to cascade till it finds the\n closest item.\n\n - Examples\n\n - `a.list.at([5,6,7,8,9],-2)` → `8`\n\n - `a.list([5,6,7,8,9]).at(2)` → `6`\n\n - `a.list.at([2,3,4],9,{ebb:true})` → `4`\n\n - `a.list([0,1,2]).at(-9,{ebb:true})` → `0`\n\n - `a.list.at([5,6,7],-2,{ebb:true})` → `6`\n\n- **fuse** `a.list.fuse(what, ...)`\n\n - what is the list that other lists will fuse into.\n\n - … any number of extra list parameters.\n\n - Examples\n\n - `a.list.fuse([2,3],[4,5],[6,7])` → `[2,3,4,5,6,7]`\n\n - `a.list([2,3]).fuse([3,4],[4,5])` → `[2,3,3,4,4,5]`\n\n- **less** `a.list.less(what, ...)`\n\n - what is the list you want to subtract items from.\n\n - … the items you want to remove from the list,\n\n - Examples\n\n - `a.list.less([0,1,false,'a',false],false)` → `[0,1,'a']`\n\n - `a.list([2,2,7,['a'],1,9,0,31]).less(0,['a'],2)` → `[7, 1, 9, 31]`\n\n - *Note:* An option to pass a list of items to be removed exists by\n indicating you only want `2` parameters, such that\n `a.list(2).less([0,1,2,2,3,4],[0,2])` → `[1,3,4]`.\n\n- **find** `a.list.find(list, what)`\n\n - list is the list you want to search.\n\n - what is the item you are looking for.\n\n - Examples\n\n - `a.list([4,5]).find(9)` → `0`\n\n - `a.list([4,5]).find(5)` → `2`\n\n - `a.list.find([4,5],4)` → `1`\n\n- **each** `a.list.each(list, function, this)`\n\n - list is the list you want to iterate through each of its items.\n\n - function is your callback which gets executed sequentially, on each\n item.\n\n - the first parameter is the current item’s value.\n\n - the second parameter is the current index of that value in the list.\n\n - the third parameter is a map function, which when called pushes its\n argument into a list that is returned by default by `each`.\n\n - `return;` or `return undefined;` immediately proceeds to the next\n item.\n\n - return anything else and the loop breaks, then `each` returns the\n value you returned instead.\n\n - this is an optional argument that will become the `this` inside the\n function.\n\n - Examples\n\n - `a.list([1,2,3]).each(function(val, i, map){ map(val + i) })` → `[2,\n 4, 6]`\n\n - `a.list([1,2,3]).each(function(){ return \"Hello World!\"; })` →\n `\"Hello World!\"`\n\n - `a.list([1,2,3]).each(function(val, i, map){ if(val == 2){ return }\n map(val); })` → `[1,3]`\n\n - `a.list([1,2,3]).each(function(val, i, map){ map(val); if(val == 2){\n return val } })` → `2`\n\n - `a.list([{name:'joe',age:27},{name:'bob',age:42}]).each(function(val,\n i, map){ map(val.name) })` → `['joe','bob']`\n\n - `a.list(['a','b','c']).each(function(){ return this })` → `//\n current context`\n\n - `a.list(['a','b','c']).each(function(){ return this }, {z:1})` →\n `{z:1}`\n\nNotes\n-----\n\nTheory uses lists and index notation, not arrays and offset notation. Offset\nnotation is the common practice of describing the position of an element in an\narray by its corresponding location in the physically allocated space of\ncontiguous memory, which logically starts at a zeroth initial. This is otherwise\nshortened to \"0 based index arrays\", despite the misnomer of it actually being\nan offset. The author of this library has chosen index notation instead because\nit offers the following advantages:\n\n1. Naturally, the first element in a list cardinally corresponds to `1`.\n Contrarily, even official documentation of JavaScript has explicit\n disclaimers that the \"first element of an array is actually at index 0\" -\n this is easily forgotten, especially by novices, and can lead to errors.\n\n2. Mathematically, a closed interval is properly represented in code as `for(i\n = 1; i <= items.length; i++)`, because it includes its endpoints. Offset\n notation instead is technically a left-closed right-open interval set,\n represented in code as `for(i = 0; i < items.length; i++)`. This matters\n because code deals with integer intervals, because all elements have a fixed\n size - you can not access a fractional part of an element. Integer intervals\n are closed intervals, thus conclusively proving this importance.\n\n3. Mathematically, matrix notation also starts with `1`.\n\n4. The last element in a list cardinally corresponds to the length of the list,\n thus allowing easy access with `items.length` rather than having frustrating\n `(items.length - 1)` arithmetic everywhere in your code.\n\n5. Negative indices are symmetric with positive indices. Such that `-1` and `1`\n respectively refer to the last and first element, and in the case where\n there is only one item in the list, it matches the same element. This\n convenience allows for simple left and right access that offset notation\n does not provide.\n\n6. Non existence of an element can be represented by `0`, which would\n conveniently code elegantly as `if( !items.indexOf('z') ) return;`. Rather,\n one must decide upon whether `if( items.indexOf('z') == -1 ) return;` is\n philosophically more meaningful than `if( items.indexOf('z') < 0 ) return;`\n with offset notation despite ignoring the asymmetry of the equation.\n\nStill irrational? Then switch it back via `a.list.index = 0` in your closure.\n\nObjects\n=======\n\n- **is** `a.obj.is(what)`\n\n - determines to see if what is an object or not.\n\n - Examples\n\n - `a.obj.is({})` → `true`\n\n - `a.obj.is(function(){})` → `false`\n\n - `a.obj.is([])` → `false`\n\n- **ify** `a.obj.ify(what)`\n\n - what is the text-ified object you want to parse into an object.\n\n - *Note:* Essentially just a wrapper for `JSON.parse()` for now.\n\n - Examples\n\n - `a.obj.ify('[0,1]')` → `[0,1]`\n\n - `a.obj('{\"a\":false,\"b\":1,\"c\":\"d\",\"e\":[0,1],\"f\":{\"g\":\"h\"}}').ify()` →\n `{\"a\":false,\"b\":1,\"c\":\"d\",\"e\":[0,1],\"f\":{\"g\":\"h\"}}`\n\n- **has** `a.obj.has(what, key)`\n\n - what is the object you want to test the existence of a key or property\n on.\n\n - key is the property you want to see if exists in what.\n\n - Examples\n\n - `a.obj.has({yay:false},'yay')` → `true`\n\n - `a.obj({yay:false}).has('toString')` → `false`\n\n- **empty** `a.obj.empty(what)`\n\n - what is the object you want to test to see if it is empty.\n\n - Examples\n\n - `a.obj.empty({})` → `true`\n\n - `a.obj({a:0}).empty()` → `false`\n\n- **copy** `a.obj.copy(what)`\n\n - what is the object or list that you want to make a deep duplicate of.\n\n - Examples\n\n - `a.obj.copy({a:[0,1],b:function(){ return 1 }})` →\n `{a:[0,1],b:function(){ return 1 }}`\n\n - `a.obj([{a:1},{b:2}]).copy()` → `[{a:1},{b:2}]`\n\n- **union** `a.obj.union(what, ...)` or `a.obj(what).u(...)`\n\n - what is the object you want to merge into, or a list of objects to\n merge.\n\n - ... are more objects to be merged.\n\n - *Note:* You can provide a list of objects instead, which will be merged.\n\n - Examples\n\n - `a.obj.union({a:'b',c:'d'},{c:1,z:2})` → `{a:'b',c:'d',z:2}`\n\n - `a.obj([{a:1},{b:2}]).union()` → `{a:1,b:2}`\n\n - `a.obj({a:'b',c:'d'}).u({c:1,z:2},{x:3,y:4})` →\n `{a:'b',c:'d',x:3,y:4,z:2}`\n\n - `a.obj.u([{a:1,b:2},{b:3,x:4},{y:5}])` → `{a:1,b:2,x:4,y:5}`\n\n- **get** `a.obj.get(what, where)` or `a(what, where)`\n\n - what is the object you want to get something from.\n\n - where is a dot separated text of keys to the thing you want to get.\n\n - numbers indicate a list index, if not specified it will scan through\n the list.\n\n - \"-\\>\" postfix indicates you will be calling a function, but if not\n found it will return a fail safe function.\n\n - *Note:* Warning, fails if the property name itself contains a '.' dot in\n it.\n\n - Examples\n\n - `a.obj.get({a:4,b:6,c:8},'b')` → `6`\n\n - `a.obj({a:4,b:6,c:8}).get('z')` → `undefined`\n\n - `a.obj({a:{z:{b:{y:{c:{x:'deep'}}}}}}).get('a.z.b.y.c.x')` →\n `'deep'`\n\n - `a.obj({a:[1,[2,{b:{c:'scan'}},3],4]}).get('a.b.c')` → `'scan'`\n\n - `a.obj({a:[1,{b:'index'},3]}).get('a.2.b')` → `'index'`\n\n - `a.obj({a:[1,{b:'index'},3]}).get('a.-2.b')` → `'index'`\n\n - `a.obj({a:{b:function(c){return c*c}}}).get('a.b->')(2)` → `4`\n\n - `a.obj({a:1}).get('a.b->')(2)` → `undefined // fail safe`\n\n - `a.obj({a:1}).get('a.b')(2)` → `TypeError: undefined is not a\n function`\n\n- **each** `a.obj.each(object, function, this)`\n\n - object is the object you want to iterate through each of its key/value\n pairs.\n\n - function is your callback which gets executed on each pair.\n\n - the first parameter is the current value.\n\n - the second parameter is the key of the value in the object.\n\n - the third parameter is a map function, which when called adds a\n key/value pair to the object that is returned by default by `each`.\n\n - `return;` or `return undefined;` immediately proceeds to the next\n pair.\n\n - return anything else and the loop breaks, then `each` returns the\n value you returned instead.\n\n - this is an optional argument that will become the `this` inside the\n function.\n\n - Examples\n\n - `a.obj({a:'z',b:'y'}).each(function(val, key, map){ map(val,key) })`\n → `{y:'b',z:'a'}`\n\n - `a.obj({a:'z',b:'y'}).each(function(){ return \"Hello World!\"; })` →\n `\"Hello World!\"`\n\n - `a.obj({a:1,b:2,c:3}).each(function(val, key, map){ if(val == 2){\n return } map(key,val); })` → `{a:1,c:3}`\n\n - `a.obj({a:1,b:2,c:3}).each(function(val, key, map){ map(key,val);\n if(val == 2){ return val } })` → `2`\n\n - `a.obj({z:4}).each(function(){ return this })` → `// current\n context`\n\n - `a.obj({z:4}).each(function(){ return this }, [1,2])` → `[1,2]`\n\nFunctions\n=========\n\n- **is** `a.fns.is(what)`\n\n - determines to see if what is a function or not.\n\n - Examples\n\n - `a.fns.is(function(){})` → `true`\n\n - `a.fns.is({})` → `false`\n\n- **pass** `a.fns.pass(function, this)`\n\n - function is the function that you want this bound to.\n\n - this will become the `this` inside the function.\n\n - *Note:* The original function is returned for you to then immediately\n call.\n\n - Examples\n\n - `a.fns.pass(function(z){ return this.b + z },{b:1})(2)` → `3`\n\n - `a.fns(function(z){ return this.b + z }).pass({b:2})(3)` → `5`\n\n- **sort** `a.fns.sort(what)`\n\n - what is the arguments object of the function you want sorted.\n\n - *Note:* An object containing the first letter of each type is returned.\n The value of these keys is a list with the corresponding arguments of\n that type, in the same order as they appeared in the original function\n call.\n\n - *Note:* If something goes wrong, an error type is included, with a text\n value explaining why.\n\n - Examples\n\n - `(function(){ return a.fns.sort(arguments) })(\"a\",0,\"b\",1,{z:2})` →\n `{b:[],n:[0,1],t:['a','b'],l:[],o:[{z:2}],f:[]}`\n\n - `a.fns.sort()` → `{e:\"Empty\"}`\n\n- **flow** `a.fns.flow(what, function)`\n\n - what is a sequential list of functions to asynchronously iterate\n through.\n\n - the last parameter of each function is the next function in the\n list.\n\n - at any point, the flow can be canceled by calling `.end()` on the\n last parameter.\n\n - function is the callback to be executed at the end of the operations.\n\n - Examples\n\n - `a.fns.flow([function(next){ next(6) },function(six, next){ next(six\n / 3) }],function(two){ alert(two) })`\n\n - `a.fns.flow([function(next){ next.end(2) },function(){ /* skipped */\n }],function(two){ alert(two) })`\n\nEvents\n======\n\n- **event** `a.on(what).event(function)`\n\n - what is a string name of the event you want to listen on.\n\n - function is the callback function that will be called when the event is\n emitted.\n\n - the `this` object of the callback is the listener object.\n\n - returns the listener, which you can call `.off()` on to stop receiving\n events.\n\n - Examples\n\n - `a.on('alarm').event(function(task){ alert('Remember to ' + task);\n this.off(); })`\n\n- **emit** `a.on(what).emit(data, ...)`\n\n - what is a string name of the event you want to emit on.\n\n - data and ... are your parameters to emit to the receivers.\n\n - Examples\n\n - `a.on('alarm').emit('exercise!')`\n\nTime\n====\n\n- **is** `a.time.is()`\n\n - timestamp wrapper for `new Date().getTime()`, but if a parameter is\n provided it will test if it is an instance of `Date`.\n\n - Examples\n\n - `a.time.is()` → `1357457565462`\n\n - `a.time(new Date()).is()` → `true`\n\n- **now** `a.time.now()`\n\n - hyper precise timestamp, up to four decimals longer than the above.\n\n - Examples\n\n - `a.time.now()` → `1357457866774.292`\n\n- **loop** `a.time.loop(function, interval)`\n\n - repeatedly calls function every interval millisecond, wrapper for\n `setInterval`.\n\n - *Note:* Does not matter what order you call the parameters in.\n\n - Examples\n\n - `a.time.loop(function(){ alert('loop') },1000)` → `// returns ID for\n clearing`\n\n- **wait** `a.time.wait(function, delay)`\n\n - calls function after waiting millisecond delay, wrapper for\n `setTimeout`.\n\n - *Note:* Does not matter what order you call the parameters in.\n\n - Examples\n\n - `a.time.wait(1000,function(){ alert('wait') })` → `// returns ID for\n clearing`\n\n- **stop** `a.time.stop(ID)`\n\n - stops the wait or loop associated with the ID from further being\n executed.\n\n - Examples\n\n - `a.time.stop(1111)` → `true`\n\nTests\n=====\n\n- **is** `a.test.is(what, thing)`\n\n - what is what you want to compare equivalency against thing.\n\n - thing is the thing you want to compare equivalency to what.\n\n - Examples\n\n - `a.test.is({a:1,b:'c',d:{f:function(){return\n false}}},{a:1,b:'c',d:{f:function(){return false}}})` → `true`\n\n - `a.test(NaN).is(NaN)` → `true`\n\n - `a.test.is(function(){return true},function(){ return true; })` →\n `false`\n\n - `a.test(undefined).is(null)` → `false`\n\n- **test** `a.test(function)()`\n\n - function is the function that might break, and you want to test.\n\n - *Note:* all this does is wrap it in a `try{}catch(){}` block.\n\n - Examples\n\n - `a.test(function(){ explode_with_spam })()` → `// error object`\n\n - `a.test(function(){ return 'ok'; })()` → `'ok'`\n\nRun them! Using mocha, just `mocha` with Node or `./test/mocha.html` in any\nbrowser. \n \nCrafted with love by Mark Nadal, whom is not responsible for any liabilities\nfrom the use of this code.\n", - "readmeFilename": "README.md", - "_id": "theory@0.2.6", - "_from": "theory@~>0.2.6" -} diff --git a/node_modules/theory/test/a.js b/node_modules/theory/test/a.js deleted file mode 100644 index 01b18ae5..00000000 --- a/node_modules/theory/test/a.js +++ /dev/null @@ -1,6 +0,0 @@ -describe('seq',function(){ - it('a',function(){ - expect(root.Dep).to.be.ok(); - }); -}); -root.DepA = 2; \ No newline at end of file diff --git a/node_modules/theory/test/all.js b/node_modules/theory/test/all.js deleted file mode 100644 index 1c9c418a..00000000 --- a/node_modules/theory/test/all.js +++ /dev/null @@ -1,7 +0,0 @@ -/* -** tests have relative paths to theory, -** although you should always use theory as an installed module -*/ - -var expect = global.expect = require("./expect"); -require('./common'); \ No newline at end of file diff --git a/node_modules/theory/test/amd.html b/node_modules/theory/test/amd.html deleted file mode 100644 index 13302348..00000000 --- a/node_modules/theory/test/amd.html +++ /dev/null @@ -1,38 +0,0 @@ - - - AMD Off - - - - - - - - - - - - - - Theory without AMD -
      -
      - - - \ No newline at end of file diff --git a/node_modules/theory/test/array_is.js b/node_modules/theory/test/array_is.js deleted file mode 100644 index 1cfad348..00000000 --- a/node_modules/theory/test/array_is.js +++ /dev/null @@ -1,33 +0,0 @@ -//alert('array is'); -describe('Lists',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('is()',function(){ - expect(theory.list([]).is()).to.be(true); - expect(theory.list([1]).is()).to.be(true); - expect(theory.list(0).is()).to.be(false); - expect(theory.list(1).is()).to.be(false); - expect(theory.list('').is()).to.be(false); - expect(theory.list('a').is()).to.be(false); - expect(theory.list({}).is()).to.be(false); - expect(theory.list({a:1}).is()).to.be(false); - expect(theory.list(false).is()).to.be(false); - expect(theory.list(true).is()).to.be(false); - expect(theory.list(function(){}).is()).to.be(false); - }); - it('is',function(){ - expect(theory.list.is([])).to.be(true); - expect(theory.list.is([1])).to.be(true); - expect(theory.list.is(0)).to.be(false); - expect(theory.list.is(1)).to.be(false); - expect(theory.list.is('')).to.be(false); - expect(theory.list.is('a')).to.be(false); - expect(theory.list.is({})).to.be(false); - expect(theory.list.is({a:1})).to.be(false); - expect(theory.list.is(false)).to.be(false); - expect(theory.list.is(true)).to.be(false); - expect(theory.list.is(function(){})).to.be(false); - }); -}); -root.ArrayIs = true; \ No newline at end of file diff --git a/node_modules/theory/test/array_util.js b/node_modules/theory/test/array_util.js deleted file mode 100644 index 45bfec21..00000000 --- a/node_modules/theory/test/array_util.js +++ /dev/null @@ -1,75 +0,0 @@ -module.exports=require('../theory') -('list_utils',function(a){ - //alert('arrays util'); - describe('arrays',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('at',function(){ - expect(theory.list([1,2,3,4,5,6,7,8,9]).at(2)).to.be(2); - expect(theory.list.at([1,2,3,4,5,6,7,8,9],2)).to.be(2); - expect(theory.list([1,2,3,4,5,6,7,8,9]).at(-2)).to.be(8); - expect(theory.list.at([1,2,3,4,5,6,7,8,9],-2)).to.be(8); - expect(theory.list([1,2]).at(9)).to.be(undefined); - expect(theory.list.at([1,2],9)).to.be(undefined); - expect(theory.list([2,3,4]).at(2,{ebb:true})).to.be(3); - expect(theory.list.at([2,3,4],2,{ebb:1})).to.be(3); - expect(theory.list([2,3,4]).at(-2,{ebb:1})).to.be(3); - expect(theory.list.at([2,3,4],-2,{ebb:true})).to.be(3); - expect(theory.list([2,3,4]).at(9,{ebb:true})).to.be(4); - expect(theory.list.at([2,3,4],9,{ebb:true})).to.be(4); - expect(theory.list([2,3,4]).at(-9,{ebb:true})).to.be(2); - expect(theory.list.at([2,3,4],-9,{ebb:true})).to.be(2); - expect(theory.list([2,3,0]).at(9,{ebb:true})).to.be(0); - expect(theory.list.at([2,3,0],9,{ebb:true})).to.be(0); - expect(theory.list([false,3,0]).at(-9,{ebb:true})).to.be(false); - expect(theory.list.at([false,3,0],-9,{ebb:true})).to.be(false); - }); - it('ify',function(){ - expect(theory.list("Bob, Joe,Isaac , Fred").ify()).to.eql(["Bob","Joe","Isaac","Fred"]); - expect(theory.list.ify("Bob, Joe,Isaac , Fred")).to.eql(["Bob","Joe","Isaac","Fred"]); - expect(theory.list("1,2,3 ; 4,5,6").ify({split:';'})).to.eql(["1,2,3","4,5,6"]); - expect(theory.list.ify("1,2,3 ; 4,5,6",{split:';'})).to.eql(["1,2,3","4,5,6"]); - expect(theory.list({a:1,b:'c',d:[0,1,2]}).ify()).to.eql(['a:1','b:c','d:0,1,2']); - expect(theory.list.ify({a:1,b:'c',d:[0,1,2]})).to.eql(['a:1','b:c','d:0,1,2']); - expect(theory.list({a:1,b:'c',d:[0,1,2],e:{f:'g'}}).ify({wedge:'='})).to.eql(["a=1", "b=c", "d=0,1,2", 'e={"f":"g"}']); - expect(theory.list.ify({a:1,b:'c',d:[0,1,2],e:{f:'g'}},{wedge:'='})).to.eql(["a=1", "b=c", "d=0,1,2", 'e={"f":"g"}']); - }); - it('fuse',function(){ - expect(theory.list([2,3]).fuse([4,5],[6,7])).to.eql([2,3,4,5,6,7]); - expect(theory.list.fuse([2,3],[4,5],[6,7])).to.eql([2,3,4,5,6,7]); - }); - it('less',function(){ - expect(theory.list([1]).less(1)).to.eql([]); - expect(theory.list.less([1],1)).to.eql([]); - expect(theory.list([4,5]).less(1)).to.eql([4,5]); - expect(theory.list.less([4,5],1)).to.eql([4,5]); - expect(theory.list([0,1,'a','b','c','b','d']).less('b')).to.eql([0,1,'a','c','d']); - expect(theory.list.less([0,1,'a','b','c','b','d'],'b')).to.eql([0,1,'a','c','d']); - expect(theory.list([0,1,NaN,'','c',false,true,[1],[]]).less(NaN,false,0,[],'')).to.eql([1,'c',true,[1]]); - expect(theory.list.less([0,1,NaN,'','c',false,true,[1],[]],NaN,false,0,[],'')).to.eql([1,'c',true,[1]]); - expect(theory.list(2).less([0,0,1,2,2,3],[0,2])).to.eql([1,3]); - }); - it('find',function(){ - expect(theory.list([-2,-1,0,1,2]).find(0)).to.be(3); - expect(theory.list.find([-2,-1,0,1,2],0)).to.be(3); - expect(theory.list(['a','b','c']).find('z')).to.be(0); - expect(theory.list.find(['a','b','c'],'z')).to.be(0); - expect(theory.list([false,true,NaN,0,1,'','a',['b'],{c:'d'}]).find(NaN)).to.be(3); - expect(theory.list.find([false,true,NaN,0,1,'','a',['b'],{c:'d'}],NaN)).to.be(3); - expect(theory.list([false,true,NaN,0,1,'','a',['b'],{c:'d'}]).find(['b'])).to.be(8); - expect(theory.list.find([false,true,NaN,0,1,'','a',['b'],{c:'d'}],['b'])).to.be(8); - expect(theory.list([false,true,NaN,0,1,'','a',['b'],{c:'d'}]).find({c:'d'})).to.be(9); - expect(theory.list.find([false,true,NaN,0,1,'','a',['b'],{c:'d'}],{c:'d'})).to.be(9); - }); - it('each',function(){ - expect(theory.list([1,2,3,4,5]).each(function(v,i,t){ t(v+=this.d); this.d=v; },{d:0})).to.eql([1,3,6,10,15]); - expect(theory.list.each([1,2,3,4,5],function(v,i,t){ t(v+=this.d); this.d=v; },{d:0})).to.eql([1,3,6,10,15]); - expect(theory.list([2,3,0,4]).each(function(v,i,t){ if(!v){ return } t(v*=this.d); this.d=v; },{d:1})).to.eql([2,6,24]); - expect(theory.list.each([2,3,0,4],function(v,i,t){ if(!v){ return } t(v*=this.d); this.d=v; },{d:1})).to.eql([2,6,24]); - expect(theory.list([true,false,NaN,Infinity,'',9]).each(function(v,i,t){ if(i===3){ return 0 }})).to.be(0); - expect(theory.list.each([true,false,NaN,Infinity,'',9],function(v,i,t){ if(i===3){ return 0 }})).to.be(0); - }); - }); - return [3,2,1]; -}); \ No newline at end of file diff --git a/node_modules/theory/test/arrays.js b/node_modules/theory/test/arrays.js deleted file mode 100644 index 78682449..00000000 --- a/node_modules/theory/test/arrays.js +++ /dev/null @@ -1,10 +0,0 @@ -module.exports=require('../theory') -('syllabus',function(a){ - describe('arrays',function(){ - it('deps',function(){ - expect(root.ArrayIs).to.be(true); - expect(a.array_is).to.be(undefined); - }); - }); - return [1,2,3]; -},['./array_util', './array_is']); \ No newline at end of file diff --git a/node_modules/theory/test/b.js b/node_modules/theory/test/b.js deleted file mode 100644 index 9e3c8f92..00000000 --- a/node_modules/theory/test/b.js +++ /dev/null @@ -1,6 +0,0 @@ -describe('seq',function(){ - it('b',function(){ - expect(root.Dep).to.be.ok(); - }); -}); -root.DepB = 3; \ No newline at end of file diff --git a/node_modules/theory/test/binary.js b/node_modules/theory/test/binary.js deleted file mode 100644 index b7a4999d..00000000 --- a/node_modules/theory/test/binary.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports=require('../theory') -('binary',function(a){ - describe('Binary',function(){ - it('is()',function(){ - expect(theory.bi(false).is()).to.be(true); - expect(theory.bi(true).is()).to.be(true); - expect(theory.bi('').is()).to.be(false); - expect(theory.bi('a').is()).to.be(false); - expect(theory.bi(0).is()).to.be(false); - expect(theory.bi(1).is()).to.be(false); - expect(theory.bi([]).is()).to.be(false); - expect(theory.bi([1]).is()).to.be(false); - expect(theory.bi({}).is()).to.be(false); - expect(theory.bi({a:1}).is()).to.be(false); - expect(theory.bi(function(){}).is()).to.be(false); - }); - it('is',function(){ - expect(theory.bi.is(false)).to.be(true); - expect(theory.bi.is(true)).to.be(true); - expect(theory.bi.is('')).to.be(false); - expect(theory.bi.is('a')).to.be(false); - expect(theory.bi.is(0)).to.be(false); - expect(theory.bi.is(1)).to.be(false); - expect(theory.bi.is([])).to.be(false); - expect(theory.bi.is([1])).to.be(false); - expect(theory.bi.is({})).to.be(false); - expect(theory.bi.is({a:1})).to.be(false); - expect(theory.bi.is(function(){})).to.be(false); - }); - }); - return true; -}); \ No newline at end of file diff --git a/node_modules/theory/test/common.js b/node_modules/theory/test/common.js deleted file mode 100644 index 2fc49e75..00000000 --- a/node_modules/theory/test/common.js +++ /dev/null @@ -1,81 +0,0 @@ -var TS = new Date().getTime(); -module.exports=require('../theory') -('tests',function(a){ - var s='',i;for(i in a){s+=i+', '};console.log(s); - root.page && (document.getElementById('debug').innerHTML = (new Date().getTime() - TS)/1000+'s '+module.sync); - describe('Dependencies',function(){ - it('are',function(){ - expect(a.binary).to.be(true); - expect(a.count).to.be(42); - expect(a.texts).to.be("Hello World!"); - expect(theory.language).to.be("Hello World!"); - expect(a.enumerate).to.eql([1,2,3]); - expect(theory.syllabus).to.eql([1,2,3]); - expect(a.array_util).to.eql(undefined); - expect(theory.list_utils).to.eql([3,2,1]); - expect(a.hash).to.eql({all:'your',tests:'belong',to:'us'}); - expect(root.TimeFull).to.be.ok(); - expect(a.events).to.be.ok(); - }); - }); - describe('Test',function(){ - it('equality',function(){ - (function(){ - expect(theory.test(function(){ return 1; })()).to.be(1); - expect(theory.test(function(){ explode; return 1; })()).to.not.be(1); - })(); - expect(theory.test(function(){ return 'testing'; }).is(function(){ return 'testing'; })).to.be.ok(); - expect(theory.test(NaN).is(NaN)).to.be.ok(); - expect(theory.test(null).is(null)).to.be.ok(); - expect(theory.test(-0).is(-0)).to.be.ok(); - expect(theory.test({a:1,b:'c',d:[false,'e'],f:{g:function(){return false}}}) - .is({a:1,b:'c',d:[false,'e'],f:{g:function(){return false}}})).to.be.ok(); - expect(theory.test(function(){return 'tests'}).is(function(){ return 'testing'; })).to.not.be.ok(); - expect(theory.test(undefined).is(null)).to.not.be.ok(); - expect(theory.test(null).is(undefined)).to.not.be.ok(); - expect(theory.test.is(undefined,null)).to.not.be.ok(); - expect(theory.test(undefined).is(0)).to.not.be.ok(); - expect(theory.test(0).is(undefined)).to.not.be.ok(); - expect(theory.test.is(0,undefined)).to.not.be.ok(); - expect(theory.test(null).is(0)).to.not.be.ok(); - expect(theory.test(0).is(null)).to.not.be.ok(); - expect(theory.test.is(null,0)).to.not.be.ok(); - expect(theory.test(true).is(1)).to.not.be.ok(); - expect(theory.test(1).is(true)).to.not.be.ok(); - expect(theory.test.is(1,true)).to.not.be.ok(); - expect(theory.test(0).is(-0)).to.not.be.ok(); - expect(theory.test(-0).is(0)).to.not.be.ok(); - }); - }); - describe('Require',function(){ - it('callback',function(){ - if(root.node){ - return expect('use native require').to.ok(); - } - require(['./sub/three','./sub/four'])(function(){ - expect(root.Three).to.be(3); - expect(root.Four).to.be(4); - require('./ready')(function(){ - expect(root.Ready).to.be.ok(); - }); - }); - }); - }); - if(root.page){ - mocha.run(); - } -},{ - './dep':[ - './a' - ,'./b' - ] - ,'./sub':'' - ,'./binary':'' - ,'./numbers':'count' - ,'./strings':'texts' - ,'./arrays':'enumerate' - ,'./objects':'hash' - ,'./functions':'' - ,'./time':'travel' - ,'./events':'' -}); \ No newline at end of file diff --git a/node_modules/theory/test/d.js b/node_modules/theory/test/d.js deleted file mode 100644 index 2ecbbaf8..00000000 --- a/node_modules/theory/test/d.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports=require('../theory') -('d',function(a){ - describe('d',function(){ - it('z',function(){ - expect(root.ZERO).to.be(0); - }); - }); - return 'd'; -},['./sub/z','./sub/add']); \ No newline at end of file diff --git a/node_modules/theory/test/dep.js b/node_modules/theory/test/dep.js deleted file mode 100644 index bf08d207..00000000 --- a/node_modules/theory/test/dep.js +++ /dev/null @@ -1 +0,0 @@ -root.Dep = !0; \ No newline at end of file diff --git a/node_modules/theory/test/events.js b/node_modules/theory/test/events.js deleted file mode 100644 index e766d96a..00000000 --- a/node_modules/theory/test/events.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports=require('../theory') -({name: 'events' -, init: function(a){ - var t = {}; - describe('On',function(){ - it('event',function(){ - t.on = theory.on('test').event(function(b,c,d){ t.ont = [b,c,d] }); - theory.on('test').emit(4,5,6); - expect(t.ont).to.eql([4,5,6]); - }); - it('emit',function(){ - t.on2 = theory.on('test').event(function(b,c,d){ t.ont2 = [b,c,d] }); - theory.on('test').emit(1,2,3); - expect(t.ont).to.eql([1,2,3]); - expect(t.ont2).to.eql([1,2,3]); - }); - it('off',function(){ - t.on.off(); t.ont = 1; - theory.on('test').emit(-4,-8,0); - expect(t.ont).to.be(1); - expect(t.ont2).to.eql([-4,-8,0]); - t.on2.off(); t.ont2 = 5; - theory.on('test').emit(9, 9, 9); - expect(t.ont).to.be(1); - expect(t.ont2).to.be(5); - }); - it('on',function(){ - t.on = theory.on('test').event(function(b,c,d){ t.ont = [b,c,d] }); - theory.on('test').emit(11, 22, 33); - expect(t.ont).to.eql([11,22,33]); - t.on = theory.on('test').event(function(b,c,d){ t.ont = ['a','b','c']; t.ont2 = [0,0,0] }, -1); - theory.on('test').emit(12, 23, 34); - expect(t.ont).to.eql([12,23,34]); - expect(t.ont2).to.eql([0,0,0]); - }); - }); - return true; -}}); \ No newline at end of file diff --git a/node_modules/theory/test/expect.js b/node_modules/theory/test/expect.js deleted file mode 100644 index 772febd0..00000000 --- a/node_modules/theory/test/expect.js +++ /dev/null @@ -1,1284 +0,0 @@ -(function (global, module) { - - var exports = module.exports; - - /** - * Exports. - */ - - module.exports = expect; - expect.Assertion = Assertion; - - /** - * Exports version. - */ - - expect.version = '0.1.2'; - - /** - * Possible assertion flags. - */ - - var flags = { - not: ['to', 'be', 'have', 'include', 'only'] - , to: ['be', 'have', 'include', 'only', 'not'] - , only: ['have'] - , have: ['own'] - , be: ['an'] - }; - - function expect (obj) { - return new Assertion(obj); - } - - /** - * Constructor - * - * @api private - */ - - function Assertion (obj, flag, parent) { - this.obj = obj; - this.flags = {}; - - if (undefined != parent) { - this.flags[flag] = true; - - for (var i in parent.flags) { - if (parent.flags.hasOwnProperty(i)) { - this.flags[i] = true; - } - } - } - - var $flags = flag ? flags[flag] : keys(flags) - , self = this; - - if ($flags) { - for (var i = 0, l = $flags.length; i < l; i++) { - // avoid recursion - if (this.flags[$flags[i]]) continue; - - var name = $flags[i] - , assertion = new Assertion(this.obj, name, this) - - if ('function' == typeof Assertion.prototype[name]) { - // clone the function, make sure we dont touch the prot reference - var old = this[name]; - this[name] = function () { - return old.apply(self, arguments); - }; - - for (var fn in Assertion.prototype) { - if (Assertion.prototype.hasOwnProperty(fn) && fn != name) { - this[name][fn] = bind(assertion[fn], assertion); - } - } - } else { - this[name] = assertion; - } - } - } - } - - /** - * Performs an assertion - * - * @api private - */ - - Assertion.prototype.assert = function (truth, msg, error, expected) { - var msg = this.flags.not ? error : msg - , ok = this.flags.not ? !truth : truth - , err; - - if (!ok) { - err = new Error(msg.call(this)); - if (arguments.length > 3) { - err.actual = this.obj; - err.expected = expected; - err.showDiff = true; - } - throw err; - } - - this.and = new Assertion(this.obj); - }; - - /** - * Check if the value is truthy - * - * @api public - */ - - Assertion.prototype.ok = function () { - this.assert( - !!this.obj - , function(){ return 'expected ' + i(this.obj) + ' to be truthy' } - , function(){ return 'expected ' + i(this.obj) + ' to be falsy' }); - }; - - /** - * Creates an anonymous function which calls fn with arguments. - * - * @api public - */ - - Assertion.prototype.withArgs = function() { - expect(this.obj).to.be.a('function'); - var fn = this.obj; - var args = Array.prototype.slice.call(arguments); - return expect(function() { fn.apply(null, args); }); - }; - - /** - * Assert that the function throws. - * - * @param {Function|RegExp} callback, or regexp to match error string against - * @api public - */ - - Assertion.prototype.throwError = - Assertion.prototype.throwException = function (fn) { - expect(this.obj).to.be.a('function'); - - var thrown = false - , not = this.flags.not; - - try { - this.obj(); - } catch (e) { - if (isRegExp(fn)) { - var subject = 'string' == typeof e ? e : e.message; - if (not) { - expect(subject).to.not.match(fn); - } else { - expect(subject).to.match(fn); - } - } else if ('function' == typeof fn) { - fn(e); - } - thrown = true; - } - - if (isRegExp(fn) && not) { - // in the presence of a matcher, ensure the `not` only applies to - // the matching. - this.flags.not = false; - } - - var name = this.obj.name || 'fn'; - this.assert( - thrown - , function(){ return 'expected ' + name + ' to throw an exception' } - , function(){ return 'expected ' + name + ' not to throw an exception' }); - }; - - /** - * Checks if the array is empty. - * - * @api public - */ - - Assertion.prototype.empty = function () { - var expectation; - - if ('object' == typeof this.obj && null !== this.obj && !isArray(this.obj)) { - if ('number' == typeof this.obj.length) { - expectation = !this.obj.length; - } else { - expectation = !keys(this.obj).length; - } - } else { - if ('string' != typeof this.obj) { - expect(this.obj).to.be.an('object'); - } - - expect(this.obj).to.have.property('length'); - expectation = !this.obj.length; - } - - this.assert( - expectation - , function(){ return 'expected ' + i(this.obj) + ' to be empty' } - , function(){ return 'expected ' + i(this.obj) + ' to not be empty' }); - return this; - }; - - /** - * Checks if the obj exactly equals another. - * - * @api public - */ - - Assertion.prototype.be = - Assertion.prototype.equal = function (obj) { - this.assert( - obj === this.obj - , function(){ return 'expected ' + i(this.obj) + ' to equal ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not equal ' + i(obj) }); - return this; - }; - - /** - * Checks if the obj sortof equals another. - * - * @api public - */ - - Assertion.prototype.eql = function (obj) { - this.assert( - expect.eql(this.obj, obj) - , function(){ return 'expected ' + i(this.obj) + ' to sort of equal ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to sort of not equal ' + i(obj) } - , obj); - return this; - }; - - /** - * Assert within start to finish (inclusive). - * - * @param {Number} start - * @param {Number} finish - * @api public - */ - - Assertion.prototype.within = function (start, finish) { - var range = start + '..' + finish; - this.assert( - this.obj >= start && this.obj <= finish - , function(){ return 'expected ' + i(this.obj) + ' to be within ' + range } - , function(){ return 'expected ' + i(this.obj) + ' to not be within ' + range }); - return this; - }; - - /** - * Assert typeof / instance of - * - * @api public - */ - - Assertion.prototype.a = - Assertion.prototype.an = function (type) { - if ('string' == typeof type) { - // proper english in error msg - var n = /^[aeiou]/.test(type) ? 'n' : ''; - - // typeof with support for 'array' - this.assert( - 'array' == type ? isArray(this.obj) : - 'regexp' == type ? isRegExp(this.obj) : - 'object' == type - ? 'object' == typeof this.obj && null !== this.obj - : type == typeof this.obj - , function(){ return 'expected ' + i(this.obj) + ' to be a' + n + ' ' + type } - , function(){ return 'expected ' + i(this.obj) + ' not to be a' + n + ' ' + type }); - } else { - // instanceof - var name = type.name || 'supplied constructor'; - this.assert( - this.obj instanceof type - , function(){ return 'expected ' + i(this.obj) + ' to be an instance of ' + name } - , function(){ return 'expected ' + i(this.obj) + ' not to be an instance of ' + name }); - } - - return this; - }; - - /** - * Assert numeric value above _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.greaterThan = - Assertion.prototype.above = function (n) { - this.assert( - this.obj > n - , function(){ return 'expected ' + i(this.obj) + ' to be above ' + n } - , function(){ return 'expected ' + i(this.obj) + ' to be below ' + n }); - return this; - }; - - /** - * Assert numeric value below _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.lessThan = - Assertion.prototype.below = function (n) { - this.assert( - this.obj < n - , function(){ return 'expected ' + i(this.obj) + ' to be below ' + n } - , function(){ return 'expected ' + i(this.obj) + ' to be above ' + n }); - return this; - }; - - /** - * Assert string value matches _regexp_. - * - * @param {RegExp} regexp - * @api public - */ - - Assertion.prototype.match = function (regexp) { - this.assert( - regexp.exec(this.obj) - , function(){ return 'expected ' + i(this.obj) + ' to match ' + regexp } - , function(){ return 'expected ' + i(this.obj) + ' not to match ' + regexp }); - return this; - }; - - /** - * Assert property "length" exists and has value of _n_. - * - * @param {Number} n - * @api public - */ - - Assertion.prototype.length = function (n) { - expect(this.obj).to.have.property('length'); - var len = this.obj.length; - this.assert( - n == len - , function(){ return 'expected ' + i(this.obj) + ' to have a length of ' + n + ' but got ' + len } - , function(){ return 'expected ' + i(this.obj) + ' to not have a length of ' + len }); - return this; - }; - - /** - * Assert property _name_ exists, with optional _val_. - * - * @param {String} name - * @param {Mixed} val - * @api public - */ - - Assertion.prototype.property = function (name, val) { - if (this.flags.own) { - this.assert( - Object.prototype.hasOwnProperty.call(this.obj, name) - , function(){ return 'expected ' + i(this.obj) + ' to have own property ' + i(name) } - , function(){ return 'expected ' + i(this.obj) + ' to not have own property ' + i(name) }); - return this; - } - - if (this.flags.not && undefined !== val) { - if (undefined === this.obj[name]) { - throw new Error(i(this.obj) + ' has no property ' + i(name)); - } - } else { - var hasProp; - try { - hasProp = name in this.obj - } catch (e) { - hasProp = undefined !== this.obj[name] - } - - this.assert( - hasProp - , function(){ return 'expected ' + i(this.obj) + ' to have a property ' + i(name) } - , function(){ return 'expected ' + i(this.obj) + ' to not have a property ' + i(name) }); - } - - if (undefined !== val) { - this.assert( - val === this.obj[name] - , function(){ return 'expected ' + i(this.obj) + ' to have a property ' + i(name) - + ' of ' + i(val) + ', but got ' + i(this.obj[name]) } - , function(){ return 'expected ' + i(this.obj) + ' to not have a property ' + i(name) - + ' of ' + i(val) }); - } - - this.obj = this.obj[name]; - return this; - }; - - /** - * Assert that the array contains _obj_ or string contains _obj_. - * - * @param {Mixed} obj|string - * @api public - */ - - Assertion.prototype.string = - Assertion.prototype.contain = function (obj) { - if ('string' == typeof this.obj) { - this.assert( - ~this.obj.indexOf(obj) - , function(){ return 'expected ' + i(this.obj) + ' to contain ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not contain ' + i(obj) }); - } else { - this.assert( - ~indexOf(this.obj, obj) - , function(){ return 'expected ' + i(this.obj) + ' to contain ' + i(obj) } - , function(){ return 'expected ' + i(this.obj) + ' to not contain ' + i(obj) }); - } - return this; - }; - - /** - * Assert exact keys or inclusion of keys by using - * the `.own` modifier. - * - * @param {Array|String ...} keys - * @api public - */ - - Assertion.prototype.key = - Assertion.prototype.keys = function ($keys) { - var str - , ok = true; - - $keys = isArray($keys) - ? $keys - : Array.prototype.slice.call(arguments); - - if (!$keys.length) throw new Error('keys required'); - - var actual = keys(this.obj) - , len = $keys.length; - - // Inclusion - ok = every($keys, function (key) { - return ~indexOf(actual, key); - }); - - // Strict - if (!this.flags.not && this.flags.only) { - ok = ok && $keys.length == actual.length; - } - - // Key string - if (len > 1) { - $keys = map($keys, function (key) { - return i(key); - }); - var last = $keys.pop(); - str = $keys.join(', ') + ', and ' + last; - } else { - str = i($keys[0]); - } - - // Form - str = (len > 1 ? 'keys ' : 'key ') + str; - - // Have / include - str = (!this.flags.only ? 'include ' : 'only have ') + str; - - // Assertion - this.assert( - ok - , function(){ return 'expected ' + i(this.obj) + ' to ' + str } - , function(){ return 'expected ' + i(this.obj) + ' to not ' + str }); - - return this; - }; - - /** - * Assert a failure. - * - * @param {String ...} custom message - * @api public - */ - Assertion.prototype.fail = function (msg) { - var error = function() { return msg || "explicit failure"; } - this.assert(false, error, error); - return this; - }; - - /** - * Function bind implementation. - */ - - function bind (fn, scope) { - return function () { - return fn.apply(scope, arguments); - } - } - - /** - * Array every compatibility - * - * @see bit.ly/5Fq1N2 - * @api public - */ - - function every (arr, fn, thisObj) { - var scope = thisObj || global; - for (var i = 0, j = arr.length; i < j; ++i) { - if (!fn.call(scope, arr[i], i, arr)) { - return false; - } - } - return true; - } - - /** - * Array indexOf compatibility. - * - * @see bit.ly/a5Dxa2 - * @api public - */ - - function indexOf (arr, o, i) { - if (Array.prototype.indexOf) { - return Array.prototype.indexOf.call(arr, o, i); - } - - if (arr.length === undefined) { - return -1; - } - - for (var j = arr.length, i = i < 0 ? i + j < 0 ? 0 : i + j : i || 0 - ; i < j && arr[i] !== o; i++); - - return j <= i ? -1 : i; - } - - // https://gist.github.com/1044128/ - var getOuterHTML = function(element) { - if ('outerHTML' in element) return element.outerHTML; - var ns = "http://www.w3.org/1999/xhtml"; - var container = document.createElementNS(ns, '_'); - var xmlSerializer = new XMLSerializer(); - var html; - if (document.xmlVersion) { - return xmlSerializer.serializeToString(element); - } else { - container.appendChild(element.cloneNode(false)); - html = container.innerHTML.replace('><', '>' + element.innerHTML + '<'); - container.innerHTML = ''; - return html; - } - }; - - // Returns true if object is a DOM element. - var isDOMElement = function (object) { - if (typeof HTMLElement === 'object') { - return object instanceof HTMLElement; - } else { - return object && - typeof object === 'object' && - object.nodeType === 1 && - typeof object.nodeName === 'string'; - } - }; - - /** - * Inspects an object. - * - * @see taken from node.js `util` module (copyright Joyent, MIT license) - * @api private - */ - - function i (obj, showHidden, depth) { - var seen = []; - - function stylize (str) { - return str; - } - - function format (value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (value && typeof value.inspect === 'function' && - // Filter out the util module, it's inspect function is special - value !== exports && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - return value.inspect(recurseTimes); - } - - // Primitive types cannot have properties - switch (typeof value) { - case 'undefined': - return stylize('undefined', 'undefined'); - - case 'string': - var simple = '\'' + json.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return stylize(simple, 'string'); - - case 'number': - return stylize('' + value, 'number'); - - case 'boolean': - return stylize('' + value, 'boolean'); - } - // For some reason typeof null is "object", so special case here. - if (value === null) { - return stylize('null', 'null'); - } - - if (isDOMElement(value)) { - return getOuterHTML(value); - } - - // Look up the keys of the object. - var visible_keys = keys(value); - var $keys = showHidden ? Object.getOwnPropertyNames(value) : visible_keys; - - // Functions without properties can be shortcutted. - if (typeof value === 'function' && $keys.length === 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - var name = value.name ? ': ' + value.name : ''; - return stylize('[Function' + name + ']', 'special'); - } - } - - // Dates without properties can be shortcutted - if (isDate(value) && $keys.length === 0) { - return stylize(value.toUTCString(), 'date'); - } - - // Error objects can be shortcutted - if (value instanceof Error) { - return stylize("["+value.toString()+"]", 'Error'); - } - - var base, type, braces; - // Determine the object type - if (isArray(value)) { - type = 'Array'; - braces = ['[', ']']; - } else { - type = 'Object'; - braces = ['{', '}']; - } - - // Make functions say that they are functions - if (typeof value === 'function') { - var n = value.name ? ': ' + value.name : ''; - base = (isRegExp(value)) ? ' ' + value : ' [Function' + n + ']'; - } else { - base = ''; - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + value.toUTCString(); - } - - if ($keys.length === 0) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return stylize('' + value, 'regexp'); - } else { - return stylize('[Object]', 'special'); - } - } - - seen.push(value); - - var output = map($keys, function (key) { - var name, str; - if (value.__lookupGetter__) { - if (value.__lookupGetter__(key)) { - if (value.__lookupSetter__(key)) { - str = stylize('[Getter/Setter]', 'special'); - } else { - str = stylize('[Getter]', 'special'); - } - } else { - if (value.__lookupSetter__(key)) { - str = stylize('[Setter]', 'special'); - } - } - } - if (indexOf(visible_keys, key) < 0) { - name = '[' + key + ']'; - } - if (!str) { - if (indexOf(seen, value[key]) < 0) { - if (recurseTimes === null) { - str = format(value[key]); - } else { - str = format(value[key], recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (isArray(value)) { - str = map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + map(str.split('\n'), function (line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = stylize('[Circular]', 'special'); - } - } - if (typeof name === 'undefined') { - if (type === 'Array' && key.match(/^\d+$/)) { - return str; - } - name = json.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = stylize(name, 'string'); - } - } - - return name + ': ' + str; - }); - - seen.pop(); - - var numLinesEst = 0; - var length = reduce(output, function (prev, cur) { - numLinesEst++; - if (indexOf(cur, '\n') >= 0) numLinesEst++; - return prev + cur.length + 1; - }, 0); - - if (length > 50) { - output = braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - - } else { - output = braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; - } - - return output; - } - return format(obj, (typeof depth === 'undefined' ? 2 : depth)); - } - - expect.stringify = i; - - function isArray (ar) { - return Object.prototype.toString.call(ar) === '[object Array]'; - } - - function isRegExp(re) { - var s; - try { - s = '' + re; - } catch (e) { - return false; - } - - return re instanceof RegExp || // easy case - // duck-type for context-switching evalcx case - typeof(re) === 'function' && - re.constructor.name === 'RegExp' && - re.compile && - re.test && - re.exec && - s.match(/^\/.*\/[gim]{0,3}$/); - } - - function isDate(d) { - return d instanceof Date; - } - - function keys (obj) { - if (Object.keys) { - return Object.keys(obj); - } - - var keys = []; - - for (var i in obj) { - if (Object.prototype.hasOwnProperty.call(obj, i)) { - keys.push(i); - } - } - - return keys; - } - - function map (arr, mapper, that) { - if (Array.prototype.map) { - return Array.prototype.map.call(arr, mapper, that); - } - - var other= new Array(arr.length); - - for (var i= 0, n = arr.length; i= 2) { - var rv = arguments[1]; - } else { - do { - if (i in this) { - rv = this[i++]; - break; - } - - // if array contains no values, no initial value to return - if (++i >= len) - throw new TypeError(); - } while (true); - } - - for (; i < len; i++) { - if (i in this) - rv = fun.call(null, rv, this[i], i, this); - } - - return rv; - } - - /** - * Asserts deep equality - * - * @see taken from node.js `assert` module (copyright Joyent, MIT license) - * @api private - */ - - expect.eql = function eql(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - } else if ('undefined' != typeof Buffer - && Buffer.isBuffer(actual) && Buffer.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == "object", - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return actual == expected; - // If both are regular expression use the special `regExpEquiv` method - // to determine equivalence. - } else if (isRegExp(actual) && isRegExp(expected)) { - return regExpEquiv(actual, expected); - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical "prototype" property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } - }; - - function isUndefinedOrNull (value) { - return value === null || value === undefined; - } - - function isArguments (object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; - } - - function regExpEquiv (a, b) { - return a.source === b.source && a.global === b.global && - a.ignoreCase === b.ignoreCase && a.multiline === b.multiline; - } - - function objEquiv (a, b) { - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical "prototype" property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return expect.eql(a, b); - } - try{ - var ka = keys(a), - kb = keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!expect.eql(a[key], b[key])) - return false; - } - return true; - } - - var json = (function () { - "use strict"; - - if ('object' == typeof JSON && JSON.parse && JSON.stringify) { - return { - parse: nativeJSON.parse - , stringify: nativeJSON.stringify - } - } - - var JSON = {}; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - function date(d, key) { - return isFinite(d.valueOf()) ? - d.getUTCFullYear() + '-' + - f(d.getUTCMonth() + 1) + '-' + - f(d.getUTCDate()) + 'T' + - f(d.getUTCHours()) + ':' + - f(d.getUTCMinutes()) + ':' + - f(d.getUTCSeconds()) + 'Z' : null; - } - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - - function quote(string) { - - // If the string contains no control characters, no quote characters, and no - // backslash characters, then we can safely slap some quotes around it. - // Otherwise we must also replace the offending characters with safe escape - // sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - - - function str(key, holder) { - - // Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - - // If the value has a toJSON method, call it to obtain a replacement value. - - if (value instanceof Date) { - value = date(key); - } - - // If we were called with a replacer function, then call the replacer to - // obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - - // What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - - // JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - - // If the value is a boolean or null, convert it to a string. Note: - // typeof null does not produce 'null'. The case is included here in - // the remote chance that this gets fixed someday. - - return String(value); - - // If the type is 'object', we might be dealing with an object or an array or - // null. - - case 'object': - - // Due to a specification blunder in ECMAScript, typeof null is 'object', - // so watch out for that case. - - if (!value) { - return 'null'; - } - - // Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - - // Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - - // The value is an array. Stringify every element. Use null as a placeholder - // for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - - // Join all of the elements together, separated with commas, and wrap them in - // brackets. - - v = partial.length === 0 ? '[]' : gap ? - '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - - // If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - - // Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - - // Join all of the member texts together, separated with commas, - // and wrap them in braces. - - v = partial.length === 0 ? '{}' : gap ? - '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : - '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - - // If the JSON object does not yet have a stringify method, give it one. - - JSON.stringify = function (value, replacer, space) { - - // The stringify method takes a value and an optional replacer, and an optional - // space parameter, and returns a JSON text. The replacer can be a function - // that can replace values, or an array of strings that will select the keys. - // A default replacer method can be provided. Use of the space parameter can - // produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - - // If the space parameter is a number, make an indent string containing that - // many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - - // If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - - // If there is a replacer, it must be a function or an array. - // Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - - // Make a fake root object containing our value under the key of ''. - // Return the result of stringifying the value. - - return str('', {'': value}); - }; - - // If the JSON object does not yet have a parse method, give it one. - - JSON.parse = function (text, reviver) { - // The parse method takes a text and an optional reviver function, and returns - // a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - - // The walk method is used to recursively walk the resulting structure so - // that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - - // Parsing happens in four stages. In the first stage, we replace certain - // Unicode characters with escape sequences. JavaScript handles many characters - // incorrectly, either silently deleting them, or treating them as line endings. - - text = String(text); - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - - // In the second stage, we run the text against regular expressions that look - // for non-JSON patterns. We are especially concerned with '()' and 'new' - // because they can cause invocation, and '=' because it can cause mutation. - // But just to be safe, we want to reject all unexpected forms. - - // We split the second stage into 4 regexp operations in order to work around - // crippling inefficiencies in IE's and Safari's regexp engines. First we - // replace the JSON backslash pairs with '@' (a non-JSON character). Second, we - // replace all simple value tokens with ']' characters. Third, we delete all - // open brackets that follow a colon or comma or that begin the text. Finally, - // we look to see that the remaining characters are only whitespace or ']' or - // ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/ - .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') - .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') - .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - - // In the third stage we use the eval function to compile the text into a - // JavaScript structure. The '{' operator is subject to a syntactic ambiguity - // in JavaScript: it can begin a block or an object literal. We wrap the text - // in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - - // In the optional fourth stage, we recursively walk the new structure, passing - // each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' ? - walk({'': j}, '') : j; - } - - // If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - - return JSON; - })(); - - if ('undefined' != typeof window) { - window.expect = module.exports; - } - -})( - this - , 'undefined' != typeof module ? module : {exports: {}} -); \ No newline at end of file diff --git a/node_modules/theory/test/functions.js b/node_modules/theory/test/functions.js deleted file mode 100644 index b2c4331f..00000000 --- a/node_modules/theory/test/functions.js +++ /dev/null @@ -1,64 +0,0 @@ -module.exports=require('../theory') -('functions',function(a){ - function Func(){ - return Func; - } - describe('Functions',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('is()',function(){ - expect(theory.fns(function(){}).is()).to.be(true); - expect(theory.fns('').is()).to.be(false); - expect(theory.fns('a').is()).to.be(false); - expect(theory.fns(0).is()).to.be(false); - expect(theory.fns(1).is()).to.be(false); - expect(theory.fns([]).is()).to.be(false); - expect(theory.fns([1]).is()).to.be(false); - expect(theory.fns({}).is()).to.be(false); - expect(theory.fns({a:1}).is()).to.be(false); - expect(theory.fns(false).is()).to.be(false); - expect(theory.fns(true).is()).to.be(false); - }); - it('is',function(){ - expect(theory.fns.is(function(){})).to.be(true); - expect(theory.fns.is('')).to.be(false); - expect(theory.fns.is('a')).to.be(false); - expect(theory.fns.is(0)).to.be(false); - expect(theory.fns.is(1)).to.be(false); - expect(theory.fns.is([])).to.be(false); - expect(theory.fns.is([1])).to.be(false); - expect(theory.fns.is({})).to.be(false); - expect(theory.fns.is({a:1})).to.be(false); - expect(theory.fns.is(false)).to.be(false); - expect(theory.fns.is(true)).to.be(false); - }); - it('sort',function(){ - Func.sort = theory.fns.sort([true,false,0,1,'','a',[],[2],{},{b:3},function(){}]); - expect(Func.sort.b).to.eql([true,false]); - expect(Func.sort.n).to.eql([0,1]); - expect(Func.sort.t).to.eql(['','a']); - expect(Func.sort.l).to.eql([[],[2]]); - expect(Func.sort.o).to.eql([{},{b:3}]); - expect(Func.sort.f[0]).to.be.a('function'); - }); - it('pass',function(){ - expect(theory.fns(function(){ this.pass = 5; return this.pass +2; }).pass(Func)()).to.be(7); - expect(theory.fns.pass(function(){ this.pass = 5; return this.pass +2; },Func)()).to.be(7); - }); - it('flow',function(done){ - theory.fns.flow([ - function(next){ - next(Func.val = 5); - },function(x,next){ - next(x*x); - } - ],function(x){ - Func.val = x*x; - expect(Func.val).to.be(625); - done(); - }); - }); - }); - return Func; -}); \ No newline at end of file diff --git a/node_modules/theory/test/mocha.css b/node_modules/theory/test/mocha.css deleted file mode 100644 index 4a044e95..00000000 --- a/node_modules/theory/test/mocha.css +++ /dev/null @@ -1,182 +0,0 @@ - -body { - font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif; - padding: 60px 50px; -} - -#mocha ul, #mocha li { - margin: 0; - padding: 0; -} - -#mocha ul { - list-style: none; -} - -#mocha h1, #mocha h2 { - margin: 0; -} - -#mocha h1 { - margin-top: 15px; - font-size: 1em; - font-weight: 200; -} - -#mocha h1 a { - text-decoration: none; - color: inherit; -} - -#mocha h1 a:hover { - text-decoration: underline; -} - -#mocha .suite .suite h1 { - margin-top: 0; - font-size: .8em; -} - -#mocha h2 { - font-size: 12px; - font-weight: normal; - cursor: pointer; -} - -#mocha .suite { - margin-left: 15px; -} - -#mocha .test { - margin-left: 15px; -} - -#mocha .test:hover h2::after { - position: relative; - top: 0; - right: -10px; - content: '(view source)'; - font-size: 12px; - font-family: arial; - color: #888; -} - -#mocha .test.pending:hover h2::after { - content: '(pending)'; - font-family: arial; -} - -#mocha .test.pass.medium .duration { - background: #C09853; -} - -#mocha .test.pass.slow .duration { - background: #B94A48; -} - -#mocha .test.pass::before { - content: '?'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #00d6b2; -} - -#mocha .test.pass .duration { - font-size: 9px; - margin-left: 5px; - padding: 2px 5px; - color: white; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - box-shadow: inset 0 1px 1px rgba(0,0,0,.2); - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - -ms-border-radius: 5px; - -o-border-radius: 5px; - border-radius: 5px; -} - -#mocha .test.pass.fast .duration { - display: none; -} - -#mocha .test.pending { - color: #0b97c4; -} - -#mocha .test.pending::before { - content: '?'; - color: #0b97c4; -} - -#mocha .test.fail { - color: #c00; -} - -#mocha .test.fail pre { - color: black; -} - -#mocha .test.fail::before { - content: '?'; - font-size: 12px; - display: block; - float: left; - margin-right: 5px; - color: #c00; -} - -#mocha .test pre.error { - color: #c00; -} - -#mocha .test pre { - display: inline-block; - font: 12px/1.5 monaco, monospace; - margin: 5px; - padding: 15px; - border: 1px solid #eee; - border-bottom-color: #ddd; - -webkit-border-radius: 3px; - -webkit-box-shadow: 0 1px 3px #eee; -} - -#error { - color: #c00; - font-size: 1.5 em; - font-weight: 100; - letter-spacing: 1px; -} - -#stats { - position: fixed; - top: 15px; - right: 10px; - font-size: 12px; - margin: 0; - color: #888; -} - -#stats .progress { - float: right; - padding-top: 0; -} - -#stats em { - color: black; -} - -#stats li { - display: inline-block; - margin: 0 5px; - list-style: none; - padding-top: 11px; -} - -code .comment { color: #ddd } -code .init { color: #2F6FAD } -code .string { color: #5890AD } -code .keyword { color: #8A6343 } -code .number { color: #2F6FAD } diff --git a/node_modules/theory/test/mocha.html b/node_modules/theory/test/mocha.html deleted file mode 100644 index 48f04139..00000000 --- a/node_modules/theory/test/mocha.html +++ /dev/null @@ -1,17 +0,0 @@ - - - Theory Tests - - - - - - - - - - Theory Tests -
      -
      - - \ No newline at end of file diff --git a/node_modules/theory/test/mocha.js b/node_modules/theory/test/mocha.js deleted file mode 100644 index 7abc6488..00000000 --- a/node_modules/theory/test/mocha.js +++ /dev/null @@ -1,4228 +0,0 @@ -;(function(){ -if ('undefined' == typeof window) { - return; -} - -// CommonJS require() - -function require(p){ - var path = require.resolve(p) - , mod = require.modules[path]; - if (!mod) throw new Error('failed to require "' + p + '"'); - if (!mod.exports) { - mod.exports = {}; - mod.call(mod.exports, mod, mod.exports, require.relative(path)); - } - return mod.exports; - } - -require.modules = {}; - -require.resolve = function (path){ - var orig = path - , reg = path + '.js' - , index = path + '/index.js'; - return require.modules[reg] && reg - || require.modules[index] && index - || orig; - }; - -require.register = function (path, fn){ - require.modules[path] = fn; - }; - -require.relative = function (parent) { - return function(p){ - if ('.' != p.charAt(0)) return require(p); - - var path = parent.split('/') - , segs = p.split('/'); - path.pop(); - - for (var i = 0; i < segs.length; i++) { - var seg = segs[i]; - if ('..' == seg) path.pop(); - else if ('.' != seg) path.push(seg); - } - - return require(path.join('/')); - }; - }; - - -require.register("browser/debug.js", function(module, exports, require){ - -module.exports = function(type){ - return function(){ - - } -}; -}); // module: browser/debug.js - -require.register("browser/diff.js", function(module, exports, require){ - -}); // module: browser/diff.js - -require.register("browser/events.js", function(module, exports, require){ - -/** - * Module exports. - */ - -exports.EventEmitter = EventEmitter; - -/** - * Check if `obj` is an array. - */ - -function isArray(obj) { - return '[object Array]' == {}.toString.call(obj); -} - -/** - * Event emitter constructor. - * - * @api public - */ - -function EventEmitter(){}; - -/** - * Adds a listener. - * - * @api public - */ - -EventEmitter.prototype.on = function (name, fn) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = fn; - } else if (isArray(this.$events[name])) { - this.$events[name].push(fn); - } else { - this.$events[name] = [this.$events[name], fn]; - } - - return this; -}; - -EventEmitter.prototype.addListener = EventEmitter.prototype.on; - -/** - * Adds a volatile listener. - * - * @api public - */ - -EventEmitter.prototype.once = function (name, fn) { - var self = this; - - function on () { - self.removeListener(name, on); - fn.apply(this, arguments); - }; - - on.listener = fn; - this.on(name, on); - - return this; -}; - -/** - * Removes a listener. - * - * @api public - */ - -EventEmitter.prototype.removeListener = function (name, fn) { - if (this.$events && this.$events[name]) { - var list = this.$events[name]; - - if (isArray(list)) { - var pos = -1; - - for (var i = 0, l = list.length; i < l; i++) { - if (list[i] === fn || (list[i].listener && list[i].listener === fn)) { - pos = i; - break; - } - } - - if (pos < 0) { - return this; - } - - list.splice(pos, 1); - - if (!list.length) { - delete this.$events[name]; - } - } else if (list === fn || (list.listener && list.listener === fn)) { - delete this.$events[name]; - } - } - - return this; -}; - -/** - * Removes all listeners for an event. - * - * @api public - */ - -EventEmitter.prototype.removeAllListeners = function (name) { - if (name === undefined) { - this.$events = {}; - return this; - } - - if (this.$events && this.$events[name]) { - this.$events[name] = null; - } - - return this; -}; - -/** - * Gets all listeners for a certain event. - * - * @api public - */ - -EventEmitter.prototype.listeners = function (name) { - if (!this.$events) { - this.$events = {}; - } - - if (!this.$events[name]) { - this.$events[name] = []; - } - - if (!isArray(this.$events[name])) { - this.$events[name] = [this.$events[name]]; - } - - return this.$events[name]; -}; - -/** - * Emits an event. - * - * @api public - */ - -EventEmitter.prototype.emit = function (name) { - if (!this.$events) { - return false; - } - - var handler = this.$events[name]; - - if (!handler) { - return false; - } - - var args = [].slice.call(arguments, 1); - - if ('function' == typeof handler) { - handler.apply(this, args); - } else if (isArray(handler)) { - var listeners = handler.slice(); - - for (var i = 0, l = listeners.length; i < l; i++) { - listeners[i].apply(this, args); - } - } else { - return false; - } - - return true; -}; -}); // module: browser/events.js - -require.register("browser/fs.js", function(module, exports, require){ - -}); // module: browser/fs.js - -require.register("browser/path.js", function(module, exports, require){ - -}); // module: browser/path.js - -require.register("browser/progress.js", function(module, exports, require){ - -/** - * Expose `Progress`. - */ - -module.exports = Progress; - -/** - * Initialize a new `Progress` indicator. - */ - -function Progress() { - this.percent = 0; - this.size(0); - this.fontSize(11); - this.font('helvetica, arial, sans-serif'); -} - -/** - * Set progress size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.size = function(n){ - this._size = n; - return this; -}; - -/** - * Set text to `str`. - * - * @param {String} str - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.text = function(str){ - this._text = str; - return this; -}; - -/** - * Set font size to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - * @api public - */ - -Progress.prototype.fontSize = function(n){ - this._fontSize = n; - return this; -}; - -/** - * Set font `family`. - * - * @param {String} family - * @return {Progress} for chaining - */ - -Progress.prototype.font = function(family){ - this._font = family; - return this; -}; - -/** - * Update percentage to `n`. - * - * @param {Number} n - * @return {Progress} for chaining - */ - -Progress.prototype.update = function(n){ - this.percent = n; - return this; -}; - -/** - * Draw on `ctx`. - * - * @param {CanvasRenderingContext2d} ctx - * @return {Progress} for chaining - */ - -Progress.prototype.draw = function(ctx){ - var percent = Math.min(this.percent, 100) - , size = this._size - , half = size / 2 - , x = half - , y = half - , rad = half - 1 - , fontSize = this._fontSize; - - ctx.font = fontSize + 'px ' + this._font; - - var angle = Math.PI * 2 * (percent / 100); - ctx.clearRect(0, 0, size, size); - - // outer circle - ctx.strokeStyle = '#9f9f9f'; - ctx.beginPath(); - ctx.arc(x, y, rad, 0, angle, false); - ctx.stroke(); - - // inner circle - ctx.strokeStyle = '#eee'; - ctx.beginPath(); - ctx.arc(x, y, rad - 1, 0, angle, true); - ctx.stroke(); - - // text - var text = this._text || (percent | 0) + '%' - , w = ctx.measureText(text).width; - - ctx.fillText( - text - , x - w / 2 + 1 - , y + fontSize / 2 - 1); - - return this; -}; - -}); // module: browser/progress.js - -require.register("browser/tty.js", function(module, exports, require){ - -exports.isatty = function(){ - return true; -}; - -exports.getWindowSize = function(){ - return [window.innerHeight, window.innerWidth]; -}; -}); // module: browser/tty.js - -require.register("context.js", function(module, exports, require){ - -/** - * Expose `Context`. - */ - -module.exports = Context; - -/** - * Initialize a new `Context`. - * - * @api private - */ - -function Context(){} - -/** - * Set the context `Runnable` to `runnable`. - * - * @param {Runnable} runnable - * @return {Context} - * @api private - */ - -Context.prototype.runnable = function(runnable){ - this._runnable = runnable; - return this; -}; - -/** - * Set test timeout `ms`. - * - * @param {Number} ms - * @return {Context} self - * @api private - */ - -Context.prototype.timeout = function(ms){ - this._runnable.timeout(ms); - return this; -}; - -/** - * Inspect the context void of `._runnable`. - * - * @return {String} - * @api private - */ - -Context.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - return '_runnable' == key - ? undefined - : val; - }, 2); -}; - -}); // module: context.js - -require.register("hook.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Hook`. - */ - -module.exports = Hook; - -/** - * Initialize a new `Hook` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Hook(title, fn) { - Runnable.call(this, title, fn); - this.type = 'hook'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Hook.prototype = new Runnable; -Hook.prototype.constructor = Hook; - - -}); // module: hook.js - -require.register("interfaces/bdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * BDD-style interface: - * - * describe('Array', function(){ - * describe('#indexOf()', function(){ - * it('should return -1 when not present', function(){ - * - * }); - * - * it('should return the index when present', function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context){ - - // noop variants - - context.xdescribe = function(){}; - context.xit = function(){}; - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.describe = context.context = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn(); - suites.shift(); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.it = function(title, fn){ - suites[0].addTest(new Test(title, fn)); - }; - }); -}; - -}); // module: interfaces/bdd.js - -require.register("interfaces/exports.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * exports.Array = { - * '#indexOf()': { - * 'should return -1 when the value is not present': function(){ - * - * }, - * - * 'should return the correct index when the value is present': function(){ - * - * } - * } - * }; - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('require', visit); - - function visit(obj) { - var suite; - for (var key in obj) { - if ('function' == typeof obj[key]) { - var fn = obj[key]; - switch (key) { - case 'before': - suites[0].beforeAll(fn); - break; - case 'after': - suites[0].afterAll(fn); - break; - case 'beforeEach': - suites[0].beforeEach(fn); - break; - case 'afterEach': - suites[0].afterEach(fn); - break; - default: - suites[0].addTest(new Test(key, fn)); - } - } else { - var suite = Suite.create(suites[0], key); - suites.unshift(suite); - visit(obj[key]); - suites.shift(); - } - } - } -}; -}); // module: interfaces/exports.js - -require.register("interfaces/index.js", function(module, exports, require){ - -exports.bdd = require('./bdd'); -exports.tdd = require('./tdd'); -exports.qunit = require('./qunit'); -exports.exports = require('./exports'); - -}); // module: interfaces/index.js - -require.register("interfaces/qunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * QUnit-style interface: - * - * suite('Array'); - * - * test('#length', function(){ - * var arr = [1,2,3]; - * ok(arr.length == 3); - * }); - * - * test('#indexOf()', function(){ - * var arr = [1,2,3]; - * ok(arr.indexOf(1) == 0); - * ok(arr.indexOf(2) == 1); - * ok(arr.indexOf(3) == 2); - * }); - * - * suite('String'); - * - * test('#length', function(){ - * ok('foo'.length == 3); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context){ - - /** - * Execute before running tests. - */ - - context.before = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after running tests. - */ - - context.after = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Execute before each test case. - */ - - context.beforeEach = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.afterEach = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Describe a "suite" with the given `title`. - */ - - context.suite = function(title){ - if (suites.length > 1) suites.shift(); - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - suites[0].addTest(new Test(title, fn)); - }; - }); -}; - -}); // module: interfaces/qunit.js - -require.register("interfaces/tdd.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Suite = require('../suite') - , Test = require('../test'); - -/** - * TDD-style interface: - * - * suite('Array', function(){ - * suite('#indexOf()', function(){ - * suiteSetup(function(){ - * - * }); - * - * test('should return -1 when not present', function(){ - * - * }); - * - * test('should return the index when present', function(){ - * - * }); - * - * suiteTeardown(function(){ - * - * }); - * }); - * }); - * - */ - -module.exports = function(suite){ - var suites = [suite]; - - suite.on('pre-require', function(context){ - - /** - * Execute before each test case. - */ - - context.setup = function(fn){ - suites[0].beforeEach(fn); - }; - - /** - * Execute after each test case. - */ - - context.teardown = function(fn){ - suites[0].afterEach(fn); - }; - - /** - * Execute before the suite. - */ - - context.suiteSetup = function(fn){ - suites[0].beforeAll(fn); - }; - - /** - * Execute after the suite. - */ - - context.suiteTeardown = function(fn){ - suites[0].afterAll(fn); - }; - - /** - * Describe a "suite" with the given `title` - * and callback `fn` containing nested suites - * and/or tests. - */ - - context.suite = function(title, fn){ - var suite = Suite.create(suites[0], title); - suites.unshift(suite); - fn(); - suites.shift(); - }; - - /** - * Describe a specification or test-case - * with the given `title` and callback `fn` - * acting as a thunk. - */ - - context.test = function(title, fn){ - suites[0].addTest(new Test(title, fn)); - }; - }); -}; - -}); // module: interfaces/tdd.js - -require.register("mocha.js", function(module, exports, require){ - -/*! - * mocha - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var path = require('browser/path'); - -/** - * Expose `Mocha`. - */ - -exports = module.exports = Mocha; - -/** - * Library version. - */ - -exports.version = '1.1.0'; - -/** - * Expose internals. - */ - -exports.utils = require('./utils'); -exports.interfaces = require('./interfaces'); -exports.reporters = require('./reporters'); -exports.Runnable = require('./runnable'); -exports.Context = require('./context'); -exports.Runner = require('./runner'); -exports.Suite = require('./suite'); -exports.Hook = require('./hook'); -exports.Test = require('./test'); - -/** - * Return image `name` path. - * - * @param {String} name - * @return {String} - * @api private - */ - -function image(name) { - return __dirname + '/../images/' + name + '.png'; -} - -/** - * Setup mocha with `options`. - * - * Options: - * - * - `ui` name "bdd", "tdd", "exports" etc - * - `reporter` reporter instance, defaults to `mocha.reporters.Dot` - * - `globals` array of accepted globals - * - `timeout` timeout in milliseconds - * - `ignoreLeaks` ignore global leaks - * - `grep` string or regexp to filter tests with - * - * @param {Object} options - * @api public - */ - -function Mocha(options) { - options = options || {}; - this.files = []; - this.options = options; - this.grep(options.grep); - this.suite = new exports.Suite('', new exports.Context); - this.ui(options.ui); - this.reporter(options.reporter); - if (options.timeout) this.suite.timeout(options.timeout); -} - -/** - * Add test `file`. - * - * @param {String} file - * @api public - */ - -Mocha.prototype.addFile = function(file){ - this.files.push(file); - return this; -}; - -/** - * Set reporter to `name`, defaults to "dot". - * - * @param {String} name - * @api public - */ - -Mocha.prototype.reporter = function(name){ - name = name || 'dot'; - this._reporter = require('./reporters/' + name); - if (!this._reporter) throw new Error('invalid reporter "' + name + '"'); - return this; -}; - -/** - * Set test UI `name`, defaults to "bdd". - * - * @param {String} bdd - * @api public - */ - -Mocha.prototype.ui = function(name){ - name = name || 'bdd'; - this._ui = exports.interfaces[name]; - if (!this._ui) throw new Error('invalid interface "' + name + '"'); - this._ui = this._ui(this.suite); - return this; -}; - -/** - * Load registered files. - * - * @api private - */ - -Mocha.prototype.loadFiles = function(){ - var suite = this.suite; - this.files.forEach(function(file){ - file = path.resolve(file); - suite.emit('pre-require', global, file); - suite.emit('require', require(file), file); - suite.emit('post-require', global, file); - }); -}; - -/** - * Enable growl support. - * - * @api private - */ - -Mocha.prototype.growl = function(runner, reporter) { - var notify = require('growl'); - - runner.on('end', function(){ - var stats = reporter.stats; - if (stats.failures) { - var msg = stats.failures + ' of ' + runner.total + ' tests failed'; - notify(msg, { title: 'Failed', image: image('fail') }); - } else { - notify(stats.passes + ' tests passed in ' + stats.duration + 'ms', { - title: 'Passed' - , image: image('pass') - }); - } - }); -}; - -/** - * Add regexp to grep for to the options object - * - * @param {RegExp} or {String} re - * @return {Mocha} - * @api public - */ - -Mocha.prototype.grep = function(re){ - this.options.grep = 'string' == typeof re - ? new RegExp(re) - : re; - return this; -}; - -/** - * Run tests and invoke `fn()` when complete. - * - * @param {Function} fn - * @return {Runner} - * @api public - */ - -Mocha.prototype.run = function(fn){ - this.loadFiles(); - var suite = this.suite; - var options = this.options; - var runner = new exports.Runner(suite); - var reporter = new this._reporter(runner); - runner.ignoreLeaks = options.ignoreLeaks; - if (options.grep) runner.grep(options.grep); - if (options.globals) runner.globals(options.globals); - if (options.growl) this.growl(runner, reporter); - return runner.run(fn); -}; -}); // module: mocha.js - -require.register("reporters/base.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var tty = require('browser/tty') - , diff = require('browser/diff'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Check if both stdio streams are associated with a tty. - */ - -var isatty = tty.isatty(1) && tty.isatty(2); - -/** - * Expose `Base`. - */ - -exports = module.exports = Base; - -/** - * Enable coloring by default. - */ - -exports.useColors = isatty; - -/** - * Default color map. - */ - -exports.colors = { - 'pass': 90 - , 'fail': 31 - , 'bright pass': 92 - , 'bright fail': 91 - , 'bright yellow': 93 - , 'pending': 36 - , 'suite': 0 - , 'error title': 0 - , 'error message': 31 - , 'error stack': 90 - , 'checkmark': 32 - , 'fast': 90 - , 'medium': 33 - , 'slow': 31 - , 'green': 32 - , 'light': 90 - , 'diff gutter': 90 - , 'diff added': 42 - , 'diff removed': 41 -}; - -/** - * Color `str` with the given `type`, - * allowing colors to be disabled, - * as well as user-defined color - * schemes. - * - * @param {String} type - * @param {String} str - * @return {String} - * @api private - */ - -var color = exports.color = function(type, str) { - if (!exports.useColors) return str; - return '\033[' + exports.colors[type] + 'm' + str + '\033[0m'; -}; - -/** - * Expose term window size, with some - * defaults for when stderr is not a tty. - */ - -exports.window = { - width: isatty - ? process.stdout.getWindowSize - ? process.stdout.getWindowSize(1)[0] - : tty.getWindowSize()[1] - : 75 -}; - -/** - * Expose some basic cursor interactions - * that are common among reporters. - */ - -exports.cursor = { - hide: function(){ - process.stdout.write('\033[?25l'); - }, - - show: function(){ - process.stdout.write('\033[?25h'); - }, - - deleteLine: function(){ - process.stdout.write('\033[2K'); - }, - - beginningOfLine: function(){ - process.stdout.write('\033[0G'); - }, - - CR: function(){ - exports.cursor.deleteLine(); - exports.cursor.beginningOfLine(); - } -}; - -/** - * A test is considered slow if it - * exceeds the following value in milliseconds. - */ - -exports.slow = 75; - -/** - * Outut the given `failures` as a list. - * - * @param {Array} failures - * @api public - */ - -exports.list = function(failures){ - console.error(); - failures.forEach(function(test, i){ - // format - var fmt = color('error title', ' %s) %s:\n') - + color('error message', ' %s') - + color('error stack', '\n%s\n'); - - // msg - var err = test.err - , message = err.message || '' - , stack = err.stack || message - , index = stack.indexOf(message) + message.length - , msg = stack.slice(0, index) - , actual = err.actual - , expected = err.expected; - - // actual / expected diff - if ('string' == typeof actual && 'string' == typeof expected) { - var len = Math.max(actual.length, expected.length); - - if (len < 20) msg = errorDiff(err, 'Chars'); - else msg = errorDiff(err, 'Words'); - - // linenos - var lines = msg.split('\n'); - if (lines.length > 4) { - var width = String(lines.length).length; - msg = lines.map(function(str, i){ - return pad(++i, width) + ' |' + ' ' + str; - }).join('\n'); - } - - // legend - msg = '\n' - + color('diff removed', 'actual') - + ' ' - + color('diff added', 'expected') - + '\n\n' - + msg - + '\n'; - - // indent - msg = msg.replace(/^/gm, ' '); - - fmt = color('error title', ' %s) %s:\n%s') - + color('error stack', '\n%s\n'); - } - - // indent stack trace without msg - stack = stack.slice(index ? index + 1 : index) - .replace(/^/gm, ' '); - - console.error(fmt, (i + 1), test.fullTitle(), msg, stack); - }); -}; - -/** - * Initialize a new `Base` reporter. - * - * All other reporters generally - * inherit from this reporter, providing - * stats such as test duration, number - * of tests passed / failed etc. - * - * @param {Runner} runner - * @api public - */ - -function Base(runner) { - var self = this - , stats = this.stats = { suites: 0, tests: 0, passes: 0, pending: 0, failures: 0 } - , failures = this.failures = []; - - if (!runner) return; - this.runner = runner; - - runner.on('start', function(){ - stats.start = new Date; - }); - - runner.on('suite', function(suite){ - stats.suites = stats.suites || 0; - suite.root || stats.suites++; - }); - - runner.on('test end', function(test){ - stats.tests = stats.tests || 0; - stats.tests++; - }); - - runner.on('pass', function(test){ - stats.passes = stats.passes || 0; - - var medium = exports.slow / 2; - test.speed = test.duration > exports.slow - ? 'slow' - : test.duration > medium - ? 'medium' - : 'fast'; - - stats.passes++; - }); - - runner.on('fail', function(test, err){ - stats.failures = stats.failures || 0; - stats.failures++; - test.err = err; - failures.push(test); - }); - - runner.on('end', function(){ - stats.end = new Date; - stats.duration = new Date - stats.start; - }); - - runner.on('pending', function(){ - stats.pending++; - }); -} - -/** - * Output common epilogue used by many of - * the bundled reporters. - * - * @api public - */ - -Base.prototype.epilogue = function(){ - var stats = this.stats - , fmt - , tests; - - console.log(); - - function pluralize(n) { - return 1 == n ? 'test' : 'tests'; - } - - // failure - if (stats.failures) { - fmt = color('bright fail', ' ?') - + color('fail', ' %d of %d %s failed') - + color('light', ':') - - console.error(fmt, - stats.failures, - this.runner.total, - pluralize(this.runner.total)); - - Base.list(this.failures); - console.error(); - return; - } - - // pass - fmt = color('bright pass', ' ?') - + color('green', ' %d %s complete') - + color('light', ' (%dms)'); - - console.log(fmt, - stats.tests || 0, - pluralize(stats.tests), - stats.duration); - - // pending - if (stats.pending) { - fmt = color('pending', ' •') - + color('pending', ' %d %s pending'); - - console.log(fmt, stats.pending, pluralize(stats.pending)); - } - - console.log(); -}; - -/** - * Pad the given `str` to `len`. - * - * @param {String} str - * @param {String} len - * @return {String} - * @api private - */ - -function pad(str, len) { - str = String(str); - return Array(len - str.length + 1).join(' ') + str; -} - -/** - * Return a character diff for `err`. - * - * @param {Error} err - * @return {String} - * @api private - */ - -function errorDiff(err, type) { - return diff['diff' + type](err.actual, err.expected).map(function(str){ - if (/^(\n+)$/.test(str.value)) str.value = Array(++RegExp.$1.length).join(''); - if (str.added) return colorLines('diff added', str.value); - if (str.removed) return colorLines('diff removed', str.value); - return str.value; - }).join(''); -} - -/** - * Color lines for `str`, using the color `name`. - * - * @param {String} name - * @param {String} str - * @return {String} - * @api private - */ - -function colorLines(name, str) { - return str.split('\n').map(function(str){ - return color(name, str); - }).join('\n'); -} - -}); // module: reporters/base.js - -require.register("reporters/doc.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Doc`. - */ - -exports = module.exports = Doc; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Doc(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , indents = 2; - - function indent() { - return Array(indents).join(' '); - } - - runner.on('suite', function(suite){ - if (suite.root) return; - ++indents; - console.log('%s
      ', indent()); - ++indents; - console.log('%s

      %s

      ', indent(), suite.title); - console.log('%s
      ', indent()); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - console.log('%s
      ', indent()); - --indents; - console.log('%s
      ', indent()); - --indents; - }); - - runner.on('pass', function(test){ - console.log('%s
      %s
      ', indent(), test.title); - var code = utils.escape(clean(test.fn.toString())); - console.log('%s
      %s
      ', indent(), code); - }); -} - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -function clean(str) { - str = str - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , re = new RegExp('^ {' + spaces + '}', 'gm'); - - str = str.replace(re, ''); - - return str; -} -}); // module: reporters/doc.js - -require.register("reporters/dot.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `Dot`. - */ - -exports = module.exports = Dot; - -/** - * Initialize a new `Dot` matrix test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Dot(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , n = 0; - - runner.on('start', function(){ - process.stdout.write('\n '); - }); - - runner.on('pending', function(test){ - process.stdout.write(color('pending', '.')); - }); - - runner.on('pass', function(test){ - if (++n % width == 0) process.stdout.write('\n '); - if ('slow' == test.speed) { - process.stdout.write(color('bright yellow', '.')); - } else { - process.stdout.write(color(test.speed, '.')); - } - }); - - runner.on('fail', function(test, err){ - if (++n % width == 0) process.stdout.write('\n '); - process.stdout.write(color('fail', '.')); - }); - - runner.on('end', function(){ - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Dot.prototype = new Base; -Dot.prototype.constructor = Dot; - -}); // module: reporters/dot.js - -require.register("reporters/html-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var JSONCov = require('./json-cov') - , fs = require('browser/fs'); - -/** - * Expose `HTMLCov`. - */ - -exports = module.exports = HTMLCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTMLCov(runner) { - var jade = require('jade') - , file = __dirname + '/templates/coverage.jade' - , str = fs.readFileSync(file, 'utf8') - , fn = jade.compile(str, { filename: file }) - , self = this; - - JSONCov.call(this, runner, false); - - runner.on('end', function(){ - process.stdout.write(fn({ - cov: self.cov - , coverageClass: coverageClass - })); - }); -} - -function coverageClass(n) { - if (n >= 75) return 'high'; - if (n >= 50) return 'medium'; - if (n >= 25) return 'low'; - return 'terrible'; -} -}); // module: reporters/html-cov.js - -require.register("reporters/html.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , Progress = require('../browser/progress') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `Doc`. - */ - -exports = module.exports = HTML; - -/** - * Stats template. - */ - -var statsTemplate = '
        ' - + '
      • ' - + '
      • passes: 0
      • ' - + '
      • failures: 0
      • ' - + '
      • duration: 0s
      • ' - + '
      '; - -/** - * Initialize a new `Doc` reporter. - * - * @param {Runner} runner - * @api public - */ - -function HTML(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , root = document.getElementById('mocha') - , stat = fragment(statsTemplate) - , items = stat.getElementsByTagName('li') - , passes = items[1].getElementsByTagName('em')[0] - , failures = items[2].getElementsByTagName('em')[0] - , duration = items[3].getElementsByTagName('em')[0] - , canvas = stat.getElementsByTagName('canvas')[0] - , report = fragment('
        ') - , stack = [report] - , progress - , ctx - - if (canvas.getContext) { - ctx = canvas.getContext('2d'); - progress = new Progress; - } - - if (!root) return error('#mocha div missing, add it to your document'); - - root.appendChild(stat); - root.appendChild(report); - - if (progress) progress.size(40); - - runner.on('suite', function(suite){ - if (suite.root) return; - - // suite - var url = location.protocol + '//' + location.host + location.pathname + '?grep=^' + utils.escapeRegexp(suite.fullTitle()); - var el = fragment('
      • %s

      • ', url, suite.title); - - // container - stack[0].appendChild(el); - stack.unshift(document.createElement('ul')); - el.appendChild(stack[0]); - }); - - runner.on('suite end', function(suite){ - if (suite.root) return; - stack.shift(); - }); - - runner.on('fail', function(test, err){ - if ('hook' == test.type || err.uncaught) runner.emit('test end', test); - }); - - runner.on('test end', function(test){ - // TODO: add to stats - var percent = stats.tests / total * 100 | 0; - if (progress) progress.update(percent).draw(ctx); - - // update stats - var ms = new Date - stats.start; - text(passes, stats.passes); - text(failures, stats.failures); - text(duration, (ms / 1000).toFixed(2)); - - // test - if ('passed' == test.state) { - var el = fragment('
      • %e%ems

      • ', test.speed, test.title, test.duration); - } else if (test.pending) { - var el = fragment('
      • %e

      • ', test.title); - } else { - var el = fragment('
      • %e

      • ', test.title); - var str = test.err.stack || test.err.toString(); - - // FF / Opera do not add the message - if (!~str.indexOf(test.err.message)) { - str = test.err.message + '\n' + str; - } - - // <=IE7 stringifies to [Object Error]. Since it can be overloaded, we - // check for the result of the stringifying. - if ('[object Error]' == str) str = test.err.message; - - // Safari doesn't give you a stack. Let's at least provide a source line. - if (!test.err.stack && test.err.sourceURL && test.err.line !== undefined) { - str += "\n(" + test.err.sourceURL + ":" + test.err.line + ")"; - } - - el.appendChild(fragment('
        %e
        ', str)); - } - - // toggle code - var h2 = el.getElementsByTagName('h2')[0]; - - on(h2, 'click', function(){ - pre.style.display = 'none' == pre.style.display - ? 'block' - : 'none'; - }); - - // code - // TODO: defer - if (!test.pending) { - var pre = fragment('
        %e
        ', clean(test.fn.toString())); - el.appendChild(pre); - pre.style.display = 'none'; - } - - stack[0].appendChild(el); - }); -} - -/** - * Display error `msg`. - */ - -function error(msg) { - document.body.appendChild(fragment('
        %s
        ', msg)); -} - -/** - * Return a DOM fragment from `html`. - */ - -function fragment(html) { - var args = arguments - , div = document.createElement('div') - , i = 1; - - div.innerHTML = html.replace(/%([se])/g, function(_, type){ - switch (type) { - case 's': return String(args[i++]); - case 'e': return escape(args[i++]); - } - }); - - return div.firstChild; -} - -/** - * Set `el` text to `str`. - */ - -function text(el, str) { - if (el.textContent) { - el.textContent = str; - } else { - el.innerText = str; - } -} - -/** - * Listen on `event` with callback `fn`. - */ - -function on(el, event, fn) { - if (el.addEventListener) { - el.addEventListener(event, fn, false); - } else { - el.attachEvent('on' + event, fn); - } -} - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -function clean(str) { - str = str - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , re = new RegExp('^ {' + spaces + '}', 'gm'); - - str = str - .replace(re, '') - .replace(/^\s+/, ''); - - return str; -} - -}); // module: reporters/html.js - -require.register("reporters/index.js", function(module, exports, require){ - -exports.Base = require('./base'); -exports.Dot = require('./dot'); -exports.Doc = require('./doc'); -exports.TAP = require('./tap'); -exports.JSON = require('./json'); -exports.HTML = require('./html'); -exports.List = require('./list'); -exports.Min = require('./min'); -exports.Spec = require('./spec'); -exports.Progress = require('./progress'); -exports.Landing = require('./landing'); -exports.JSONCov = require('./json-cov'); -exports.HTMLCov = require('./html-cov'); -exports.JSONStream = require('./json-stream'); -exports.XUnit = require('./xunit') -exports.Teamcity = require('./teamcity') - -}); // module: reporters/index.js - -require.register("reporters/json-cov.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `JSONCov`. - */ - -exports = module.exports = JSONCov; - -/** - * Initialize a new `JsCoverage` reporter. - * - * @param {Runner} runner - * @param {Boolean} output - * @api public - */ - -function JSONCov(runner, output) { - var self = this - , output = 1 == arguments.length ? true : output; - - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var cov = global._$jscoverage || {}; - var result = self.cov = map(cov); - result.stats = self.stats; - result.tests = tests.map(clean); - result.failures = failures.map(clean); - result.passes = passes.map(clean); - if (!output) return; - process.stdout.write(JSON.stringify(result, null, 2 )); - }); -} - -/** - * Map jscoverage data to a JSON structure - * suitable for reporting. - * - * @param {Object} cov - * @return {Object} - * @api private - */ - -function map(cov) { - var ret = { - instrumentation: 'node-jscoverage' - , sloc: 0 - , hits: 0 - , misses: 0 - , coverage: 0 - , files: [] - }; - - for (var filename in cov) { - var data = coverage(filename, cov[filename]); - ret.files.push(data); - ret.hits += data.hits; - ret.misses += data.misses; - ret.sloc += data.sloc; - } - - if (ret.sloc > 0) { - ret.coverage = (ret.hits / ret.sloc) * 100; - } - - return ret; -}; - -/** - * Map jscoverage data for a single source file - * to a JSON structure suitable for reporting. - * - * @param {String} filename name of the source file - * @param {Object} data jscoverage coverage data - * @return {Object} - * @api private - */ - -function coverage(filename, data) { - var ret = { - filename: filename, - coverage: 0, - hits: 0, - misses: 0, - sloc: 0, - source: {} - }; - - data.source.forEach(function(line, num){ - num++; - - if (data[num] === 0) { - ret.misses++; - ret.sloc++; - } else if (data[num] !== undefined) { - ret.hits++; - ret.sloc++; - } - - ret.source[num] = { - source: line - , coverage: data[num] === undefined - ? '' - : data[num] - }; - }); - - ret.coverage = ret.hits / ret.sloc * 100; - - return ret; -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} - -}); // module: reporters/json-cov.js - -require.register("reporters/json-stream.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total; - - runner.on('start', function(){ - console.log(JSON.stringify(['start', { total: total }])); - }); - - runner.on('pass', function(test){ - console.log(JSON.stringify(['pass', clean(test)])); - }); - - runner.on('fail', function(test, err){ - console.log(JSON.stringify(['fail', clean(test)])); - }); - - runner.on('end', function(){ - process.stdout.write(JSON.stringify(['end', self.stats])); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json-stream.js - -require.register("reporters/json.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `JSON`. - */ - -exports = module.exports = JSONReporter; - -/** - * Initialize a new `JSON` reporter. - * - * @param {Runner} runner - * @api public - */ - -function JSONReporter(runner) { - var self = this; - Base.call(this, runner); - - var tests = [] - , failures = [] - , passes = []; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('pass', function(test){ - passes.push(test); - }); - - runner.on('fail', function(test){ - failures.push(test); - }); - - runner.on('end', function(){ - var obj = { - stats: self.stats - , tests: tests.map(clean) - , failures: failures.map(clean) - , passes: passes.map(clean) - }; - - process.stdout.write(JSON.stringify(obj, null, 2)); - }); -} - -/** - * Return a plain-object representation of `test` - * free of cyclic properties etc. - * - * @param {Object} test - * @return {Object} - * @api private - */ - -function clean(test) { - return { - title: test.title - , fullTitle: test.fullTitle() - , duration: test.duration - } -} -}); // module: reporters/json.js - -require.register("reporters/landing.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Landing`. - */ - -exports = module.exports = Landing; - -/** - * Airplane color. - */ - -Base.colors.plane = 0; - -/** - * Airplane crash color. - */ - -Base.colors['plane crash'] = 31; - -/** - * Runway color. - */ - -Base.colors.runway = 90; - -/** - * Initialize a new `Landing` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Landing(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , width = Base.window.width * .75 | 0 - , total = runner.total - , stream = process.stdout - , plane = color('plane', '?') - , crashed = -1 - , n = 0; - - function runway() { - var buf = Array(width).join('-'); - return ' ' + color('runway', buf); - } - - runner.on('start', function(){ - stream.write('\n '); - cursor.hide(); - }); - - runner.on('test end', function(test){ - // check if the plane crashed - var col = -1 == crashed - ? width * ++n / total | 0 - : crashed; - - // show the crash - if ('failed' == test.state) { - plane = color('plane crash', '?'); - crashed = col; - } - - // render landing strip - stream.write('\033[4F\n\n'); - stream.write(runway()); - stream.write('\n '); - stream.write(color('runway', Array(col).join('·'))); - stream.write(plane) - stream.write(color('runway', Array(width - col).join('·') + '\n')); - stream.write(runway()); - stream.write('\033[0m'); - }); - - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Landing.prototype = new Base; -Landing.prototype.constructor = Landing; - -}); // module: reporters/landing.js - -require.register("reporters/list.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `List`. - */ - -exports = module.exports = List; - -/** - * Initialize a new `List` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function List(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , n = 0; - - runner.on('start', function(){ - console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(color('pass', ' ' + test.fullTitle() + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = color('checkmark', ' -') - + color('pending', ' %s'); - console.log(fmt, test.fullTitle()); - }); - - runner.on('pass', function(test){ - var fmt = color('checkmark', ' ?') - + color('pass', ' %s: ') - + color(test.speed, '%dms'); - cursor.CR(); - console.log(fmt, test.fullTitle(), test.duration); - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(color('fail', ' %d) %s'), ++n, test.fullTitle()); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -List.prototype = new Base; -List.prototype.constructor = List; - - -}); // module: reporters/list.js - -require.register("reporters/markdown.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils'); - -/** - * Expose `Markdown`. - */ - -exports = module.exports = Markdown; - -/** - * Initialize a new `Markdown` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Markdown(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , level = 0 - , buf = ''; - - function title(str) { - return Array(level).join('#') + ' ' + str; - } - - function indent() { - return Array(level).join(' '); - } - - function mapTOC(suite, obj) { - var ret = obj; - obj = obj[suite.title] = obj[suite.title] || { suite: suite }; - suite.suites.forEach(function(suite){ - mapTOC(suite, obj); - }); - return ret; - } - - function stringifyTOC(obj, level) { - ++level; - var buf = ''; - var link; - for (var key in obj) { - if ('suite' == key) continue; - if (key) link = ' - [' + key + '](#' + utils.slug(obj[key].suite.fullTitle()) + ')\n'; - if (key) buf += Array(level).join(' ') + link; - buf += stringifyTOC(obj[key], level); - } - --level; - return buf; - } - - function generateTOC(suite) { - var obj = mapTOC(suite, {}); - return stringifyTOC(obj, 0); - } - - generateTOC(runner.suite); - - runner.on('suite', function(suite){ - ++level; - var slug = utils.slug(suite.fullTitle()); - buf += '' + '\n'; - buf += title(suite.title) + '\n'; - }); - - runner.on('suite end', function(suite){ - --level; - }); - - runner.on('pass', function(test){ - var code = clean(test.fn.toString()); - buf += test.title + '.\n'; - buf += '\n```js'; - buf += code + '\n'; - buf += '```\n\n'; - }); - - runner.on('end', function(){ - process.stdout.write('# TOC\n'); - process.stdout.write(generateTOC(runner.suite)); - process.stdout.write(buf); - }); -} - -/** - * Strip the function definition from `str`, - * and re-indent for pre whitespace. - */ - -function clean(str) { - str = str - .replace(/^function *\(.*\) *{/, '') - .replace(/\s+\}$/, ''); - - var spaces = str.match(/^\n?( *)/)[1].length - , re = new RegExp('^ {' + spaces + '}', 'gm'); - - str = str.replace(re, ''); - - return str; -} -}); // module: reporters/markdown.js - -require.register("reporters/min.js", function(module, exports, require){ -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Min`. - */ - -exports = module.exports = Min; - -/** - * Initialize a new `Min` minimal test reporter (best used with --watch). - * - * @param {Runner} runner - * @api public - */ - -function Min(runner) { - Base.call(this, runner); - - runner.on('start', function(){ - // clear screen - process.stdout.write('\033[2J'); - // set cursor position - process.stdout.write('\033[1;3H'); - }); - - runner.on('end', this.epilogue.bind(this)); -} - -/** - * Inherit from `Base.prototype`. - */ - -Min.prototype = new Base; -Min.prototype.constructor = Min; - -}); // module: reporters/min.js - -require.register("reporters/progress.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Progress`. - */ - -exports = module.exports = Progress; - -/** - * General progress bar color. - */ - -Base.colors.progress = 90; - -/** - * Initialize a new `Progress` bar test reporter. - * - * @param {Runner} runner - * @param {Object} options - * @api public - */ - -function Progress(runner, options) { - Base.call(this, runner); - - var self = this - , options = options || {} - , stats = this.stats - , width = Base.window.width * .50 | 0 - , total = runner.total - , complete = 0 - , max = Math.max; - - // default chars - options.open = options.open || '['; - options.complete = options.complete || '?'; - options.incomplete = options.incomplete || '·'; - options.close = options.close || ']'; - options.verbose = false; - - // tests started - runner.on('start', function(){ - console.log(); - cursor.hide(); - }); - - // tests complete - runner.on('test end', function(){ - complete++; - var incomplete = total - complete - , percent = complete / total - , n = width * percent | 0 - , i = width - n; - - cursor.CR(); - process.stdout.write('\033[J'); - process.stdout.write(color('progress', ' ' + options.open)); - process.stdout.write(Array(n).join(options.complete)); - process.stdout.write(Array(i).join(options.incomplete)); - process.stdout.write(color('progress', options.close)); - if (options.verbose) { - process.stdout.write(color('progress', ' ' + complete + ' of ' + total)); - } - }); - - // tests are complete, output some stats - // and the failures if any - runner.on('end', function(){ - cursor.show(); - console.log(); - self.epilogue(); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -Progress.prototype = new Base; -Progress.prototype.constructor = Progress; - - -}); // module: reporters/progress.js - -require.register("reporters/spec.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `Spec`. - */ - -exports = module.exports = Spec; - -/** - * Initialize a new `Spec` test reporter. - * - * @param {Runner} runner - * @api public - */ - -function Spec(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , indents = 0 - , n = 0; - - function indent() { - return Array(indents).join(' ') - } - - runner.on('start', function(){ - console.log(); - }); - - runner.on('suite', function(suite){ - ++indents; - console.log(color('suite', '%s%s'), indent(), suite.title); - }); - - runner.on('suite end', function(suite){ - --indents; - if (1 == indents) console.log(); - }); - - runner.on('test', function(test){ - process.stdout.write(indent() + color('pass', ' ? ' + test.title + ': ')); - }); - - runner.on('pending', function(test){ - var fmt = indent() + color('pending', ' - %s'); - console.log(fmt, test.title); - }); - - runner.on('pass', function(test){ - if ('fast' == test.speed) { - var fmt = indent() - + color('checkmark', ' ?') - + color('pass', ' %s '); - cursor.CR(); - console.log(fmt, test.title); - } else { - var fmt = indent() - + color('checkmark', ' ?') - + color('pass', ' %s ') - + color(test.speed, '(%dms)'); - cursor.CR(); - console.log(fmt, test.title, test.duration); - } - }); - - runner.on('fail', function(test, err){ - cursor.CR(); - console.log(indent() + color('fail', ' %d) %s'), ++n, test.title); - }); - - runner.on('end', self.epilogue.bind(self)); -} - -/** - * Inherit from `Base.prototype`. - */ - -Spec.prototype = new Base; -Spec.prototype.constructor = Spec; - - -}); // module: reporters/spec.js - -require.register("reporters/tap.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , cursor = Base.cursor - , color = Base.color; - -/** - * Expose `TAP`. - */ - -exports = module.exports = TAP; - -/** - * Initialize a new `TAP` reporter. - * - * @param {Runner} runner - * @api public - */ - -function TAP(runner) { - Base.call(this, runner); - - var self = this - , stats = this.stats - , total = runner.total - , n = 1; - - runner.on('start', function(){ - console.log('%d..%d', 1, total); - }); - - runner.on('test end', function(){ - ++n; - }); - - runner.on('pending', function(test){ - console.log('ok %d %s # SKIP -', n, title(test)); - }); - - runner.on('pass', function(test){ - console.log('ok %d %s', n, title(test)); - }); - - runner.on('fail', function(test, err){ - console.log('not ok %d %s', n, title(test)); - console.log(err.stack.replace(/^/gm, ' ')); - }); -} - -/** - * Return a TAP-safe title of `test` - * - * @param {Object} test - * @return {String} - * @api private - */ - -function title(test) { - return test.fullTitle().replace(/#/g, ''); -} - -}); // module: reporters/tap.js - -require.register("reporters/teamcity.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base'); - -/** - * Expose `Teamcity`. - */ - -exports = module.exports = Teamcity; - -/** - * Initialize a new `Teamcity` reporter. - * - * @param {Runner} runner - * @api public - */ - -function Teamcity(runner) { - Base.call(this, runner); - var stats = this.stats; - - runner.on('start', function() { - console.log("##teamcity[testSuiteStarted name='mocha.suite']"); - }); - - runner.on('test', function(test) { - console.log("##teamcity[testStarted name='" + escape(test.fullTitle()) + "']"); - }); - - runner.on('fail', function(test, err) { - console.log("##teamcity[testFailed name='" + escape(test.fullTitle()) + "' message='" + escape(err.message) + "']"); - }); - - runner.on('pending', function(test) { - console.log("##teamcity[testIgnored name='" + escape(test.fullTitle()) + "' message='pending']"); - }); - - runner.on('test end', function(test) { - console.log("##teamcity[testFinished name='" + escape(test.fullTitle()) + "' duration='" + test.duration + "']"); - }); - - runner.on('end', function() { - console.log("##teamcity[testSuiteFinished name='mocha.suite' duration='" + stats.duration + "']"); - }); -} - -/** - * Escape the given `str`. - */ - -function escape(str) { - return str - .replace(/\|/g, "||") - .replace(/\n/g, "|n") - .replace(/\r/g, "|r") - .replace(/\[/g, "|[") - .replace(/\]/g, "|]") - .replace(/\u0085/g, "|x") - .replace(/\u2028/g, "|l") - .replace(/\u2029/g, "|p") - .replace(/'/g, "|'"); -} - -}); // module: reporters/teamcity.js - -require.register("reporters/xunit.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Base = require('./base') - , utils = require('../utils') - , escape = utils.escape; - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `XUnit`. - */ - -exports = module.exports = XUnit; - -/** - * Initialize a new `XUnit` reporter. - * - * @param {Runner} runner - * @api public - */ - -function XUnit(runner) { - Base.call(this, runner); - var stats = this.stats - , tests = [] - , self = this; - - runner.on('test end', function(test){ - tests.push(test); - }); - - runner.on('end', function(){ - console.log(tag('testsuite', { - name: 'Mocha Tests' - , tests: stats.tests - , failures: stats.failures - , errors: stats.failures - , skip: stats.tests - stats.failures - stats.passes - , timestamp: (new Date).toUTCString() - , time: stats.duration / 1000 - }, false)); - - tests.forEach(test); - console.log(''); - }); -} - -/** - * Inherit from `Base.prototype`. - */ - -XUnit.prototype = new Base; -XUnit.prototype.constructor = XUnit; - - -/** - * Output tag for the given `test.` - */ - -function test(test) { - var attrs = { - classname: test.parent.fullTitle() - , name: test.title - , time: test.duration / 1000 - }; - - if ('failed' == test.state) { - var err = test.err; - attrs.message = escape(err.message); - console.log(tag('testcase', attrs, false, tag('failure', attrs, false, cdata(err.stack)))); - } else if (test.pending) { - console.log(tag('testcase', attrs, false, tag('skipped', {}, true))); - } else { - console.log(tag('testcase', attrs, true) ); - } -} - -/** - * HTML tag helper. - */ - -function tag(name, attrs, close, content) { - var end = close ? '/>' : '>' - , pairs = [] - , tag; - - for (var key in attrs) { - pairs.push(key + '="' + escape(attrs[key]) + '"'); - } - - tag = '<' + name + (pairs.length ? ' ' + pairs.join(' ') : '') + end; - if (content) tag += content + ''; -} - -}); // module: reporters/xunit.js - -require.register("runnable.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('runnable'); - -/** - * Save timer references to avoid Sinon interfering (see GH-237). - */ - -var Date = global.Date - , setTimeout = global.setTimeout - , setInterval = global.setInterval - , clearTimeout = global.clearTimeout - , clearInterval = global.clearInterval; - -/** - * Expose `Runnable`. - */ - -module.exports = Runnable; - -/** - * Initialize a new `Runnable` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Runnable(title, fn) { - this.title = title; - this.fn = fn; - this.async = fn && fn.length; - this.sync = ! this.async; - this._timeout = 2000; - this.timedOut = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runnable.prototype = new EventEmitter; -Runnable.prototype.constructor = Runnable; - - -/** - * Set & get timeout `ms`. - * - * @param {Number} ms - * @return {Runnable|Number} ms or self - * @api private - */ - -Runnable.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - debug('timeout %d', ms); - this._timeout = ms; - if (this.timer) this.resetTimeout(); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Runnable.prototype.fullTitle = function(){ - return this.parent.fullTitle() + ' ' + this.title; -}; - -/** - * Clear the timeout. - * - * @api private - */ - -Runnable.prototype.clearTimeout = function(){ - clearTimeout(this.timer); -}; - -/** - * Reset the timeout. - * - * @api private - */ - -Runnable.prototype.resetTimeout = function(){ - var self = this - , ms = this.timeout(); - - this.clearTimeout(); - if (ms) { - this.timer = setTimeout(function(){ - self.callback(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } -}; - -/** - * Run the test and invoke `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runnable.prototype.run = function(fn){ - var self = this - , ms = this.timeout() - , start = new Date - , ctx = this.ctx - , finished - , emitted; - - if (ctx) ctx.runnable(this); - - // timeout - if (this.async) { - if (ms) { - this.timer = setTimeout(function(){ - done(new Error('timeout of ' + ms + 'ms exceeded')); - self.timedOut = true; - }, ms); - } - } - - // called multiple times - function multiple() { - if (emitted) return; - emitted = true; - self.emit('error', new Error('done() called multiple times')); - } - - // finished - function done(err) { - if (self.timedOut) return; - if (finished) return multiple(); - self.clearTimeout(); - self.duration = new Date - start; - finished = true; - fn(err); - } - - // for .resetTimeout() - this.callback = done; - - // async - if (this.async) { - try { - this.fn.call(ctx, function(err){ - if (err instanceof Error) return done(err); - if (null != err) return done(new Error('done() invoked with non-Error: ' + err)); - done(); - }); - } catch (err) { - done(err); - } - return; - } - - // sync - try { - if (!this.pending) this.fn.call(ctx); - this.duration = new Date - start; - fn(); - } catch (err) { - fn(err); - } -}; - -}); // module: runnable.js - -require.register("runner.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('runner') - , Test = require('./test') - , utils = require('./utils') - , noop = function(){}; - -/** - * Expose `Runner`. - */ - -module.exports = Runner; - -/** - * Initialize a `Runner` for the given `suite`. - * - * Events: - * - * - `start` execution started - * - `end` execution complete - * - `suite` (suite) test suite execution started - * - `suite end` (suite) all tests (and sub-suites) have finished - * - `test` (test) test execution started - * - `test end` (test) test completed - * - `hook` (hook) hook execution started - * - `hook end` (hook) hook complete - * - `pass` (test) test passed - * - `fail` (test, err) test failed - * - * @api public - */ - -function Runner(suite) { - var self = this; - this._globals = []; - this.suite = suite; - this.total = suite.total(); - this.failures = 0; - this.on('test end', function(test){ self.checkGlobals(test); }); - this.on('hook end', function(hook){ self.checkGlobals(hook); }); - this.grep(/.*/); - this.globals(utils.keys(global).concat(['errno'])); -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Runner.prototype = new EventEmitter; -Runner.prototype.constructor = Runner; - - -/** - * Run tests with full titles matching `re`. Updates runner.total - * with number of tests matched. - * - * @param {RegExp} re - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.grep = function(re){ - debug('grep %s', re); - this._grep = re; - this.total = this.grepTotal(this.suite); - return this; -}; - -/** - * Returns the number of tests matching the grep search for the - * given suite. - * - * @param {Suite} suite - * @return {Number} - * @api public - */ - -Runner.prototype.grepTotal = function(suite) { - var self = this; - var total = 0; - - suite.eachTest(function(test){ - if (self._grep.test(test.fullTitle())) total++; - }); - - return total; -}; - -/** - * Allow the given `arr` of globals. - * - * @param {Array} arr - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.globals = function(arr){ - if (0 == arguments.length) return this._globals; - debug('globals %j', arr); - utils.forEach(arr, function(arr){ - this._globals.push(arr); - }, this); - return this; -}; - -/** - * Check for global variable leaks. - * - * @api private - */ - -Runner.prototype.checkGlobals = function(test){ - if (this.ignoreLeaks) return; - var leaks = utils.filter(utils.keys(global), function(key){ - var matched = utils.filter(this._globals, function(allowed){ - return allowed == key || key.lastIndexOf(allowed.split('*')[0], 0) == 0; - }); - return matched.length == 0 && (!global.navigator || 'onerror' !== key); - }, this); - - this._globals = this._globals.concat(leaks); - - if (leaks.length > 1) { - this.fail(test, new Error('global leaks detected: ' + leaks.join(', ') + '')); - } else if (leaks.length) { - this.fail(test, new Error('global leak detected: ' + leaks[0])); - } -}; - -/** - * Fail the given `test`. - * - * @param {Test} test - * @param {Error} err - * @api private - */ - -Runner.prototype.fail = function(test, err){ - ++this.failures; - test.state = 'failed'; - if ('string' == typeof err) { - err = new Error('the string "' + err + '" was thrown, throw an Error :)'); - } - this.emit('fail', test, err); -}; - -/** - * Fail the given `hook` with `err`. - * - * Hook failures (currently) hard-end due - * to that fact that a failing hook will - * surely cause subsequent tests to fail, - * causing jumbled reporting. - * - * @param {Hook} hook - * @param {Error} err - * @api private - */ - -Runner.prototype.failHook = function(hook, err){ - this.fail(hook, err); - this.emit('end'); -}; - -/** - * Run hook `name` callbacks and then invoke `fn()`. - * - * @param {String} name - * @param {Function} function - * @api private - */ - -Runner.prototype.hook = function(name, fn){ - var suite = this.suite - , hooks = suite['_' + name] - , ms = suite._timeout - , self = this - , timer; - - function next(i) { - var hook = hooks[i]; - if (!hook) return fn(); - self.currentRunnable = hook; - - self.emit('hook', hook); - - hook.on('error', function(err){ - self.failHook(hook, err); - }); - - hook.run(function(err){ - hook.removeAllListeners('error'); - if (err) return self.failHook(hook, err); - self.emit('hook end', hook); - next(++i); - }); - } - - process.nextTick(function(){ - next(0); - }); -}; - -/** - * Run hook `name` for the given array of `suites` - * in order, and callback `fn(err)`. - * - * @param {String} name - * @param {Array} suites - * @param {Function} fn - * @api private - */ - -Runner.prototype.hooks = function(name, suites, fn){ - var self = this - , orig = this.suite; - - function next(suite) { - self.suite = suite; - - if (!suite) { - self.suite = orig; - return fn(); - } - - self.hook(name, function(err){ - if (err) { - self.suite = orig; - return fn(err); - } - - next(suites.pop()); - }); - } - - next(suites.pop()); -}; - -/** - * Run hooks from the top level down. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookUp = function(name, fn){ - var suites = [this.suite].concat(this.parents()).reverse(); - this.hooks(name, suites, fn); -}; - -/** - * Run hooks from the bottom up. - * - * @param {String} name - * @param {Function} fn - * @api private - */ - -Runner.prototype.hookDown = function(name, fn){ - var suites = [this.suite].concat(this.parents()); - this.hooks(name, suites, fn); -}; - -/** - * Return an array of parent Suites from - * closest to furthest. - * - * @return {Array} - * @api private - */ - -Runner.prototype.parents = function(){ - var suite = this.suite - , suites = []; - while (suite = suite.parent) suites.push(suite); - return suites; -}; - -/** - * Run the current test and callback `fn(err)`. - * - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTest = function(fn){ - var test = this.test - , self = this; - - try { - test.on('error', function(err){ - self.fail(test, err); - }); - test.run(fn); - } catch (err) { - fn(err); - } -}; - -/** - * Run tests in the given `suite` and invoke - * the callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runTests = function(suite, fn){ - var self = this - , tests = suite.tests - , test; - - function next(err) { - // if we bail after first err - if (self.failures && suite._bail) return fn(); - - // next test - test = tests.shift(); - - // all done - if (!test) return fn(); - - // grep - if (!self._grep.test(test.fullTitle())) return next(); - - // pending - if (test.pending) { - self.emit('pending', test); - self.emit('test end', test); - return next(); - } - - // execute test and hook(s) - self.emit('test', self.test = test); - self.hookDown('beforeEach', function(){ - self.currentRunnable = self.test; - self.runTest(function(err){ - test = self.test; - - if (err) { - self.fail(test, err); - self.emit('test end', test); - return self.hookUp('afterEach', next); - } - - test.state = 'passed'; - self.emit('pass', test); - self.emit('test end', test); - self.hookUp('afterEach', next); - }); - }); - } - - this.next = next; - next(); -}; - -/** - * Run the given `suite` and invoke the - * callback `fn()` when complete. - * - * @param {Suite} suite - * @param {Function} fn - * @api private - */ - -Runner.prototype.runSuite = function(suite, fn){ - var total = this.grepTotal(suite) - , self = this - , i = 0; - - debug('run suite %s', suite.fullTitle()); - - if (!total) return fn(); - - this.emit('suite', this.suite = suite); - - function next() { - var curr = suite.suites[i++]; - if (!curr) return done(); - self.runSuite(curr, next); - } - - function done() { - self.suite = suite; - self.hook('afterAll', function(){ - self.emit('suite end', suite); - fn(); - }); - } - - this.hook('beforeAll', function(){ - self.runTests(suite, next); - }); -}; - -/** - * Handle uncaught exceptions. - * - * @param {Error} err - * @api private - */ - -Runner.prototype.uncaught = function(err){ - debug('uncaught exception'); - var runnable = this.currentRunnable; - if ('failed' == runnable.state) return; - runnable.clearTimeout(); - err.uncaught = true; - this.fail(runnable, err); - - // recover from test - if ('test' == runnable.type) { - this.emit('test end', runnable); - this.hookUp('afterEach', this.next); - return; - } - - // bail on hooks - this.emit('end'); -}; - -/** - * Run the root suite and invoke `fn(failures)` - * on completion. - * - * @param {Function} fn - * @return {Runner} for chaining - * @api public - */ - -Runner.prototype.run = function(fn){ - var self = this - , fn = fn || function(){}; - - debug('start'); - - // callback - this.on('end', function(){ - debug('end'); - process.removeListener('uncaughtException', this.uncaught); - fn(self.failures); - }); - - // run suites - this.emit('start'); - this.runSuite(this.suite, function(){ - debug('finished running'); - self.emit('end'); - }); - - // uncaught exception - process.on('uncaughtException', function(err){ - self.uncaught(err); - }); - - return this; -}; - -}); // module: runner.js - -require.register("suite.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var EventEmitter = require('browser/events').EventEmitter - , debug = require('browser/debug')('suite') - , utils = require('./utils') - , Hook = require('./hook'); - -/** - * Expose `Suite`. - */ - -exports = module.exports = Suite; - -/** - * Create a new `Suite` with the given `title` - * and parent `Suite`. When a suite with the - * same title is already present, that suite - * is returned to provide nicer reporter - * and more flexible meta-testing. - * - * @param {Suite} parent - * @param {String} title - * @return {Suite} - * @api public - */ - -exports.create = function(parent, title){ - var suite = new Suite(title, parent.ctx); - suite.parent = parent; - title = suite.fullTitle(); - parent.addSuite(suite); - return suite; -}; - -/** - * Initialize a new `Suite` with the given - * `title` and `ctx`. - * - * @param {String} title - * @param {Context} ctx - * @api private - */ - -function Suite(title, ctx) { - this.title = title; - this.ctx = ctx; - this.suites = []; - this.tests = []; - this._beforeEach = []; - this._beforeAll = []; - this._afterEach = []; - this._afterAll = []; - this.root = !title; - this._timeout = 2000; - this._bail = false; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Suite.prototype = new EventEmitter; -Suite.prototype.constructor = Suite; - - -/** - * Return a clone of this `Suite`. - * - * @return {Suite} - * @api private - */ - -Suite.prototype.clone = function(){ - var suite = new Suite(this.title); - debug('clone'); - suite.ctx = this.ctx; - suite.timeout(this.timeout()); - suite.bail(this.bail()); - return suite; -}; - -/** - * Set timeout `ms` or short-hand such as "2s". - * - * @param {Number|String} ms - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.timeout = function(ms){ - if (0 == arguments.length) return this._timeout; - if (String(ms).match(/s$/)) ms = parseFloat(ms) * 1000; - debug('timeout %d', ms); - this._timeout = parseInt(ms, 10); - return this; -}; - -/** - * Sets whether to bail after first error. - * - * @parma {Boolean} bail - * @return {Suite|Number} for chaining - * @api private - */ - -Suite.prototype.bail = function(bail){ - if (0 == arguments.length) return this._bail; - debug('bail %s', bail); - this._bail = bail; - return this; -}; - -/** - * Run `fn(test[, done])` before running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeAll = function(fn){ - var hook = new Hook('"before all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.ctx = this.ctx; - this._beforeAll.push(hook); - this.emit('beforeAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after running tests. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterAll = function(fn){ - var hook = new Hook('"after all" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.ctx = this.ctx; - this._afterAll.push(hook); - this.emit('afterAll', hook); - return this; -}; - -/** - * Run `fn(test[, done])` before each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.beforeEach = function(fn){ - var hook = new Hook('"before each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.ctx = this.ctx; - this._beforeEach.push(hook); - this.emit('beforeEach', hook); - return this; -}; - -/** - * Run `fn(test[, done])` after each test case. - * - * @param {Function} fn - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.afterEach = function(fn){ - var hook = new Hook('"after each" hook', fn); - hook.parent = this; - hook.timeout(this.timeout()); - hook.ctx = this.ctx; - this._afterEach.push(hook); - this.emit('afterEach', hook); - return this; -}; - -/** - * Add a test `suite`. - * - * @param {Suite} suite - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addSuite = function(suite){ - suite.parent = this; - suite.timeout(this.timeout()); - suite.bail(this.bail()); - this.suites.push(suite); - this.emit('suite', suite); - return this; -}; - -/** - * Add a `test` to this suite. - * - * @param {Test} test - * @return {Suite} for chaining - * @api private - */ - -Suite.prototype.addTest = function(test){ - test.parent = this; - test.timeout(this.timeout()); - test.ctx = this.ctx; - this.tests.push(test); - this.emit('test', test); - return this; -}; - -/** - * Return the full title generated by recursively - * concatenating the parent's full title. - * - * @return {String} - * @api public - */ - -Suite.prototype.fullTitle = function(){ - if (this.parent) { - var full = this.parent.fullTitle(); - if (full) return full + ' ' + this.title; - } - return this.title; -}; - -/** - * Return the total number of tests. - * - * @return {Number} - * @api public - */ - -Suite.prototype.total = function(){ - return utils.reduce(this.suites, function(sum, suite){ - return sum + suite.total(); - }, 0) + this.tests.length; -}; - -/** - * Iterates through each suite recursively to find - * all tests. Applies a function in the format - * `fn(test)`. - * - * @param {Function} fn - * @return {Suite} - * @api private - */ - -Suite.prototype.eachTest = function(fn){ - utils.forEach(this.tests, fn); - utils.forEach(this.suites, function(suite){ - suite.eachTest(fn); - }); - return this; -}; - -}); // module: suite.js - -require.register("test.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var Runnable = require('./runnable'); - -/** - * Expose `Test`. - */ - -module.exports = Test; - -/** - * Initialize a new `Test` with the given `title` and callback `fn`. - * - * @param {String} title - * @param {Function} fn - * @api private - */ - -function Test(title, fn) { - Runnable.call(this, title, fn); - this.pending = !fn; - this.type = 'test'; -} - -/** - * Inherit from `Runnable.prototype`. - */ - -Test.prototype = new Runnable; -Test.prototype.constructor = Test; - - -/** - * Inspect the context void of private properties. - * - * @return {String} - * @api private - */ - -Test.prototype.inspect = function(){ - return JSON.stringify(this, function(key, val){ - return '_' == key[0] - ? undefined - : 'parent' == key - ? '#' - : val; - }, 2); -}; -}); // module: test.js - -require.register("utils.js", function(module, exports, require){ - -/** - * Module dependencies. - */ - -var fs = require('browser/fs') - , path = require('browser/path') - , join = path.join - , debug = require('browser/debug')('watch'); - -/** - * Ignored directories. - */ - -var ignore = ['node_modules', '.git']; - -/** - * Escape special characters in the given string of html. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html) { - return String(html) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(//g, '>'); -}; - -/** - * Array#forEach (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.forEach = function(arr, fn, scope) { - for (var i = 0, l = arr.length; i < l; i++) - fn.call(scope, arr[i], i); -}; - -/** - * Array#indexOf (<=IE8) - * - * @parma {Array} arr - * @param {Object} obj to find index of - * @param {Number} start - * @api private - */ - -exports.indexOf = function (arr, obj, start) { - for (var i = start || 0, l = arr.length; i < l; i++) { - if (arr[i] === obj) - return i; - } - return -1; -}; - -/** - * Array#reduce (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} initial value - * @param {Object} scope - * @api private - */ - -exports.reduce = function(arr, fn, val, scope) { - var rval = val; - - for (var i = 0, l = arr.length; i < l; i++) { - rval = fn.call(scope, rval, arr[i], i, arr); - } - - return rval; -}; - -/** - * Array#filter (<=IE8) - * - * @param {Array} array - * @param {Function} fn - * @param {Object} scope - * @api private - */ - -exports.filter = function(arr, fn, scope) { - var ret = []; - - for (var i = 0, l = arr.length; i < l; i++) { - var val = arr[i]; - if (fn.call(scope, val, i, arr)) - ret.push(val); - } - - return ret; -}; - -/** - * Object.keys (<=IE8) - * - * @param {Object} obj - * @return {Array} keys - * @api private - */ - -exports.keys = Object.keys || function(obj) { - var keys = [] - , has = Object.prototype.hasOwnProperty // for `window` on <=IE8 - - for (var key in obj) { - if (has.call(obj, key)) { - keys.push(key); - } - } - - return keys; -}; - -/** - * Watch the given `files` for changes - * and invoke `fn(file)` on modification. - * - * @param {Array} files - * @param {Function} fn - * @api private - */ - -exports.watch = function(files, fn){ - var options = { interval: 100 }; - files.forEach(function(file){ - debug('file %s', file); - fs.watchFile(file, options, function(curr, prev){ - if (prev.mtime < curr.mtime) fn(file); - }); - }); -}; - -/** - * Ignored files. - */ - -function ignored(path){ - return !~ignore.indexOf(path); -} - -/** - * Lookup files in the given `dir`. - * - * @return {Array} - * @api private - */ - -exports.files = function(dir, ret){ - ret = ret || []; - - fs.readdirSync(dir) - .filter(ignored) - .forEach(function(path){ - path = join(dir, path); - if (fs.statSync(path).isDirectory()) { - exports.files(path, ret); - } else if (path.match(/\.(js|coffee)$/)) { - ret.push(path); - } - }); - - return ret; -}; - -/** - * Compute a slug from the given `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.slug = function(str){ - return str - .toLowerCase() - .replace(/ +/g, '-') - .replace(/[^-\w]/g, ''); -}; - -/** - * Escape regular expression characters in `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -exports.escapeRegexp = function(str){ - return str.replace(/[-\\^$*+?.()|[\]{}]/g, "\\$&"); -}; -}); // module: utils.js -/** - * Node shims. - * - * These are meant only to allow - * mocha.js to run untouched, not - * to allow running node code in - * the browser. - */ - -process = {}; -process.exit = function(status){}; -process.stdout = {}; -global = window; - -/** - * next tick implementation. - */ - -process.nextTick = (function(){ - // postMessage behaves badly on IE8 - if (window.ActiveXObject || !window.postMessage) { - return function(fn){ fn() }; - } - - // based on setZeroTimeout by David Baron - // - http://dbaron.org/log/20100309-faster-timeouts - var timeouts = [] - , name = 'mocha-zero-timeout' - - window.addEventListener('message', function(e){ - if (e.source == window && e.data == name) { - if (e.stopPropagation) e.stopPropagation(); - if (timeouts.length) timeouts.shift()(); - } - }, true); - - return function(fn){ - timeouts.push(fn); - window.postMessage(name, '*'); - } -})(); - -/** - * Remove uncaughtException listener. - */ - -process.removeListener = function(e){ - if ('uncaughtException' == e) { - window.onerror = null; - } -}; - -/** - * Implements uncaughtException listener. - */ - -process.on = function(e, fn){ - if ('uncaughtException' == e) { - window.onerror = fn; - } -}; - -/** - * Expose mocha. - */ - -window.mocha = require('mocha'); - -// boot -;(function(){ - var suite = new mocha.Suite('', new mocha.Context) - , utils = mocha.utils - , options = {} - - /** - * Highlight the given string of `js`. - */ - - function highlight(js) { - return js - .replace(//g, '>') - .replace(/\/\/(.*)/gm, '//$1') - .replace(/('.*?')/gm, '$1') - .replace(/(\d+\.\d+)/gm, '$1') - .replace(/(\d+)/gm, '$1') - .replace(/\bnew *(\w+)/gm, 'new $1') - .replace(/\b(function|new|throw|return|var|if|else)\b/gm, '$1') - } - - /** - * Highlight code contents. - */ - - function highlightCode() { - var code = document.getElementsByTagName('code'); - for (var i = 0, len = code.length; i < len; ++i) { - code[i].innerHTML = highlight(code[i].innerHTML); - } - } - - /** - * Parse the given `qs`. - */ - - function parse(qs) { - return utils.reduce(qs.replace('?', '').split('&'), function(obj, pair){ - var i = pair.indexOf('=') - , key = pair.slice(0, i) - , val = pair.slice(++i); - - obj[key] = decodeURIComponent(val); - return obj; - }, {}); - } - - /** - * Setup mocha with the given setting options. - */ - - mocha.setup = function(opts){ - if ('string' === typeof opts) options.ui = opts; - else options = opts; - - ui = mocha.interfaces[options.ui]; - if (!ui) throw new Error('invalid mocha interface "' + ui + '"'); - if (options.timeout) suite.timeout(options.timeout); - ui(suite); - suite.emit('pre-require', window); - }; - - /** - * Run mocha, returning the Runner. - */ - - mocha.run = function(fn){ - suite.emit('run'); - var runner = new mocha.Runner(suite); - var Reporter = options.reporter || mocha.reporters.HTML; - var reporter = new Reporter(runner); - var query = parse(window.location.search || ""); - if (query.grep) runner.grep(new RegExp(query.grep)); - if (options.ignoreLeaks) runner.ignoreLeaks = true; - if (options.globals) runner.globals(options.globals); - runner.globals(['location']); - runner.on('end', highlightCode); - return runner.run(fn); - }; -})(); -})(); \ No newline at end of file diff --git a/node_modules/theory/test/numbers.js b/node_modules/theory/test/numbers.js deleted file mode 100644 index d1f109be..00000000 --- a/node_modules/theory/test/numbers.js +++ /dev/null @@ -1,86 +0,0 @@ -module.exports=require('../theory') -('numbers',function(a){ - describe('Numbers',function(){ - it('is()',function(){ - expect(theory.num(0).is()).to.be(true); - expect(theory.num(1).is()).to.be(true); - expect(theory.num(Infinity).is()).to.be(true); - expect(theory.num(NaN).is()).to.be(false); - expect(theory.num('').is()).to.be(false); - expect(theory.num('a').is()).to.be(false); - expect(theory.num([]).is()).to.be(false); - expect(theory.num([1]).is()).to.be(false); - expect(theory.num({}).is()).to.be(false); - expect(theory.num({a:1}).is()).to.be(false); - expect(theory.num(false).is()).to.be(false); - expect(theory.num(true).is()).to.be(false); - expect(theory.num(function(){}).is()).to.be(false); - }); - it('is',function(){ - expect(theory.num.is(0)).to.be(true); - expect(theory.num.is(1)).to.be(true); - expect(theory.num.is(Infinity)).to.be(true); - expect(theory.num.is(NaN)).to.be(false); - expect(theory.num.is('')).to.be(false); - expect(theory.num.is('a')).to.be(false); - expect(theory.num.is([])).to.be(false); - expect(theory.num.is([1])).to.be(false); - expect(theory.num.is({})).to.be(false); - expect(theory.num.is({a:1})).to.be(false); - expect(theory.num.is(false)).to.be(false); - expect(theory.num.is(true)).to.be(false); - expect(theory.num.is(function(){})).to.be(false); - }); - it('ify',function(){ - expect(theory.num('asdf').ify()).to.be(undefined); - expect(theory.num.ify('asdf')).to.be(undefined); - expect(theory.num(0).ify()).to.be(0); - expect(theory.num.ify(0)).to.be(0); - expect(theory.num(1).ify()).to.be(1); - expect(theory.num.ify(1)).to.be(1); - expect(theory.num(-1).ify()).to.be(-1); - expect(theory.num.ify(-1)).to.be(-1); - expect(theory.num('0').ify()).to.be(0); - expect(theory.num.ify('0')).to.be(0); - expect(theory.num('1').ify()).to.be(1); - expect(theory.num.ify('1')).to.be(1); - expect(theory.num('-1').ify()).to.be(-1); - expect(theory.num.ify('-1')).to.be(-1); - expect(theory.num('10').ify()).to.be(10); - expect(theory.num.ify('10')).to.be(10); - expect(theory.num('01').ify()).to.be(1); - expect(theory.num.ify('01')).to.be(1); - expect(theory.num('37.91').ify()).to.be(37.91); - expect(theory.num.ify('37.91')).to.be(37.91); - expect(theory.num('-7.3').ify()).to.be(-7.3); - expect(theory.num.ify('-7.3')).to.be(-7.3); - expect(theory.num('A14C').ify()).to.be(14); - expect(theory.num.ify('A14C')).to.be(14); - expect(theory.num('A14C2').ify()).to.be(14); - expect(theory.num.ify('A14C2')).to.be(14); - expect(theory.num('A2.1,2').ify()).to.be(2.1); - expect(theory.num.ify('A2.1,2')).to.be(2.1); - }); - it('ify []',function(){ - expect(theory.num(0).ify([])).to.eql([0]); - expect(theory.num.ify(0,[])).to.eql([0]); - expect(theory.num(1).ify([])).to.eql([1]); - expect(theory.num.ify(1,[])).to.eql([1]); - expect(theory.num('0').ify([])).to.eql([0]); - expect(theory.num.ify('0',[])).to.eql([0]); - expect(theory.num('A14C').ify([])).to.eql([14]); - expect(theory.num.ify('A14C',[])).to.eql([14]); - expect(theory.num('A14C2').ify([])).to.eql([14,2]); - expect(theory.num.ify('A14C2',[])).to.eql([14,2]); - expect(theory.num('A0.4C45,-100. Z 0032 - 5').ify([])).to.eql([0.4,45,-100,32,5]); - expect(theory.num.ify('A0.4C45,-100. Z 0032 - 5',[])).to.eql([0.4,45,-100,32,5]); - }); - it('random',function(){ - expect(theory.num.r().toString().length).to.be(6); - expect(theory.num(11).r().toString().length).to.be(11); - expect(theory.num.r([10,99]).toString().length).to.be(2); - expect(theory.num([-99,-10]).r().toString().length).to.be(3); - }); - }); - return 42; -}); \ No newline at end of file diff --git a/node_modules/theory/test/objects.js b/node_modules/theory/test/objects.js deleted file mode 100644 index f177bf19..00000000 --- a/node_modules/theory/test/objects.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports=require('../theory') -('hash',function(a){ - //var s='',i;for(i in a){s+=i+', '};alert('hash: '+s); - describe('Objects',function(){ - it('deps',function(){ - expect(a.object_is).to.be(undefined); - expect(root.ObjectUtils).to.be.ok(); - expect(a.object_util).to.be(undefined); - expect(a.get.has.status).to.be('done'); - expect(theory.object_union).to.eql({u:1}); - expect(root.CopyObject).to.be.ok(); - }); - }); - return {all:'your',tests:'belong',to:'us'}; -},{ - './sub/object_is':'' - ,'./sub/object_util':'util' - ,'./sub/object_get':'get' -}); \ No newline at end of file diff --git a/node_modules/theory/test/one.js b/node_modules/theory/test/one.js deleted file mode 100644 index b69972de..00000000 --- a/node_modules/theory/test/one.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports=require('../theory') -('one',function(a){ - return 1; -}); \ No newline at end of file diff --git a/node_modules/theory/test/ready.js b/node_modules/theory/test/ready.js deleted file mode 100644 index d99613a8..00000000 --- a/node_modules/theory/test/ready.js +++ /dev/null @@ -1 +0,0 @@ -root.Ready = true; \ No newline at end of file diff --git a/node_modules/theory/test/strings.js b/node_modules/theory/test/strings.js deleted file mode 100644 index 1d117644..00000000 --- a/node_modules/theory/test/strings.js +++ /dev/null @@ -1,70 +0,0 @@ -module.exports=require('../theory') -('language',function(a){ - var t = {}; - describe('Text',function(){ - it('is()',function(){ - expect(theory.text('').is()).to.be(true); - expect(theory.text('a').is()).to.be(true); - expect(theory.text(false).is()).to.be(false); - expect(theory.text(true).is()).to.be(false); - expect(theory.text(0).is()).to.be(false); - expect(theory.text(1).is()).to.be(false); - expect(theory.text([]).is()).to.be(false); - expect(theory.text([1]).is()).to.be(false); - expect(theory.text({}).is()).to.be(false); - expect(theory.text({a:1}).is()).to.be(false); - expect(theory.text(function(){}).is()).to.be(false); - }); - it('is',function(){ - expect(theory.text.is('')).to.be(true); - expect(theory.text.is('a')).to.be(true); - expect(theory.text.is(false)).to.be(false); - expect(theory.text.is(true)).to.be(false); - expect(theory.text.is(0)).to.be(false); - expect(theory.text.is(1)).to.be(false); - expect(theory.text.is([])).to.be(false); - expect(theory.text.is([1])).to.be(false); - expect(theory.text.is({})).to.be(false); - expect(theory.text.is({a:1})).to.be(false); - expect(theory.text.is(function(){})).to.be(false); - }); - it('ify',function(){ - expect(theory.text(0).ify()).to.be('0'); - expect(theory.text.ify(0)).to.be('0'); - expect(theory.text(22).ify()).to.be('22'); - expect(theory.text.ify(22)).to.be('22'); - expect(theory.text([true,33,'yay']).ify()).to.be('[true,33,"yay"]'); - expect(theory.text.ify([true,33,'yay'])).to.be('[true,33,"yay"]'); - expect(theory.text({a:0,b:'1',c:[0,'1'],d:{e:'f'}}).ify()).to.be('{"a":0,"b":"1","c":[0,"1"],"d":{"e":"f"}}'); - expect(theory.text.ify({a:0,b:'1',c:[0,'1'],d:{e:'f'}})).to.be('{"a":0,"b":"1","c":[0,"1"],"d":{"e":"f"}}'); - expect(theory.text(false).ify()).to.be('false'); - expect(theory.text.ify(false)).to.be('false'); - expect(theory.text(true).ify()).to.be('true'); - expect(theory.text.ify(true)).to.be('true'); - }); - it('random',function(){ - expect(theory.text.r().length).to.be(16); - expect(theory.text(11).r().length).to.be(11); - expect(theory.text.r(4).length).to.be(4); - t.tr = theory.text.r(2,'as'); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok(); - t.tr = theory.text.random('as',2); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok(); - t.tr = theory.text(2).random('as'); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok(); - t.tr = theory.text('as').random(2); expect((t.tr=='as'||t.tr=='aa'||t.tr=='sa'||t.tr=='ss')).to.be.ok(); - }); - it('clip',function(){ - expect(theory.text('A B C D').clip(' ',0,-1)).to.be('A B C'); - expect(theory.text.clip('A B C D',' ',0,-1)).to.be('A B C'); - expect(theory.text("path/to/awesome.js").clip('.',-1)).to.be('js'); - expect(theory.text.clip("path/to/awesome.js",'.',-1)).to.be('js'); - }); - it('caps',function(){ - expect(theory.text("shout!").caps()).to.be("SHOUT!"); - expect(theory.text.caps("shout!")).to.be("SHOUT!"); - }); - it('low',function(){ - expect(theory.text("HUSH 1").low()).to.be("hush 1"); - expect(theory.text.low("HUSH 1")).to.be("hush 1"); - }); - }); - return "Hello World!"; -}); \ No newline at end of file diff --git a/node_modules/theory/test/sub.js b/node_modules/theory/test/sub.js deleted file mode 100644 index 74b37a43..00000000 --- a/node_modules/theory/test/sub.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports=require('../theory') -('sub',function(a){ - describe('sub',function(){ - it('a',function(){ - expect(root.Add(2, a.one)).to.be(3); - }); - }); - return a.one; -},[ - './one' - ,'./sub/c' -]); \ No newline at end of file diff --git a/node_modules/theory/test/sub/add.js b/node_modules/theory/test/sub/add.js deleted file mode 100644 index 3422268b..00000000 --- a/node_modules/theory/test/sub/add.js +++ /dev/null @@ -1,3 +0,0 @@ -root.Add = function(z, y){ - return z + y; -} \ No newline at end of file diff --git a/node_modules/theory/test/sub/c.js b/node_modules/theory/test/sub/c.js deleted file mode 100644 index 164f7e1c..00000000 --- a/node_modules/theory/test/sub/c.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports=require('../../theory') -('check',function(a){ - describe('sub',function(){ - it('c',function(){ - expect(a.f).to.be('g'); - }); - }); - return a; -},{ - '../d':1 - ,'./e':'f' -}); \ No newline at end of file diff --git a/node_modules/theory/test/sub/e.js b/node_modules/theory/test/sub/e.js deleted file mode 100644 index 1ea4e5b5..00000000 --- a/node_modules/theory/test/sub/e.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports=require('../../theory') -('fan',function(a){ - return 'g'; -}); \ No newline at end of file diff --git a/node_modules/theory/test/sub/four.js b/node_modules/theory/test/sub/four.js deleted file mode 100644 index d26dad00..00000000 --- a/node_modules/theory/test/sub/four.js +++ /dev/null @@ -1 +0,0 @@ -root.Four = 4; \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_copy.js b/node_modules/theory/test/sub/object_copy.js deleted file mode 100644 index e89dfdbc..00000000 --- a/node_modules/theory/test/sub/object_copy.js +++ /dev/null @@ -1,32 +0,0 @@ -describe('objects',function(){ - var t = {}; - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('copy',function(){ - expect(theory.obj([]).copy()).to.eql([]); - expect(theory.obj.copy([])).to.eql([]); - expect(theory.obj({}).copy()).to.eql({}); - expect(theory.obj.copy({})).to.eql({}); - t.val = {a:1,b:'c',d:[0,1,2],e:{f:'g'},h:function(){ return 1 }}; - t.dup = theory.obj(t.val).copy(); - expect(t.dup.a).to.be(t.val.a); - expect(t.dup.b).to.be(t.val.b); - expect(t.dup.d).to.eql(t.val.d); - expect(t.dup.e).to.eql(t.val.e); - expect(t.dup.h()).to.eql(t.val.h()); - t.dup.d = 'diff'; - expect(t.dup.d).to.not.be(t.val.d); - t.val = t.dup = undefined; - t.val = {a:1,b:'c',d:[0,1,2],e:{f:'g'},h:function(){ return 1 }}; - t.dup = theory.obj(t.val).copy(); - expect(t.dup.a).to.be(t.val.a); - expect(t.dup.b).to.be(t.val.b); - expect(t.dup.d).to.eql(t.val.d); - expect(t.dup.e).to.eql(t.val.e); - expect(t.dup.h()).to.eql(t.val.h()); - t.dup.d = 'diff'; - expect(t.dup.d).to.not.be(t.val.d); - }); -}); -root.CopyObject = true; \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_get.js b/node_modules/theory/test/sub/object_get.js deleted file mode 100644 index de7d7c4d..00000000 --- a/node_modules/theory/test/sub/object_get.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports=require('../../theory') -('hash',function(a){ - describe('objects',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('get',function(){ - expect(theory.obj({a:1,b:2,c:3}).get('b')).to.be(2); - expect(theory.obj.get({a:1,b:2,c:3},'b')).to.be(2); - expect(theory.obj({a:1,b:{x:{z:7}},c:3}).get('b.pow.z.x')).to.be(undefined); - expect(theory.obj.get({a:1,b:{x:{z:7}},c:3},'b.pow.z.x')).to.be(undefined); - expect(theory.obj({a:1,b:{x:{z:7}},c:3}).get('b.x.z')).to.be(7); - expect(theory.obj.get({a:1,b:{x:{z:7}},c:3},'b.x.z')).to.be(7); - expect(theory.obj({a:1,b:[[1,2],[3,4],[{x:9}]],c:3}).get('b.x')).to.be(9); - expect(theory.obj.get({a:1,b:[[1,2],[3,4],[{x:9}]],c:3},'b.x')).to.be(9); - expect(theory.obj({a:1,b:[[1,2],[3,4],{x:9}],c:3}).get('b.1.x')).to.be(undefined); - expect(theory.obj.get({a:1,b:[[1,2],[3,4],{x:9}],c:3},'b.1.x')).to.be(undefined); - expect(theory.obj({a:1,b:[[1,2],[3,4],{x:9}],c:3}).get('b.3.x')).to.be(9); - expect(theory.obj.get({a:1,b:[[1,2],[3,4],{x:9}],c:3},'b.3.x')).to.be(9); - expect(theory.obj({a:1,b:[[1,2],[3,4],{x:9}],c:3}).get('b.-1.x')).to.be(9); - expect(theory.obj.get({a:1,b:[[1,2],[3,4],{x:9}],c:3},'b.-1.x')).to.be(9); - expect(theory.obj({a:{b:{c:null}}}).get('a.b.c')).to.be(null); - expect(theory.obj.get({a:{b:{c:null}}},'a.b.c')).to.be(null); - expect(theory.obj({a:{b:{c:null}}}).get('a.b.c->')).to.be.a('function'); - expect(theory.obj.get({a:{b:{c:null}}},'a.b.c->')).to.be.a('function'); - expect(theory.obj({a:{b:{c:function(){return 1}}}}).get('a.b.c->')()).to.be(1); - expect(theory.obj.get({a:{b:{c:function(){return 1}}}},'a.b.c->')()).to.be(1); - }); - }); - //var s='',i;for(i in a){s+=i+', '};alert('get: '+s); - return {has:{status:'done'}}; -},{ - './object_has':'has' - ,'./object_copy':'' -}) \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_has.js b/node_modules/theory/test/sub/object_has.js deleted file mode 100644 index db3f83d6..00000000 --- a/node_modules/theory/test/sub/object_has.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports=require('../../theory') -('object_has',function(a){ - describe('objects',function(){ - it('has',function(){ - expect(theory.obj({yay:false}).has('yay')).to.be(true); - expect(theory.obj.has({yay:false},'yay')).to.be(true); - expect(theory.obj({yay:false}).has('toString')).to.be(false); - expect(theory.obj.has({yay:false},'toString')).to.be(false); - }); - }); - return {status:'done'}; -},['./object_union']); \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_is.js b/node_modules/theory/test/sub/object_is.js deleted file mode 100644 index dfaab310..00000000 --- a/node_modules/theory/test/sub/object_is.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports=require('../../theory') -({name: 'is_object' -, init: function(a){ - describe('objects',function(){ - it('is()',function(){ - expect(theory.obj({}).is()).to.be(true); - expect(theory.obj({a:1}).is()).to.be(true); - expect(theory.obj(0).is()).to.be(false); - expect(theory.obj(1).is()).to.be(false); - expect(theory.obj('').is()).to.be(false); - expect(theory.obj('a').is()).to.be(false); - expect(theory.obj([]).is()).to.be(false); - expect(theory.obj([1]).is()).to.be(false); - expect(theory.obj(false).is()).to.be(false); - expect(theory.obj(true).is()).to.be(false); - expect(theory.obj(function(){}).is()).to.be(false); - }); - it('is',function(){ - expect(theory.obj.is({})).to.be(true); - expect(theory.obj.is({a:1})).to.be(true); - expect(theory.obj.is(0)).to.be(false); - expect(theory.obj.is(1)).to.be(false); - expect(theory.obj.is('')).to.be(false); - expect(theory.obj.is('a')).to.be(false); - expect(theory.obj.is([])).to.be(false); - expect(theory.obj.is([1])).to.be(false); - expect(theory.obj.is(false)).to.be(false); - expect(theory.obj.is(true)).to.be(false); - expect(theory.obj.is(function(){})).to.be(false); - }); - }); -}}); \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_union.js b/node_modules/theory/test/sub/object_union.js deleted file mode 100644 index 2d9498e0..00000000 --- a/node_modules/theory/test/sub/object_union.js +++ /dev/null @@ -1,17 +0,0 @@ -module.exports=require('../../theory') -('object_union',function(a){ - describe('objects',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('union',function(){ - expect(theory.obj({a:'b',c:'d'}).union({c:1,z:2})).to.eql({a:'b',c:'d',z:2}); - expect(theory.obj.union({a:'b',c:'d'},{c:1,z:2})).to.eql({a:'b',c:'d',z:2}); - expect(theory.obj({a:'b',c:'d'}).union({c:1,z:2},{x:3,y:4})).to.eql({a:'b',c:'d',z:2,x:3,y:4}); - expect(theory.obj.union({a:'b',c:'d'},{c:1,z:2},{x:3,y:4})).to.eql({a:'b',c:'d',z:2,x:3,y:4}); - expect(theory.obj([{a:'b',c:'d'},{c:1,z:2}]).u({ig:'nore'})).to.eql({a:'b',c:'d',z:2}); - expect(theory.obj.u([{a:'b',c:'d'},{c:1,z:2}],{ig:'nore'})).to.eql({a:'b',c:'d',z:2}); - }); - }); - return {u:1}; -}); \ No newline at end of file diff --git a/node_modules/theory/test/sub/object_util.js b/node_modules/theory/test/sub/object_util.js deleted file mode 100644 index 06e3b62d..00000000 --- a/node_modules/theory/test/sub/object_util.js +++ /dev/null @@ -1,26 +0,0 @@ -describe('objects',function(){ - beforeEach(function(done){ // IE6 stack release - setTimeout(function(){done()}, 0); - }); - it('ify',function(){ - expect(theory.obj('[0,1]').ify()).to.eql([0,1]); - expect(theory.obj.ify('[0,1]')).to.eql([0,1]); - expect(theory.obj('{"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}').ify()).to.eql({"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}); - expect(theory.obj.ify('{"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}')).to.eql({"a":false,"b":1,"c":"d","e":[0,1],"f":{"g":"h"}}); - }); - it('empty',function(){ - expect(theory.obj({}).empty()).to.be(true); - expect(theory.obj.empty({})).to.be(true); - expect(theory.obj({a:false}).empty()).to.be(false); - expect(theory.obj.empty({a:false})).to.be(false); - }); - it('each',function(){ - expect(theory.obj({a:'z',b:'y',c:'x'}).each(function(v,i,t){ t(v,i) })).to.eql({x:'c',y:'b',z:'a'}); - expect(theory.obj.each({a:'z',b:'y',c:'x'},function(v,i,t){ t(v,i) })).to.eql({x:'c',y:'b',z:'a'}); - expect(theory.obj({a:'z',b:false,c:'x'}).each(function(v,i,t){ if(!v){ return } t(i,v) })).to.eql({a:'z',c:'x'}); - expect(theory.obj.each({a:'z',b:false,c:'x'},function(v,i,t){ if(!v){ return } t(i,v) })).to.eql({a:'z',c:'x'}); - expect(theory.obj({a:'z',b:3,c:'x'}).each(function(v,i,t){ if(v===3){ return 0 }})).to.be(0); - expect(theory.obj.each({a:'z',b:3,c:'x'},function(v,i,t){ if(v===3){ return 0 }})).to.be(0); - }); -}); -root.ObjectUtils = true; \ No newline at end of file diff --git a/node_modules/theory/test/sub/three.js b/node_modules/theory/test/sub/three.js deleted file mode 100644 index e6de9802..00000000 --- a/node_modules/theory/test/sub/three.js +++ /dev/null @@ -1 +0,0 @@ -root.Three = 3; \ No newline at end of file diff --git a/node_modules/theory/test/sub/z.js b/node_modules/theory/test/sub/z.js deleted file mode 100644 index 9525fab6..00000000 --- a/node_modules/theory/test/sub/z.js +++ /dev/null @@ -1 +0,0 @@ -root.ZERO=0; \ No newline at end of file diff --git a/node_modules/theory/test/time.js b/node_modules/theory/test/time.js deleted file mode 100644 index d6fcde97..00000000 --- a/node_modules/theory/test/time.js +++ /dev/null @@ -1,27 +0,0 @@ -describe('Time',function(){ - var t = {}; - it('is',function(){ - t.ts = theory.time.is(); - expect(13 <= t.ts.toString().length).to.be.ok(); - }); - it('now',function(){ - t.ts = theory.time.now(); - expect(15 <= t.ts.toString().length).to.be.ok(); - }); - it('loop',function(done){ - t.count = 0; - t.loop = theory.time.loop(function(){ - if(t.count === 19){ - expect(theory.time.stop(t.loop)).to.be.ok(); - return done(); - } t.count++; - },7); - }); - it('wait',function(done){ - t.wait = theory.time.wait(function(){ - expect(true).to.be.ok(); - done(); - },57); - }); -}); -root.TimeFull = 'Time Travel'; \ No newline at end of file diff --git a/node_modules/theory/theory.js b/node_modules/theory/theory.js deleted file mode 100644 index a8beaffe..00000000 --- a/node_modules/theory/theory.js +++ /dev/null @@ -1,928 +0,0 @@ -/** THEORY **/ -;var theory=theory||null;if(theory){root.init()}else{ -theory=(function(b,c,fn){ - function theory(b,c){ - var a = (function(b,c){ - var a = a||theory, l = arguments.length; - if(l == 1){ - if(a.text.is(b)){ - return a.obj.get(a,b); - } - } if(l == 2){ - if(a.text.is(c)){ - return a.obj.get(b,c); - } - } - }); - if(this && theory.bi.is(this)){ return theorize(a) } - return a(b,c); - } var $, _; - function theorize(a){ - var $=undefined,_=undefined; - a.log = (function(s){ - //console.log(s); - return a.log; - }); - a.fns = (function(){ - function fns($){ - fns.$_ = $ !== undefined? $ : _; - return fns; - } var $; - fns.is = (function(fn){ - $ = fns.$_;fns.$_=_;fn = $||fn; - return (fn instanceof Function)? true : false; - }); - fns.flow = (function(s,f){ // TODO: BUG: Seriously reconsider then().done() because they fail on .end() after a synchronous callback, provide no doc or support for it until you do. - var t = (function(){ - var args = a.list.slit.call(arguments,0), n; - args.push(t); - n = (function(){ - (t.list[t.i++] || t.end).apply(t,args); - })(); - return t; - }), list = a.list.is(s)? s : a.list.is(f)? f : 0; - f = a.fns.is(f)? f : a.fns.is(s)? s : function(){}; - t.end = list? f : function(){}; // TODO: Receives `next` as param, is this desirable? - t.then = (function(fn){ - if(a.fns.is(fn)){ t.list.push(fn) } - return t; - }); - t.done = (function(fn){ - t.end = a.fns.is(fn)? fn : t.end; - return t; - }); - t.list = list || []; - t.i = 0; - if(list){ t() } - else{ f(t) } - return t; - }); - fns.sort = (function(args){ - if(!args){ return {e:"Empty"} } - var args = a.list.slit.call(args, 0), r = {b:[],n:[],t:[],l:[],o:[],f:[]}; - for(var i = 0; i < args.length; i++){ - if (fns.is(args[i])){ - r.f.push(args[i]); - } else if(a.list.is(args[i])){ - r.l.push(args[i]); - } else if(a.obj.is(args[i])){ - r.o.push(args[i]); - } else if(a.num.is(args[i])){ - r.n.push(args[i]); - } else if(a.text.is(args[i])){ - r.t.push(args[i]); - } else if(a.bi.is(args[i])){ - r.b.push(args[i]); - } - } - return r; - }); - fns.$ = (function(t,v){ - v = t.$; - t.$=_; - return v; - }); - fns.pass = (function(fn,o){ - $ = fns.$_;fns.$_=_;if($){ o=fn;fn=$ } - if(a.text.is(o)){ var tmp = a(fn,o); o = fn; fn = tmp } - if(!fns.is(fn)){ return _ } - return (function(){ - return fn.apply(o, a.list.slit.call(arguments)); - }); - }); - return fns; - })(); - a.list = (function(){ - function list($){ - list.$ = $ !== undefined? $ : _; - return list; - } var $; - list.is = (function(l){ - l = a.fns.$(list)||l; - return (l instanceof Array)? true : false; - }); - list.slit = Array.prototype.slice; - list.at = (function(l,i,opt){ - var r; - if($=a.fns.$(list)){ opt=i;i=l;l=$ } - if(!l||!i){ return undefined } - if(a.text.is(l)){ l = l.split('') } - if(i < 0){ - r = l.slice().reverse(); - i = Math.abs(i); - } opt = opt || {}; - if(opt.ebb){ - for(--i; 0 <= i; i--){ // upgrade to functionalize - if(r && r[i] !== undefined){ return r[i] } - else if(l[i] !== undefined){ return l[i] } - } return undefined; - } - return (r||l)[--i]; - }); - list.ify = (function(l,opt){ - if($=a.fns.$(list)){ opt=l;l=$ } - opt=opt||{}; - opt.wedge = opt.wedge||':'; - opt.split = opt.split||','; - var r = []; - if(a.list.is(l)){ - return l; - } else - if(a.text.is(l)){ - var r = new RegExp("\\s*\\"+opt.split+"\\s*",'ig'); - return l.split(r); - } else - if(a.obj.is(l)){ - a.obj(l).each(function(v,i){ - r.push(i+opt.wedge+(a.obj.is(v)? a.text.ify(v) : v)); - }); - } - return r; - }); - list.fuse = (function(l){ - var args = a.list.slit.call(arguments, 0), ll; - l = ($=a.fns.$(list))||l; - ll = $? a.fns.sort(args).l : a.fns.sort(args).l.slice(1); - return Array.prototype.concat.apply(l,ll); - }); - list.union = list.u = (function(l,ll){ //[1,2,3,4,5] u [3,5,6,7,8] = [1,2,3,4,5,6,7,8] - return not_implemented_yet; - if($=a.fns.$(list)){ ll=l;l=$ } - // yeaaah, try again. - return r; - }); - list.intersect = list.n = (function(l,ll){ //[1,2,3,4,5] n [3,5,6,7,8] = [3,5] - return not_implemented_yet; - if($=a.fns.$(list)){ ll=l;l=$ } - // yeaah, try again. - }); - list.less = (function(l,s){ // ToDo: Add ability to use a function to determine what is removed. - var args = a.list.slit.call(arguments, 0), sl = s, ls = l; - l = ($=a.fns.$(list))||l; - s = $? args : args.slice(1); - if($ === args.length){ l=ls;s=sl } - sl = s.length; - return a.list(l).each(function(v,i,t){ - if(1 == sl && a.test.is(v,s[0])){ return } else - if(a.list(s).each(function(w,j){ - if(a.test.is(v,w)){ return true } - })){ return } - t(v); - })||[]; - }); - list.each = list.find = (function(l,c,t){ - if($=a.fns.$(list)){ t=c;c=l;l=$ } - return a.obj.each(l,c,t); - }); - list.copy = (function(l){ - return a.obj.copy( ($=a.fns.$(list))||l ); - }); - list.index = 1; - return list; - })(); - a.obj = (function(){ - function obj($){ - obj.$ = $ !== undefined? $ : _; - return obj; - } var $; - obj.is = (function(o){ - o = a.fns.$(obj)||o; - return (o instanceof Object && !a.list.is(o) && !a.fns.is(o))? true : false; - }); - obj.ify = (function(o){ - o = a.fns.$(obj)||o; - if(a.obj.is(o)){ return o } - try{ - o = JSON.parse(o); - }catch(e){o={}}; - return o; - }); - obj.empty = (function(o){ - if(!(o = a.fns.$(obj)||o)){ return true } - return obj.each(o,function(v,i){ - if(i){ return true } - })? false : true; - }); - obj.copy = (function(o,r,l){ - if(!r){ - o = a.fns.$(obj) || o; - } l = a.list.is(o); - if(r && !a.obj.is(o) && !l){ return o } - r = {}; o = a.obj.each(o,function(v,i,t){ - l? t(obj.copy(v,true)) : (r[i] = obj.copy(v,true)); - })||[]; - return l? o : r; - }); - obj.union = obj.u = (function(x,y){ - var args = a.list.slit.call(arguments, 0), r = {}; - if($=a.fns.$(obj)){ y=x;x=$ } - if(a.list.is(x)){ y = x } else - if(a.list.is(y)){ } else { - y = $? args : args.slice(1); - y.splice(0,0,x); - } - a.list(y).each(function(v,i){ - a.obj(v).each(function(w,j){ - if(a.obj(r).has(j)){ return } - r[j] = w; - }); - }); - return r; - }); - obj.has = (function(o,k){ - if($=a.fns.$(obj)){ k=o;o=$ } - return Object.prototype.hasOwnProperty.call(o, k); - }); - obj.each = (function(l,c,_){ - if($=a.fns.$(obj)){ _=c;c=l;l=$ } - var i = 0, ii = 0, x, r, rr, f = a.fns.is(c), - t = (function(k,v){ - if(v !== undefined){ - rr = rr || {}; - rr[k] = v; - return; - } rr = rr || []; - rr.push(k); - }); - if(a.list.is(l)){ - x = l.length; - for(;i < x; i++){ - ii = (i + a.list.index); - if(f){ - r = _? c.call(_, l[i], ii, t) : c(l[i], ii, t); - if(r !== undefined){ return r } - } else { - if(a.test.is(c,l[i])){ return ii } - } - } - } else if(a.obj.is(l)){ - for(i in l){ - if(f){ - if(a.obj(l).has(i)){ - r = _? c.call(_, l[i], i, t) : c(l[i], i, t); - if(r !== undefined){ return r } - } - } else { - if(a.test.is(c,l[i])){ return i } - } - } - } - return f? rr : a.list.index? 0 : -1; - }); - obj.get = (function(o,l,opt,f){ - if($=a.fns.$(obj)){ l=o;o=$ } - if(a.num.is(l)){ l = a.text.ify(l) } - if(a.list.is(l)){ l = l.join('.') } - if(a.text.is(l)){ - f = (l.length == (l = l.replace(a.text.find.__.fn,'')).length)? - undefined : function(){}; l = l.split(a.text.find.__.dot); - } if(!l){ return } - var x = (l||[]).length, r, - deep = (function(o,v){ - return a.list(o).each(function(w,j){ - if(a.obj(w||{}).has(v)){ return w } - if(a.list.is(w)){ return deep(w,v) } - }); - }), get = (function(v,i,t,n){ - if(a.list.is(o)){ - if(/^\-?\d+$/.test(v)){ - n = a.list.index; - v = a.num.ify(v); - } else { - o = deep(o,v); - } - } - if(n || a.obj(o||{}).has(v)){ - o = n? a.list(o).at(v) : o[v]; - if(i === x - (a.list.index? 0 : 1)){ - return f? a.fns.is(o)? o : f : o; - } return; - } - return f || a.test.nil; - }); r = a.list(l).each(get); - return r === a.test.nil? undefined : r; - }); - return obj; - })(); - a.text = (function(){ - function text($){ - text.$ = $ !== undefined? $ : _; - return text; - } var $; - text.is = (function(t){ - t = (($=a.fns.$(text))!==_)?$:t; - return typeof t == 'string'?true:false; - }); - text.get = (function(q){ return }); - text.ify = (function(t){ - t = (($=a.fns.$(text))!==_)?$:t; - if(JSON){ return JSON.stringify(t) } - return t.toString? t.toString():t; - }); - text.random = text.r = (function(l,c){ - if($=a.fns.$(text)){ c=l;l=$ } var $ = $||l, s = ''; - l = a.num.is($)? $ : a.num.is(c)? c : 16; - c = a.text.is($)? $ : a.text.is(c)? c : '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz'; - while(l>0){ s += c.charAt(Math.floor(Math.random()*c.length)); l-- } - return s; - }); - text.clip = (function(t,r,s,e){ - if($=a.fns.$(text)){ e=s;s=r;r=t;t=$ } // IE6 fails if e === undefined with Mocha - return t = (t||'').split(r), t=a.num.is(e)?t.slice(s,e):t.slice(s), t.join(r); - }); - text.find = (function(t){ - var regex = {}; - a.log(regex.name = t.name+'.find'); - regex.is = /[\.\\\?\*\[\]\{\}\(\)\^\$\+\|\,]/ig - regex.special = {'.':1,'\\':1,'?':1,'*':1,'[':1,']':1,'{':1,'}':1,'(':1,')':1,'^':1,'$':1,'+':1,'|':1,',':1} - regex.mail = /^(("[\w-\s]+")|([\w-]+(?:[\.\+][\w-]+)*)|("[\w-\s]+")([\w-]+(?:[\.\+][\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i; - regex.base64 = new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$"); - regex.list = /(,\s|;\s|,|;|\s)/ig; - regex.css = /(.+?):(.+?);/ig; - regex.url = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; - regex.ext = /\.([^\.]+)$/i; - regex.ws_ = /\-/ig; - regex.space = /\s/ig; - regex.num = /(\-\d+\.\d+|\d+\.\d+|\-\d+|\d+)/g; - regex['int'] = /(\-\d+|\d+)/g; - regex.__ = { fn: /\-\>$/, dot: /\./ }; - return regex; - })(text); - text.caps = (function(t){ - t = a.fns.$(text)||t; - t = (text.is(t))?t:""; - return t.toUpperCase(); - }); - text.low = (function(t){ - t = a.fns.$(text)||t; - t = (text.is(t))?t:""; - return t.toLowerCase(); - }); - return text; - })(); - a.num = (function(){ - function num($){ - num.$ = ($ !== undefined? $ : _); - return num; - } var $; - num.is = (function(n){ - n = (($=a.fns.$(num))!==_)?$:n; - return ( (n===0)? true : (!isNaN(n) && !a.bi.is(n) && !a.list.is(n) && !a.text.is(n))? true : false); - }); - num.i = (function(n){return parseInt(a.fns.$(num)||n,10)}); - num.dec = (function(n){return parseFloat(a.fns.$(num)||n)}); - num.ify = (function(n,o){ - if(($=a.fns.$(num))!==_){ o=n;n=$ } - var r, l = a.list.is(o); - if(a.list.is(o)){ - if(a.num.is(n)){ - return [n]; - } if(a.text.is(n)){ - r = n.match(a.text.find.num) || []; - return a.list(r).each(function(v,i,t){ - t(a.num.ify(v)); - }); - } - } - r = num.dec(n); - if(a.num.is(r)){ return r } - if(!n){ return } - if(a.text.is(n)){ - return a.num.ify( (n.match(a.text.find.num)||[])[0] ); - } - }); - num.random = num.r = (function(l){ - l = ((($=a.fns.$(num))!==_)?$:l)||6; - if(a.list.is(l)){ return (Math.floor(Math.random() * (l[1] - l[0] + 1)) + l[0]) } - l = (l<=14)? l : 14; - var n = '9'; - for(var i = 0; i < l-1; i++){ n += '0' } - n = a.num.ify(n); - var r = function(){return Math.floor(Math.random()*10)||(l==1?0:r())}; - n = Math.floor(r() + Math.pow(Math.random(),Math.random()) * (n)); - if(n.toString().length != l){ return num.r(l) } - return n; - }); - return num; - })(); - a.bi = (function(){ - function bi($){ - bi.$ = $ !== undefined? $ : _; - return bi; - } var $; - bi.is = (function(b){ - b = (($=a.fns.$(bi))!==_)?$:b; - return (b instanceof Boolean || typeof b == 'boolean')?true:false; - }); - return bi; - })(); - a.on = (function(){ - function on($){ - on.$ = $ !== undefined? $ : _; - return on; - } var $, events = {}, sort = (function(A,B){ - if(!A || !B){ return 0 } A = A.i; B = B.i; - if(A < B){ return -1 }else if(A > B){ return 1 } - else { return 0 } - }); - on.emit = (function(){ - if(!a.text.is($ = a.fns.$(on))) return; - var e = events[$] = events[$] || (events[$] = []), args = arguments; - if(!(events[$] = a.list(e).each(function(hear, i, t){ - if(!hear.fn) return; t(hear); - hear.fn.apply(hear, args); - }))){ delete events[$]; } - }); - on.event = (function(fn, i){ - if(!a.text.is($ = a.fns.$(on))) return; - var $ = events[$] = events[$] || (events[$] = []) - , e = {fn: fn, i: i || 0, off: function(){ return !(e.fn = false); }}; - return $.push(e), $.sort(sort), e; - }); - return on; - })(); - a.time = (function(){ - function time($){ - time.$ = $ !== undefined? $ : _; - return time; - } - time.is = (function(t){ - t = ($=a.fns.$(time))||t; - return t? t instanceof Date : (+new Date().getTime()); - }); - time.now = (function(){ - var n = a.num.ify((a.time.is().toString())+'.'+a.num.r(4)); - return (theory.time.now.last||0) < n? (theory.time.now.last = n) : time.now(); - }); - time.loop = (function(fn,d){ - var args = a.fns.sort(a.list.slit.call(arguments, 0)); - return (args.f.length)?setInterval(a.list(args.f).at(1),a.list(args.n).at(1)):_; - }); - time.wait = (function(fn,d){ - var args = a.fns.sort(a.list.slit.call(arguments, 0)); - return (args.f.length)?setTimeout(a.list(args.f).at(1),a.list(args.n).at(1)):_; - }); - time.stop = (function(i){ - i = ($=a.fns.$(time))||i; - return (clearTimeout(i)&&clearInterval(i))||true; - }); - return time; - })(); - a.com = (function($){ - var com = a.com; - com.$ = $ !== undefined? $ : _; - com.way = com.way||$;$=_; - com.queue = []; - theory.com.queue = theory.com.queue||[]; - com.dc = [theory.time.now()]; - com.node = (function(opt){ - if(!process._events){ process._events = {} } - if(process.send && !process._events.theory){ - process._events.theory = (function(m){ - com.msg(a.obj.ify(m)); - }); process.on('message',process._events.theory); - process.send({onOpen:{readyState:(process.readyState = 1)},mod:module.theory[opt.way]}); - com.wire = process; - return; - } - }); - com.page = (function(){ - com.src = com.src||(window.location.protocol +'//'+ window.location.hostname) - + ((window.location.port)?':'+window.location.port:'') - + (com.path||'/com'); - var municate = (function(){ - if(!window.SockJS){ return } - theory.com.wire = new window.SockJS(com.src); - theory.com.wire.onopen = function(){ - theory.com.open&&theory.com.open(); - console.log("Communication initiated at "+com.src+" with "+com.wire.protocol+"."); - com.drain(); - }; - theory.com.wire.onmessage = theory.com.municate||function(m){ - var fn, m = a.obj.ify(m.data||m); - if(fn = theory.com.asked[m.when]){ - if(a.fns.is(fn)){ fn(m) } - delete theory.com.asked[m.when]; - return; - } - com.msg(m); - }; - theory.com.wire.onclose = function(m){ - console.log('close'); - theory.com.close&&theory.com.close(m); - }; - }); - if(theory.com.off || root.opts.com === false){ return } - if(window.SockJS){ - municate(); - } else { - module.ajax.load(com.url||(location.local+'//cdn.sockjs.org/sockjs-0.3.min.js') - ,function(d){municate()}); - } - }); - com.drain = (function(){ - while(theory.com.queue.length > 0){ - com.write(theory.com.queue.shift()); - } - }); - com.write = (function(m,c){ - c = c||theory.com.wire; - if(!c || c.readyState !== 1){ - theory.com.queue.push(m); - return; - } - if(a.obj.is(m)){ - m = a.text(m).ify(); - } - //console.log("send --> "+m); - c.send(m); - }); - com.init = (function(c){ - if(root.node){ com.node({way:c}) } - if(c){ return } - if(root.page){ com.page() } - return com; - }); - /** Helpers **/ - com.msg = (function(m,c){ - theory.obj.get(theory,theory.obj.get(m,'how.way')+'->')(m,c); - }); - com.ways = (function(m,w){ - var way = w||a.obj.get(m,'how.way')||com.way; - if($=a.fns.$(com)){ - way = ($.charAt(0)=='.')?com.way+$:$; - } return m = com.meta(m,way); - }); - com.ask = (function(m,f){ - if(!a.fns.is(f)){ return } - m = com.ways(m); - delete m.where; - theory.com.asked[m.when] = f; - com.write(m); - });theory.com.asked = theory.com.asked||{}; - com.reply = (function(m){ - m = com.ways(m); - if(m.how.web){ - m.how.way = 'web.reply'; - } m.who = m.who||{}; - m.who.to = m.who.to||m.who.tid; - com.write(m); - }); - com.send = (function(m){ - m = com.ways(m); - com.write(m); - }); - com.meta = (function(m,opt){ - if(!a.obj.is(m)){ m = {what:m} } - var n = {what: (m.what = m.what||{}) }; - opt = opt||{c:{}}; - if(a.text.is(opt)){ opt = {w:opt,c:{}} } - if(opt.protocol){ opt.c = opt } - a.obj(m).each(function(v,i){ - if( i == 'how' || i == 'who' || i == 'what' || - i == 'when'|| i == 'where'){ return } - n.what[i] = m.what[i] = v; delete m[i]; - }); - if(!m.how){ n.how={way: opt.w||com.way} }else{ - n.how = m.how; - n.how.way = opt.w||m.how.way||com.way; - delete m.how; - } m.how = n.how; - if(!m.when){ n.when=a.time.now() }else{ - n.when = m.when; - delete m.when; - } m.when = n.when; - if(!m.who){ - if(root.page && !com.who){ - n.who = { tid: (com.who=root.who) } - } if(root.node){ n.who = {} } - }else{ - if(a.obj.is(m.who)){ n.who=m.who }else{ - n.who = {to: m.who} - } if(root.node){ - } if(root.page && !com.who){ - n.who.tid = com.who = root.who; - } delete m.who; - } m.who = n.who; - if(!m.where){ - if(root.page){ if(a.text.is(m.where)){}else{}; - } if(root.node){ n.where={pid: process.pid} } - }else{ - if(a.obj.is(m.where)){ n.where = m.where }else{ - n.where = {at: m.where}; - } if(root.node){ - if(!a.obj(m.where).has('pid')){ n.where.pid=process.pid } - } delete m.where; - } m.where = n.where; - return n; - }); /** END HELPERS **/ - return com; - }); - a.test = (function(){ - function test($){ - if($===undefined && a.fns.is(test.$)){ try{return test.$()}catch(e){return e} } - test.$ = arguments.length? $ : test.nil; - return test; - } test.nil = test.$ = 'ThEoRy.TeSt.NiL-VaLuE'; - test._ = (function(r){ r = a.fns.$(test); test.$ = test.nil; return r; }); - test.of = (function(t,f){ - if(($=test._()) !== test.nil){ f=t;t=$ } - return t instanceof f; - }); - test.is = (function(a, b, aStack, bStack){ // modified Underscore's to fix flaws - if(($=test._()) !== test.nil){ b=a;a=$ } - var _ = {isFunction:theory.fns.is - ,has:theory.obj.has}, eq = test.is; - aStack = aStack||[]; bStack = bStack||[]; - // Identical objects are equal. `0 === -0`, but they aren't identical. - if(a === b){ return a !== 0 || 1 / a == 1 / b } - if(a == null || b == null){ return a === b } - var className = Object.prototype.toString.apply(a); - if(className != Object.prototype.toString.apply(b)){ return false } - switch(className){ - case '[object String]': return a == String(b); - case '[object Number]': return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b); - case '[object Function]': return a.name === b.name && a.toString() === b.toString(); - case '[object Date]': - case '[object Boolean]': return +a == +b; - case '[object RegExp]': return a.source == b.source && a.global == b.global && - a.multiline == b.multiline && a.ignoreCase == b.ignoreCase; - } - if(typeof a != 'object' || typeof b != 'object'){ return false } - var length = aStack.length; - while(length--){ if(aStack[length] == a){ return bStack[length] == b} } - aStack.push(a); bStack.push(b); - var size = 0, result = true; - if(className == '[object Array]'){ - size = a.length; result = size == b.length; - if(result){ - while(size--){ - if(!(result = eq(a[size], b[size], aStack, bStack))){ break } - } - } - }else{ - var aCtor = a.constructor, bCtor = b.constructor; - if(aCtor !== bCtor && !(_.isFunction(aCtor) && (aCtor instanceof aCtor) && - _.isFunction(bCtor) && (bCtor instanceof bCtor))){ return false } - for(var key in a){ - if(_.has(a, key)){ - size++; - if(!(result = _.has(b, key) && eq(a[key], b[key], aStack, bStack))){ break } - } - } if(result){ - for(key in b){ - if(_.has(b, key) && !(size--)){ break } - } result = !size; - } - } - aStack.pop(); bStack.pop(); - return result; - }); - return test; - })(); - return a; - } - theory.Name = 'theory'; - theory.version = 2.6; - theorize(theory); - return theory; -})(true); - -/** - BASE -**/ -(function(r){ - var root = root||{}, a = theory; - root.opts = root.opts || {}; - root.deps = {loaded:{},alias:{},all:{},wait:{}}; - root.pollute = ((typeof GLOBAL !== 'undefined' && GLOBAL.global && GLOBAL.process && - GLOBAL.process.env && GLOBAL.process.pid && GLOBAL.process.execPath)? - (function(){ - global.node = root.node = true; - global.opts = root.opts; - global.theory = theory; - module.theory = module.theory||{} - process.env.totheory = __filename; - if(process.env.NODE_ENV==='production'){process.env.LIVE = true}; - module.path = require('path'); - require.sep = module.path.sep; - module.exports=(function(cb,deps,name){ - if(!arguments.length) return theory; - var args = a.fns.sort(a.list.slit.call(arguments, 0)), r - ,m = util.require.apply({},arguments); - args.file = root.submodule||(module.parent||{}).filename; - global.aname = global.aname||m.name; - a.obj(util.deps(m.dependencies,{flat:{},src:args.file})).each(function(name,path){ - var p = require(root.submodule=path=util.resolve(path,path)); - m.theory[name] = (theory.obj.is(p) && theory.obj.empty(p))? undefined : p; - }); - module.theory[m.name] = a.obj.ify(a.text.ify(m)); - var mod = (theory[m.name] = m.init(m.theory)); - if(global.aname === m.name && theory.com) theory.com(theory.Name).init(m.name); - return mod; - }); - return; - }) : (function(){ - root = window.root = window.root||root; - root.page = true; - root.who = root.who||a.list((document.cookie+';').match(/tid=(.+?);/)||[]).at(-1)||''; - window.console = window.console||{log:function(s){return s}}; - console.saw = (function(s){console.log(a.text(s).ify())}); - location.local=(location.protocol==='file:'?'http:':''); - var noConflict={__dirname: window.__dirname,module:window.module,exports:window.exports,require:window.require}; - window.__dirname = ''; - window.module = {exports: (window.exports = {})}; - window.module.ajax = {load:(function(b,c){ - var d=document,j="script",s=d.createElement(j); module.sync=(s.onload===null||!s.readyState)?0:1; // IE6+ - var e=2166136261,g=b.length,h=c,i=/=\?/,w=window.setTimeout,x,y,a=function(z){ - document.body&&(z=z||x)&&s&&document.body[z]?document.body[y=z](s):w(a,0); - };if(i.test(b)){for(;g--;)e=e*16777619^b.charCodeAt(g); - window[j+=e<0?-e:e]=function(){h.apply(h,arguments);delete window[j]};b=b.replace(i,"="+j);c=0 - };s.onload=s.onreadystatechange=function(){if(y&&/de|m/.test(s.readyState||"m")){ - c&&c();a(x='removeChild');try{for(c in s)delete s[c]}catch(b){} - }};s.src=b;c&&a(x='appendChild'); - })};module.ajax.load('#'); - window.module.ajax.code = util.load; - window.onerror = (function(e,w,l){ - console.log(e + " at line "+ l +" on "+ w); - //if(theory.com){ theory.com.send({e:e,url:w,line:l}) } - }); - window.require = module.require = function require(p){ - if(!p){ return require } - if(util.stripify(p) == util.stripify(theory.Name)){ - return util.require; - } var fn, c = 0, cb = function(f){ fn = f; }; - theory.list((p = theory.list.is(p)? p : [p])).each(function(v){ - window.module.ajax.code(v,function(d){++c && (p.length <= c) && fn && fn(d)}); - }); return cb; - }; window.require.sep = '/'; require.resolve = util.resolve; require.cache = {}; - util.init(); - if(root.opts.amd === false){theory.obj(noConflict).each(function(v,i){window[i]=v});} - if(theory.com){ theory.com(theory.Name).init() } - }) - ); - var util = {}; - util.theorize = (function(mod){ - mod.theory = theory.call(true); - if(mod.theory.com){ mod.theory.com(mod.name) } - return mod.theory; - }); - util.require = (function(){ - var mod, args = a.fns.sort(a.list.slit.call(arguments,0)) - , fail = {name:'fail',init:(function(){console.log('module failed to load')})}; - if(args.o.length === 1 && !args.t.length && !args.l.length){ - mod = a.list(args.o).at(1); - } else { - if(args.f.length){ - mod = { - name: a.list(args.t).at(1) - ,init: a.list(args.f).at(1) - ,dependencies: a.list(args.l).at(1) || a.list(args.o).at(1) - } - } - } mod.name = mod.name||fail.name; - mod.init = mod.init||mod.main||mod.start||mod.boot||mod.cb||mod.fn||fail.init; - mod.dependencies = mod.dependencies||mod.require||mod.deps||mod.dep; - mod.dependencies = a.list.is(mod.dependencies)? - a.list(mod.dependencies).each(function(v,i,t){t(v,1)}) : mod.dependencies; - mod.theory = util.theorize(mod); - if(root.node){ return mod } - args = {cb:function(p, opt){ - if(args.launched - || a.list(util.deps(mod.dependencies,{flat:{}})).each(function(v,j){ - if(!(i = root.deps.loaded[j])){ return true } - if(i === 2){ return true } - if(i && i.launch && a.text.is(v) && mod.theory[v] === undefined){ mod.theory[v] = i.launch; } - })){ return } - args.on.off(); - args.launched = {launch: (theory[mod.name] = mod.init(mod.theory||theory)), n:mod.name}; - module.exports = exports = args.launched.launch; - if(mod.src){ - root.deps.loaded[mod.src] = args.launched; - theory.on('ThEoRy_DePs').emit(); - } return args.launched.launch; - }}; args.on = theory.on('ThEoRy_DePs').event(args.cb); - args.start = function(){util.deps(mod.dependencies,args); return args.cb()} - args.name = function(src){ - module.on = args.name = false; - root.deps.alias[args.src = mod.src = src] = mod.name; - if((root.deps.all[src] = mod.dependencies)){ - root.deps.loaded[src] = 2; - } if(!window.JSON){module.ajax.load(root.opts.JSON||location.local // JSON shim when needed - +"//ajax.cdnjs.com/ajax/libs/json2/20110223/json2.js",args.start) - } else { return args.start() }; - }; module.on = (!(require||{}).ing)? args.name(util.src(1))||false : args.name; - }); - util.deps = (function(deps, opt){ - opt = opt || {}; - a.obj(deps).each(function(v,i){ - var path = i, dopt = {p:i}; - if(opt.src){ - delete deps[i]; - deps[path = util.resolve(opt.src, util.pathify(path))] = v; - } if(a.list.is(v)){ - delete deps[i]; - v = deps[path] = a.list(v).each(function(w,i,t){t(util.resolve(opt.src,util.pathify(w)),1)}) - } if(a.obj.is(v)){ - dopt.defer = v; - opt.flat && util.deps(v,{flat: opt.flat}); - } if(v && a.text.is(v)){ - dopt.name = v; - } if(opt.flat){ - var url = util.urlify(util.pathify(path)); - if((i = opt.flat[url]) && i !== 1){ return } - opt.flat[url] = (opt.sub? 1 : dopt.name) || util.stripify(path); - if(i !== 1 && url && a.text.is(url) && (v = root.deps.all[url])){ - (a.obj.is(v) || a.list.is(v)) && util.deps(v,{flat: opt.flat, sub:1}); - } return; - } return util.load(path, dopt); - }); - return opt.flat; - }); - util.urlify = (function(url){ // via SO, IE6+ safe - if(!root.page){ return url; } - var el= document.createElement('div'); - el.innerHTML= 'x'; - return el.firstChild.href; - }); - util.pathify = (function(p){ - if(!root.page){ return p; } - return p = (/\.js$/i.test(p))? p : p+'.js'; - }); - util.stripify = (function(p){ - if(!a.text.is(p)){ return ''; } p=p.replace(/^\./,''); - return (p.split(require.sep).reverse()[0]).replace(/\.js$/i,''); - }); - util.resolve = (function(p1, p2){ // via browserify - if('.' != p2.charAt(0)){ return p2.replace('/',require.sep) } - var path = p1.replace('/',require.sep).split(require.sep) - , segs = p2.replace('/',require.sep).split(require.sep) - path.pop(); - for(var i=0;i