@sap-ux/ui5-proxy-middleware 1.1.31 → 1.1.33
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 +4 -1
- package/dist/ui5/middleware.js +7 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -113,8 +113,11 @@ server:
|
|
|
113
113
|
Alternatively you can only use the underlying proxy function, e.g. for the case when you want to incorporate the `ui5-proxy-middleware` functionality in your own middleware.
|
|
114
114
|
|
|
115
115
|
```Typescript
|
|
116
|
+
import { Router } from 'express';
|
|
116
117
|
import { ui5Proxy } from '@sap-ux/ui5-proxy-middleware';
|
|
117
|
-
|
|
118
|
+
|
|
119
|
+
const router = Router();
|
|
120
|
+
router.use("/resources/", ui5Proxy({ path: "/", url: "https://ui5.sap.com"})/*, options, filter*/);
|
|
118
121
|
```
|
|
119
122
|
- **config** - The UI5 configuration
|
|
120
123
|
- **options** - Options of the [http-proxy-middleware](https://www.npmjs.com/package/http-proxy-middleware#options)
|
package/dist/ui5/middleware.js
CHANGED
|
@@ -108,7 +108,13 @@ module.exports = ({ resources, options }) => __awaiter(void 0, void 0, void 0, f
|
|
|
108
108
|
}
|
|
109
109
|
if (directLoad) {
|
|
110
110
|
const directLoadProxy = (req, res, next) => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
-
|
|
111
|
+
try {
|
|
112
|
+
yield (0, base_1.injectScripts)(req, res, next, ui5Configs);
|
|
113
|
+
}
|
|
114
|
+
catch (error) {
|
|
115
|
+
logger.error(error);
|
|
116
|
+
next(error);
|
|
117
|
+
}
|
|
112
118
|
});
|
|
113
119
|
base_1.HTML_MOUNT_PATHS.forEach((path) => {
|
|
114
120
|
routes.push({ route: path, handler: directLoadProxy });
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aui5-proxy-middleware"
|
|
11
11
|
},
|
|
12
|
-
"version": "1.1.
|
|
12
|
+
"version": "1.1.33",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"i18next": "20.3.2",
|
|
28
28
|
"proxy-from-env": "1.1.0",
|
|
29
29
|
"@sap-ux/logger": "0.3.7",
|
|
30
|
-
"@sap-ux/ui5-config": "0.
|
|
30
|
+
"@sap-ux/ui5-config": "0.19.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/express": "4.17.13",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"nock": "13.2.4",
|
|
38
38
|
"supertest": "6.3.2",
|
|
39
39
|
"yaml": "2.2.2",
|
|
40
|
-
"@sap-ux/project-access": "1.
|
|
40
|
+
"@sap-ux/project-access": "1.11.2"
|
|
41
41
|
},
|
|
42
42
|
"ui5": {
|
|
43
43
|
"dependencies": []
|