@abaplint/transpiler-cli 2.7.130 → 2.7.131
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 +122 -9
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -36151,11 +36151,14 @@ class ClassDefinition extends _identifier_1.Identifier {
|
|
|
36151
36151
|
}
|
|
36152
36152
|
names.add(m.getName().toUpperCase());
|
|
36153
36153
|
}
|
|
36154
|
+
for (const a of (cdef === null || cdef === void 0 ? void 0 : cdef.getAliases().getAll()) || []) {
|
|
36155
|
+
names.add(a.getName().toUpperCase());
|
|
36156
|
+
}
|
|
36154
36157
|
sup = cdef === null || cdef === void 0 ? void 0 : cdef.getSuperClass();
|
|
36155
36158
|
}
|
|
36156
36159
|
for (const m of this.getMethodDefinitions().getAll()) {
|
|
36157
36160
|
if (names.has(m.getName().toUpperCase()) && m.isRedefinition() === false) {
|
|
36158
|
-
throw new Error(
|
|
36161
|
+
throw new Error(`${m.getName().toUpperCase()} already declared in superclass`);
|
|
36159
36162
|
}
|
|
36160
36163
|
}
|
|
36161
36164
|
}
|
|
@@ -46276,6 +46279,7 @@ exports.PersonalizationObject = PersonalizationObject;
|
|
|
46276
46279
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
46277
46280
|
exports.Program = void 0;
|
|
46278
46281
|
const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
46282
|
+
const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
|
|
46279
46283
|
class Program extends _abap_object_1.ABAPObject {
|
|
46280
46284
|
getType() {
|
|
46281
46285
|
return "PROG";
|
|
@@ -46309,14 +46313,49 @@ class Program extends _abap_object_1.ABAPObject {
|
|
|
46309
46313
|
this.parseXML();
|
|
46310
46314
|
return this.parsedXML.isModulePool;
|
|
46311
46315
|
}
|
|
46316
|
+
getDynpros() {
|
|
46317
|
+
this.parseXML();
|
|
46318
|
+
return this.parsedXML.dynpros;
|
|
46319
|
+
}
|
|
46320
|
+
////////////////////////////
|
|
46312
46321
|
parseXML() {
|
|
46313
|
-
|
|
46314
|
-
|
|
46322
|
+
var _a, _b, _c, _d;
|
|
46323
|
+
if (this.parsedXML !== undefined) {
|
|
46324
|
+
return;
|
|
46325
|
+
}
|
|
46326
|
+
const file = this.getXMLFile();
|
|
46327
|
+
const parsed = this.parseRaw2();
|
|
46328
|
+
if (parsed === undefined) {
|
|
46315
46329
|
this.parsedXML = {
|
|
46316
|
-
isInclude:
|
|
46317
|
-
isModulePool:
|
|
46330
|
+
isInclude: false,
|
|
46331
|
+
isModulePool: false,
|
|
46332
|
+
dynpros: [],
|
|
46318
46333
|
};
|
|
46334
|
+
return;
|
|
46319
46335
|
}
|
|
46336
|
+
const dynpros = [];
|
|
46337
|
+
const xmlDynpros = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DYNPROS;
|
|
46338
|
+
if (xmlDynpros !== undefined) {
|
|
46339
|
+
for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
|
|
46340
|
+
const fields = [];
|
|
46341
|
+
for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
|
|
46342
|
+
fields.push({
|
|
46343
|
+
name: f.NAME,
|
|
46344
|
+
type: f.TYPE,
|
|
46345
|
+
length: f.LENGTH,
|
|
46346
|
+
});
|
|
46347
|
+
}
|
|
46348
|
+
dynpros.push({
|
|
46349
|
+
number: d.HEADER.SCREEN,
|
|
46350
|
+
fields: fields,
|
|
46351
|
+
});
|
|
46352
|
+
}
|
|
46353
|
+
}
|
|
46354
|
+
this.parsedXML = {
|
|
46355
|
+
isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
|
|
46356
|
+
isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
|
|
46357
|
+
dynpros: dynpros,
|
|
46358
|
+
};
|
|
46320
46359
|
}
|
|
46321
46360
|
}
|
|
46322
46361
|
exports.Program = Program;
|
|
@@ -49647,7 +49686,7 @@ class Registry {
|
|
|
49647
49686
|
}
|
|
49648
49687
|
static abaplintVersion() {
|
|
49649
49688
|
// magic, see build script "version.sh"
|
|
49650
|
-
return "2.
|
|
49689
|
+
return "2.103.0";
|
|
49651
49690
|
}
|
|
49652
49691
|
getDDICReferences() {
|
|
49653
49692
|
return this.ddicReferences;
|
|
@@ -57156,6 +57195,71 @@ exports.Downport = Downport;
|
|
|
57156
57195
|
|
|
57157
57196
|
/***/ }),
|
|
57158
57197
|
|
|
57198
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js":
|
|
57199
|
+
/*!**********************************************************************!*\
|
|
57200
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js ***!
|
|
57201
|
+
\**********************************************************************/
|
|
57202
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
57203
|
+
|
|
57204
|
+
"use strict";
|
|
57205
|
+
|
|
57206
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
57207
|
+
exports.DynproChecks = exports.DynproChecksConf = void 0;
|
|
57208
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
57209
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
57210
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
57211
|
+
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
57212
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
57213
|
+
class DynproChecksConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
57214
|
+
}
|
|
57215
|
+
exports.DynproChecksConf = DynproChecksConf;
|
|
57216
|
+
class DynproChecks {
|
|
57217
|
+
constructor() {
|
|
57218
|
+
this.conf = new DynproChecksConf();
|
|
57219
|
+
}
|
|
57220
|
+
getMetadata() {
|
|
57221
|
+
return {
|
|
57222
|
+
key: "dynpro_checks",
|
|
57223
|
+
title: "Dynpro Checks",
|
|
57224
|
+
shortDescription: `Various Dynpro checks`,
|
|
57225
|
+
extendedInformation: `* Check length of PUSH elements less than 132`,
|
|
57226
|
+
tags: [_irule_1.RuleTag.Syntax],
|
|
57227
|
+
};
|
|
57228
|
+
}
|
|
57229
|
+
initialize(_reg) {
|
|
57230
|
+
return this;
|
|
57231
|
+
}
|
|
57232
|
+
getConfig() {
|
|
57233
|
+
return this.conf;
|
|
57234
|
+
}
|
|
57235
|
+
setConfig(conf) {
|
|
57236
|
+
this.conf = conf;
|
|
57237
|
+
}
|
|
57238
|
+
run(obj) {
|
|
57239
|
+
const ret = [];
|
|
57240
|
+
if (!(obj instanceof objects_1.Program)) {
|
|
57241
|
+
return [];
|
|
57242
|
+
}
|
|
57243
|
+
const file = obj.getXMLFile();
|
|
57244
|
+
if (file === undefined) {
|
|
57245
|
+
return [];
|
|
57246
|
+
}
|
|
57247
|
+
for (const dynpro of obj.getDynpros()) {
|
|
57248
|
+
for (const field of dynpro.fields) {
|
|
57249
|
+
if (field.type === "PUSH" && field.length > 132) {
|
|
57250
|
+
const message = `Screen ${dynpro.number}, field ${field.name} LENGTH longer than 132`;
|
|
57251
|
+
ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
|
|
57252
|
+
}
|
|
57253
|
+
}
|
|
57254
|
+
}
|
|
57255
|
+
return ret;
|
|
57256
|
+
}
|
|
57257
|
+
}
|
|
57258
|
+
exports.DynproChecks = DynproChecks;
|
|
57259
|
+
//# sourceMappingURL=dynpro_checks.js.map
|
|
57260
|
+
|
|
57261
|
+
/***/ }),
|
|
57262
|
+
|
|
57159
57263
|
/***/ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js":
|
|
57160
57264
|
/*!******************************************************************************!*\
|
|
57161
57265
|
!*** ./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js ***!
|
|
@@ -59873,6 +59977,7 @@ __exportStar(__webpack_require__(/*! ./definitions_top */ "./node_modules/@abapl
|
|
|
59873
59977
|
__exportStar(__webpack_require__(/*! ./description_empty */ "./node_modules/@abaplint/core/build/src/rules/description_empty.js"), exports);
|
|
59874
59978
|
__exportStar(__webpack_require__(/*! ./double_space */ "./node_modules/@abaplint/core/build/src/rules/double_space.js"), exports);
|
|
59875
59979
|
__exportStar(__webpack_require__(/*! ./downport */ "./node_modules/@abaplint/core/build/src/rules/downport.js"), exports);
|
|
59980
|
+
__exportStar(__webpack_require__(/*! ./dynpro_checks */ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js"), exports);
|
|
59876
59981
|
__exportStar(__webpack_require__(/*! ./easy_to_find_messages */ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js"), exports);
|
|
59877
59982
|
__exportStar(__webpack_require__(/*! ./empty_line_in_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js"), exports);
|
|
59878
59983
|
__exportStar(__webpack_require__(/*! ./empty_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_statement.js"), exports);
|
|
@@ -79309,7 +79414,6 @@ class MethodImplementationTranspiler {
|
|
|
79309
79414
|
const type = identifier.getType();
|
|
79310
79415
|
if (identifier.getMeta().includes("exporting" /* abaplint.IdentifierMeta.MethodExporting */)) {
|
|
79311
79416
|
after += `let ${varName} = ${unique}?.${varName} || ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};\n`;
|
|
79312
|
-
// begin new
|
|
79313
79417
|
}
|
|
79314
79418
|
else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
|
|
79315
79419
|
&& parameterDefault === undefined
|
|
@@ -79330,7 +79434,12 @@ class MethodImplementationTranspiler {
|
|
|
79330
79434
|
else {
|
|
79331
79435
|
after += `let ${varName} = ${unique}?.${varName};\n`;
|
|
79332
79436
|
}
|
|
79333
|
-
|
|
79437
|
+
if (type instanceof abaplint.BasicTypes.NumericGenericType) {
|
|
79438
|
+
after += `if (${varName}.constructor.name === "Character") {
|
|
79439
|
+
${varName} = ${new transpile_types_1.TranspileTypes().toType(identifier.getType())};
|
|
79440
|
+
${varName}.set(${unique}?.${varName});
|
|
79441
|
+
}\n`;
|
|
79442
|
+
}
|
|
79334
79443
|
}
|
|
79335
79444
|
else if (identifier.getMeta().includes("importing" /* abaplint.IdentifierMeta.MethodImporting */)
|
|
79336
79445
|
&& type.isGeneric() === false) {
|
|
@@ -81508,6 +81617,10 @@ class WriteTranspiler {
|
|
|
81508
81617
|
if (exponent) {
|
|
81509
81618
|
extra.push("exponent: " + traversal.traverse(exponent).getCode());
|
|
81510
81619
|
}
|
|
81620
|
+
const currency = node.findExpressionAfterToken("CURRENCY");
|
|
81621
|
+
if (currency) {
|
|
81622
|
+
extra.push("currency: " + traversal.traverse(currency).getCode());
|
|
81623
|
+
}
|
|
81511
81624
|
if (concat.includes("NO-GROUPING")) {
|
|
81512
81625
|
extra.push("noGrouping: true");
|
|
81513
81626
|
}
|
|
@@ -82855,7 +82968,7 @@ class TranspileTypes {
|
|
|
82855
82968
|
}
|
|
82856
82969
|
else if (type instanceof abaplint.BasicTypes.NumericGenericType) {
|
|
82857
82970
|
resolved = "Packed";
|
|
82858
|
-
extra = "{length: 8, decimals:
|
|
82971
|
+
extra = "{length: 8, decimals: 2}";
|
|
82859
82972
|
}
|
|
82860
82973
|
else if (type instanceof abaplint.BasicTypes.XStringType) {
|
|
82861
82974
|
resolved = "XString";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.131",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"author": "abaplint",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@abaplint/transpiler": "^2.7.
|
|
29
|
+
"@abaplint/transpiler": "^2.7.131",
|
|
30
30
|
"@types/glob": "^7.2.0",
|
|
31
31
|
"glob": "=7.2.0",
|
|
32
32
|
"@types/progress": "^2.0.6",
|
|
33
33
|
"@types/node": "^20.8.10",
|
|
34
|
-
"@abaplint/core": "^2.
|
|
34
|
+
"@abaplint/core": "^2.103.0",
|
|
35
35
|
"progress": "^2.0.3",
|
|
36
36
|
"webpack": "^5.89.0",
|
|
37
37
|
"webpack-cli": "^5.1.4",
|