@sap-ux/odata-service-writer 0.27.16 → 0.27.18

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.
@@ -162,7 +162,7 @@ async function setDefaultPreviewSettings(basePath, service, fs) {
162
162
  if (fs.exists(ui5Yamlpath)) {
163
163
  const yamlContents = fs.read(ui5Yamlpath);
164
164
  const ui5Config = await ui5_config_1.UI5Config.newInstance(yamlContents);
165
- const backends = ui5Config.getBackendConfigsFromFioriToolsProxydMiddleware();
165
+ const backends = ui5Config.getBackendConfigsFromFioriToolsProxyMiddleware();
166
166
  // There should be only one /sap entry
167
167
  if (backends.find((existingBackend) => existingBackend.path === '/sap')) {
168
168
  service.previewSettings.path = service.path;
package/dist/delete.js CHANGED
@@ -43,14 +43,14 @@ async function deleteServiceData(basePath, paths, service, fs) {
43
43
  if (paths.ui5Yaml) {
44
44
  ui5Config = await ui5_config_1.UI5Config.newInstance(fs.read(paths.ui5Yaml));
45
45
  // Delete service backend from fiori-tools-proxy middleware config
46
- ui5Config.removeBackendFromFioriToolsProxydMiddleware(service.path);
46
+ ui5Config.removeBackendFromFioriToolsProxyMiddleware(service.path);
47
47
  fs.write(paths.ui5Yaml, ui5Config.toString());
48
48
  }
49
49
  const serviceAnnotationPaths = getEDMXAnnotationPaths(service.annotations);
50
50
  if (paths.ui5LocalYaml) {
51
51
  ui5LocalConfig = await ui5_config_1.UI5Config.newInstance(fs.read(paths.ui5LocalYaml));
52
52
  // Delete service backend from fiori-tools-proxy middleware config
53
- ui5LocalConfig.removeBackendFromFioriToolsProxydMiddleware(service.path);
53
+ ui5LocalConfig.removeBackendFromFioriToolsProxyMiddleware(service.path);
54
54
  // Delete service from mockserver middleware config
55
55
  ui5LocalConfig.removeServiceFromMockServerMiddleware(service.path, serviceAnnotationPaths);
56
56
  fs.write(paths.ui5LocalYaml, ui5LocalConfig.toString());
@@ -58,7 +58,7 @@ async function deleteServiceData(basePath, paths, service, fs) {
58
58
  if (paths.ui5MockYaml) {
59
59
  ui5MockConfig = await ui5_config_1.UI5Config.newInstance(fs.read(paths.ui5MockYaml));
60
60
  // Delete service backend from fiori-tools-proxy middleware config
61
- ui5MockConfig.removeBackendFromFioriToolsProxydMiddleware(service.path);
61
+ ui5MockConfig.removeBackendFromFioriToolsProxyMiddleware(service.path);
62
62
  // Delete service from mockserver config
63
63
  ui5MockConfig.removeServiceFromMockServerMiddleware(service.path, serviceAnnotationPaths);
64
64
  fs.write(paths.ui5MockYaml, ui5MockConfig.toString());
package/dist/update.js CHANGED
@@ -38,18 +38,18 @@ async function generateMockserverMiddlewareBasedOnUi5MockYaml(fs, ui5YamlPath, u
38
38
  */
39
39
  function extendBackendMiddleware(fs, service, ui5Config, ui5ConfigPath, update = false) {
40
40
  if (update) {
41
- ui5Config.updateBackendToFioriToolsProxydMiddleware(service.previewSettings);
41
+ ui5Config.updateBackendToFioriToolsProxyMiddleware(service.previewSettings);
42
42
  }
43
43
  else {
44
44
  // Try to add backend
45
45
  try {
46
- ui5Config.addBackendToFioriToolsProxydMiddleware(service.previewSettings, service.ignoreCertError);
46
+ ui5Config.addBackendToFioriToolsProxyMiddleware(service.previewSettings, service.ignoreCertError);
47
47
  }
48
48
  catch (error) {
49
49
  if ((error instanceof ui5_config_1.YAMLError && error.code === ui5_config_1.yamlErrorCode.nodeNotFound) ||
50
50
  error.message === 'Could not find fiori-tools-proxy') {
51
51
  // Middleware is missing, add it along with the service backend
52
- ui5Config.addFioriToolsProxydMiddleware({
52
+ ui5Config.addFioriToolsProxyMiddleware({
53
53
  backend: [service.previewSettings],
54
54
  ignoreCertError: service.ignoreCertError
55
55
  });
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.27.16",
12
+ "version": "0.27.18",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -27,9 +27,9 @@
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.9.12",
31
- "@sap-ux/project-access": "1.30.11",
32
- "@sap-ux/ui5-config": "0.29.1"
30
+ "@sap-ux/mockserver-config-writer": "0.9.14",
31
+ "@sap-ux/project-access": "1.30.13",
32
+ "@sap-ux/ui5-config": "0.29.3"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/ejs": "3.1.2",