cds-plugin-ui5 0.6.10 → 0.6.11
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/cds-plugin.js +8 -1
- package/lib/applyUI5Middleware.js +4 -1
- package/package.json +2 -2
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.6.11](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/cds-plugin-ui5@0.6.10...cds-plugin-ui5@0.6.11) (2023-09-25)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **cds-plugin-ui5:** disable view cache for Fiori elements based apps ([#847](https://github.com/ui5-community/ui5-ecosystem-showcase/issues/847)) ([81f6a80](https://github.com/ui5-community/ui5-ecosystem-showcase/commit/81f6a803cff4f0c7323e7dcf5b2a28dc081d3123))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.6.10](https://github.com/ui5-community/ui5-ecosystem-showcase/compare/cds-plugin-ui5@0.6.9...cds-plugin-ui5@0.6.10) (2023-09-15)
|
|
7
18
|
|
|
8
19
|
|
package/cds-plugin.js
CHANGED
|
@@ -123,7 +123,14 @@ if (!skip) {
|
|
|
123
123
|
newLis.push(li.toString());
|
|
124
124
|
}
|
|
125
125
|
});
|
|
126
|
-
newLis.push(
|
|
126
|
+
newLis.push(
|
|
127
|
+
...links.sort().map((link) => {
|
|
128
|
+
// we remove the query parameters from the link text
|
|
129
|
+
const linkText = link.indexOf("?") === -1 ? link : link.substr(0, link.indexOf("?"));
|
|
130
|
+
// renders a UI5 link ;-)
|
|
131
|
+
return `<li><a class="ui5" href="${link}">${linkText}</a></li>`;
|
|
132
|
+
})
|
|
133
|
+
);
|
|
127
134
|
ul.innerHTML = newLis.join("\n");
|
|
128
135
|
} else {
|
|
129
136
|
log.warn(`Failed to inject application links into CDS index page!`);
|
|
@@ -117,9 +117,12 @@ module.exports = async function applyUI5Middleware(router, options) {
|
|
|
117
117
|
});
|
|
118
118
|
await middlewareManager.applyMiddleware(router);
|
|
119
119
|
|
|
120
|
+
// for Fiori elements based applications we need to invalidate the view cache
|
|
121
|
+
const isFioriElementsBased = rootProject.getFrameworkDependencies().find((lib) => lib.name.startsWith("sap.fe"));
|
|
122
|
+
|
|
120
123
|
// collect app pages from workspace (glob testing: https://globster.xyz/ and https://codepen.io/mrmlnc/pen/OXQjMe)
|
|
121
124
|
// -> but exclude the HTML fragments from the list of app pages!
|
|
122
|
-
const pages = (await rootReader.byGlob("**/!(*.fragment).{html,htm}")).map((resource) => resource.getPath());
|
|
125
|
+
const pages = (await rootReader.byGlob("**/!(*.fragment).{html,htm}")).map((resource) => `${resource.getPath()}${isFioriElementsBased ? "?sap-ui-xx-viewCache=false" : ""}`);
|
|
123
126
|
|
|
124
127
|
// collect app pages from middlewares implementing the getAppPages
|
|
125
128
|
middlewareManager.middlewareExecutionOrder?.map((name) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cds-plugin-ui5",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"description": "A CDS server plugin to inject the middlewares of all related UI5 tooling based projects.",
|
|
5
5
|
"author": "Peter Muessig",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@sap/cds": ">=6.8.2",
|
|
25
25
|
"express": ">=4.18.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "0a1b366d89992da71f4877260f8d06f14ae2efda"
|
|
28
28
|
}
|