@sap-ux/project-access 2.1.7 → 2.1.8

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.
@@ -190,6 +190,10 @@ export async function findRootsForPath(path, options) {
190
190
  // Check if app is included in CAP project
191
191
  const projectRoot = await findCapProjectRoot(appRoot, undefined, { memFs, cache });
192
192
  if (projectRoot) {
193
+ if (projectRoot === appRoot) {
194
+ // appRoot is the CAP root itself, meaning there is no enclosing CAP project - not a supported app layout
195
+ return null;
196
+ }
193
197
  // App included in CAP
194
198
  return {
195
199
  appRoot,
@@ -226,7 +230,7 @@ export async function findCapProjectRoot(path, checkForAppRouter = true, options
226
230
  }
227
231
  const { memFs, cache } = getFindOptions(options);
228
232
  const { root } = parse(path);
229
- let projectRoot = dirname(path);
233
+ let projectRoot = path;
230
234
  while (projectRoot !== root) {
231
235
  if (!cache.capProjectType.has(projectRoot)) {
232
236
  cache.capProjectType.set(projectRoot, await getCapProjectType(projectRoot, memFs));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap-ux/project-access",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "description": "Library to access SAP Fiori tools projects",
5
5
  "type": "module",
6
6
  "repository": {