@sap-ux/fe-fpm-writer 0.43.25 → 0.43.26
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.
|
@@ -134,7 +134,7 @@ function getUI5XmlDocument(basePath, viewPath, fs) {
|
|
|
134
134
|
// Parse the xml view content
|
|
135
135
|
let viewDocument;
|
|
136
136
|
try {
|
|
137
|
-
viewDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(viewContent);
|
|
137
|
+
viewDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(viewContent, 'text/xml');
|
|
138
138
|
}
|
|
139
139
|
catch (error) {
|
|
140
140
|
throw new Error(`Unable to parse xml view file. Details: ${(0, validate_1.getErrorMessage)(error)}`);
|
|
@@ -279,7 +279,7 @@ function getTemplateDocument(buildingBlockData, viewDocument, fs, manifest, temp
|
|
|
279
279
|
// Parse the rendered template content
|
|
280
280
|
let templateDocument;
|
|
281
281
|
try {
|
|
282
|
-
templateDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(templateContent);
|
|
282
|
+
templateDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(templateContent, 'text/xml');
|
|
283
283
|
}
|
|
284
284
|
catch (error) {
|
|
285
285
|
throw new Error(`Unable to parse template file with building block data. Details: ${(0, validate_1.getErrorMessage)(error)}`);
|
|
@@ -70,7 +70,7 @@ function getXPathStringsForXmlFile(xmlFilePath, fs) {
|
|
|
70
70
|
const errorHandler = (level, message) => {
|
|
71
71
|
throw new Error(`Unable to parse the xml view file. Details: [${level}] - ${message}`);
|
|
72
72
|
};
|
|
73
|
-
const xmlDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(xmlContent);
|
|
73
|
+
const xmlDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(xmlContent, 'text/xml');
|
|
74
74
|
const nodes = [{ parentNode: '', node: xmlDocument.firstChild }];
|
|
75
75
|
// check macros namespace and page macro definition
|
|
76
76
|
const macrosNamespace = getOrAddNamespace(xmlDocument);
|
|
@@ -128,7 +128,7 @@ async function getFilterBarIdsInFile(viewOrFragmentPath, fs) {
|
|
|
128
128
|
const errorHandler = (level, message) => {
|
|
129
129
|
throw new Error(`Unable to parse the xml view file. Details: [${level}] - ${message}`);
|
|
130
130
|
};
|
|
131
|
-
const xmlDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(xmlContent);
|
|
131
|
+
const xmlDocument = new xmldom_1.DOMParser({ errorHandler }).parseFromString(xmlContent, 'text/xml');
|
|
132
132
|
const elements = Array.from(xmlDocument.getElementsByTagName(buildingBlockSelector));
|
|
133
133
|
for (const element of elements) {
|
|
134
134
|
const id = element.getAttributeNode('id')?.value;
|
package/dist/common/utils.js
CHANGED
|
@@ -115,7 +115,7 @@ async function getManifest(basePath, fs, validate = true) {
|
|
|
115
115
|
*/
|
|
116
116
|
function isElementIdAvailable(fs, viewOrFragmentPath, id) {
|
|
117
117
|
const xmlContent = fs.read(viewOrFragmentPath).toString();
|
|
118
|
-
const xmlDocument = new xmldom_1.DOMParser({ errorHandler: () => { } }).parseFromString(xmlContent);
|
|
118
|
+
const xmlDocument = new xmldom_1.DOMParser({ errorHandler: () => { } }).parseFromString(xmlContent, 'text/xml');
|
|
119
119
|
return xmlDocument.documentElement ? !xmlDocument.getElementById(id) : true;
|
|
120
120
|
}
|
|
121
121
|
//# sourceMappingURL=utils.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fe-fpm-writer",
|
|
3
3
|
"description": "SAP Fiori elements flexible programming model writer",
|
|
4
|
-
"version": "0.43.
|
|
4
|
+
"version": "0.43.26",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@sap-ux/annotation-converter": "0.10.21",
|
|
24
24
|
"@sap-ux/vocabularies-types": "0.15.0",
|
|
25
|
-
"@xmldom/xmldom": "0.8.
|
|
25
|
+
"@xmldom/xmldom": "0.8.13",
|
|
26
26
|
"ejs": "3.1.10",
|
|
27
27
|
"i18next": "25.10.10",
|
|
28
28
|
"mem-fs": "2.1.0",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"semver": "7.7.4",
|
|
31
31
|
"xml-formatter": "3.7.0",
|
|
32
32
|
"xpath": "0.0.34",
|
|
33
|
-
"@sap-ux/
|
|
34
|
-
"@sap-ux/
|
|
35
|
-
"@sap-ux/
|
|
36
|
-
"@sap-ux/
|
|
33
|
+
"@sap-ux/logger": "0.8.5",
|
|
34
|
+
"@sap-ux/project-access": "1.36.1",
|
|
35
|
+
"@sap-ux/fiori-annotation-api": "0.9.46",
|
|
36
|
+
"@sap-ux/i18n": "0.3.10"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/inquirer": "8.2.6",
|