Comparing version 1.12.8 to 1.12.9
@@ -9,4 +9,4 @@ /** | ||
import {DI} from './DI'; | ||
var _DI = require('./DI'); | ||
module.exports = DI; | ||
module.exports = _DI.DI; |
@@ -7,12 +7,25 @@ /** | ||
import Bottle from 'bottlejs'; | ||
import {MissingServiceException} from './Exception/MissingServiceException'; | ||
import Core from 'deep-core'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.DI = undefined; | ||
var _bottlejs = require('bottlejs'); | ||
var _bottlejs2 = _interopRequireDefault(_bottlejs); | ||
var _MissingServiceException = require('./Exception/MissingServiceException'); | ||
var _deepCore = require('deep-core'); | ||
var _deepCore2 = _interopRequireDefault(_deepCore); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
* Deep dependency injection module | ||
*/ | ||
export class DI { | ||
class DI { | ||
constructor() { | ||
this._bottle = new Bottle(); | ||
this._bottle = new _bottlejs2.default(); | ||
this._localBackend = false; | ||
@@ -66,3 +79,3 @@ } | ||
if (!(value instanceof Object)) { | ||
throw new Core.Exception.InvalidArgumentException(value, 'Object'); | ||
throw new _deepCore2.default.Exception.InvalidArgumentException(value, 'Object'); | ||
} | ||
@@ -80,3 +93,3 @@ | ||
if (typeof this._bottle.container[key] === 'undefined') { | ||
throw new MissingServiceException(`Unregistered service or parameter "${key}"`); | ||
throw new _MissingServiceException.MissingServiceException(`Unregistered service or parameter "${key}"`); | ||
} | ||
@@ -109,6 +122,5 @@ | ||
} | ||
cleanup() { | ||
} | ||
cleanup() {} | ||
} | ||
exports.DI = DI; |
@@ -7,8 +7,17 @@ /** | ||
import Core from 'deep-core'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.Exception = undefined; | ||
var _deepCore = require('deep-core'); | ||
var _deepCore2 = _interopRequireDefault(_deepCore); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
/** | ||
* Thrown when any exception occurs | ||
*/ | ||
export class Exception extends Core.Exception.Exception { | ||
class Exception extends _deepCore2.default.Exception.Exception { | ||
/** | ||
@@ -21,1 +30,2 @@ * @param {Array} args | ||
} | ||
exports.Exception = Exception; |
@@ -7,8 +7,13 @@ /** | ||
import {Exception} from './Exception'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.MissingServiceException = undefined; | ||
var _Exception = require('./Exception'); | ||
/** | ||
* Thrown when requested service is missing | ||
*/ | ||
export class MissingServiceException extends Exception { | ||
class MissingServiceException extends _Exception.Exception { | ||
/** | ||
@@ -21,1 +26,2 @@ * @param {String} serviceName | ||
} | ||
exports.MissingServiceException = MissingServiceException; |
{ | ||
"name": "deep-di", | ||
"version": "1.12.8", | ||
"version": "1.12.9", | ||
"description": "DEEP Dependency Injection Library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
19845
334