UNPKG

@abaplint/transpiler

Version:
45 lines 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HandleW3MI = void 0; const chunk_1 = require("../chunk"); class HandleW3MI { runObject(obj, _reg) { const filename = obj.getXMLFile()?.getFilename().replace(".xml", ".mjs").toLowerCase(); if (filename === undefined) { return []; } obj.parse(); const dataFile = obj.getDataFile(); const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = { "objectType": "W3MI", "filename": ${JSON.stringify(dataFile?.getFilename())}, };`); const output = { object: { name: obj.getName(), type: obj.getType(), }, filename: filename, chunk: chunk, requires: [], exports: [], }; const ret = [output]; if (dataFile) { const data = { object: { name: obj.getName(), type: obj.getType(), }, filename: dataFile?.getFilename(), chunk: new chunk_1.Chunk().appendString(dataFile?.getRaw()), requires: [], exports: [], }; ret.push(data); } return ret; } } exports.HandleW3MI = HandleW3MI; //# sourceMappingURL=handle_w3mi.js.map