@sap-ux/project-access 1.26.4 → 1.26.5

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.
@@ -118,6 +118,7 @@ async function getCapModelAndServices(projectRoot) {
118
118
  _logger?.info(`@sap-ux/project-access:getCapModelAndServices - Using 'cds.home': ${cds.home}`);
119
119
  _logger?.info(`@sap-ux/project-access:getCapModelAndServices - Using 'cds.version': ${cds.version}`);
120
120
  _logger?.info(`@sap-ux/project-access:getCapModelAndServices - Using 'cds.root': ${cds.root}`);
121
+ _logger?.info(`@sap-ux/project-access:getCapModelAndServices - Using 'projectRoot': ${_projectRoot}`);
121
122
  let services = cds.compile.to.serviceinfo(model, { root: _projectRoot }) ?? [];
122
123
  if (services.map) {
123
124
  services = services.map((value) => {
@@ -370,6 +371,8 @@ async function loadCdsModuleFromProject(capProjectPath, strict = false) {
370
371
  if (global) {
371
372
  global.cds = cds;
372
373
  }
374
+ // correct cds.env for current project root. Especially needed CAP Java projects loading cds dependency from jar file
375
+ cds.env = cds.env.for('cds', capProjectPath);
373
376
  return cds;
374
377
  }
375
378
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "1.26.4",
3
+ "version": "1.26.5",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "repository": {
6
6
  "type": "git",