@sap-ux/project-access 1.2.0 → 1.3.1
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/constants.d.ts +1 -0
- package/dist/constants.js +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.js +2 -1
- package/dist/project/ui5-config.d.ts +9 -0
- package/dist/project/ui5-config.js +19 -1
- package/package.json +2 -2
package/dist/constants.d.ts
CHANGED
package/dist/constants.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { FileName } from './constants';
|
|
2
|
-
export { findAllApps, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getCapModelAndServices, getCapProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject } from './project';
|
|
2
|
+
export { findAllApps, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getCapModelAndServices, getCapProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readUi5Yaml } from './project';
|
|
3
3
|
export * from './types';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getCapProjectType = exports.getCapModelAndServices = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.FileName = void 0;
|
|
17
|
+
exports.readUi5Yaml = exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getCapProjectType = exports.getCapModelAndServices = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.FileName = void 0;
|
|
18
18
|
var constants_1 = require("./constants");
|
|
19
19
|
Object.defineProperty(exports, "FileName", { enumerable: true, get: function () { return constants_1.FileName; } });
|
|
20
20
|
var project_1 = require("./project");
|
|
@@ -28,5 +28,6 @@ Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: functio
|
|
|
28
28
|
Object.defineProperty(exports, "isCapJavaProject", { enumerable: true, get: function () { return project_1.isCapJavaProject; } });
|
|
29
29
|
Object.defineProperty(exports, "isCapNodeJsProject", { enumerable: true, get: function () { return project_1.isCapNodeJsProject; } });
|
|
30
30
|
Object.defineProperty(exports, "loadModuleFromProject", { enumerable: true, get: function () { return project_1.loadModuleFromProject; } });
|
|
31
|
+
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return project_1.readUi5Yaml; } });
|
|
31
32
|
__exportStar(require("./types"), exports);
|
|
32
33
|
//# sourceMappingURL=index.js.map
|
package/dist/project/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@ export { getCapModelAndServices, getCapProjectType, isCapJavaProject, isCapNodeJ
|
|
|
2
2
|
export { getAppProgrammingLanguage } from './info';
|
|
3
3
|
export { loadModuleFromProject } from './module-loader';
|
|
4
4
|
export { findAllApps, findProjectRoot, getAppRootFromWebappPath } from './search';
|
|
5
|
-
export { getWebappPath } from './ui5-config';
|
|
5
|
+
export { getWebappPath, readUi5Yaml } from './ui5-config';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/project/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.loadModuleFromProject = exports.getAppProgrammingLanguage = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getCapProjectType = exports.getCapModelAndServices = void 0;
|
|
3
|
+
exports.readUi5Yaml = exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.loadModuleFromProject = exports.getAppProgrammingLanguage = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getCapProjectType = exports.getCapModelAndServices = void 0;
|
|
4
4
|
var cap_1 = require("./cap");
|
|
5
5
|
Object.defineProperty(exports, "getCapModelAndServices", { enumerable: true, get: function () { return cap_1.getCapModelAndServices; } });
|
|
6
6
|
Object.defineProperty(exports, "getCapProjectType", { enumerable: true, get: function () { return cap_1.getCapProjectType; } });
|
|
@@ -16,4 +16,5 @@ Object.defineProperty(exports, "findProjectRoot", { enumerable: true, get: funct
|
|
|
16
16
|
Object.defineProperty(exports, "getAppRootFromWebappPath", { enumerable: true, get: function () { return search_1.getAppRootFromWebappPath; } });
|
|
17
17
|
var ui5_config_1 = require("./ui5-config");
|
|
18
18
|
Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return ui5_config_1.getWebappPath; } });
|
|
19
|
+
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return ui5_config_1.readUi5Yaml; } });
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Editor } from 'mem-fs-editor';
|
|
2
|
+
import { UI5Config } from '@sap-ux/ui5-config';
|
|
2
3
|
/**
|
|
3
4
|
* Get path to webapp.
|
|
4
5
|
*
|
|
@@ -7,4 +8,12 @@ import type { Editor } from 'mem-fs-editor';
|
|
|
7
8
|
* @returns - path to webapp folder
|
|
8
9
|
*/
|
|
9
10
|
export declare function getWebappPath(projectRoot: string, memFs?: Editor): Promise<string>;
|
|
11
|
+
/**
|
|
12
|
+
* Checks if UI5 config yaml file exists and returns its content.
|
|
13
|
+
*
|
|
14
|
+
* @param basePath - path to project root
|
|
15
|
+
* @param fileName - name of yaml file to be read
|
|
16
|
+
* @returns {UI5Config} UI5 config file in yaml format
|
|
17
|
+
*/
|
|
18
|
+
export declare function readUi5Yaml(basePath: string, fileName: string): Promise<UI5Config>;
|
|
10
19
|
//# sourceMappingURL=ui5-config.d.ts.map
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.getWebappPath = void 0;
|
|
12
|
+
exports.readUi5Yaml = exports.getWebappPath = void 0;
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
const ui5_config_1 = require("@sap-ux/ui5-config");
|
|
15
15
|
const constants_1 = require("../constants");
|
|
@@ -38,4 +38,22 @@ function getWebappPath(projectRoot, memFs) {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
exports.getWebappPath = getWebappPath;
|
|
41
|
+
/**
|
|
42
|
+
* Checks if UI5 config yaml file exists and returns its content.
|
|
43
|
+
*
|
|
44
|
+
* @param basePath - path to project root
|
|
45
|
+
* @param fileName - name of yaml file to be read
|
|
46
|
+
* @returns {UI5Config} UI5 config file in yaml format
|
|
47
|
+
*/
|
|
48
|
+
function readUi5Yaml(basePath, fileName) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const ui5YamlPath = (0, path_1.join)(basePath, fileName);
|
|
51
|
+
if (yield (0, file_1.fileExists)(ui5YamlPath)) {
|
|
52
|
+
const yamlString = yield (0, file_1.readFile)(ui5YamlPath);
|
|
53
|
+
return yield ui5_config_1.UI5Config.newInstance(yamlString);
|
|
54
|
+
}
|
|
55
|
+
throw Error(`File '${fileName}' not found in project '${basePath}'`);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.readUi5Yaml = readUi5Yaml;
|
|
41
59
|
//# sourceMappingURL=ui5-config.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/project-access",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Library to access SAP Fiori tools projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sap-ux/ui5-config": "0.16.
|
|
27
|
+
"@sap-ux/ui5-config": "0.16.6",
|
|
28
28
|
"findit2": "2.2.3",
|
|
29
29
|
"mem-fs": "2.1.0",
|
|
30
30
|
"mem-fs-editor": "9.4.0"
|