Comparing version 0.0.1-alpha.2 to 0.0.1-alpha.3
'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -37,3 +37,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var AppClient = (function () { | ||
var AppClient = function () { | ||
function AppClient(app, context) { | ||
@@ -54,5 +54,5 @@ _classCallCheck(this, AppClient); | ||
return AppClient; | ||
})(); | ||
}(); | ||
var App = (function () { | ||
var App = function () { | ||
function App() { | ||
@@ -163,3 +163,3 @@ var opts = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; | ||
var pres = RequestDTO.getPres().map(function (p) { | ||
return p(req); | ||
return _bluebird2.default.resolve(p(req)); | ||
}); | ||
@@ -208,4 +208,4 @@ | ||
return App; | ||
})(); | ||
}(); | ||
exports.default = App; |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,17 +6,2 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
var _bluebird = require('bluebird'); | ||
var _bluebird2 = _interopRequireDefault(_bluebird); | ||
var _util = require('./util'); | ||
var _util2 = _interopRequireDefault(_util); | ||
var _DTO = require('./DTO'); | ||
var _DTO2 = _interopRequireDefault(_DTO); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
exports.default = { | ||
@@ -33,3 +18,3 @@ route: function route(verb, path) { | ||
return function (target) { | ||
target.addPre(_bluebird2.default.resolve(fn)); | ||
target.addPre(fn); | ||
}; | ||
@@ -36,0 +21,0 @@ }, |
'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -25,4 +27,2 @@ value: true | ||
function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
@@ -34,3 +34,3 @@ | ||
var DTO = (function () { | ||
var DTO = function () { | ||
/** | ||
@@ -143,4 +143,4 @@ * Construct a new DTO from a schema and data | ||
return DTO; | ||
})(); | ||
}(); | ||
exports.default = DTO; |
@@ -6,5 +6,10 @@ 'use strict'; | ||
}); | ||
exports.CustomError = exports.ParseError = exports.RequiredValueError = exports.ValidationError = undefined; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
var _util = require('util'); | ||
var _util2 = _interopRequireDefault(_util); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
@@ -14,20 +19,17 @@ | ||
var CustomError = (function (_Error) { | ||
_inherits(CustomError, _Error); | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function CustomError(message) { | ||
_classCallCheck(this, CustomError); | ||
var CustomError = function CustomError(message) { | ||
_classCallCheck(this, CustomError); | ||
var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(CustomError).call(this, message)); | ||
Error.call(this); | ||
Error.captureStackTrace(this, this.constructor.name); | ||
_this.name = _this.constructor.name; | ||
_this.message = message; | ||
Error.captureStackTrace(_this, _this.constructor.name); | ||
return _this; | ||
} | ||
this.name = this.constructor.name; | ||
this.message = message; | ||
}; | ||
return CustomError; | ||
})(Error); | ||
_util2.default.inherits(CustomError, Error); | ||
var RequiredValueError = (function (_CustomError) { | ||
var RequiredValueError = function (_CustomError) { | ||
_inherits(RequiredValueError, _CustomError); | ||
@@ -42,5 +44,5 @@ | ||
return RequiredValueError; | ||
})(CustomError); | ||
}(CustomError); | ||
var ParseError = (function (_CustomError2) { | ||
var ParseError = function (_CustomError2) { | ||
_inherits(ParseError, _CustomError2); | ||
@@ -51,13 +53,13 @@ | ||
var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(ParseError).call(this, 'Could not parse ' + value + ' as ' + type)); | ||
var _this2 = _possibleConstructorReturn(this, Object.getPrototypeOf(ParseError).call(this, 'Could not parse ' + value + ' as ' + type)); | ||
_this3.parseType = type; | ||
_this3.parseValue = value; | ||
return _this3; | ||
_this2.parseType = type; | ||
_this2.parseValue = value; | ||
return _this2; | ||
} | ||
return ParseError; | ||
})(CustomError); | ||
}(CustomError); | ||
var ValidationError = (function (_CustomError3) { | ||
var ValidationError = function (_CustomError3) { | ||
_inherits(ValidationError, _CustomError3); | ||
@@ -68,10 +70,10 @@ | ||
var _this4 = _possibleConstructorReturn(this, Object.getPrototypeOf(ValidationError).call(this, message)); | ||
var _this3 = _possibleConstructorReturn(this, Object.getPrototypeOf(ValidationError).call(this, message)); | ||
_this4.validationPath = path; | ||
return _this4; | ||
_this3.validationPath = path; | ||
return _this3; | ||
} | ||
return ValidationError; | ||
})(CustomError); | ||
}(CustomError); | ||
@@ -78,0 +80,0 @@ exports.ValidationError = ValidationError; |
'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -24,3 +24,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var PropType = (function () { | ||
var PropType = function () { | ||
@@ -76,4 +76,4 @@ /** | ||
return PropType; | ||
})(); | ||
}(); | ||
exports.default = PropType; |
'use strict'; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -17,3 +17,3 @@ Object.defineProperty(exports, "__esModule", { | ||
var Service = (function () { | ||
var Service = function () { | ||
function Service() { | ||
@@ -60,4 +60,4 @@ _classCallCheck(this, Service); | ||
return Service; | ||
})(); | ||
}(); | ||
exports.default = Service; |
{ | ||
"name": "churro", | ||
"version": "0.0.1-alpha.2", | ||
"version": "0.0.1-alpha.3", | ||
"description": "churro", | ||
@@ -9,3 +9,3 @@ "main": "lib/index.js", | ||
"pretest": "./node_modules/.bin/babel src --out-dir lib", | ||
"test": "./node_modules/mocha/bin/mocha --compilers js:babel/register" | ||
"test": "./node_modules/mocha/bin/mocha --compilers js:babel-register" | ||
}, | ||
@@ -26,2 +26,3 @@ "repository": { | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-register": "^6.3.13", | ||
"mocha": "^2.3.3", | ||
@@ -28,0 +29,0 @@ "should": "^5.0.1" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78783
5
1114