@sap-ux/project-access 1.25.7 → 1.26.0

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.
@@ -121,9 +121,12 @@ async function getCapModelAndServices(projectRoot) {
121
121
  let services = cds.compile.to.serviceinfo(model, { root: _projectRoot }) ?? [];
122
122
  if (services.map) {
123
123
  services = services.map((value) => {
124
+ const { endpoints, urlPath } = value;
125
+ const odataEndpoint = endpoints?.find((endpoint) => endpoint.kind === 'odata');
126
+ const endpointPath = odataEndpoint?.path ?? urlPath;
124
127
  return {
125
128
  name: value.name,
126
- urlPath: uniformUrl(value.urlPath),
129
+ urlPath: uniformUrl(endpointPath),
127
130
  runtime: value.runtime
128
131
  };
129
132
  });
@@ -218,11 +218,12 @@ exports.getMinUI5VersionFromManifest = getMinUI5VersionFromManifest;
218
218
  */
219
219
  function getMinUI5VersionAsArray(manifest, noValidation = false) {
220
220
  const result = [];
221
+ const manifestVariablePattern = /^\$\{.*\}$/; // minUI5Version can also contain variable entries like ${sap.ui5.dist.version}
221
222
  const minUI5Version = getMinUI5VersionFromManifest(manifest);
222
223
  if (minUI5Version) {
223
224
  const minUI5VersionArray = Array.isArray(minUI5Version) ? minUI5Version : [minUI5Version];
224
225
  minUI5VersionArray.forEach((version) => {
225
- if (noValidation || (0, semver_1.valid)(version)) {
226
+ if (noValidation || (0, semver_1.valid)(version) || manifestVariablePattern.test(version)) {
226
227
  result.push(version);
227
228
  }
228
229
  });
@@ -227,6 +227,12 @@ export interface ServiceInfo {
227
227
  name: string;
228
228
  urlPath: string;
229
229
  runtime?: string;
230
+ endpoints?: [
231
+ {
232
+ kind: string;
233
+ path: string;
234
+ }
235
+ ];
230
236
  }
231
237
  /**
232
238
  * CDS version information extracted from package json that was used to compile the project when determining the service.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "1.25.7",
3
+ "version": "1.26.0",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "repository": {
6
6
  "type": "git",