deep-kernel
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -26,2 +26,4 @@ /** | ||
/** | ||
* @todo - rename it to AbstractService (ContainerAware doesn't make sense anymore) | ||
* | ||
* Container aware instance | ||
@@ -38,3 +40,3 @@ */ | ||
this._container = null; | ||
this._kernel = null; | ||
this._localBackend = false; | ||
@@ -62,3 +64,3 @@ } | ||
/** | ||
* @param {Instance} microservice | ||
* @param {Object|String} microservice | ||
* @returns {Injectable} | ||
@@ -69,5 +71,6 @@ */ | ||
value: function bind(microservice) { | ||
// @todo: find more smart way of doing this... | ||
if (typeof microservice === 'string') { | ||
microservice = this._container.get(_Kernel.Kernel.KERNEL).microservice(microservice); | ||
microservice = this.kernel.microservice(microservice); | ||
} | ||
@@ -79,3 +82,3 @@ | ||
/** | ||
* @param {String} identifier (e.g. @microservice_identifier:resource) | ||
* @param {String} identifier (e.g. @microservice_identifier:resource[:action]) | ||
* @returns {String} | ||
@@ -102,3 +105,3 @@ * | ||
/** | ||
* @param {DI} container | ||
* @returns {DI|null} | ||
*/ | ||
@@ -115,3 +118,3 @@ }, { | ||
return (_container = this._container).get.apply(_container, arguments); | ||
return (_container = this.container).get.apply(_container, arguments); | ||
} | ||
@@ -150,11 +153,20 @@ }, { | ||
key: 'container', | ||
set: function set(container) { | ||
this._container = container; | ||
get: function get() { | ||
return this._kernel ? this._kernel.container : null; | ||
} | ||
/** | ||
* @param {Kernel} kernel | ||
*/ | ||
}, { | ||
key: 'kernel', | ||
set: function set(kernel) { | ||
this._kernel = kernel; | ||
}, | ||
/** | ||
* @returns {DI} | ||
* @returns {Kernel} | ||
*/ | ||
get: function get() { | ||
return this._container; | ||
return this._kernel; | ||
} | ||
@@ -161,0 +173,0 @@ }]); |
@@ -231,3 +231,3 @@ /** | ||
serviceInstance.container = this._container; | ||
serviceInstance.kernel = this; | ||
serviceInstance.localBackend = _deepCore2['default'].IS_DEV_SERVER; | ||
@@ -234,0 +234,0 @@ serviceInstance.boot(this, (function () { |
{ | ||
"name": "deep-kernel", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "DEEP Kernel Library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
45693
789