@sap-ux/fe-fpm-writer 0.13.2 → 0.13.5
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/dist/action/index.js +1 -1
- package/dist/building-block/index.js +2 -1
- package/dist/column/index.js +1 -1
- package/dist/page/custom.js +1 -1
- package/dist/page/list.js +1 -1
- package/dist/page/object.js +1 -1
- package/dist/section/index.js +1 -1
- package/dist/view/index.js +1 -1
- package/package.json +2 -2
package/dist/action/index.js
CHANGED
|
@@ -81,7 +81,7 @@ function generateCustomAction(basePath, actionConfig, fs) {
|
|
|
81
81
|
}
|
|
82
82
|
// enhance manifest with action definition and controller reference
|
|
83
83
|
const actions = enhanceManifestAndGetActionsElementReference(manifest, config.target);
|
|
84
|
-
Object.assign(actions, JSON.parse(ejs_1.render(fs.read(path_1.join(root, `action/manifest.action.json`)), config)));
|
|
84
|
+
Object.assign(actions, JSON.parse(ejs_1.render(fs.read(path_1.join(root, `action/manifest.action.json`)), config, {})));
|
|
85
85
|
fs.writeJSON(manifestPath, manifest);
|
|
86
86
|
return fs;
|
|
87
87
|
}
|
|
@@ -95,6 +95,7 @@ function getOrAddMacrosNamespace(ui5XmlDocument) {
|
|
|
95
95
|
const macrosNamespaceEntry = Object.entries(namespaceMap).find(([_, value]) => value === 'sap.fe.macros');
|
|
96
96
|
if (!macrosNamespaceEntry) {
|
|
97
97
|
ui5XmlDocument.firstChild._nsMap['macros'] = 'sap.fe.macros';
|
|
98
|
+
ui5XmlDocument.documentElement.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:macros', 'sap.fe.macros');
|
|
98
99
|
}
|
|
99
100
|
return macrosNamespaceEntry ? macrosNamespaceEntry[0] : 'macros';
|
|
100
101
|
}
|
|
@@ -112,7 +113,7 @@ function getTemplateDocument(buildingBlockData, viewDocument, fs) {
|
|
|
112
113
|
const templateContent = ejs_1.render(fs.read(templateFilePath), {
|
|
113
114
|
macrosNamespace: getOrAddMacrosNamespace(viewDocument),
|
|
114
115
|
data: buildingBlockData
|
|
115
|
-
});
|
|
116
|
+
}, {});
|
|
116
117
|
const errorHandler = (level, message) => {
|
|
117
118
|
throw new Error(`Unable to parse template file with building block data. Details: [${level}] - ${message}`);
|
|
118
119
|
};
|
package/dist/column/index.js
CHANGED
|
@@ -72,7 +72,7 @@ function generateCustomColumn(basePath, customColumn, fs) {
|
|
|
72
72
|
const completeColumn = enhanceConfig(fs, root, customColumn, manifestPath, manifest);
|
|
73
73
|
// enhance manifest with column definition
|
|
74
74
|
const manifestRoot = getManifestRoot(customColumn.ui5Version);
|
|
75
|
-
const filledTemplate = ejs_1.render(fs.read(path_1.join(manifestRoot, `manifest.json`)), completeColumn);
|
|
75
|
+
const filledTemplate = ejs_1.render(fs.read(path_1.join(manifestRoot, `manifest.json`)), completeColumn, {});
|
|
76
76
|
fs.extendJSON(manifestPath, JSON.parse(filledTemplate));
|
|
77
77
|
// add fragment
|
|
78
78
|
const viewPath = path_1.join(completeColumn.path, `${completeColumn.name}.fragment.xml`);
|
package/dist/page/custom.js
CHANGED
|
@@ -66,7 +66,7 @@ function generate(basePath, data, fs) {
|
|
|
66
66
|
// merge content into existing files
|
|
67
67
|
const root = getTemplateRoot(data.ui5Version);
|
|
68
68
|
// enhance manifest.json
|
|
69
|
-
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(root, `manifest.json`)), config)), common_1.getManifestJsonExtensionHelper(config));
|
|
69
|
+
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(root, `manifest.json`)), config, {})), common_1.getManifestJsonExtensionHelper(config));
|
|
70
70
|
// add extension content
|
|
71
71
|
const viewPath = path_1.join(config.path, `${config.name}.view.xml`);
|
|
72
72
|
if (!fs.exists(viewPath)) {
|
package/dist/page/list.js
CHANGED
|
@@ -50,7 +50,7 @@ function generate(basePath, data, fs) {
|
|
|
50
50
|
const manifest = fs.readJSON(manifestPath);
|
|
51
51
|
const config = enhanceData(data, manifest);
|
|
52
52
|
// enhance manifest.json
|
|
53
|
-
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(__dirname, '../../templates/page/list/manifest.json')), config)), common_1.getManifestJsonExtensionHelper(config));
|
|
53
|
+
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(__dirname, '../../templates/page/list/manifest.json')), config, {})), common_1.getManifestJsonExtensionHelper(config));
|
|
54
54
|
return fs;
|
|
55
55
|
}
|
|
56
56
|
exports.generate = generate;
|
package/dist/page/object.js
CHANGED
|
@@ -41,7 +41,7 @@ function generate(basePath, data, fs) {
|
|
|
41
41
|
const manifest = fs.readJSON(manifestPath);
|
|
42
42
|
const config = enhanceData(data, manifest);
|
|
43
43
|
// enhance manifest.json
|
|
44
|
-
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(__dirname, '../../templates/page/object/manifest.json')), config)), common_1.getManifestJsonExtensionHelper(config));
|
|
44
|
+
fs.extendJSON(manifestPath, JSON.parse(ejs_1.render(fs.read(path_1.join(__dirname, '../../templates/page/object/manifest.json')), config, {})), common_1.getManifestJsonExtensionHelper(config));
|
|
45
45
|
return fs;
|
|
46
46
|
}
|
|
47
47
|
exports.generate = generate;
|
package/dist/section/index.js
CHANGED
|
@@ -66,7 +66,7 @@ function generateCustomSection(basePath, customSection, fs) {
|
|
|
66
66
|
const completeSection = enhanceConfig(fs, root, customSection, manifestPath, manifest);
|
|
67
67
|
// enhance manifest with section definition
|
|
68
68
|
const manifestRoot = getManifestRoot(root, customSection.ui5Version);
|
|
69
|
-
const filledTemplate = ejs_1.render(fs.read(path_1.join(manifestRoot, `manifest.json`)), completeSection);
|
|
69
|
+
const filledTemplate = ejs_1.render(fs.read(path_1.join(manifestRoot, `manifest.json`)), completeSection, {});
|
|
70
70
|
fs.extendJSON(manifestPath, JSON.parse(filledTemplate));
|
|
71
71
|
// add fragment
|
|
72
72
|
const viewPath = path_1.join(completeSection.path, `${completeSection.name}.fragment.xml`);
|
package/dist/view/index.js
CHANGED
|
@@ -61,7 +61,7 @@ function generateCustomView(basePath, customView, fs) {
|
|
|
61
61
|
// merge with defaults
|
|
62
62
|
const completeView = enhanceConfig(fs, root, customView, manifestPath, manifest);
|
|
63
63
|
// enhance manifest with view definition
|
|
64
|
-
const filledTemplate = ejs_1.render(fs.read(path_1.join(root, 'view', `manifest.json`)), completeView);
|
|
64
|
+
const filledTemplate = ejs_1.render(fs.read(path_1.join(root, 'view', `manifest.json`)), completeView, {});
|
|
65
65
|
fs.extendJSON(manifestPath, JSON.parse(filledTemplate));
|
|
66
66
|
// add fragment
|
|
67
67
|
const viewPath = path_1.join(completeView.path, `${completeView.name}.fragment.xml`);
|
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.13.
|
|
4
|
+
"version": "0.13.5",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/semver": "7.3.9",
|
|
34
34
|
"@types/mem-fs-editor": "7.0.1",
|
|
35
35
|
"@types/mem-fs": "1.1.2",
|
|
36
|
-
"@sap-ux/ui5-config": "0.14.
|
|
36
|
+
"@sap-ux/ui5-config": "0.14.4"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
|