@sap-ux/ui5-middleware-fe-mockserver
Advanced tools
Comparing version 2.1.52 to 2.1.54
@@ -32,6 +32,11 @@ "use strict"; | ||
async function FEMiddleware(middlewareConfig) { | ||
var _a, _b, _c, _d, _e, _f, _g, _h; | ||
// basepath will be the webapp folder so we have to go up a level to retrieve the config | ||
const basePath = middlewareConfig.resources | ||
? path.resolve(middlewareConfig.resources.rootProject._readers[0]._fsBasePath, '..') | ||
: ''; | ||
let basePath = (_c = (_b = (_a = middlewareConfig === null || middlewareConfig === void 0 ? void 0 : middlewareConfig.resources) === null || _a === void 0 ? void 0 : _a.rootProject) === null || _b === void 0 ? void 0 : _b._readers[0]) === null || _c === void 0 ? void 0 : _c._fsBasePath; | ||
if (basePath) { | ||
basePath = path.resolve(middlewareConfig.resources.rootProject._readers[0]._fsBasePath, '..'); | ||
} | ||
else { | ||
basePath = (_h = (_g = (_f = (_e = (_d = middlewareConfig === null || middlewareConfig === void 0 ? void 0 : middlewareConfig.resources) === null || _d === void 0 ? void 0 : _d.rootProject) === null || _e === void 0 ? void 0 : _e._readers[1]) === null || _f === void 0 ? void 0 : _f._project) === null || _g === void 0 ? void 0 : _g._modulePath) !== null && _h !== void 0 ? _h : ''; | ||
} | ||
const mockserverInstance = new fe_mockserver_core_1.default((0, configResolver_1.resolveConfig)(middlewareConfig.options.configuration, basePath)); | ||
@@ -38,0 +43,0 @@ await mockserverInstance.isReady; |
{ | ||
"name": "@sap-ux/ui5-middleware-fe-mockserver", | ||
"version": "2.1.52", | ||
"version": "2.1.54", | ||
"description": "SAP Fiori tools - UI5 middleware for the Fiori elements mock server", | ||
@@ -10,3 +10,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@sap-ux/fe-mockserver-core": "1.1.51" | ||
"@sap-ux/fe-mockserver-core": "1.1.52" | ||
}, | ||
@@ -13,0 +13,0 @@ "devDependencies": { |
@@ -64,3 +64,8 @@ # @sap-ux/ui5-middleware-fe-mockserver | ||
### Special case within karma | ||
If you are running the mockserver embedded in karma you need to change the configuration to use | ||
`beforeMiddleware: csp` instead of `afterMiddleware: compression` | ||
## Service Configuration | ||
@@ -67,0 +72,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
31823
192
115
+ Added@sap-ux/fe-mockserver-core@1.1.52(transitive)
- Removed@sap-ux/fe-mockserver-core@1.1.51(transitive)