@abaplint/transpiler-cli 2.12.12 → 2.12.13
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 +260 -88
- package/package.json +3 -3
package/build/bundle.js
CHANGED
|
@@ -4934,7 +4934,6 @@ __exportStar(__webpack_require__(/*! ./sql_arithmetic_operator */ "./node_module
|
|
|
4934
4934
|
__exportStar(__webpack_require__(/*! ./sql_arithmetics */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_arithmetics.js"), exports);
|
|
4935
4935
|
__exportStar(__webpack_require__(/*! ./sql_as_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_as_name.js"), exports);
|
|
4936
4936
|
__exportStar(__webpack_require__(/*! ./sql_case */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_case.js"), exports);
|
|
4937
|
-
__exportStar(__webpack_require__(/*! ./sql_cast */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js"), exports);
|
|
4938
4937
|
__exportStar(__webpack_require__(/*! ./sql_cds_parameters */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js"), exports);
|
|
4939
4938
|
__exportStar(__webpack_require__(/*! ./sql_client */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_client.js"), exports);
|
|
4940
4939
|
__exportStar(__webpack_require__(/*! ./sql_compare_operator */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_compare_operator.js"), exports);
|
|
@@ -7085,33 +7084,6 @@ exports.SQLCase = SQLCase;
|
|
|
7085
7084
|
|
|
7086
7085
|
/***/ }),
|
|
7087
7086
|
|
|
7088
|
-
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js":
|
|
7089
|
-
/*!*****************************************************************************************!*\
|
|
7090
|
-
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cast.js ***!
|
|
7091
|
-
\*****************************************************************************************/
|
|
7092
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7093
|
-
|
|
7094
|
-
"use strict";
|
|
7095
|
-
|
|
7096
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
7097
|
-
exports.SQLCast = void 0;
|
|
7098
|
-
const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
7099
|
-
const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
7100
|
-
const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
7101
|
-
const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
|
|
7102
|
-
const sql_field_name_1 = __webpack_require__(/*! ./sql_field_name */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_field_name.js");
|
|
7103
|
-
class SQLCast extends combi_1.Expression {
|
|
7104
|
-
getRunnable() {
|
|
7105
|
-
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
7106
|
-
// todo: from version something
|
|
7107
|
-
return (0, combi_1.seq)("CAST", "(", (0, combi_1.opt)((0, combi_1.altPrio)(sql_field_name_1.SQLFieldName, abap)), "AS", sql_field_name_1.SQLFieldName, ")");
|
|
7108
|
-
}
|
|
7109
|
-
}
|
|
7110
|
-
exports.SQLCast = SQLCast;
|
|
7111
|
-
//# sourceMappingURL=sql_cast.js.map
|
|
7112
|
-
|
|
7113
|
-
/***/ }),
|
|
7114
|
-
|
|
7115
7087
|
/***/ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js":
|
|
7116
7088
|
/*!***************************************************************************************************!*\
|
|
7117
7089
|
!*** ./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_cds_parameters.js ***!
|
|
@@ -7267,7 +7239,7 @@ class SQLField extends combi_1.Expression {
|
|
|
7267
7239
|
const abap = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleFieldChain2), version_1.Version.OpenABAP);
|
|
7268
7240
|
const as = (0, combi_1.seq)("AS", _1.SQLAsName);
|
|
7269
7241
|
const parenFieldName = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WParenRightW), (0, combi_1.tok)(tokens_1.WParenRight)));
|
|
7270
|
-
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase,
|
|
7242
|
+
const field = (0, combi_1.altPrio)(_1.SQLAggregation, _1.SQLCase, sql_function_1.SQLFunction, sql_path_1.SQLPath, _1.SQLFieldName, abap, _1.Constant, parenFieldName);
|
|
7271
7243
|
const parenField = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), field, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
7272
7244
|
const sub = (0, combi_1.plusPrio)((0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.altPrio)(parenField, field)));
|
|
7273
7245
|
const arith = (0, combi_1.ver)(version_1.Version.v740sp05, sub);
|
|
@@ -7533,10 +7505,11 @@ const integer_1 = __webpack_require__(/*! ./integer */ "./node_modules/@abaplint
|
|
|
7533
7505
|
const sql_function_input_1 = __webpack_require__(/*! ./sql_function_input */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/sql_function_input.js");
|
|
7534
7506
|
class SQLFunction extends combi_1.Expression {
|
|
7535
7507
|
getRunnable() {
|
|
7536
|
-
const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("NUMC", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), "FLTP", "INT2", "INT4", "INT8");
|
|
7508
|
+
const castTypes = (0, combi_1.altPrio)((0, combi_1.seq)("CHAR", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), (0, combi_1.seq)("DEC", (0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, ",", integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)), (0, combi_1.seq)("NUMC", (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.ParenLeftW), integer_1.Integer, (0, combi_1.tok)(tokens_1.WParenRightW)))), "DATS", "FLTP", "INT2", "INT4", "INT8");
|
|
7537
7509
|
const commaParam = (0, combi_1.seq)(",", sql_function_input_1.SQLFunctionInput);
|
|
7538
7510
|
// note: the function names are not keywords, they are usually in lower case
|
|
7539
7511
|
const abs = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^abs$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7512
|
+
// yea, 750 is correct, but it also works technically in version v740sp05
|
|
7540
7513
|
const cast = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^cast$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, "AS", castTypes, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7541
7514
|
const ceil = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^ceil$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
7542
7515
|
const coalesce = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)((0, combi_1.regex)(/^coalesce$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.optPrio)(commaParam), (0, combi_1.tok)(tokens_1.WParenRightW)));
|
|
@@ -19604,33 +19577,21 @@ exports.Identifier = Identifier;
|
|
|
19604
19577
|
/*!************************************************************************************************!*\
|
|
19605
19578
|
!*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js ***!
|
|
19606
19579
|
\************************************************************************************************/
|
|
19607
|
-
/***/ ((__unused_webpack_module, exports
|
|
19580
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
19608
19581
|
|
|
19609
19582
|
"use strict";
|
|
19610
19583
|
|
|
19611
19584
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
19612
19585
|
exports.ABAPFileInformation = void 0;
|
|
19613
|
-
const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
19614
|
-
const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
19615
|
-
const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
19616
|
-
const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
|
|
19617
|
-
const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
19618
|
-
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
19619
|
-
const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
19620
19586
|
class ABAPFileInformation {
|
|
19621
|
-
constructor(
|
|
19622
|
-
this.
|
|
19623
|
-
this.implementations = [];
|
|
19624
|
-
this.interfaces = [];
|
|
19625
|
-
this.classes = [];
|
|
19626
|
-
this.filename = filename;
|
|
19627
|
-
this.parse(structure);
|
|
19587
|
+
constructor(parsed) {
|
|
19588
|
+
this.parsed = parsed;
|
|
19628
19589
|
}
|
|
19629
19590
|
listClassImplementations() {
|
|
19630
|
-
return this.implementations;
|
|
19591
|
+
return this.parsed.implementations;
|
|
19631
19592
|
}
|
|
19632
19593
|
listInterfaceDefinitions() {
|
|
19633
|
-
return this.interfaces;
|
|
19594
|
+
return this.parsed.interfaces;
|
|
19634
19595
|
}
|
|
19635
19596
|
getInterfaceDefinitionByName(name) {
|
|
19636
19597
|
const upper = name.toUpperCase();
|
|
@@ -19642,7 +19603,7 @@ class ABAPFileInformation {
|
|
|
19642
19603
|
return undefined;
|
|
19643
19604
|
}
|
|
19644
19605
|
listClassDefinitions() {
|
|
19645
|
-
return this.classes;
|
|
19606
|
+
return this.parsed.classes;
|
|
19646
19607
|
}
|
|
19647
19608
|
getClassDefinitionByName(name) {
|
|
19648
19609
|
const upper = name.toUpperCase();
|
|
@@ -19663,16 +19624,54 @@ class ABAPFileInformation {
|
|
|
19663
19624
|
return undefined;
|
|
19664
19625
|
}
|
|
19665
19626
|
listFormDefinitions() {
|
|
19666
|
-
return this.forms;
|
|
19627
|
+
return this.parsed.forms;
|
|
19628
|
+
}
|
|
19629
|
+
}
|
|
19630
|
+
exports.ABAPFileInformation = ABAPFileInformation;
|
|
19631
|
+
//# sourceMappingURL=abap_file_information.js.map
|
|
19632
|
+
|
|
19633
|
+
/***/ }),
|
|
19634
|
+
|
|
19635
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js":
|
|
19636
|
+
/*!*******************************************************************************************************!*\
|
|
19637
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js ***!
|
|
19638
|
+
\*******************************************************************************************************/
|
|
19639
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
19640
|
+
|
|
19641
|
+
"use strict";
|
|
19642
|
+
|
|
19643
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
19644
|
+
exports.ABAPFileInformationParser = void 0;
|
|
19645
|
+
const Structures = __webpack_require__(/*! ../3_structures/structures */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
|
|
19646
|
+
const Expressions = __webpack_require__(/*! ../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
19647
|
+
const Statements = __webpack_require__(/*! ../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
|
|
19648
|
+
const _identifier_1 = __webpack_require__(/*! ./_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
|
|
19649
|
+
const Tokens = __webpack_require__(/*! ../1_lexer/tokens */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js");
|
|
19650
|
+
const visibility_1 = __webpack_require__(/*! ./visibility */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js");
|
|
19651
|
+
const _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js");
|
|
19652
|
+
class ABAPFileInformationParser {
|
|
19653
|
+
constructor(filename) {
|
|
19654
|
+
this.filename = filename;
|
|
19667
19655
|
}
|
|
19668
|
-
///////////////////////
|
|
19669
19656
|
parse(structure) {
|
|
19670
|
-
|
|
19657
|
+
const result = {
|
|
19658
|
+
interfaces: [],
|
|
19659
|
+
classes: [],
|
|
19660
|
+
forms: [],
|
|
19661
|
+
implementations: [],
|
|
19662
|
+
};
|
|
19671
19663
|
if (structure === undefined) {
|
|
19672
|
-
return;
|
|
19664
|
+
return result;
|
|
19673
19665
|
}
|
|
19674
|
-
this.parseClasses(structure);
|
|
19675
|
-
this.parseInterfaces(structure);
|
|
19666
|
+
result.classes = this.parseClasses(structure);
|
|
19667
|
+
result.interfaces = this.parseInterfaces(structure);
|
|
19668
|
+
result.implementations = this.parseClassImplementations(structure);
|
|
19669
|
+
result.forms = this.parseForms(structure);
|
|
19670
|
+
return result;
|
|
19671
|
+
}
|
|
19672
|
+
parseClassImplementations(structure) {
|
|
19673
|
+
var _a;
|
|
19674
|
+
const implementations = [];
|
|
19676
19675
|
for (const found of structure.findAllStructures(Structures.ClassImplementation)) {
|
|
19677
19676
|
const methods = [];
|
|
19678
19677
|
for (const method of found.findAllStructures(Structures.Method)) {
|
|
@@ -19682,24 +19681,30 @@ class ABAPFileInformation {
|
|
|
19682
19681
|
}
|
|
19683
19682
|
}
|
|
19684
19683
|
const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();
|
|
19685
|
-
|
|
19684
|
+
implementations.push({
|
|
19686
19685
|
name: name.getStr(),
|
|
19687
19686
|
identifier: new _identifier_1.Identifier(name, this.filename),
|
|
19688
19687
|
methods,
|
|
19689
19688
|
});
|
|
19690
19689
|
}
|
|
19690
|
+
return implementations;
|
|
19691
|
+
}
|
|
19692
|
+
parseForms(structure) {
|
|
19693
|
+
const forms = [];
|
|
19691
19694
|
for (const statement of structure.findAllStructures(Structures.Form)) {
|
|
19692
19695
|
// FORMs can contain a dash in the name
|
|
19693
19696
|
const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();
|
|
19694
19697
|
const name = statement.findFirstExpression(Expressions.FormName).concatTokens();
|
|
19695
19698
|
const nameToken = new Tokens.Identifier(pos, name);
|
|
19696
|
-
|
|
19699
|
+
forms.push({
|
|
19697
19700
|
name: nameToken.getStr(),
|
|
19698
19701
|
identifier: new _identifier_1.Identifier(nameToken, this.filename),
|
|
19699
19702
|
});
|
|
19700
19703
|
}
|
|
19704
|
+
return forms;
|
|
19701
19705
|
}
|
|
19702
19706
|
parseInterfaces(structure) {
|
|
19707
|
+
const interfaces = [];
|
|
19703
19708
|
for (const found of structure.findDirectStructures(Structures.Interface)) {
|
|
19704
19709
|
const i = found.findFirstStatement(Statements.Interface);
|
|
19705
19710
|
if (i === undefined) {
|
|
@@ -19711,7 +19716,7 @@ class ABAPFileInformation {
|
|
|
19711
19716
|
const aliases = this.parseAliases(found, visibility_1.Visibility.Public);
|
|
19712
19717
|
const constants = this.parseConstants(found, visibility_1.Visibility.Public);
|
|
19713
19718
|
const g = i.findDirectExpression(Expressions.ClassGlobal);
|
|
19714
|
-
|
|
19719
|
+
interfaces.push({
|
|
19715
19720
|
name: interfaceName.getStr(),
|
|
19716
19721
|
identifier: new _identifier_1.Identifier(interfaceName, this.filename),
|
|
19717
19722
|
isLocal: g === undefined,
|
|
@@ -19723,9 +19728,11 @@ class ABAPFileInformation {
|
|
|
19723
19728
|
attributes,
|
|
19724
19729
|
});
|
|
19725
19730
|
}
|
|
19731
|
+
return interfaces;
|
|
19726
19732
|
}
|
|
19727
19733
|
parseClasses(structure) {
|
|
19728
19734
|
var _a;
|
|
19735
|
+
const classes = [];
|
|
19729
19736
|
for (const found of structure.findAllStructures(Structures.ClassDefinition)) {
|
|
19730
19737
|
const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();
|
|
19731
19738
|
const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);
|
|
@@ -19764,7 +19771,7 @@ class ABAPFileInformation {
|
|
|
19764
19771
|
else if (concat.includes("DURATION MEDIUM")) {
|
|
19765
19772
|
duration = _abap_file_information_1.Duration.medium;
|
|
19766
19773
|
}
|
|
19767
|
-
|
|
19774
|
+
classes.push({
|
|
19768
19775
|
name: className.getStr(),
|
|
19769
19776
|
identifier: new _identifier_1.Identifier(className, this.filename),
|
|
19770
19777
|
isLocal: containsGlobal === undefined,
|
|
@@ -19783,6 +19790,7 @@ class ABAPFileInformation {
|
|
|
19783
19790
|
constants,
|
|
19784
19791
|
});
|
|
19785
19792
|
}
|
|
19793
|
+
return classes;
|
|
19786
19794
|
}
|
|
19787
19795
|
///////////////////
|
|
19788
19796
|
getImplementing(input) {
|
|
@@ -19981,8 +19989,8 @@ class ABAPFileInformation {
|
|
|
19981
19989
|
return ret;
|
|
19982
19990
|
}
|
|
19983
19991
|
}
|
|
19984
|
-
exports.
|
|
19985
|
-
//# sourceMappingURL=
|
|
19992
|
+
exports.ABAPFileInformationParser = ABAPFileInformationParser;
|
|
19993
|
+
//# sourceMappingURL=abap_file_information_parser.js.map
|
|
19986
19994
|
|
|
19987
19995
|
/***/ }),
|
|
19988
19996
|
|
|
@@ -26953,7 +26961,7 @@ const _syntax_input_1 = __webpack_require__(/*! ../_syntax_input */ "./node_modu
|
|
|
26953
26961
|
const isSimple = /^\w+$/;
|
|
26954
26962
|
class Select {
|
|
26955
26963
|
static runSyntax(node, input, skipImplicitInto = false) {
|
|
26956
|
-
var _a
|
|
26964
|
+
var _a;
|
|
26957
26965
|
const token = node.getFirstToken();
|
|
26958
26966
|
let from = node.findDirectExpression(Expressions.SQLFrom);
|
|
26959
26967
|
if (from === undefined) {
|
|
@@ -26974,10 +26982,8 @@ class Select {
|
|
|
26974
26982
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
26975
26983
|
return;
|
|
26976
26984
|
}
|
|
26977
|
-
const isSingle = ((_a = node.getChildren()[1]) === null || _a === void 0 ? void 0 : _a.concatTokens().toUpperCase()) === "SINGLE"
|
|
26978
|
-
|| node.get() instanceof Expressions.SelectLoop;
|
|
26979
26985
|
this.checkFields(fields, dbSources, input, node);
|
|
26980
|
-
this.handleInto(node, input, fields, dbSources
|
|
26986
|
+
const intoExpression = this.handleInto(node, input, fields, dbSources);
|
|
26981
26987
|
const fae = node.findDirectExpression(Expressions.SQLForAllEntries);
|
|
26982
26988
|
if (fae) {
|
|
26983
26989
|
input.scope.push(_scope_type_1.ScopeType.OpenSQL, "SELECT", token.getStart(), input.filename);
|
|
@@ -26991,7 +26997,7 @@ class Select {
|
|
|
26991
26997
|
&& node.findDirectExpression(Expressions.SQLIntoTable) === undefined
|
|
26992
26998
|
&& node.findDirectExpression(Expressions.SQLIntoList) === undefined
|
|
26993
26999
|
&& node.findDirectExpression(Expressions.SQLIntoStructure) === undefined) {
|
|
26994
|
-
const fields = (
|
|
27000
|
+
const fields = (_a = node.findFirstExpression(Expressions.SQLAggregation)) === null || _a === void 0 ? void 0 : _a.concatTokens();
|
|
26995
27001
|
const c = new RegExp(/^count\(\s*\*\s*\)$/, "i");
|
|
26996
27002
|
if (fields === undefined || c.test(fields) === false) {
|
|
26997
27003
|
const nameToken = from === null || from === void 0 ? void 0 : from.findDirectExpression(Expressions.SQLFromSource);
|
|
@@ -27025,8 +27031,18 @@ class Select {
|
|
|
27025
27031
|
for (const s of node.findAllExpressions(Expressions.SQLCompare)) {
|
|
27026
27032
|
sql_compare_1.SQLCompare.runSyntax(s, input, dbSources);
|
|
27027
27033
|
}
|
|
27028
|
-
|
|
27029
|
-
|
|
27034
|
+
const orderBy = node.findDirectExpression(Expressions.SQLOrderBy);
|
|
27035
|
+
if (orderBy) {
|
|
27036
|
+
sql_order_by_1.SQLOrderBy.runSyntax(orderBy, input);
|
|
27037
|
+
const where = node.findDirectExpression(Expressions.SQLCond);
|
|
27038
|
+
if (intoExpression
|
|
27039
|
+
&& where
|
|
27040
|
+
&& intoExpression.getFirstToken().getStart().isBefore(orderBy.getFirstToken().getStart())
|
|
27041
|
+
&& where.getFirstToken().getStart().isBefore(orderBy.getFirstToken().getStart())
|
|
27042
|
+
&& where.getFirstToken().getStart().isBefore(intoExpression.getFirstToken().getStart())) {
|
|
27043
|
+
const message = `ORDER BY must be before INTO, after WHERE`;
|
|
27044
|
+
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, orderBy.getFirstToken(), message));
|
|
27045
|
+
}
|
|
27030
27046
|
}
|
|
27031
27047
|
if (this.isStrictMode(node)) {
|
|
27032
27048
|
this.strictModeChecks(node, input);
|
|
@@ -27077,13 +27093,14 @@ class Select {
|
|
|
27077
27093
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
27078
27094
|
}
|
|
27079
27095
|
}
|
|
27080
|
-
static handleInto(node, input, fields, dbSources
|
|
27096
|
+
static handleInto(node, input, fields, dbSources) {
|
|
27081
27097
|
const intoTable = node.findDirectExpression(Expressions.SQLIntoTable);
|
|
27082
27098
|
if (intoTable) {
|
|
27083
27099
|
const inline = intoTable.findFirstExpression(Expressions.InlineData);
|
|
27084
27100
|
if (inline) {
|
|
27085
27101
|
inline_data_1.InlineData.runSyntax(inline, input, this.buildTableType(fields, dbSources, input.scope));
|
|
27086
27102
|
}
|
|
27103
|
+
return intoTable;
|
|
27087
27104
|
}
|
|
27088
27105
|
const intoStructure = node.findDirectExpression(Expressions.SQLIntoStructure);
|
|
27089
27106
|
if (intoStructure) {
|
|
@@ -27097,6 +27114,7 @@ class Select {
|
|
|
27097
27114
|
inline_data_1.InlineData.runSyntax(inline, input, basic_1.VoidType.get("SELECT_todo1"));
|
|
27098
27115
|
}
|
|
27099
27116
|
}
|
|
27117
|
+
return intoStructure;
|
|
27100
27118
|
}
|
|
27101
27119
|
const intoList = node.findDirectExpression(Expressions.SQLIntoList);
|
|
27102
27120
|
if (intoList) {
|
|
@@ -27136,7 +27154,9 @@ class Select {
|
|
|
27136
27154
|
inline_data_1.InlineData.runSyntax(inline, input, type);
|
|
27137
27155
|
}
|
|
27138
27156
|
}
|
|
27157
|
+
return intoList;
|
|
27139
27158
|
}
|
|
27159
|
+
return undefined;
|
|
27140
27160
|
}
|
|
27141
27161
|
static checkFields(fields, dbSources, input, node) {
|
|
27142
27162
|
if (dbSources.length > 1) {
|
|
@@ -28029,7 +28049,9 @@ class StringTemplate {
|
|
|
28029
28049
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
28030
28050
|
return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
|
|
28031
28051
|
}
|
|
28032
|
-
else if ((typeUtils.isCharLike(type) === false
|
|
28052
|
+
else if ((typeUtils.isCharLike(type) === false
|
|
28053
|
+
&& typeUtils.isHexLike(type) === false
|
|
28054
|
+
&& !(type instanceof basic_1.UTCLongType))
|
|
28033
28055
|
|| type instanceof basic_1.StructureType) {
|
|
28034
28056
|
const message = "String template, not character like, " + type.constructor.name;
|
|
28035
28057
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
@@ -29117,9 +29139,10 @@ class Append {
|
|
|
29117
29139
|
if (source) {
|
|
29118
29140
|
if (targetType !== undefined
|
|
29119
29141
|
&& !(targetType instanceof basic_1.TableType)
|
|
29142
|
+
&& !(targetType instanceof basic_1.UnknownType)
|
|
29120
29143
|
&& dataTarget !== target
|
|
29121
29144
|
&& !(targetType instanceof basic_1.VoidType)) {
|
|
29122
|
-
const message =
|
|
29145
|
+
const message = `Append, target not a table type (${targetType.constructor.name})`;
|
|
29123
29146
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
29124
29147
|
return;
|
|
29125
29148
|
}
|
|
@@ -35544,12 +35567,12 @@ class ABAPFile extends _abstract_file_1.AbstractFile {
|
|
|
35544
35567
|
getRaw() {
|
|
35545
35568
|
return this.file.getRaw();
|
|
35546
35569
|
}
|
|
35547
|
-
getInfo() {
|
|
35548
|
-
return this.info;
|
|
35549
|
-
}
|
|
35550
35570
|
getRawRows() {
|
|
35551
35571
|
return this.file.getRawRows();
|
|
35552
35572
|
}
|
|
35573
|
+
getInfo() {
|
|
35574
|
+
return this.info;
|
|
35575
|
+
}
|
|
35553
35576
|
getStructure() {
|
|
35554
35577
|
return this.structure;
|
|
35555
35578
|
}
|
|
@@ -35586,12 +35609,13 @@ exports.ABAPFile = ABAPFile;
|
|
|
35586
35609
|
|
|
35587
35610
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
35588
35611
|
exports.ABAPParser = void 0;
|
|
35589
|
-
const
|
|
35612
|
+
const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
|
|
35613
|
+
const abap_file_information_1 = __webpack_require__(/*! ./4_file_information/abap_file_information */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js");
|
|
35614
|
+
const abap_file_information_parser_1 = __webpack_require__(/*! ./4_file_information/abap_file_information_parser */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information_parser.js");
|
|
35590
35615
|
const lexer_1 = __webpack_require__(/*! ./1_lexer/lexer */ "./node_modules/@abaplint/core/build/src/abap/1_lexer/lexer.js");
|
|
35591
35616
|
const statement_parser_1 = __webpack_require__(/*! ./2_statements/statement_parser */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statement_parser.js");
|
|
35592
35617
|
const structure_parser_1 = __webpack_require__(/*! ./3_structures/structure_parser */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structure_parser.js");
|
|
35593
|
-
const
|
|
35594
|
-
const abap_file_1 = __webpack_require__(/*! ./abap_file */ "./node_modules/@abaplint/core/build/src/abap/abap_file.js");
|
|
35618
|
+
const version_1 = __webpack_require__(/*! ../version */ "./node_modules/@abaplint/core/build/src/version.js");
|
|
35595
35619
|
class ABAPParser {
|
|
35596
35620
|
constructor(version, globalMacros, reg) {
|
|
35597
35621
|
this.version = version ? version : version_1.defaultVersion;
|
|
@@ -35616,7 +35640,9 @@ class ABAPParser {
|
|
|
35616
35640
|
for (const f of statementResult) {
|
|
35617
35641
|
const result = structure_parser_1.StructureParser.run(f);
|
|
35618
35642
|
// 4: file information
|
|
35619
|
-
const
|
|
35643
|
+
const parser = new abap_file_information_parser_1.ABAPFileInformationParser(f.file.getFilename());
|
|
35644
|
+
const parsed = parser.parse(result.node);
|
|
35645
|
+
const info = new abap_file_information_1.ABAPFileInformation(parsed);
|
|
35620
35646
|
output.push(new abap_file_1.ABAPFile(f.file, f.tokens, f.statements, result.node, info));
|
|
35621
35647
|
issues.push(...result.issues);
|
|
35622
35648
|
}
|
|
@@ -45262,6 +45288,7 @@ class ABAPObject extends _abstract_object_1.AbstractObject {
|
|
|
45262
45288
|
setDirty() {
|
|
45263
45289
|
this.syntaxResult = undefined;
|
|
45264
45290
|
this.texts = undefined;
|
|
45291
|
+
this.parsed = [];
|
|
45265
45292
|
super.setDirty();
|
|
45266
45293
|
}
|
|
45267
45294
|
getABAPFiles() {
|
|
@@ -45356,6 +45383,7 @@ class AbstractObject {
|
|
|
45356
45383
|
return this.name;
|
|
45357
45384
|
}
|
|
45358
45385
|
setDirty() {
|
|
45386
|
+
this.old = [];
|
|
45359
45387
|
this.dirty = true;
|
|
45360
45388
|
}
|
|
45361
45389
|
addFile(file) {
|
|
@@ -47803,6 +47831,37 @@ exports.EcattTestScript = EcattTestScript;
|
|
|
47803
47831
|
|
|
47804
47832
|
/***/ }),
|
|
47805
47833
|
|
|
47834
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/email_template.js":
|
|
47835
|
+
/*!*************************************************************************!*\
|
|
47836
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/email_template.js ***!
|
|
47837
|
+
\*************************************************************************/
|
|
47838
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
47839
|
+
|
|
47840
|
+
"use strict";
|
|
47841
|
+
|
|
47842
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
47843
|
+
exports.EmailTemplate = void 0;
|
|
47844
|
+
const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
|
|
47845
|
+
class EmailTemplate extends _abstract_object_1.AbstractObject {
|
|
47846
|
+
getType() {
|
|
47847
|
+
return "SMTG";
|
|
47848
|
+
}
|
|
47849
|
+
getAllowedNaming() {
|
|
47850
|
+
return {
|
|
47851
|
+
maxLength: 60, // todo
|
|
47852
|
+
allowNamespace: true,
|
|
47853
|
+
};
|
|
47854
|
+
}
|
|
47855
|
+
getDescription() {
|
|
47856
|
+
// todo
|
|
47857
|
+
return undefined;
|
|
47858
|
+
}
|
|
47859
|
+
}
|
|
47860
|
+
exports.EmailTemplate = EmailTemplate;
|
|
47861
|
+
//# sourceMappingURL=email_template.js.map
|
|
47862
|
+
|
|
47863
|
+
/***/ }),
|
|
47864
|
+
|
|
47806
47865
|
/***/ "./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js":
|
|
47807
47866
|
/*!*************************************************************************************!*\
|
|
47808
47867
|
!*** ./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js ***!
|
|
@@ -48236,6 +48295,8 @@ class FunctionGroup extends _abap_object_1.ABAPObject {
|
|
|
48236
48295
|
super.setDirty();
|
|
48237
48296
|
this.includes = undefined;
|
|
48238
48297
|
this.modules = undefined;
|
|
48298
|
+
this.description = undefined;
|
|
48299
|
+
this.dynpros = undefined;
|
|
48239
48300
|
}
|
|
48240
48301
|
getAllowedNaming() {
|
|
48241
48302
|
return {
|
|
@@ -49092,7 +49153,6 @@ __exportStar(__webpack_require__(/*! ./behavior_definition */ "./node_modules/@a
|
|
|
49092
49153
|
__exportStar(__webpack_require__(/*! ./brf_plus_system_application */ "./node_modules/@abaplint/core/build/src/objects/brf_plus_system_application.js"), exports);
|
|
49093
49154
|
__exportStar(__webpack_require__(/*! ./bsp_application */ "./node_modules/@abaplint/core/build/src/objects/bsp_application.js"), exports);
|
|
49094
49155
|
__exportStar(__webpack_require__(/*! ./business_add_in_implementation */ "./node_modules/@abaplint/core/build/src/objects/business_add_in_implementation.js"), exports);
|
|
49095
|
-
__exportStar(__webpack_require__(/*! ./cds_entity_buffer */ "./node_modules/@abaplint/core/build/src/objects/cds_entity_buffer.js"), exports);
|
|
49096
49156
|
__exportStar(__webpack_require__(/*! ./business_catalog_app_assignment */ "./node_modules/@abaplint/core/build/src/objects/business_catalog_app_assignment.js"), exports);
|
|
49097
49157
|
__exportStar(__webpack_require__(/*! ./business_catalog */ "./node_modules/@abaplint/core/build/src/objects/business_catalog.js"), exports);
|
|
49098
49158
|
__exportStar(__webpack_require__(/*! ./business_configuration_maintenance_object */ "./node_modules/@abaplint/core/build/src/objects/business_configuration_maintenance_object.js"), exports);
|
|
@@ -49101,6 +49161,7 @@ __exportStar(__webpack_require__(/*! ./business_function_assignment */ "./node_m
|
|
|
49101
49161
|
__exportStar(__webpack_require__(/*! ./business_function_set_assignment */ "./node_modules/@abaplint/core/build/src/objects/business_function_set_assignment.js"), exports);
|
|
49102
49162
|
__exportStar(__webpack_require__(/*! ./business_object_model */ "./node_modules/@abaplint/core/build/src/objects/business_object_model.js"), exports);
|
|
49103
49163
|
__exportStar(__webpack_require__(/*! ./business_object_type */ "./node_modules/@abaplint/core/build/src/objects/business_object_type.js"), exports);
|
|
49164
|
+
__exportStar(__webpack_require__(/*! ./cds_entity_buffer */ "./node_modules/@abaplint/core/build/src/objects/cds_entity_buffer.js"), exports);
|
|
49104
49165
|
__exportStar(__webpack_require__(/*! ./cds_metadata_extension */ "./node_modules/@abaplint/core/build/src/objects/cds_metadata_extension.js"), exports);
|
|
49105
49166
|
__exportStar(__webpack_require__(/*! ./cds_type */ "./node_modules/@abaplint/core/build/src/objects/cds_type.js"), exports);
|
|
49106
49167
|
__exportStar(__webpack_require__(/*! ./change_document */ "./node_modules/@abaplint/core/build/src/objects/change_document.js"), exports);
|
|
@@ -49126,6 +49187,7 @@ __exportStar(__webpack_require__(/*! ./domain */ "./node_modules/@abaplint/core/
|
|
|
49126
49187
|
__exportStar(__webpack_require__(/*! ./ecatt_test_configuration */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_configuration.js"), exports);
|
|
49127
49188
|
__exportStar(__webpack_require__(/*! ./ecatt_test_data_container */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_data_container.js"), exports);
|
|
49128
49189
|
__exportStar(__webpack_require__(/*! ./ecatt_test_script */ "./node_modules/@abaplint/core/build/src/objects/ecatt_test_script.js"), exports);
|
|
49190
|
+
__exportStar(__webpack_require__(/*! ./email_template */ "./node_modules/@abaplint/core/build/src/objects/email_template.js"), exports);
|
|
49129
49191
|
__exportStar(__webpack_require__(/*! ./enhancement_implementation */ "./node_modules/@abaplint/core/build/src/objects/enhancement_implementation.js"), exports);
|
|
49130
49192
|
__exportStar(__webpack_require__(/*! ./enhancement_spot */ "./node_modules/@abaplint/core/build/src/objects/enhancement_spot.js"), exports);
|
|
49131
49193
|
__exportStar(__webpack_require__(/*! ./entity_type */ "./node_modules/@abaplint/core/build/src/objects/entity_type.js"), exports);
|
|
@@ -49441,6 +49503,7 @@ class LockObject extends _abstract_object_1.AbstractObject {
|
|
|
49441
49503
|
getAllowedNaming() {
|
|
49442
49504
|
return {
|
|
49443
49505
|
maxLength: 16,
|
|
49506
|
+
customRegex: /^(\/[A-Z_\d]{3,8}\/)?E[A-Z0-9_]+$/i,
|
|
49444
49507
|
allowNamespace: true,
|
|
49445
49508
|
};
|
|
49446
49509
|
}
|
|
@@ -52181,6 +52244,13 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
52181
52244
|
}
|
|
52182
52245
|
return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.description;
|
|
52183
52246
|
}
|
|
52247
|
+
getSecondaryIndexes() {
|
|
52248
|
+
var _a;
|
|
52249
|
+
if (this.parsedData === undefined) {
|
|
52250
|
+
this.parseXML();
|
|
52251
|
+
}
|
|
52252
|
+
return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.secondaryIndexes;
|
|
52253
|
+
}
|
|
52184
52254
|
getAllowedNaming() {
|
|
52185
52255
|
let length = 30;
|
|
52186
52256
|
const regex = /^((\/[A-Z_\d]{3,8}\/)|[a-zA-Z0-9]{3}|CI_)\w+$/;
|
|
@@ -52408,7 +52478,7 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
52408
52478
|
}
|
|
52409
52479
|
///////////////
|
|
52410
52480
|
parseXML() {
|
|
52411
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
52481
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
52412
52482
|
const parsed = super.parseRaw2();
|
|
52413
52483
|
if (parsed === undefined) {
|
|
52414
52484
|
return;
|
|
@@ -52447,6 +52517,25 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
52447
52517
|
DDTEXT: field.DDTEXT,
|
|
52448
52518
|
});
|
|
52449
52519
|
}
|
|
52520
|
+
// secondary indexes
|
|
52521
|
+
const indexes = (_m = parsed.abapGit["asx:abap"]["asx:values"]) === null || _m === void 0 ? void 0 : _m.DD12V;
|
|
52522
|
+
;
|
|
52523
|
+
this.parsedData.secondaryIndexes = [];
|
|
52524
|
+
for (const index of (0, xml_utils_1.xmlToArray)(indexes === null || indexes === void 0 ? void 0 : indexes.DD12V)) {
|
|
52525
|
+
const indexName = index.INDEXNAME;
|
|
52526
|
+
const indexFields = [];
|
|
52527
|
+
const indexFieldsXml = (_o = parsed.abapGit["asx:abap"]["asx:values"]) === null || _o === void 0 ? void 0 : _o.DD17V;
|
|
52528
|
+
for (const indexField of (0, xml_utils_1.xmlToArray)(indexFieldsXml === null || indexFieldsXml === void 0 ? void 0 : indexFieldsXml.DD17V)) {
|
|
52529
|
+
if (indexField.INDEXNAME === indexName) {
|
|
52530
|
+
// assumption: fields are listed by POSITION in the xml
|
|
52531
|
+
indexFields.push(indexField.FIELDNAME);
|
|
52532
|
+
}
|
|
52533
|
+
}
|
|
52534
|
+
this.parsedData.secondaryIndexes.push({
|
|
52535
|
+
name: indexName,
|
|
52536
|
+
fields: indexFields,
|
|
52537
|
+
});
|
|
52538
|
+
}
|
|
52450
52539
|
}
|
|
52451
52540
|
}
|
|
52452
52541
|
exports.Table = Table;
|
|
@@ -53804,7 +53893,7 @@ class Registry {
|
|
|
53804
53893
|
}
|
|
53805
53894
|
static abaplintVersion() {
|
|
53806
53895
|
// magic, see build script "version.sh"
|
|
53807
|
-
return "2.
|
|
53896
|
+
return "2.114.4";
|
|
53808
53897
|
}
|
|
53809
53898
|
getDDICReferences() {
|
|
53810
53899
|
return this.ddicReferences;
|
|
@@ -55265,14 +55354,14 @@ class AllowedObjectNaming {
|
|
|
55265
55354
|
const name = obj.getName();
|
|
55266
55355
|
let message = "";
|
|
55267
55356
|
if (name.length > allowed.maxLength) {
|
|
55268
|
-
message = "Name exceeds max length";
|
|
55357
|
+
message = "Name exceeds max length, allowed is " + allowed.maxLength;
|
|
55269
55358
|
}
|
|
55270
55359
|
else if (allowed.allowNamespace === false && name.indexOf("/") >= 0) {
|
|
55271
55360
|
message = "Namespace not allowed for object type";
|
|
55272
55361
|
}
|
|
55273
55362
|
else if (allowed.customRegex !== undefined) {
|
|
55274
55363
|
if (name.match(allowed.customRegex) === null) {
|
|
55275
|
-
message = "Name not allowed";
|
|
55364
|
+
message = "Name not allowed, expected to match " + allowed.customRegex.toString();
|
|
55276
55365
|
}
|
|
55277
55366
|
}
|
|
55278
55367
|
else if (name.match(NAME_REGEX) === null) {
|
|
@@ -55877,7 +55966,7 @@ ENDTRY.`,
|
|
|
55877
55966
|
for (const statNode of file.getStatements()) {
|
|
55878
55967
|
const statement = statNode.get();
|
|
55879
55968
|
if (statement instanceof Statements.CallTransaction && !statNode.concatTokensWithoutStringsAndComments().toUpperCase().includes("WITH AUTHORITY-CHECK")) {
|
|
55880
|
-
issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key));
|
|
55969
|
+
issues.push(issue_1.Issue.atStatement(file, statNode, this.getMessage(), this.getMetadata().key, this.getConfig().severity));
|
|
55881
55970
|
}
|
|
55882
55971
|
}
|
|
55883
55972
|
return issues;
|
|
@@ -56058,7 +56147,7 @@ class CDSParserError {
|
|
|
56058
56147
|
title: "CDS Parser Error",
|
|
56059
56148
|
shortDescription: `CDS parsing`,
|
|
56060
56149
|
extendedInformation: `Parses CDS and issues parser errors`,
|
|
56061
|
-
tags: [_irule_1.RuleTag.Syntax],
|
|
56150
|
+
tags: [_irule_1.RuleTag.Syntax, _irule_1.RuleTag.SingleFile],
|
|
56062
56151
|
};
|
|
56063
56152
|
}
|
|
56064
56153
|
getConfig() {
|
|
@@ -56717,6 +56806,10 @@ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/c
|
|
|
56717
56806
|
const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
56718
56807
|
const severity_1 = __webpack_require__(/*! ../severity */ "./node_modules/@abaplint/core/build/src/severity.js");
|
|
56719
56808
|
class CheckIncludeConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
56809
|
+
constructor() {
|
|
56810
|
+
super(...arguments);
|
|
56811
|
+
this.allowUnused = false;
|
|
56812
|
+
}
|
|
56720
56813
|
}
|
|
56721
56814
|
exports.CheckIncludeConf = CheckIncludeConf;
|
|
56722
56815
|
class CheckInclude {
|
|
@@ -56744,7 +56837,7 @@ class CheckInclude {
|
|
|
56744
56837
|
}
|
|
56745
56838
|
initialize(reg) {
|
|
56746
56839
|
this.reg = reg;
|
|
56747
|
-
this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error);
|
|
56840
|
+
this.graph = new include_graph_1.IncludeGraph(this.reg, this.getConfig().severity || severity_1.Severity.Error, this.getConfig().allowUnused || false);
|
|
56748
56841
|
return this;
|
|
56749
56842
|
}
|
|
56750
56843
|
run(obj) {
|
|
@@ -64710,8 +64803,7 @@ https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abapstart-of-selectio
|
|
|
64710
64803
|
tags: [_irule_1.RuleTag.SingleFile],
|
|
64711
64804
|
badExample: `REPORT zfoo.
|
|
64712
64805
|
WRITE 'hello'.`,
|
|
64713
|
-
goodExample: `
|
|
64714
|
-
START-OF-SELECTION.
|
|
64806
|
+
goodExample: `START-OF-SELECTION.
|
|
64715
64807
|
WRITE 'hello'.`,
|
|
64716
64808
|
};
|
|
64717
64809
|
}
|
|
@@ -65164,6 +65256,7 @@ __exportStar(__webpack_require__(/*! ./implement_methods */ "./node_modules/@aba
|
|
|
65164
65256
|
__exportStar(__webpack_require__(/*! ./implicit_start_of_selection */ "./node_modules/@abaplint/core/build/src/rules/implicit_start_of_selection.js"), exports);
|
|
65165
65257
|
__exportStar(__webpack_require__(/*! ./in_statement_indentation */ "./node_modules/@abaplint/core/build/src/rules/in_statement_indentation.js"), exports);
|
|
65166
65258
|
__exportStar(__webpack_require__(/*! ./indentation */ "./node_modules/@abaplint/core/build/src/rules/indentation.js"), exports);
|
|
65259
|
+
__exportStar(__webpack_require__(/*! ./index_completely_contained */ "./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js"), exports);
|
|
65167
65260
|
__exportStar(__webpack_require__(/*! ./inline_data_old_versions */ "./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js"), exports);
|
|
65168
65261
|
__exportStar(__webpack_require__(/*! ./intf_referencing_clas */ "./node_modules/@abaplint/core/build/src/rules/intf_referencing_clas.js"), exports);
|
|
65169
65262
|
__exportStar(__webpack_require__(/*! ./invalid_table_index */ "./node_modules/@abaplint/core/build/src/rules/invalid_table_index.js"), exports);
|
|
@@ -65270,6 +65363,83 @@ __exportStar(__webpack_require__(/*! ./xml_consistency */ "./node_modules/@abapl
|
|
|
65270
65363
|
|
|
65271
65364
|
/***/ }),
|
|
65272
65365
|
|
|
65366
|
+
/***/ "./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js":
|
|
65367
|
+
/*!***********************************************************************************!*\
|
|
65368
|
+
!*** ./node_modules/@abaplint/core/build/src/rules/index_completely_contained.js ***!
|
|
65369
|
+
\***********************************************************************************/
|
|
65370
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
65371
|
+
|
|
65372
|
+
"use strict";
|
|
65373
|
+
|
|
65374
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
65375
|
+
exports.IndexCompletelyContained = exports.IndexCompletelyContainedConf = void 0;
|
|
65376
|
+
const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
|
|
65377
|
+
const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
|
|
65378
|
+
const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
|
|
65379
|
+
const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
|
|
65380
|
+
const Objects = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
65381
|
+
class IndexCompletelyContainedConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
65382
|
+
}
|
|
65383
|
+
exports.IndexCompletelyContainedConf = IndexCompletelyContainedConf;
|
|
65384
|
+
class IndexCompletelyContained {
|
|
65385
|
+
constructor() {
|
|
65386
|
+
this.conf = new IndexCompletelyContainedConf();
|
|
65387
|
+
}
|
|
65388
|
+
getMetadata() {
|
|
65389
|
+
return {
|
|
65390
|
+
key: "index_completely_contained",
|
|
65391
|
+
title: "Check if database table indexes are completely contained",
|
|
65392
|
+
shortDescription: `If indexes are completely contained in other indexes, they can be removed to improve performance.`,
|
|
65393
|
+
tags: [_irule_1.RuleTag.Performance, _irule_1.RuleTag.SingleFile],
|
|
65394
|
+
};
|
|
65395
|
+
}
|
|
65396
|
+
initialize() {
|
|
65397
|
+
return this;
|
|
65398
|
+
}
|
|
65399
|
+
getConfig() {
|
|
65400
|
+
return this.conf;
|
|
65401
|
+
}
|
|
65402
|
+
setConfig(conf) {
|
|
65403
|
+
this.conf = conf;
|
|
65404
|
+
}
|
|
65405
|
+
run(obj) {
|
|
65406
|
+
if (!(obj instanceof Objects.Table)) {
|
|
65407
|
+
return [];
|
|
65408
|
+
}
|
|
65409
|
+
const indexes = obj.getSecondaryIndexes();
|
|
65410
|
+
if (indexes === undefined || indexes.length === 0) {
|
|
65411
|
+
return [];
|
|
65412
|
+
}
|
|
65413
|
+
const issues = [];
|
|
65414
|
+
for (let i = 0; i < indexes.length; i++) {
|
|
65415
|
+
const indexA = indexes[i];
|
|
65416
|
+
for (let j = 0; j < indexes.length; j++) {
|
|
65417
|
+
if (i === j) {
|
|
65418
|
+
continue;
|
|
65419
|
+
}
|
|
65420
|
+
const indexB = indexes[j];
|
|
65421
|
+
let contained = true;
|
|
65422
|
+
for (const field of indexA.fields) {
|
|
65423
|
+
if (indexB.fields.indexOf(field) === -1) {
|
|
65424
|
+
contained = false;
|
|
65425
|
+
break;
|
|
65426
|
+
}
|
|
65427
|
+
}
|
|
65428
|
+
if (contained) {
|
|
65429
|
+
const position = new position_1.Position(1, 1);
|
|
65430
|
+
const message = `Index "${indexA.name}" is completely contained in index "${indexB.name}"`;
|
|
65431
|
+
issues.push(issue_1.Issue.atPosition(obj.getFiles()[0], position, message, this.getMetadata().key, this.conf.severity));
|
|
65432
|
+
}
|
|
65433
|
+
}
|
|
65434
|
+
}
|
|
65435
|
+
return issues;
|
|
65436
|
+
}
|
|
65437
|
+
}
|
|
65438
|
+
exports.IndexCompletelyContained = IndexCompletelyContained;
|
|
65439
|
+
//# sourceMappingURL=index_completely_contained.js.map
|
|
65440
|
+
|
|
65441
|
+
/***/ }),
|
|
65442
|
+
|
|
65273
65443
|
/***/ "./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js":
|
|
65274
65444
|
/*!*********************************************************************************!*\
|
|
65275
65445
|
!*** ./node_modules/@abaplint/core/build/src/rules/inline_data_old_versions.js ***!
|
|
@@ -77442,11 +77612,12 @@ class Graph {
|
|
|
77442
77612
|
}
|
|
77443
77613
|
}
|
|
77444
77614
|
class IncludeGraph {
|
|
77445
|
-
constructor(reg, severity = severity_1.Severity.Error) {
|
|
77615
|
+
constructor(reg, severity = severity_1.Severity.Error, allowUnused = false) {
|
|
77446
77616
|
this.reg = reg;
|
|
77447
77617
|
this.issues = [];
|
|
77448
77618
|
this.graph = new Graph();
|
|
77449
77619
|
this.severity = severity;
|
|
77620
|
+
this.allowUnused = allowUnused;
|
|
77450
77621
|
this.build();
|
|
77451
77622
|
}
|
|
77452
77623
|
listMainForInclude(filename) {
|
|
@@ -77470,6 +77641,7 @@ class IncludeGraph {
|
|
|
77470
77641
|
}
|
|
77471
77642
|
const v = this.graph.findVertexByFilename(file.getFilename());
|
|
77472
77643
|
if (v !== undefined
|
|
77644
|
+
&& this.allowUnused === false
|
|
77473
77645
|
&& v.include === true
|
|
77474
77646
|
&& this.listMainForInclude(v.filename).length === 0) {
|
|
77475
77647
|
const f = this.reg.getFileByName(v.filename);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/transpiler-cli",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.13",
|
|
4
4
|
"description": "Transpiler - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"author": "abaplint",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@abaplint/core": "^2.
|
|
31
|
-
"@abaplint/transpiler": "^2.12.
|
|
30
|
+
"@abaplint/core": "^2.114.4",
|
|
31
|
+
"@abaplint/transpiler": "^2.12.13",
|
|
32
32
|
"@types/glob": "^8.1.0",
|
|
33
33
|
"@types/node": "^24.10.1",
|
|
34
34
|
"@types/progress": "^2.0.7",
|