@sap-ux/project-access 1.30.6 → 1.30.7
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/path/index.d.ts +2 -0
- package/dist/path/index.js +6 -0
- package/dist/path/normalize.d.ts +8 -0
- package/dist/path/normalize.js +24 -0
- package/dist/project/info.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizePath = void 0;
|
|
4
|
+
var normalize_1 = require("./normalize");
|
|
5
|
+
Object.defineProperty(exports, "normalizePath", { enumerable: true, get: function () { return normalize_1.normalizePath; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizePath = normalizePath;
|
|
4
|
+
const fs_1 = require("fs");
|
|
5
|
+
let toUpperCase;
|
|
6
|
+
/**
|
|
7
|
+
* Normalize path to canonical form.
|
|
8
|
+
*
|
|
9
|
+
* @param path - URI or string.
|
|
10
|
+
* @returns File path.
|
|
11
|
+
*/
|
|
12
|
+
function normalizePath(path) {
|
|
13
|
+
// for windows, some NodeJS methods will output uppercase drive letters, some in lowercase
|
|
14
|
+
if (process.platform === 'win32') {
|
|
15
|
+
if (toUpperCase === undefined) {
|
|
16
|
+
const driveLetter = fs_1.realpathSync.native('\\')[0];
|
|
17
|
+
toUpperCase = driveLetter === driveLetter.toUpperCase();
|
|
18
|
+
}
|
|
19
|
+
const correctedDriveLetter = toUpperCase ? path.charAt(0).toUpperCase() : path.charAt(0).toLowerCase();
|
|
20
|
+
return correctedDriveLetter + path.slice(1);
|
|
21
|
+
}
|
|
22
|
+
return path;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=normalize.js.map
|
package/dist/project/info.js
CHANGED
|
@@ -16,6 +16,7 @@ const search_1 = require("./search");
|
|
|
16
16
|
const service_1 = require("./service");
|
|
17
17
|
const ui5_config_1 = require("./ui5-config");
|
|
18
18
|
const semver_1 = require("semver");
|
|
19
|
+
const path_2 = require("../path");
|
|
19
20
|
/**
|
|
20
21
|
* Returns the project structure for a given Fiori project.
|
|
21
22
|
*
|
|
@@ -32,7 +33,7 @@ async function getProject(root, memFs) {
|
|
|
32
33
|
const appFolders = await getAppFolders(root, memFs);
|
|
33
34
|
const apps = await getApps(root, appFolders, memFs);
|
|
34
35
|
return {
|
|
35
|
-
root,
|
|
36
|
+
root: (0, path_2.normalizePath)(root),
|
|
36
37
|
projectType,
|
|
37
38
|
apps
|
|
38
39
|
};
|