Template Upload

This commit is contained in:
SOUTHERNCO\x2mjbyrn
2017-05-17 13:45:25 -04:00
parent 415b9c25f3
commit 7efe7605b8
11476 changed files with 2170865 additions and 34 deletions

18
node_modules/make-error-cause/dist/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,18 @@
import makeError = require('make-error');
declare function makeErrorCause(value: string | Function): makeErrorCause.Constructor<makeErrorCause.BaseError>;
declare function makeErrorCause<T extends Error>(value: string | Function, _super: {
new (...args: any[]): T;
}): makeErrorCause.Constructor<T>;
declare namespace makeErrorCause {
class BaseError extends makeError.BaseError {
cause: Error;
constructor(message: string, cause?: Error);
toString(): string;
}
interface Constructor<T> {
new (message: string, cause?: Error): T;
super_: any;
prototype: T;
}
}
export = makeErrorCause;

28
node_modules/make-error-cause/dist/index.js generated vendored Normal file
View File

@ -0,0 +1,28 @@
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var makeError = require('make-error');
function makeErrorCause(value, _super) {
if (_super === void 0) { _super = makeErrorCause.BaseError; }
return makeError(value, _super);
}
var makeErrorCause;
(function (makeErrorCause) {
var BaseError = (function (_super) {
__extends(BaseError, _super);
function BaseError(message, cause) {
_super.call(this, message);
this.cause = cause;
}
BaseError.prototype.toString = function () {
return _super.prototype.toString.call(this) + (this.cause ? "\nCaused by: " + this.cause.toString() : '');
};
return BaseError;
}(makeError.BaseError));
makeErrorCause.BaseError = BaseError;
})(makeErrorCause || (makeErrorCause = {}));
module.exports = makeErrorCause;
//# sourceMappingURL=index.js.map

1
node_modules/make-error-cause/dist/index.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,IAAO,SAAS,WAAW,YAAY,CAAC,CAAA;AAOxC,wBACE,KAAwB,EACxB,MAAqE;IAArE,sBAAqE,GAArE,SAAsC,cAAc,CAAC,SAAgB;IAErE,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AACjC,CAAC;AAED,IAAU,cAAc,CAoBvB;AApBD,WAAU,cAAc,EAAC,CAAC;IAExB;QAA+B,6BAAmB;QAEhD,mBAAa,OAAe,EAAS,KAAa;YAChD,kBAAM,OAAO,CAAC,CAAA;YADqB,UAAK,GAAL,KAAK,CAAQ;QAElD,CAAC;QAED,4BAAQ,GAAR;YACE,MAAM,CAAC,gBAAK,CAAC,QAAQ,WAAE,GAAG,CAAC,IAAI,CAAC,KAAK,GAAG,kBAAgB,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAI,GAAG,EAAE,CAAC,CAAA;QACvF,CAAC;QAEH,gBAAC;IAAD,CAAC,AAVD,CAA+B,SAAS,CAAC,SAAS,GAUjD;IAVY,wBAAS,YAUrB,CAAA;AAQH,CAAC,EApBS,cAAc,KAAd,cAAc,QAoBvB;AAED,iBAAS,cAAc,CAAA","sourcesContent":["import makeError = require('make-error')\n\nfunction makeErrorCause (value: string | Function): makeErrorCause.Constructor<makeErrorCause.BaseError>\nfunction makeErrorCause <T extends Error> (\n value: string | Function,\n _super: { new (...args: any[]): T }\n): makeErrorCause.Constructor<T>\nfunction makeErrorCause <T extends Error> (\n value: string | Function,\n _super: { new (...args: any[]): T } = makeErrorCause.BaseError as any\n): makeErrorCause.Constructor<T> {\n return makeError(value, _super)\n}\n\nnamespace makeErrorCause {\n\n export class BaseError extends makeError.BaseError {\n\n constructor (message: string, public cause?: Error) {\n super(message)\n }\n\n toString () {\n return super.toString() + (this.cause ? `\\nCaused by: ${this.cause.toString()}` : '')\n }\n\n }\n\n export interface Constructor <T> {\n new (message: string, cause?: Error): T\n super_: any\n prototype: T\n }\n\n}\n\nexport = makeErrorCause\n"]}

0
node_modules/make-error-cause/dist/index.spec.d.ts generated vendored Normal file
View File

25
node_modules/make-error-cause/dist/index.spec.js generated vendored Normal file
View File

@ -0,0 +1,25 @@
"use strict";
var test = require('blue-tape');
var makeErrorCause = require('./index');
test('make error cause', function (t) {
var TestError = makeErrorCause('TestError');
var SubTestError = makeErrorCause('SubTestError', TestError);
t.test('render the cause', function (t) {
var cause = new Error('boom!');
var error = new TestError('something bad', cause);
var again = new SubTestError('more bad', error);
t.equal(error.cause, cause);
t.equal(error.toString(), 'TestError: something bad\nCaused by: Error: boom!');
t.ok(error instanceof Error);
t.ok(error instanceof makeErrorCause.BaseError);
t.ok(error instanceof TestError);
t.equal(again.cause, error);
t.equal(again.toString(), 'SubTestError: more bad\nCaused by: TestError: something bad\nCaused by: Error: boom!');
t.ok(again instanceof Error);
t.ok(again instanceof makeErrorCause.BaseError);
t.ok(again instanceof TestError);
t.ok(again instanceof SubTestError);
t.end();
});
});
//# sourceMappingURL=index.spec.js.map

1
node_modules/make-error-cause/dist/index.spec.js.map generated vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"file":"index.spec.js","sourceRoot":"","sources":["../src/index.spec.ts"],"names":[],"mappings":";AAAA,IAAO,IAAI,WAAW,WAAW,CAAC,CAAA;AAClC,IAAO,cAAc,WAAW,SAAS,CAAC,CAAA;AAE1C,IAAI,CAAC,kBAAkB,EAAE,UAAA,CAAC;IACxB,IAAM,SAAS,GAAG,cAAc,CAAC,WAAW,CAAC,CAAA;IAC7C,IAAM,YAAY,GAAG,cAAc,CAAC,cAAc,EAAE,SAAS,CAAC,CAAA;IAE9D,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAA,CAAC;QAC1B,IAAM,KAAK,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,CAAA;QAChC,IAAM,KAAK,GAAG,IAAI,SAAS,CAAC,eAAe,EAAE,KAAK,CAAC,CAAA;QACnD,IAAM,KAAK,GAAG,IAAI,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAEjD,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QAC3B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,mDAAmD,CAAC,CAAA;QAC9E,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,KAAK,CAAC,CAAA;QAC5B,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,cAAc,CAAC,SAAS,CAAC,CAAA;QAC/C,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,SAAS,CAAC,CAAA;QAEhC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;QAC3B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,sFAAsF,CAAC,CAAA;QACjH,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,KAAK,CAAC,CAAA;QAC5B,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,cAAc,CAAC,SAAS,CAAC,CAAA;QAC/C,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,SAAS,CAAC,CAAA;QAChC,CAAC,CAAC,EAAE,CAAC,KAAK,YAAY,YAAY,CAAC,CAAA;QAEnC,CAAC,CAAC,GAAG,EAAE,CAAA;IACT,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA","sourcesContent":["import test = require('blue-tape')\nimport makeErrorCause = require('./index')\n\ntest('make error cause', t => {\n const TestError = makeErrorCause('TestError')\n const SubTestError = makeErrorCause('SubTestError', TestError)\n\n t.test('render the cause', t => {\n const cause = new Error('boom!')\n const error = new TestError('something bad', cause)\n const again = new SubTestError('more bad', error)\n\n t.equal(error.cause, cause)\n t.equal(error.toString(), 'TestError: something bad\\nCaused by: Error: boom!')\n t.ok(error instanceof Error)\n t.ok(error instanceof makeErrorCause.BaseError)\n t.ok(error instanceof TestError)\n\n t.equal(again.cause, error)\n t.equal(again.toString(), 'SubTestError: more bad\\nCaused by: TestError: something bad\\nCaused by: Error: boom!')\n t.ok(again instanceof Error)\n t.ok(again instanceof makeErrorCause.BaseError)\n t.ok(again instanceof TestError)\n t.ok(again instanceof SubTestError)\n\n t.end()\n })\n})\n"]}