@sap-ux/odata-service-writer 0.22.0 → 0.22.2

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.
Files changed (2) hide show
  1. package/dist/updates.js +3 -3
  2. package/package.json +4 -4
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 minUI5Version = manifest['sap.ui5']?.dependencies?.minUI5Version;
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 && semver_1.default.valid(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.0",
12
+ "version": "0.22.2",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -21,13 +21,13 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "ejs": "3.1.10",
24
- "fast-xml-parser": "4.2.7",
24
+ "fast-xml-parser": "4.4.1",
25
25
  "i18next": "20.6.1",
26
26
  "mem-fs": "2.1.0",
27
27
  "mem-fs-editor": "9.4.0",
28
28
  "prettify-xml": "1.2.0",
29
29
  "semver": "7.5.4",
30
- "@sap-ux/mockserver-config-writer": "0.6.1",
30
+ "@sap-ux/mockserver-config-writer": "0.6.2",
31
31
  "@sap-ux/ui5-config": "0.23.1"
32
32
  },
33
33
  "devDependencies": {
@@ -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.4"
41
+ "@sap-ux/project-access": "1.26.3"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=18.x"