@ui5/task-adaptation
Version:
Custom task for ui5-builder which allows building UI5 Flexibility Adaptation Projects for SAP BTP, Cloud Foundry environment
51 lines • 2.21 kB
JavaScript
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import Language from "../model/language.js";
import { cached } from "../cache/cacheHolder.js";
import { validateObject } from "../util/commonUtil.js";
export default class AbapProcessor {
abapRepoManager;
configuration;
annotationManager;
constructor(configuration, abapRepoManager, annotationManager) {
this.configuration = configuration;
this.abapRepoManager = abapRepoManager;
this.annotationManager = annotationManager;
}
getAppVariantIdHierarchy(appId) {
return this.abapRepoManager.getAppVariantIdHierarchy(appId);
}
fetch(repoName, _cachebusterToken) {
return this.abapRepoManager.fetch(repoName);
}
validateConfiguration() {
// validate general app config
const properties = ["appName"];
validateObject(this.configuration, properties, "should be specified in ui5.yaml configuration");
}
async updateLandscapeSpecificContent(baseAppManifest, baseAppFiles, appVariantId, prefix) {
const languages = Language.create(this.configuration.languages);
const files = await this.annotationManager.process(baseAppManifest, languages, appVariantId, prefix);
if (baseAppFiles) {
files.forEach((value, key) => baseAppFiles.set(key, value));
}
}
getConfigurationType() {
return "abap";
}
createAppVariantHierarchyItem(appVariantId, version) {
return {
appVariantId,
version,
layer: "VENDOR"
};
}
}
__decorate([
cached()
], AbapProcessor.prototype, "fetch", null);
//# sourceMappingURL=abapProcessor.js.map