@sap-ux/project-access
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -8,3 +8,4 @@ export declare const FileName: { | ||
readonly Ui5MockYaml: "ui5-mock.yaml"; | ||
readonly UI5DeployYaml: "ui5-deploy.yaml"; | ||
}; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -10,4 +10,5 @@ "use strict"; | ||
Ui5LocalYaml: 'ui5-local.yaml', | ||
Ui5MockYaml: 'ui5-mock.yaml' | ||
Ui5MockYaml: 'ui5-mock.yaml', | ||
UI5DeployYaml: 'ui5-deploy.yaml' | ||
}; | ||
//# sourceMappingURL=constants.js.map |
export { FileName } from './constants'; | ||
export { findAllApps, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getCapModelAndServices, getCapProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject } from './project'; | ||
export { findAllApps, findProjectRoot, getAppRootFromWebappPath, getAppProgrammingLanguage, getCapModelAndServices, getCapProjectType, getWebappPath, isCapJavaProject, isCapNodeJsProject, loadModuleFromProject, readUi5Yaml } from './project'; | ||
export * from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadModuleFromProject = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getWebappPath = exports.getCapProjectType = exports.getCapModelAndServices = exports.getAppProgrammingLanguage = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.FileName = void 0; | ||
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; | ||
var constants_1 = require("./constants"); | ||
@@ -32,3 +32,4 @@ Object.defineProperty(exports, "FileName", { enumerable: true, get: function () { return constants_1.FileName; } }); | ||
Object.defineProperty(exports, "loadModuleFromProject", { enumerable: true, get: function () { return project_1.loadModuleFromProject; } }); | ||
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return project_1.readUi5Yaml; } }); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -5,3 +5,3 @@ export { getCapModelAndServices, getCapProjectType, isCapJavaProject, isCapNodeJsProject } from './cap'; | ||
export { findAllApps, findProjectRoot, getAppRootFromWebappPath } from './search'; | ||
export { getWebappPath } from './ui5-config'; | ||
export { getWebappPath, readUi5Yaml } from './ui5-config'; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.loadModuleFromProject = exports.getAppProgrammingLanguage = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getCapProjectType = exports.getCapModelAndServices = void 0; | ||
exports.readUi5Yaml = exports.getWebappPath = exports.getAppRootFromWebappPath = exports.findProjectRoot = exports.findAllApps = exports.loadModuleFromProject = exports.getAppProgrammingLanguage = exports.isCapNodeJsProject = exports.isCapJavaProject = exports.getCapProjectType = exports.getCapModelAndServices = void 0; | ||
var cap_1 = require("./cap"); | ||
@@ -19,2 +19,3 @@ Object.defineProperty(exports, "getCapModelAndServices", { enumerable: true, get: function () { return cap_1.getCapModelAndServices; } }); | ||
Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return ui5_config_1.getWebappPath; } }); | ||
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return ui5_config_1.readUi5Yaml; } }); | ||
//# sourceMappingURL=index.js.map |
import type { Editor } from 'mem-fs-editor'; | ||
import { UI5Config } from '@sap-ux/ui5-config'; | ||
/** | ||
@@ -10,2 +11,10 @@ * Get path to webapp. | ||
export declare function getWebappPath(projectRoot: string, memFs?: Editor): Promise<string>; | ||
/** | ||
* Checks if UI5 config yaml file exists and returns its content. | ||
* | ||
* @param basePath - path to project root | ||
* @param fileName - name of yaml file to be read | ||
* @returns {UI5Config} UI5 config file in yaml format | ||
*/ | ||
export declare function readUi5Yaml(basePath: string, fileName: string): Promise<UI5Config>; | ||
//# sourceMappingURL=ui5-config.d.ts.map |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getWebappPath = void 0; | ||
exports.readUi5Yaml = exports.getWebappPath = void 0; | ||
const path_1 = require("path"); | ||
@@ -42,2 +42,20 @@ const ui5_config_1 = require("@sap-ux/ui5-config"); | ||
exports.getWebappPath = getWebappPath; | ||
/** | ||
* Checks if UI5 config yaml file exists and returns its content. | ||
* | ||
* @param basePath - path to project root | ||
* @param fileName - name of yaml file to be read | ||
* @returns {UI5Config} UI5 config file in yaml format | ||
*/ | ||
function readUi5Yaml(basePath, fileName) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const ui5YamlPath = (0, path_1.join)(basePath, fileName); | ||
if (yield (0, file_1.fileExists)(ui5YamlPath)) { | ||
const yamlString = yield (0, file_1.readFile)(ui5YamlPath); | ||
return yield ui5_config_1.UI5Config.newInstance(yamlString); | ||
} | ||
throw Error(`File '${fileName}' not found in project '${basePath}'`); | ||
}); | ||
} | ||
exports.readUi5Yaml = readUi5Yaml; | ||
//# sourceMappingURL=ui5-config.js.map |
{ | ||
"name": "@sap-ux/project-access", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "Library to access SAP Fiori tools projects", | ||
@@ -27,3 +27,3 @@ "repository": { | ||
"dependencies": { | ||
"@sap-ux/ui5-config": "0.16.4", | ||
"@sap-ux/ui5-config": "0.16.5", | ||
"findit2": "2.2.3", | ||
@@ -30,0 +30,0 @@ "mem-fs": "2.1.0", |
89259
1767
+ Added@sap-ux/ui5-config@0.16.5(transitive)
- Removed@sap-ux/ui5-config@0.16.4(transitive)
Updated@sap-ux/ui5-config@0.16.5