@sap-ux/odata-service-writer 0.29.9 → 0.29.10
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/data/manifest.js +4 -3
- package/package.json +4 -4
package/dist/data/manifest.js
CHANGED
|
@@ -15,8 +15,9 @@ const semver_1 = __importDefault(require("semver"));
|
|
|
15
15
|
* @param {Editor} fs - the memfs editor instance
|
|
16
16
|
* @param {string} webappPath - the webapp path of an existing UI5 application
|
|
17
17
|
* @param {DataSourceUpdateSettings} dataSourceUpdateSettings - dataSource settings for update
|
|
18
|
+
* @param {string} minimumUi5Version - minimum UI5 version of the application
|
|
18
19
|
*/
|
|
19
|
-
function enhanceManifestDatasources(fs, webappPath, dataSourceUpdateSettings) {
|
|
20
|
+
function enhanceManifestDatasources(fs, webappPath, dataSourceUpdateSettings, minimumUi5Version) {
|
|
20
21
|
const { serviceName, servicePath, serviceVersion, manifest, forceServiceUpdate, serviceMetadata, serviceRemoteAnnotations, serviceLocalAnnotations } = dataSourceUpdateSettings;
|
|
21
22
|
const dataSources = manifest?.['sap.app'].dataSources ?? {};
|
|
22
23
|
const createdRemoteAnnotationDataSources = addRemoteAnnotationDataSources(fs, webappPath, dataSources, serviceName, serviceRemoteAnnotations, forceServiceUpdate);
|
|
@@ -28,7 +29,7 @@ function enhanceManifestDatasources(fs, webappPath, dataSourceUpdateSettings) {
|
|
|
28
29
|
settings['localUri'] = `localService/${serviceName}/metadata.xml`;
|
|
29
30
|
}
|
|
30
31
|
if (serviceVersion === '4') {
|
|
31
|
-
settings['odataVersion'] = '4.0';
|
|
32
|
+
settings['odataVersion'] = minimumUi5Version && semver_1.default.satisfies(minimumUi5Version, '>=1.144') ? '4.01' : '4.0';
|
|
32
33
|
}
|
|
33
34
|
else if (serviceVersion === '2') {
|
|
34
35
|
settings['odataVersion'] = '2.0';
|
|
@@ -245,7 +246,7 @@ function enhanceManifest(service, manifest, webappPath, fs, forceServiceUpdate)
|
|
|
245
246
|
serviceMetadata: serviceSettings.metadata,
|
|
246
247
|
serviceRemoteAnnotations: serviceSettings.annotations,
|
|
247
248
|
serviceLocalAnnotations: serviceSettings.localAnnotationsName
|
|
248
|
-
});
|
|
249
|
+
}, minimumUi5Version);
|
|
249
250
|
// Add or update existing service model settings for manifest.json
|
|
250
251
|
enhanceManifestModels(serviceSettings.name, serviceSettings.version, serviceSettings.model, serviceSettings.includeSynchronizationMode, manifest);
|
|
251
252
|
}
|
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.29.
|
|
12
|
+
"version": "0.29.10",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"files": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"mem-fs-editor": "9.4.0",
|
|
30
30
|
"prettify-xml": "1.2.0",
|
|
31
31
|
"semver": "7.5.4",
|
|
32
|
-
"@sap-ux/mockserver-config-writer": "0.9.
|
|
33
|
-
"@sap-ux/project-access": "1.34.
|
|
32
|
+
"@sap-ux/mockserver-config-writer": "0.9.42",
|
|
33
|
+
"@sap-ux/project-access": "1.34.3",
|
|
34
34
|
"@sap-ux/ui5-config": "0.29.13"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"@types/semver": "7.5.2",
|
|
43
43
|
"fs-extra": "10.0.0",
|
|
44
44
|
"lodash": "4.17.21",
|
|
45
|
-
"@sap-ux/axios-extension": "1.25.
|
|
45
|
+
"@sap-ux/axios-extension": "1.25.7"
|
|
46
46
|
},
|
|
47
47
|
"engines": {
|
|
48
48
|
"node": ">=20.x"
|