@abaplint/cli 2.113.80 → 2.113.82
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/cli.js +50 -30
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -27697,7 +27697,12 @@ class Source {
|
|
|
27697
27697
|
return foundType;
|
|
27698
27698
|
}
|
|
27699
27699
|
case "EXACT":
|
|
27700
|
-
|
|
27700
|
+
{
|
|
27701
|
+
const foundType = this.determineType(node, input, targetType);
|
|
27702
|
+
new Source().runSyntax(node.findDirectExpression(Expressions.Source), input, foundType);
|
|
27703
|
+
this.addIfInferred(node, input, foundType);
|
|
27704
|
+
return foundType;
|
|
27705
|
+
}
|
|
27701
27706
|
case "VALUE":
|
|
27702
27707
|
{
|
|
27703
27708
|
const foundType = this.determineType(node, input, targetType);
|
|
@@ -40762,8 +40767,8 @@ class CDSCase extends combi_1.Expression {
|
|
|
40762
40767
|
getRunnable() {
|
|
40763
40768
|
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
|
|
40764
40769
|
const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
|
|
40765
|
-
const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.
|
|
40766
|
-
const complex = (0, combi_1.seq)("CASE", (0, combi_1.
|
|
40770
|
+
const simple = (0, combi_1.seq)("CASE", (0, combi_1.alt)(name, _1.CDSFunction), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
|
|
40771
|
+
const complex = (0, combi_1.seq)("CASE", (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
|
|
40767
40772
|
return (0, combi_1.altPrio)(simple, complex);
|
|
40768
40773
|
}
|
|
40769
40774
|
}
|
|
@@ -53576,7 +53581,7 @@ class Registry {
|
|
|
53576
53581
|
}
|
|
53577
53582
|
static abaplintVersion() {
|
|
53578
53583
|
// magic, see build script "version.sh"
|
|
53579
|
-
return "2.113.
|
|
53584
|
+
return "2.113.82";
|
|
53580
53585
|
}
|
|
53581
53586
|
getDDICReferences() {
|
|
53582
53587
|
return this.ddicReferences;
|
|
@@ -58662,32 +58667,32 @@ exports.DoubleSpace = DoubleSpace;
|
|
|
58662
58667
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
58663
58668
|
exports.Downport = exports.DownportConf = void 0;
|
|
58664
58669
|
/* eslint-disable max-len */
|
|
58665
|
-
const
|
|
58670
|
+
const crypto = __webpack_require__(/*! crypto */ "crypto");
|
|
58671
|
+
const tokens_1 = __webpack_require__(/*! ../abap/1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
58666
58672
|
const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
58667
|
-
const
|
|
58668
|
-
const
|
|
58669
|
-
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
58670
|
-
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
58673
|
+
const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
58674
|
+
const statements_1 = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
58671
58675
|
const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
|
|
58672
|
-
const
|
|
58673
|
-
const
|
|
58674
|
-
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
58675
|
-
const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
|
|
58676
|
-
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
58677
|
-
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
58678
|
-
const registry_1 = __webpack_require__(/*! ../registry */ "./node_modules/@abaplint/core/build/src/registry.js");
|
|
58679
|
-
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
58676
|
+
const Structures = __webpack_require__(/*! ../abap/3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
58677
|
+
const _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js");
|
|
58680
58678
|
const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
|
|
58679
|
+
const _scope_type_1 = __webpack_require__(/*! ../abap/5_syntax/_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
|
|
58680
|
+
const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
|
|
58681
|
+
const nodes_1 = __webpack_require__(/*! ../abap/nodes */ "./node_modules/@abaplint/core/build/src/abap/nodes/index.js");
|
|
58681
58682
|
const _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
|
|
58682
58683
|
const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
58683
58684
|
const config_1 = __webpack_require__(/*! ../config */ "./node_modules/@abaplint/core/build/src/config.js");
|
|
58684
|
-
const
|
|
58685
|
-
const
|
|
58685
|
+
const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
|
|
58686
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
58686
58687
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
58687
|
-
const
|
|
58688
|
-
const
|
|
58689
|
-
const
|
|
58690
|
-
const
|
|
58688
|
+
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
58689
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
58690
|
+
const registry_1 = __webpack_require__(/*! ../registry */ "./node_modules/@abaplint/core/build/src/registry.js");
|
|
58691
|
+
const include_graph_1 = __webpack_require__(/*! ../utils/include_graph */ "./node_modules/@abaplint/core/build/src/utils/include_graph.js");
|
|
58692
|
+
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
58693
|
+
const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
|
|
58694
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
58695
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
58691
58696
|
// todo: refactor each sub-rule to new classes?
|
|
58692
58697
|
// todo: add configuration
|
|
58693
58698
|
class DownportConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
@@ -60440,24 +60445,33 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
60440
60445
|
return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline LOOP input", this.getMetadata().key, this.conf.severity, fix);
|
|
60441
60446
|
}
|
|
60442
60447
|
outlineLoopTarget(node, lowFile, highSyntax) {
|
|
60443
|
-
var _a, _b, _c, _d, _e, _f
|
|
60448
|
+
var _a, _b, _c, _d, _e, _f;
|
|
60444
60449
|
// also allows outlining of voided types
|
|
60445
60450
|
if (!(node.get() instanceof Statements.Loop)) {
|
|
60446
60451
|
return undefined;
|
|
60447
60452
|
}
|
|
60448
|
-
const
|
|
60453
|
+
const source = node.findDirectExpression(Expressions.SimpleSource2);
|
|
60454
|
+
if (source === undefined) {
|
|
60455
|
+
return undefined;
|
|
60456
|
+
}
|
|
60457
|
+
const sourceName = source === null || source === void 0 ? void 0 : source.concatTokens();
|
|
60449
60458
|
if (sourceName === undefined) {
|
|
60450
60459
|
return undefined;
|
|
60451
60460
|
}
|
|
60461
|
+
let foundType = undefined;
|
|
60462
|
+
const spag = highSyntax.spaghetti.lookupPosition(source.getFirstToken().getStart(), lowFile.getFilename());
|
|
60463
|
+
if (spag) {
|
|
60464
|
+
foundType = spag.findVariable(source.concatTokens());
|
|
60465
|
+
}
|
|
60452
60466
|
const concat = node.concatTokens().toUpperCase();
|
|
60453
60467
|
if (concat.includes(" GROUP BY ") || concat.startsWith("LOOP AT GROUP ")) {
|
|
60454
60468
|
return undefined;
|
|
60455
60469
|
}
|
|
60456
60470
|
const isReference = concat.includes(" REFERENCE INTO ");
|
|
60457
60471
|
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
60458
|
-
const dataTarget = (
|
|
60472
|
+
const dataTarget = (_b = (_a = node.findDirectExpression(Expressions.LoopTarget)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);
|
|
60459
60473
|
if (dataTarget) {
|
|
60460
|
-
const targetName = ((
|
|
60474
|
+
const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "DOWNPORT_ERROR";
|
|
60461
60475
|
let code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\n${indentation}`;
|
|
60462
60476
|
if (isReference) {
|
|
60463
60477
|
const likeName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
|
|
@@ -60468,10 +60482,15 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
60468
60482
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
60469
60483
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline LOOP data target", this.getMetadata().key, this.conf.severity, fix);
|
|
60470
60484
|
}
|
|
60471
|
-
const fsTarget = (
|
|
60485
|
+
const fsTarget = (_e = (_d = node.findDirectExpression(Expressions.LoopTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.FSTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.InlineFS);
|
|
60472
60486
|
if (fsTarget) {
|
|
60473
|
-
const targetName = ((
|
|
60474
|
-
|
|
60487
|
+
const targetName = ((_f = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || "DOWNPORT_ERROR";
|
|
60488
|
+
let type = `LIKE LINE OF ${sourceName}`;
|
|
60489
|
+
const f = foundType === null || foundType === void 0 ? void 0 : foundType.getType();
|
|
60490
|
+
if (f instanceof basic_1.TableType && f.getRowType() instanceof basic_1.AnyType) {
|
|
60491
|
+
type = "TYPE ANY";
|
|
60492
|
+
}
|
|
60493
|
+
const code = `FIELD-SYMBOLS ${targetName} ${type}.\n${indentation}`;
|
|
60475
60494
|
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getFirstToken().getStart(), code);
|
|
60476
60495
|
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, fsTarget.getFirstToken().getStart(), fsTarget.getLastToken().getEnd(), targetName);
|
|
60477
60496
|
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
@@ -78448,6 +78467,7 @@ function readDocType(xmlData, i){
|
|
|
78448
78467
|
if (xmlData[i] === '<' && !comment) { //Determine the tag type
|
|
78449
78468
|
if( hasBody && isEntity(xmlData, i)){
|
|
78450
78469
|
i += 7;
|
|
78470
|
+
let entityName, val;
|
|
78451
78471
|
[entityName, val,i] = readEntityExp(xmlData,i+1);
|
|
78452
78472
|
if(val.indexOf("&") === -1) //Parameter entities are not supported
|
|
78453
78473
|
entities[ validateEntityName(entityName) ] = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.82",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.113.
|
|
41
|
+
"@abaplint/core": "^2.113.82",
|
|
42
42
|
"@types/chai": "^4.3.20",
|
|
43
43
|
"@types/glob": "^8.1.0",
|
|
44
44
|
"@types/minimist": "^1.2.5",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.5.0",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
50
|
-
"eslint": "^9.
|
|
50
|
+
"eslint": "^9.17.0",
|
|
51
51
|
"glob": "^7.2.3",
|
|
52
52
|
"json5": "^2.2.3",
|
|
53
53
|
"memfs": "^4.15.0",
|