dev-approuter 0.2.0 → 0.2.1
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/CHANGELOG.md +11 -0
- package/lib/devApprouter.js +13 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.1](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.2.0...dev-approuter@0.2.1) (2023-10-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **dev-approuter:** consider the UI5 middleware config ([#872](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/872)) ([e724aee](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/e724aeeee9bbb66d3ee2070474f63f7f4ea57299))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [0.2.0](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/dev-approuter@0.1.22...dev-approuter@0.2.0) (2023-10-03)
|
|
7
18
|
|
|
8
19
|
|
package/lib/devApprouter.js
CHANGED
|
@@ -58,9 +58,19 @@ class DevApprouter {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// find all UI5 modules from the CDS server root and dependencies from the approuter
|
|
61
|
-
const ui5Modules = [
|
|
61
|
+
const ui5Modules = [];
|
|
62
|
+
let ui5ModulesConfig = {};
|
|
63
|
+
const approuterUI5Modules = await findUI5Modules({ cwd, skipLocalApps: true });
|
|
64
|
+
ui5Modules.push(...(approuterUI5Modules || []));
|
|
65
|
+
const { config: approuterUI5ModulesConfig } = approuterUI5Modules;
|
|
66
|
+
ui5ModulesConfig = Object.assign(ui5ModulesConfig, approuterUI5ModulesConfig);
|
|
67
|
+
//const ui5Modules = [...(await findUI5Modules({ cwd, skipLocalApps: true }))];
|
|
62
68
|
if (cdsServerConfig) {
|
|
63
|
-
|
|
69
|
+
const cdsUI5Modules = await findUI5Modules({ cwd: cdsServerConfig.modulePath, skipLocalApps: true });
|
|
70
|
+
ui5Modules.push(...(cdsUI5Modules || []));
|
|
71
|
+
const { config: cdsUI5ModulesConfig } = cdsUI5Modules;
|
|
72
|
+
ui5ModulesConfig = Object.assign(ui5ModulesConfig, cdsUI5ModulesConfig);
|
|
73
|
+
//ui5Modules.push(...(await findUI5Modules({ cwd: cdsServerConfig.modulePath, skipDeps: true })));
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
// collect UI5 middlewares
|
|
@@ -75,6 +85,7 @@ class DevApprouter {
|
|
|
75
85
|
await applyUI5Middleware(router, {
|
|
76
86
|
cwd,
|
|
77
87
|
basePath: modulePath,
|
|
88
|
+
...(ui5ModulesConfig[moduleId] || {}),
|
|
78
89
|
});
|
|
79
90
|
|
|
80
91
|
// mounting the router for the UI5 application to the CDS server
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dev-approuter",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A dev time wrapper for the SAP Application Router that can serve UI5 and CDS modules added as dependencies.",
|
|
5
5
|
"author": "Nico Schoenteich <nicolai.schoenteich@sap.com> (https://github.com/nicoschoenteich)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"@sap/xsenv": "4.0.0",
|
|
15
15
|
"cds-plugin-ui5": "^0.6.13",
|
|
16
16
|
"express": "^4.18.2",
|
|
17
|
-
"ui5-middleware-cap": "^3.2.
|
|
17
|
+
"ui5-middleware-cap": "^3.2.1"
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "4c60ccc427b97468dbc6aee0d4c909d42c49e926"
|
|
20
20
|
}
|