@sap-ux/backend-proxy-middleware-cf 0.3.1 → 0.3.3

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.
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { DestinationProxyType } from '@sap-ux/btp-utils';
4
- import { getToken, getBtpDestinationConfig } from '@sap-ux/adp-tooling';
4
+ import { getToken, getBtpDestinationConfig, getDestinationServiceUaa } from '@sap-ux/adp-tooling';
5
5
  /**
6
6
  * Extract unique destination names from the routes in webapp/xs-app.json.
7
7
  *
@@ -48,13 +48,13 @@ function getBtpDestinationServiceAuth() {
48
48
  if (!Array.isArray(entries) || entries.length === 0) {
49
49
  return undefined;
50
50
  }
51
- const credentials = entries[0].credentials;
52
- if (!credentials?.clientid || !credentials?.clientsecret || !credentials?.url || !credentials?.uri) {
51
+ const uaa = getDestinationServiceUaa(entries[0].credentials);
52
+ if (!uaa) {
53
53
  return undefined;
54
54
  }
55
55
  return {
56
- uaa: { clientid: credentials.clientid, clientsecret: credentials.clientsecret, url: credentials.url },
57
- uri: String(credentials.uri)
56
+ uaa: { clientid: uaa.clientid, clientsecret: uaa.clientsecret, url: uaa.url },
57
+ uri: uaa.uri
58
58
  };
59
59
  }
60
60
  /**
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Abackend-proxy-middleware-cf"
12
12
  },
13
- "version": "0.3.1",
13
+ "version": "0.3.3",
14
14
  "license": "Apache-2.0",
15
15
  "author": "@SAP/ux-tools-team",
16
16
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "http-proxy-middleware": "3.0.5",
29
29
  "mime-types": "^2.1.35",
30
30
  "portfinder": "^1.0.32",
31
- "@sap-ux/adp-tooling": "1.0.1",
31
+ "@sap-ux/adp-tooling": "1.0.3",
32
32
  "@sap-ux/btp-utils": "2.0.0",
33
33
  "@sap-ux/logger": "1.0.0"
34
34
  },