@sap-ux/odata-service-writer 0.22.0 → 0.22.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/dist/updates.js +3 -3
- package/package.json +2 -2
package/dist/updates.js
CHANGED
|
@@ -32,6 +32,7 @@ const path_1 = __importStar(require("path"));
|
|
|
32
32
|
const i18n_1 = require("./i18n");
|
|
33
33
|
const semver_1 = __importDefault(require("semver"));
|
|
34
34
|
const prettify_xml_1 = __importDefault(require("prettify-xml"));
|
|
35
|
+
const project_access_1 = require("@sap-ux/project-access");
|
|
35
36
|
/**
|
|
36
37
|
* Internal function that updates the manifest.json based on the given service configuration.
|
|
37
38
|
*
|
|
@@ -51,8 +52,7 @@ function updateManifest(basePath, service, fs, templateRoot) {
|
|
|
51
52
|
throw new Error((0, i18n_1.t)('error.requiredProjectPropertyNotFound', { property: `'${appProp}'.id`, path: manifestPath }));
|
|
52
53
|
}
|
|
53
54
|
const manifestJsonExt = fs.read((0, path_1.join)(templateRoot, 'extend', `manifest.json`));
|
|
54
|
-
const
|
|
55
|
-
const manifestSettings = Object.assign(service, getModelSettings(minUI5Version));
|
|
55
|
+
const manifestSettings = Object.assign(service, getModelSettings((0, project_access_1.getMinimumUI5Version)(manifest)));
|
|
56
56
|
// If the service object includes ejs options, for example 'client' (see: https://ejs.co/#docs),
|
|
57
57
|
// resulting in unexpected behaviour and problems when webpacking. Passing an empty options object prevents this.
|
|
58
58
|
fs.extendJSON(manifestPath, JSON.parse((0, ejs_1.render)(manifestJsonExt, manifestSettings, {})));
|
|
@@ -124,7 +124,7 @@ exports.updateCdsFilesWithAnnotations = updateCdsFilesWithAnnotations;
|
|
|
124
124
|
*/
|
|
125
125
|
function getModelSettings(minUI5Version) {
|
|
126
126
|
let includeSynchronizationMode = false;
|
|
127
|
-
if (minUI5Version
|
|
127
|
+
if (minUI5Version) {
|
|
128
128
|
includeSynchronizationMode = semver_1.default.satisfies(minUI5Version, '<=1.110');
|
|
129
129
|
}
|
|
130
130
|
return { includeSynchronizationMode };
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aodata-service-writer"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.22.
|
|
12
|
+
"version": "0.22.1",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"files": [
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@types/semver": "7.5.2",
|
|
39
39
|
"fs-extra": "10.0.0",
|
|
40
40
|
"lodash": "4.17.21",
|
|
41
|
-
"@sap-ux/project-access": "1.25.
|
|
41
|
+
"@sap-ux/project-access": "1.25.7"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=18.x"
|