deep-kernel
Advanced tools
Comparing version 1.12.3 to 1.12.4
@@ -27,5 +27,7 @@ /** | ||
* @param {String} endpoint | ||
* @param {Boolean} enforceRoot | ||
*/ | ||
function HttpDriver() { | ||
let endpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
let enforceRoot = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
@@ -37,2 +39,3 @@ _classCallCheck(this, HttpDriver); | ||
_this._endpoint = endpoint; | ||
_this._enforceRoot = enforceRoot; | ||
return _this; | ||
@@ -72,2 +75,6 @@ } | ||
if (this._enforceRoot && !/^http|\//i.test(this._endpoint)) { | ||
this._endpoint = `/${this._endpoint}`; | ||
} | ||
let client = new XMLHttpRequest(); | ||
@@ -74,0 +81,0 @@ |
@@ -73,3 +73,3 @@ /** | ||
new _ComplexDriver.ComplexDriver().inherit(this).add(new _ScopeDriver.ScopeDriver(this._scopeKey).setScope(this._globalScope)).add(this._kernel.isBackend ? new _FsDriver.FsDriver(this._configFile) : new _HttpDriver.HttpDriver(this._configFile)).load(); | ||
new _ComplexDriver.ComplexDriver().inherit(this).add(new _ScopeDriver.ScopeDriver(this._scopeKey).setScope(this._globalScope)).add(this._kernel.isBackend ? new _FsDriver.FsDriver(this._configFile) : new _HttpDriver.HttpDriver(this._configFile, true)).load(); | ||
} | ||
@@ -76,0 +76,0 @@ |
{ | ||
"name": "deep-kernel", | ||
"version": "1.12.3", | ||
"version": "1.12.4", | ||
"description": "DEEP Kernel Library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
75062
1810