@sap-ux/fiori-elements-writer 0.11.4 → 0.12.0
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-elements-writer",
|
|
3
3
|
"description": "SAP Fiori elements application writer",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@sap-ux/odata-service-writer": "0.14.20",
|
|
24
|
-
"@sap-ux/ui5-application-writer": "0.
|
|
24
|
+
"@sap-ux/ui5-application-writer": "0.22.0",
|
|
25
25
|
"@sap-ux/fe-fpm-writer": "0.19.0",
|
|
26
26
|
"@sap-ux/ui5-config": "0.16.6",
|
|
27
27
|
"@sap-ux/ui5-test-writer": "0.1.7",
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"semver": "7.3.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
+
"@sap-ux/eslint-plugin-fiori-tools": "0.1.0",
|
|
37
38
|
"@types/ejs": "3.1.0",
|
|
38
39
|
"@types/fs-extra": "9.0.13",
|
|
39
40
|
"@types/lodash": "4.14.176",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1
2
|
// @ts-nocheck
|
|
2
3
|
//Loads and extends the openui5 FileListBaseConnector
|
|
3
4
|
|
|
@@ -21,9 +22,9 @@ sap.ui.define(['sap/base/util/merge', connectorPath], function(merge, FileListBa
|
|
|
21
22
|
cache: false
|
|
22
23
|
})
|
|
23
24
|
.then(function(sChangesFolderContent) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const regex = /(\/changes\/[^"]*\.[a-zA-Z]*)/g;
|
|
26
|
+
const result = regex.exec(sChangesFolderContent);
|
|
27
|
+
const aChanges = [];
|
|
27
28
|
while (result !== null) {
|
|
28
29
|
aChanges.push(result[1]);
|
|
29
30
|
result = regex.exec(sChangesFolderContent);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1
2
|
// @ts-nocheck
|
|
2
3
|
//Load the fake lrep connector only if ui5 version < 1.78
|
|
3
|
-
|
|
4
|
+
const version = sap.ui.version.split(".");
|
|
4
5
|
if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
5
6
|
sap.ui.getCore().loadLibraries(["sap/ui/fl"]);
|
|
6
7
|
sap.ui.require(["sap/ui/fl/FakeLrepConnector"], function (FakeLrepConnector) {
|
|
@@ -12,8 +13,8 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
12
13
|
if (!sCodeAsString || sCodeAsString.length === 0) {
|
|
13
14
|
return "";
|
|
14
15
|
}
|
|
15
|
-
|
|
16
|
-
for (
|
|
16
|
+
const sAsciiString = "";
|
|
17
|
+
for (const i = 0; i < sCodeAsString.length; i++) {
|
|
17
18
|
sAsciiString += sCodeAsString.charCodeAt(i) + ",";
|
|
18
19
|
}
|
|
19
20
|
if (
|
|
@@ -31,7 +32,7 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
31
32
|
* and get their content
|
|
32
33
|
*/
|
|
33
34
|
loadChanges: function () {
|
|
34
|
-
|
|
35
|
+
const oResult = {
|
|
35
36
|
changes: [],
|
|
36
37
|
settings: {
|
|
37
38
|
isKeyUser: true,
|
|
@@ -41,8 +42,8 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
41
42
|
};
|
|
42
43
|
|
|
43
44
|
//Get the content of the changes folder.
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
const aPromises = [];
|
|
46
|
+
const sCacheBusterFilePath = "/sap-ui-cachebuster-info.json";
|
|
46
47
|
|
|
47
48
|
return new Promise(function (resolve, reject) {
|
|
48
49
|
$.ajax({
|
|
@@ -52,7 +53,7 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
52
53
|
})
|
|
53
54
|
.then(function (oCachebusterContent) {
|
|
54
55
|
//we are looking for only change files
|
|
55
|
-
|
|
56
|
+
const aChangeFilesPaths = Object.keys(oCachebusterContent).filter(function (sPath) {
|
|
56
57
|
return sPath.endsWith(".change");
|
|
57
58
|
});
|
|
58
59
|
$.each(aChangeFilesPaths, function (index, sFilePath) {
|
|
@@ -88,8 +89,8 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
88
89
|
cache: false
|
|
89
90
|
})
|
|
90
91
|
.then(function (sChangesFolderContent) {
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
const regex = /(\/changes\/[^"]*\.[a-zA-Z]*)/g;
|
|
93
|
+
const result = regex.exec(sChangesFolderContent);
|
|
93
94
|
|
|
94
95
|
while (result !== null) {
|
|
95
96
|
aPromises.push(
|
|
@@ -113,20 +114,20 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
113
114
|
resolveInner(aChanges);
|
|
114
115
|
}
|
|
115
116
|
}).then(function (aCheckChanges) {
|
|
116
|
-
|
|
117
|
+
const aChangePromises = [],
|
|
117
118
|
aProcessedChanges = [];
|
|
118
119
|
aCheckChanges.forEach(function (oChange) {
|
|
119
|
-
|
|
120
|
+
const sChangeType = oChange.changeType;
|
|
120
121
|
if (sChangeType === "addXML" || sChangeType === "codeExt") {
|
|
121
122
|
/*eslint-disable no-nested-ternary*/
|
|
122
|
-
|
|
123
|
+
const sPath =
|
|
123
124
|
sChangeType === "addXML"
|
|
124
125
|
? oChange.content.fragmentPath
|
|
125
126
|
: sChangeType === "codeExt"
|
|
126
127
|
? oChange.content.codeRef
|
|
127
128
|
: "";
|
|
128
|
-
|
|
129
|
-
|
|
129
|
+
const sWebappPath = sPath.match(/webapp(.*)/);
|
|
130
|
+
const sUrl = "/" + sWebappPath[0];
|
|
130
131
|
aChangePromises.push(
|
|
131
132
|
$.ajax({
|
|
132
133
|
url: sUrl,
|
|
@@ -163,7 +164,7 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
163
164
|
return new Date(change1.creation) - new Date(change2.creation);
|
|
164
165
|
});
|
|
165
166
|
oResult.changes = aProcessedChanges;
|
|
166
|
-
|
|
167
|
+
const oLrepChange = {
|
|
167
168
|
changes: oResult,
|
|
168
169
|
componentClassName: "<%- app.id %>"
|
|
169
170
|
};
|
|
@@ -174,7 +175,7 @@ if (parseInt(version[0], 10) <= 1 && parseInt(version[1], 10) < 78) {
|
|
|
174
175
|
return new Date(change1.creation) - new Date(change2.creation);
|
|
175
176
|
});
|
|
176
177
|
oResult.changes = aProcessedChanges;
|
|
177
|
-
|
|
178
|
+
const oLrepChange = {
|
|
178
179
|
changes: oResult,
|
|
179
180
|
componentClassName: "<%- app.id %>"
|
|
180
181
|
};
|