@sap-ux/project-access 1.29.8 → 1.29.9

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.
@@ -137,6 +137,16 @@ async function getCapCustomPaths(capProjectPath) {
137
137
  }
138
138
  return result;
139
139
  }
140
+ /**
141
+ * Filters service endpoints to include only OData endpoints.
142
+ *
143
+ * @param endpoint The endpoint object to check.
144
+ * @param endpoint.kind The type of the endpoint.
145
+ * @returns `true` if the endpoint is of kind 'odata' or 'odata-v4'.
146
+ */
147
+ function filterCapServiceEndpoints(endpoint) {
148
+ return endpoint.kind === 'odata' || endpoint.kind === 'odata-v4';
149
+ }
140
150
  /**
141
151
  * Return the CAP model and all services. The cds.root will be set to the provided project root path.
142
152
  *
@@ -173,12 +183,12 @@ async function getCapModelAndServices(projectRoot) {
173
183
  // i.e. ignore services for websockets and other unsupported protocols
174
184
  if (services.filter) {
175
185
  services = services.filter((service) => (service.urlPath && service.endpoints === undefined) ||
176
- service.endpoints?.find((endpoint) => endpoint.kind === 'odata'));
186
+ service.endpoints?.find(filterCapServiceEndpoints));
177
187
  }
178
188
  if (services.map) {
179
189
  services = services.map((value) => {
180
190
  const { endpoints, urlPath } = value;
181
- const odataEndpoint = endpoints?.find((endpoint) => endpoint.kind === 'odata');
191
+ const odataEndpoint = endpoints?.find(filterCapServiceEndpoints);
182
192
  const endpointPath = odataEndpoint?.path ?? urlPath;
183
193
  return {
184
194
  name: value.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "1.29.8",
3
+ "version": "1.29.9",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "repository": {
6
6
  "type": "git",