@sap-ux/project-access 1.25.7 → 1.26.1
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.
- package/dist/project/cap.js +4 -1
- package/dist/types/cap/index.d.ts +6 -0
- package/package.json +1 -1
package/dist/project/cap.js
CHANGED
|
@@ -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(
|
|
129
|
+
urlPath: uniformUrl(endpointPath),
|
|
127
130
|
runtime: value.runtime
|
|
128
131
|
};
|
|
129
132
|
});
|
|
@@ -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.
|