@abaplint/transpiler-cli 2.4.22 → 2.5.0
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/build/bundle.js +170 -4
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -43020,16 +43020,56 @@ class MIMEObject extends _abstract_object_1.AbstractObject {
|
|
|
43020
43020
|
getType() {
|
|
43021
43021
|
return "SMIM";
|
|
43022
43022
|
}
|
|
43023
|
+
getURL() {
|
|
43024
|
+
var _a;
|
|
43025
|
+
this.parse();
|
|
43026
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.URL;
|
|
43027
|
+
}
|
|
43028
|
+
getClass() {
|
|
43029
|
+
var _a;
|
|
43030
|
+
this.parse();
|
|
43031
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.CLASS;
|
|
43032
|
+
}
|
|
43023
43033
|
getAllowedNaming() {
|
|
43024
43034
|
return {
|
|
43025
43035
|
maxLength: 32,
|
|
43026
43036
|
allowNamespace: false,
|
|
43027
43037
|
};
|
|
43028
43038
|
}
|
|
43039
|
+
getDataFile() {
|
|
43040
|
+
const main = this.getXMLFile();
|
|
43041
|
+
for (const f of this.getFiles()) {
|
|
43042
|
+
if (f.getFilename() !== (main === null || main === void 0 ? void 0 : main.getFilename())) {
|
|
43043
|
+
return f;
|
|
43044
|
+
}
|
|
43045
|
+
}
|
|
43046
|
+
return undefined;
|
|
43047
|
+
}
|
|
43048
|
+
setDirty() {
|
|
43049
|
+
this.parsedXML = undefined;
|
|
43050
|
+
super.setDirty();
|
|
43051
|
+
}
|
|
43029
43052
|
getDescription() {
|
|
43030
|
-
//
|
|
43053
|
+
// this object type does not have a description
|
|
43031
43054
|
return undefined;
|
|
43032
43055
|
}
|
|
43056
|
+
parse() {
|
|
43057
|
+
if (this.parsedXML) {
|
|
43058
|
+
return { updated: false, runtime: 0 };
|
|
43059
|
+
}
|
|
43060
|
+
const start = Date.now();
|
|
43061
|
+
this.parsedXML = {};
|
|
43062
|
+
const parsed = super.parseRaw2();
|
|
43063
|
+
if (parsed === undefined
|
|
43064
|
+
|| parsed.abapGit === undefined
|
|
43065
|
+
|| parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
|
|
43066
|
+
return { updated: false, runtime: 0 };
|
|
43067
|
+
}
|
|
43068
|
+
this.parsedXML.URL = parsed.abapGit["asx:abap"]["asx:values"].URL;
|
|
43069
|
+
this.parsedXML.CLASS = parsed.abapGit["asx:abap"]["asx:values"].CLASS;
|
|
43070
|
+
const end = Date.now();
|
|
43071
|
+
return { updated: true, runtime: end - start };
|
|
43072
|
+
}
|
|
43033
43073
|
}
|
|
43034
43074
|
exports.MIMEObject = MIMEObject;
|
|
43035
43075
|
//# sourceMappingURL=mime_object.js.map
|
|
@@ -45363,9 +45403,38 @@ class WebMIME extends _abstract_object_1.AbstractObject {
|
|
|
45363
45403
|
};
|
|
45364
45404
|
}
|
|
45365
45405
|
getDescription() {
|
|
45366
|
-
|
|
45406
|
+
var _a;
|
|
45407
|
+
this.parse();
|
|
45408
|
+
return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
|
|
45409
|
+
}
|
|
45410
|
+
setDirty() {
|
|
45411
|
+
this.parsedXML = undefined;
|
|
45412
|
+
super.setDirty();
|
|
45413
|
+
}
|
|
45414
|
+
getDataFile() {
|
|
45415
|
+
for (const f of this.getFiles()) {
|
|
45416
|
+
if (f.getFilename().includes(".data.")) {
|
|
45417
|
+
return f;
|
|
45418
|
+
}
|
|
45419
|
+
}
|
|
45367
45420
|
return undefined;
|
|
45368
45421
|
}
|
|
45422
|
+
parse() {
|
|
45423
|
+
if (this.parsedXML) {
|
|
45424
|
+
return { updated: false, runtime: 0 };
|
|
45425
|
+
}
|
|
45426
|
+
const start = Date.now();
|
|
45427
|
+
this.parsedXML = {};
|
|
45428
|
+
const parsed = super.parseRaw2();
|
|
45429
|
+
if (parsed === undefined
|
|
45430
|
+
|| parsed.abapGit === undefined
|
|
45431
|
+
|| parsed.abapGit["asx:abap"]["asx:values"] === undefined) {
|
|
45432
|
+
return { updated: false, runtime: 0 };
|
|
45433
|
+
}
|
|
45434
|
+
this.parsedXML.description = parsed.abapGit["asx:abap"]["asx:values"].TEXT;
|
|
45435
|
+
const end = Date.now();
|
|
45436
|
+
return { updated: true, runtime: end - start };
|
|
45437
|
+
}
|
|
45369
45438
|
}
|
|
45370
45439
|
exports.WebMIME = WebMIME;
|
|
45371
45440
|
//# sourceMappingURL=web_mime.js.map
|
|
@@ -45917,7 +45986,7 @@ class Registry {
|
|
|
45917
45986
|
}
|
|
45918
45987
|
static abaplintVersion() {
|
|
45919
45988
|
// magic, see build script "version.sh"
|
|
45920
|
-
return "2.95.
|
|
45989
|
+
return "2.95.19";
|
|
45921
45990
|
}
|
|
45922
45991
|
getDDICReferences() {
|
|
45923
45992
|
return this.references;
|
|
@@ -69326,6 +69395,49 @@ exports.HandleEnqu = HandleEnqu;
|
|
|
69326
69395
|
|
|
69327
69396
|
/***/ }),
|
|
69328
69397
|
|
|
69398
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js":
|
|
69399
|
+
/*!*****************************************************************************!*\
|
|
69400
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js ***!
|
|
69401
|
+
\*****************************************************************************/
|
|
69402
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
69403
|
+
|
|
69404
|
+
"use strict";
|
|
69405
|
+
|
|
69406
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69407
|
+
exports.HandleSMIM = void 0;
|
|
69408
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69409
|
+
class HandleSMIM {
|
|
69410
|
+
runObject(obj, _reg) {
|
|
69411
|
+
var _a, _b;
|
|
69412
|
+
const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
|
|
69413
|
+
if (filename === undefined) {
|
|
69414
|
+
return [];
|
|
69415
|
+
}
|
|
69416
|
+
obj.parse();
|
|
69417
|
+
const chunk = new chunk_1.Chunk().appendString(`abap.SMIM["${obj.getName().toUpperCase()}"] = {
|
|
69418
|
+
"objectType": "SMIM",
|
|
69419
|
+
"filename": ${JSON.stringify((_b = obj.getDataFile()) === null || _b === void 0 ? void 0 : _b.getFilename())},
|
|
69420
|
+
"url": ${JSON.stringify(obj.getURL())},
|
|
69421
|
+
"class": ${JSON.stringify(obj.getClass())},
|
|
69422
|
+
};`);
|
|
69423
|
+
const output = {
|
|
69424
|
+
object: {
|
|
69425
|
+
name: obj.getName(),
|
|
69426
|
+
type: obj.getType(),
|
|
69427
|
+
},
|
|
69428
|
+
filename: filename,
|
|
69429
|
+
chunk: chunk,
|
|
69430
|
+
requires: [],
|
|
69431
|
+
exports: [],
|
|
69432
|
+
};
|
|
69433
|
+
return [output];
|
|
69434
|
+
}
|
|
69435
|
+
}
|
|
69436
|
+
exports.HandleSMIM = HandleSMIM;
|
|
69437
|
+
//# sourceMappingURL=handle_smim.js.map
|
|
69438
|
+
|
|
69439
|
+
/***/ }),
|
|
69440
|
+
|
|
69329
69441
|
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_table.js":
|
|
69330
69442
|
/*!******************************************************************************!*\
|
|
69331
69443
|
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_table.js ***!
|
|
@@ -69505,6 +69617,47 @@ exports.HandleView = HandleView;
|
|
|
69505
69617
|
|
|
69506
69618
|
/***/ }),
|
|
69507
69619
|
|
|
69620
|
+
/***/ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_w3mi.js":
|
|
69621
|
+
/*!*****************************************************************************!*\
|
|
69622
|
+
!*** ./node_modules/@abaplint/transpiler/build/src/handlers/handle_w3mi.js ***!
|
|
69623
|
+
\*****************************************************************************/
|
|
69624
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
69625
|
+
|
|
69626
|
+
"use strict";
|
|
69627
|
+
|
|
69628
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
69629
|
+
exports.HandleW3MI = void 0;
|
|
69630
|
+
const chunk_1 = __webpack_require__(/*! ../chunk */ "./node_modules/@abaplint/transpiler/build/src/chunk.js");
|
|
69631
|
+
class HandleW3MI {
|
|
69632
|
+
runObject(obj, _reg) {
|
|
69633
|
+
var _a, _b;
|
|
69634
|
+
const filename = (_a = obj.getXMLFile()) === null || _a === void 0 ? void 0 : _a.getFilename().replace(".xml", ".mjs").toLowerCase();
|
|
69635
|
+
if (filename === undefined) {
|
|
69636
|
+
return [];
|
|
69637
|
+
}
|
|
69638
|
+
obj.parse();
|
|
69639
|
+
const chunk = new chunk_1.Chunk().appendString(`abap.W3MI["${obj.getName().toUpperCase()}"] = {
|
|
69640
|
+
"objectType": "W3MI",
|
|
69641
|
+
"filename": ${JSON.stringify((_b = obj.getDataFile()) === null || _b === void 0 ? void 0 : _b.getFilename())},
|
|
69642
|
+
};`);
|
|
69643
|
+
const output = {
|
|
69644
|
+
object: {
|
|
69645
|
+
name: obj.getName(),
|
|
69646
|
+
type: obj.getType(),
|
|
69647
|
+
},
|
|
69648
|
+
filename: filename,
|
|
69649
|
+
chunk: chunk,
|
|
69650
|
+
requires: [],
|
|
69651
|
+
exports: [],
|
|
69652
|
+
};
|
|
69653
|
+
return [output];
|
|
69654
|
+
}
|
|
69655
|
+
}
|
|
69656
|
+
exports.HandleW3MI = HandleW3MI;
|
|
69657
|
+
//# sourceMappingURL=handle_w3mi.js.map
|
|
69658
|
+
|
|
69659
|
+
/***/ }),
|
|
69660
|
+
|
|
69508
69661
|
/***/ "./node_modules/@abaplint/transpiler/build/src/index.js":
|
|
69509
69662
|
/*!**************************************************************!*\
|
|
69510
69663
|
!*** ./node_modules/@abaplint/transpiler/build/src/index.js ***!
|
|
@@ -69528,6 +69681,8 @@ const handle_table_type_1 = __webpack_require__(/*! ./handlers/handle_table_type
|
|
|
69528
69681
|
const handle_view_1 = __webpack_require__(/*! ./handlers/handle_view */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_view.js");
|
|
69529
69682
|
const handle_enqu_1 = __webpack_require__(/*! ./handlers/handle_enqu */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_enqu.js");
|
|
69530
69683
|
const handle_type_pool_1 = __webpack_require__(/*! ./handlers/handle_type_pool */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_type_pool.js");
|
|
69684
|
+
const handle_w3mi_1 = __webpack_require__(/*! ./handlers/handle_w3mi */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_w3mi.js");
|
|
69685
|
+
const handle_smim_1 = __webpack_require__(/*! ./handlers/handle_smim */ "./node_modules/@abaplint/transpiler/build/src/handlers/handle_smim.js");
|
|
69531
69686
|
class Transpiler {
|
|
69532
69687
|
constructor(options) {
|
|
69533
69688
|
this.options = options;
|
|
@@ -69591,6 +69746,12 @@ class Transpiler {
|
|
|
69591
69746
|
else if (obj instanceof abaplint.Objects.TableType) {
|
|
69592
69747
|
output.objects.push(...new handle_table_type_1.HandleTableType().runObject(obj, reg));
|
|
69593
69748
|
}
|
|
69749
|
+
else if (obj instanceof abaplint.Objects.MIMEObject) {
|
|
69750
|
+
output.objects.push(...new handle_smim_1.HandleSMIM().runObject(obj, reg));
|
|
69751
|
+
}
|
|
69752
|
+
else if (obj instanceof abaplint.Objects.WebMIME) {
|
|
69753
|
+
output.objects.push(...new handle_w3mi_1.HandleW3MI().runObject(obj, reg));
|
|
69754
|
+
}
|
|
69594
69755
|
}
|
|
69595
69756
|
return output;
|
|
69596
69757
|
}
|
|
@@ -76726,7 +76887,10 @@ async function run() {
|
|
|
76726
76887
|
ret += ` clas = unit.addObject("${obj.getName()}");\n`;
|
|
76727
76888
|
for (const file of obj.getABAPFiles()) {
|
|
76728
76889
|
for (const def of file.getInfo().listClassDefinitions()) {
|
|
76729
|
-
if (def.isForTesting === false
|
|
76890
|
+
if (def.isForTesting === false
|
|
76891
|
+
|| def.isGlobal === true
|
|
76892
|
+
|| def.methods.length === 0
|
|
76893
|
+
|| def.isAbstract === true) {
|
|
76730
76894
|
// todo, fix, there might be global test methods
|
|
76731
76895
|
continue;
|
|
76732
76896
|
}
|
|
@@ -76801,6 +76965,8 @@ run().then(() => {
|
|
|
76801
76965
|
if (obj instanceof abaplint.Objects.Table
|
|
76802
76966
|
|| obj instanceof abaplint.Objects.DataElement
|
|
76803
76967
|
|| obj instanceof abaplint.Objects.LockObject
|
|
76968
|
+
|| obj instanceof abaplint.Objects.MIMEObject
|
|
76969
|
+
|| obj instanceof abaplint.Objects.WebMIME
|
|
76804
76970
|
|| obj instanceof abaplint.Objects.TypePool
|
|
76805
76971
|
|| obj instanceof abaplint.Objects.TableType) {
|
|
76806
76972
|
list.push(imp(`${this.escapeNamespace(obj.getName().toLowerCase())}.${obj.getType().toLowerCase()}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"bin": {
|
|
6
6
|
"abap_transpile": "./abap_transpile"
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"author": "abaplint",
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@abaplint/transpiler": "^2.
|
|
28
|
+
"@abaplint/transpiler": "^2.5.0",
|
|
29
29
|
"@types/glob": "^7.2.0",
|
|
30
30
|
"glob": "=7.2.0",
|
|
31
31
|
"@types/progress": "^2.0.5",
|
|
32
|
-
"@abaplint/core": "^2.95.
|
|
32
|
+
"@abaplint/core": "^2.95.19",
|
|
33
33
|
"progress": "^2.0.3",
|
|
34
34
|
"webpack": "^5.75.0",
|
|
35
35
|
"webpack-cli": "^5.0.1",
|