Added node-modules

This commit is contained in:
Dobie Wollert
2014-09-14 07:04:16 -04:00
parent 663941bf57
commit 6a92348cf5
4870 changed files with 670395 additions and 0 deletions

35
node_modules/mongoose/lib/errors/cast.js generated vendored Normal file
View File

@ -0,0 +1,35 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/**
* Casting Error constructor.
*
* @param {String} type
* @param {String} value
* @inherits MongooseError
* @api private
*/
function CastError (type, value, path) {
MongooseError.call(this, 'Cast to ' + type + ' failed for value "' + value + '" at path "' + path + '"');
Error.captureStackTrace(this, arguments.callee);
this.name = 'CastError';
this.type = type;
this.value = value;
this.path = path;
};
/*!
* Inherits from MongooseError.
*/
CastError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = CastError;

40
node_modules/mongoose/lib/errors/divergentArray.js generated vendored Normal file
View File

@ -0,0 +1,40 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/*!
* DivergentArrayError constructor.
*
* @inherits MongooseError
*/
function DivergentArrayError (paths) {
var msg = 'For your own good, using `document.save()` to update an array '
+ 'which was selected using an $elemMatch projection OR '
+ 'populated using skip, limit, query conditions, or exclusion of '
+ 'the _id field when the operation results in a $pop or $set of '
+ 'the entire array is not supported. The following '
+ 'path(s) would have been modified unsafely:\n'
+ ' ' + paths.join('\n ') + '\n'
+ 'Use Model.update() to update these arrays instead.'
// TODO write up a docs page (FAQ) and link to it
MongooseError.call(this, msg);
Error.captureStackTrace(this, arguments.callee);
this.name = 'DivergentArrayError';
};
/*!
* Inherits from MongooseError.
*/
DivergentArrayError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = DivergentArrayError;

32
node_modules/mongoose/lib/errors/document.js generated vendored Normal file
View File

@ -0,0 +1,32 @@
/*!
* Module requirements
*/
var MongooseError = require('../error')
/**
* Document Error
*
* @param {String} msg
* @inherits MongooseError
* @api private
*/
function DocumentError (msg) {
MongooseError.call(this, msg);
Error.captureStackTrace(this, arguments.callee);
this.name = 'DocumentError';
};
/*!
* Inherits from MongooseError.
*/
DocumentError.prototype.__proto__ = MongooseError.prototype;
/*!
* Module exports.
*/
module.exports = exports = DocumentError;

32
node_modules/mongoose/lib/errors/missingSchema.js generated vendored Normal file
View File

@ -0,0 +1,32 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/*!
* MissingSchema Error constructor.
*
* @inherits MongooseError
*/
function MissingSchemaError (name) {
var msg = 'Schema hasn\'t been registered for model "' + name + '".\n'
+ 'Use mongoose.model(name, schema)';
MongooseError.call(this, msg);
Error.captureStackTrace(this, arguments.callee);
this.name = 'MissingSchemaError';
};
/*!
* Inherits from MongooseError.
*/
MissingSchemaError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = MissingSchemaError;

30
node_modules/mongoose/lib/errors/overwriteModel.js generated vendored Normal file
View File

@ -0,0 +1,30 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/*!
* OverwriteModel Error constructor.
*
* @inherits MongooseError
*/
function OverwriteModelError (name) {
MongooseError.call(this, 'Cannot overwrite `' + name + '` model once compiled.');
Error.captureStackTrace(this, arguments.callee);
this.name = 'OverwriteModelError';
};
/*!
* Inherits from MongooseError.
*/
OverwriteModelError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = OverwriteModelError;

49
node_modules/mongoose/lib/errors/validation.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
/*!
* Module requirements
*/
var MongooseError = require('../error')
/**
* Document Validation Error
*
* @api private
* @param {Document} instance
* @inherits MongooseError
*/
function ValidationError (instance) {
MongooseError.call(this, "Validation failed");
Error.captureStackTrace(this, arguments.callee);
this.name = 'ValidationError';
this.errors = instance.errors = {};
};
/**
* Console.log helper
*/
ValidationError.prototype.toString = function () {
var ret = this.name + ': ';
var msgs = [];
Object.keys(this.errors).forEach(function (key) {
if (this == this.errors[key]) return;
msgs.push(String(this.errors[key]));
}, this)
return ret + msgs.join(', ');
};
/*!
* Inherits from MongooseError.
*/
ValidationError.prototype.__proto__ = MongooseError.prototype;
/*!
* Module exports
*/
module.exports = exports = ValidationError;

51
node_modules/mongoose/lib/errors/validator.js generated vendored Normal file
View File

@ -0,0 +1,51 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/**
* Schema validator error
*
* @param {String} path
* @param {String} msg
* @param {String|Number|any} val
* @inherits MongooseError
* @api private
*/
function ValidatorError (path, type, val) {
var msg = type
? '"' + type + '" '
: '';
var message = 'Validator ' + msg + 'failed for path ' + path
if (2 < arguments.length) message += ' with value `' + String(val) + '`';
MongooseError.call(this, message);
Error.captureStackTrace(this, arguments.callee);
this.name = 'ValidatorError';
this.path = path;
this.type = type;
this.value = val;
};
/*!
* toString helper
*/
ValidatorError.prototype.toString = function () {
return this.message;
}
/*!
* Inherits from MongooseError
*/
ValidatorError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = ValidatorError;

31
node_modules/mongoose/lib/errors/version.js generated vendored Normal file
View File

@ -0,0 +1,31 @@
/*!
* Module dependencies.
*/
var MongooseError = require('../error');
/**
* Version Error constructor.
*
* @inherits MongooseError
* @api private
*/
function VersionError () {
MongooseError.call(this, 'No matching document found.');
Error.captureStackTrace(this, arguments.callee);
this.name = 'VersionError';
};
/*!
* Inherits from MongooseError.
*/
VersionError.prototype.__proto__ = MongooseError.prototype;
/*!
* exports
*/
module.exports = VersionError;