@sap-ux/ui5-middleware-fe-mockserver 2.1.52 → 2.1.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -61,6 +61,11 @@ server:
|
|
|
61
61
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
+
### Special case within karma
|
|
65
|
+
|
|
66
|
+
If you are running the mockserver embedded in karma you need to change the configuration to use
|
|
67
|
+
|
|
68
|
+
`beforeMiddleware: csp` instead of `afterMiddleware: compression`
|
|
64
69
|
|
|
65
70
|
## Service Configuration
|
|
66
71
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,iBAAe,YAAY,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,iBAAe,YAAY,CAAC,gBAAgB,EAAE,GAAG,GAAG,OAAO,CAAC,OAAO,CAAC,CAWnE;AAGD,SAAS,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -29,10 +29,15 @@ const path = __importStar(require("path"));
|
|
|
29
29
|
const fe_mockserver_core_1 = __importDefault(require("@sap-ux/fe-mockserver-core"));
|
|
30
30
|
const configResolver_1 = require("./configResolver");
|
|
31
31
|
async function FEMiddleware(middlewareConfig) {
|
|
32
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
32
33
|
// basepath will be the webapp folder so we have to go up a level to retrieve the config
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
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;
|
|
35
|
+
if (basePath) {
|
|
36
|
+
basePath = path.resolve(middlewareConfig.resources.rootProject._readers[0]._fsBasePath, '..');
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
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 : '';
|
|
40
|
+
}
|
|
36
41
|
const mockserverInstance = new fe_mockserver_core_1.default((0, configResolver_1.resolveConfig)(middlewareConfig.options.configuration, basePath));
|
|
37
42
|
await mockserverInstance.isReady;
|
|
38
43
|
return mockserverInstance.getRouter();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,oFAAsD;AACtD,qDAAiD;AAIjD,KAAK,UAAU,YAAY,CAAC,gBAAqB
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA6B;AAC7B,oFAAsD;AACtD,qDAAiD;AAIjD,KAAK,UAAU,YAAY,CAAC,gBAAqB;;IAC7C,wFAAwF;IACxF,IAAI,QAAQ,GAAG,MAAA,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,0CAAE,WAAW,0CAAE,QAAQ,CAAC,CAAC,CAAC,0CAAE,WAAW,CAAC;IAClF,IAAI,QAAQ,EAAE;QACV,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;KACjG;SAAM;QACH,QAAQ,GAAG,MAAA,MAAA,MAAA,MAAA,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,SAAS,0CAAE,WAAW,0CAAE,QAAQ,CAAC,CAAC,CAAC,0CAAE,QAAQ,0CAAE,WAAW,mCAAI,EAAE,CAAC;KACjG;IACD,MAAM,kBAAkB,GAAG,IAAI,4BAAY,CAAC,IAAA,8BAAa,EAAC,gBAAgB,CAAC,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC7G,MAAM,kBAAkB,CAAC,OAAO,CAAC;IACjC,OAAO,kBAAkB,CAAC,SAAS,EAAE,CAAC;AAC1C,CAAC;AAGD,iBAAS,YAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui5-middleware-fe-mockserver",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.54",
|
|
4
4
|
"description": "SAP Fiori tools - UI5 middleware for the Fiori elements mock server",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"author": "@SAP/ux-odata-team",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@sap-ux/fe-mockserver-core": "1.1.
|
|
10
|
+
"@sap-ux/fe-mockserver-core": "1.1.52"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@types/express": "4.17.13"
|