UNPKG

@abaplint/core

Version:
51 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WebMIME = void 0; const _abstract_object_1 = require("./_abstract_object"); class WebMIME extends _abstract_object_1.AbstractObject { getType() { return "W3MI"; } getAllowedNaming() { return { maxLength: 40, allowNamespace: true, customRegex: new RegExp(/^[A-Z_-\d/<> ]+$/i), }; } getDescription() { var _a; this.parse(); return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description; } setDirty() { this.parsedXML = undefined; super.setDirty(); } getDataFile() { for (const f of this.getFiles()) { if (f.getFilename().includes(".data.")) { return f; } } return undefined; } parse() { if (this.parsedXML) { return { updated: false, runtime: 0 }; } const start = Date.now(); this.parsedXML = {}; const parsed = super.parseRaw2(); if (parsed === undefined || parsed.abapGit === undefined || parsed.abapGit["asx:abap"]["asx:values"] === undefined) { return { updated: false, runtime: 0 }; } this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].TEXT; const end = Date.now(); return { updated: true, runtime: end - start }; } } exports.WebMIME = WebMIME; //# sourceMappingURL=web_mime.js.map