@sap-ux/fiori-generator-shared 0.12.2 → 0.12.4

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.
@@ -28,9 +28,13 @@ function getDefaultTargetFolder(vscode) {
28
28
  return targetFolder;
29
29
  }
30
30
  const workspace = vscode.workspace;
31
- // If this is not a workspace default to the first folder (`rootPath` is deprecated)
32
- if (workspace.workspaceFolders?.length > 0 && workspace.workspaceFolders[0].uri.scheme === 'file') {
33
- return workspace.workspaceFolders[0].uri.fsPath;
31
+ // default to the first suitable folder found in the workspace folders
32
+ if (workspace.workspaceFolders?.length > 0) {
33
+ for (const folder of workspace.workspaceFolders) {
34
+ if (folder.uri.scheme === 'file') {
35
+ return folder.uri.fsPath;
36
+ }
37
+ }
34
38
  }
35
39
  // Otherwise use <home-dir>/projects,
36
40
  return (0, fs_1.existsSync)(DEFAULT_PROJECTS_FOLDER) ? DEFAULT_PROJECTS_FOLDER : undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/fiori-generator-shared",
3
3
  "description": "Commonly used shared functionality and types to support the fiori generator.",
4
- "version": "0.12.2",
4
+ "version": "0.12.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -25,8 +25,8 @@
25
25
  "os-name": "4.0.1",
26
26
  "semver": "7.5.4",
27
27
  "@sap-ux/btp-utils": "1.1.0",
28
- "@sap-ux/project-access": "1.30.1",
29
- "@sap-ux/telemetry": "0.6.2"
28
+ "@sap-ux/project-access": "1.30.2",
29
+ "@sap-ux/telemetry": "0.6.3"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/mem-fs-editor": "7.0.1",