@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.
- package/dist/project/cap.js +4 -1
- package/dist/project/info.js +2 -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
|
});
|
package/dist/project/info.js
CHANGED
|
@@ -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.
|