@abaplint/cli 2.102.57 → 2.102.59
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 +97 -5
- package/package.json +5 -5
package/build/cli.js
CHANGED
|
@@ -25734,6 +25734,7 @@ const sql_for_all_entries_1 = __webpack_require__(/*! ./sql_for_all_entries */ "
|
|
|
25734
25734
|
const _scope_type_1 = __webpack_require__(/*! ../_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
|
|
25735
25735
|
const sql_source_1 = __webpack_require__(/*! ./sql_source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js");
|
|
25736
25736
|
const sql_compare_1 = __webpack_require__(/*! ./sql_compare */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_compare.js");
|
|
25737
|
+
const sql_order_by_1 = __webpack_require__(/*! ./sql_order_by */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js");
|
|
25737
25738
|
const isSimple = /^\w+$/;
|
|
25738
25739
|
class Select {
|
|
25739
25740
|
runSyntax(node, scope, filename, skipImplicitInto = false) {
|
|
@@ -25787,6 +25788,9 @@ class Select {
|
|
|
25787
25788
|
for (const s of node.findAllExpressions(Expressions.SQLCompare)) {
|
|
25788
25789
|
new sql_compare_1.SQLCompare().runSyntax(s, scope, filename, dbSources);
|
|
25789
25790
|
}
|
|
25791
|
+
for (const s of node.findDirectExpressions(Expressions.SQLOrderBy)) {
|
|
25792
|
+
new sql_order_by_1.SQLOrderBy().runSyntax(s, scope, filename);
|
|
25793
|
+
}
|
|
25790
25794
|
if (scope.getType() === _scope_type_1.ScopeType.OpenSQL) {
|
|
25791
25795
|
scope.pop(node.getLastToken().getEnd());
|
|
25792
25796
|
}
|
|
@@ -26446,6 +26450,31 @@ exports.SQLFrom = SQLFrom;
|
|
|
26446
26450
|
|
|
26447
26451
|
/***/ }),
|
|
26448
26452
|
|
|
26453
|
+
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js":
|
|
26454
|
+
/*!*****************************************************************************************!*\
|
|
26455
|
+
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_order_by.js ***!
|
|
26456
|
+
\*****************************************************************************************/
|
|
26457
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
26458
|
+
|
|
26459
|
+
"use strict";
|
|
26460
|
+
|
|
26461
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
26462
|
+
exports.SQLOrderBy = void 0;
|
|
26463
|
+
const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
|
|
26464
|
+
const dynamic_1 = __webpack_require__(/*! ./dynamic */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/dynamic.js");
|
|
26465
|
+
class SQLOrderBy {
|
|
26466
|
+
runSyntax(node, scope, filename) {
|
|
26467
|
+
const dyn = node.findDirectExpression(Expressions.Dynamic);
|
|
26468
|
+
if (dyn) {
|
|
26469
|
+
new dynamic_1.Dynamic().runSyntax(dyn, scope, filename);
|
|
26470
|
+
}
|
|
26471
|
+
}
|
|
26472
|
+
}
|
|
26473
|
+
exports.SQLOrderBy = SQLOrderBy;
|
|
26474
|
+
//# sourceMappingURL=sql_order_by.js.map
|
|
26475
|
+
|
|
26476
|
+
/***/ }),
|
|
26477
|
+
|
|
26449
26478
|
/***/ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js":
|
|
26450
26479
|
/*!***************************************************************************************!*\
|
|
26451
26480
|
!*** ./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/sql_source.js ***!
|
|
@@ -37044,6 +37073,9 @@ class InterfaceDefinition extends _identifier_1.Identifier {
|
|
|
37044
37073
|
}
|
|
37045
37074
|
}
|
|
37046
37075
|
this.methodDefinitions = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);
|
|
37076
|
+
if (this.methodDefinitions.getByName("CONSTRUCTOR") !== undefined) {
|
|
37077
|
+
throw new Error("Interfaces cannot have constructor methods");
|
|
37078
|
+
}
|
|
37047
37079
|
const events = this.node.findAllStatements(Statements.Events);
|
|
37048
37080
|
for (const e of events) {
|
|
37049
37081
|
this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope));
|
|
@@ -46959,6 +46991,56 @@ exports.RenameGlobalInterface = RenameGlobalInterface;
|
|
|
46959
46991
|
|
|
46960
46992
|
/***/ }),
|
|
46961
46993
|
|
|
46994
|
+
/***/ "./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js":
|
|
46995
|
+
/*!**************************************************************************************!*\
|
|
46996
|
+
!*** ./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js ***!
|
|
46997
|
+
\**************************************************************************************/
|
|
46998
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
46999
|
+
|
|
47000
|
+
"use strict";
|
|
47001
|
+
|
|
47002
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
47003
|
+
exports.RenameMessageClass = void 0;
|
|
47004
|
+
const vscode_languageserver_types_1 = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/umd/main.js");
|
|
47005
|
+
const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/objects/index.js");
|
|
47006
|
+
const renamer_helper_1 = __webpack_require__(/*! ./renamer_helper */ "./node_modules/@abaplint/core/build/src/objects/rename/renamer_helper.js");
|
|
47007
|
+
class RenameMessageClass {
|
|
47008
|
+
constructor(reg) {
|
|
47009
|
+
this.reg = reg;
|
|
47010
|
+
}
|
|
47011
|
+
buildEdits(obj, oldName, newName) {
|
|
47012
|
+
if (!(obj instanceof __1.MessageClass)) {
|
|
47013
|
+
throw new Error("RenameMessageClass, not a message class");
|
|
47014
|
+
}
|
|
47015
|
+
let changes = [];
|
|
47016
|
+
const helper = new renamer_helper_1.RenamerHelper(this.reg);
|
|
47017
|
+
changes = changes.concat(helper.buildXMLFileEdits(obj, "ARBGB", oldName, newName));
|
|
47018
|
+
changes = changes.concat(helper.renameFiles(obj, oldName, newName));
|
|
47019
|
+
for (const message of obj.getMessages()) {
|
|
47020
|
+
for (const ref of this.reg.getMSAGReferences().listByMessage(obj.getName(), message.getNumber())) {
|
|
47021
|
+
const file = this.reg.getFileByName(ref.filename);
|
|
47022
|
+
if (file === undefined) {
|
|
47023
|
+
continue;
|
|
47024
|
+
}
|
|
47025
|
+
const rows = file.getRawRows();
|
|
47026
|
+
const i = ref.token.getRow() - 1;
|
|
47027
|
+
const index = rows[i].indexOf(oldName.toLowerCase());
|
|
47028
|
+
if (index >= 0) {
|
|
47029
|
+
const range = vscode_languageserver_types_1.Range.create(i, index, i, index + oldName.length);
|
|
47030
|
+
changes.push(vscode_languageserver_types_1.TextDocumentEdit.create({ uri: file.getFilename(), version: 1 }, [vscode_languageserver_types_1.TextEdit.replace(range, newName.toLowerCase())]));
|
|
47031
|
+
}
|
|
47032
|
+
}
|
|
47033
|
+
}
|
|
47034
|
+
return {
|
|
47035
|
+
documentChanges: changes,
|
|
47036
|
+
};
|
|
47037
|
+
}
|
|
47038
|
+
}
|
|
47039
|
+
exports.RenameMessageClass = RenameMessageClass;
|
|
47040
|
+
//# sourceMappingURL=rename_message_class.js.map
|
|
47041
|
+
|
|
47042
|
+
/***/ }),
|
|
47043
|
+
|
|
46962
47044
|
/***/ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js":
|
|
46963
47045
|
/*!******************************************************************************!*\
|
|
46964
47046
|
!*** ./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js ***!
|
|
@@ -47051,6 +47133,7 @@ const rename_global_class_1 = __webpack_require__(/*! ./rename_global_class */ "
|
|
|
47051
47133
|
const rename_global_interface_1 = __webpack_require__(/*! ./rename_global_interface */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_global_interface.js");
|
|
47052
47134
|
const rename_table_1 = __webpack_require__(/*! ./rename_table */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table.js");
|
|
47053
47135
|
const rename_table_type_1 = __webpack_require__(/*! ./rename_table_type */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_table_type.js");
|
|
47136
|
+
const rename_message_class_1 = __webpack_require__(/*! ./rename_message_class */ "./node_modules/@abaplint/core/build/src/objects/rename/rename_message_class.js");
|
|
47054
47137
|
class Renamer {
|
|
47055
47138
|
constructor(reg) {
|
|
47056
47139
|
this.reg = reg;
|
|
@@ -47098,6 +47181,8 @@ class Renamer {
|
|
|
47098
47181
|
return new rename_table_type_1.RenameTableType(this.reg);
|
|
47099
47182
|
case "INTF":
|
|
47100
47183
|
return new rename_global_interface_1.RenameGlobalInterface(this.reg);
|
|
47184
|
+
case "MSAG":
|
|
47185
|
+
return new rename_message_class_1.RenameMessageClass(this.reg);
|
|
47101
47186
|
default:
|
|
47102
47187
|
throw new Error("Renaming of " + type + " not yet supported");
|
|
47103
47188
|
}
|
|
@@ -49306,7 +49391,7 @@ class Registry {
|
|
|
49306
49391
|
}
|
|
49307
49392
|
static abaplintVersion() {
|
|
49308
49393
|
// magic, see build script "version.sh"
|
|
49309
|
-
return "2.102.
|
|
49394
|
+
return "2.102.59";
|
|
49310
49395
|
}
|
|
49311
49396
|
getDDICReferences() {
|
|
49312
49397
|
return this.ddicReferences;
|
|
@@ -65766,6 +65851,10 @@ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modu
|
|
|
65766
65851
|
const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
|
|
65767
65852
|
const basic_1 = __webpack_require__(/*! ../abap/types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
|
|
65768
65853
|
class SelectAddOrderByConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
65854
|
+
constructor() {
|
|
65855
|
+
super(...arguments);
|
|
65856
|
+
this.skipForAllEntries = false;
|
|
65857
|
+
}
|
|
65769
65858
|
}
|
|
65770
65859
|
exports.SelectAddOrderByConf = SelectAddOrderByConf;
|
|
65771
65860
|
class SelectAddOrderBy {
|
|
@@ -65797,7 +65886,7 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
65797
65886
|
this.conf = conf;
|
|
65798
65887
|
}
|
|
65799
65888
|
run(obj) {
|
|
65800
|
-
var _a;
|
|
65889
|
+
var _a, _b;
|
|
65801
65890
|
const issues = [];
|
|
65802
65891
|
if (!(obj instanceof _abap_object_1.ABAPObject) || obj.getType() === "INTF") {
|
|
65803
65892
|
return [];
|
|
@@ -65811,13 +65900,16 @@ If the target is a sorted/hashed table, no issue is reported`,
|
|
|
65811
65900
|
const selects = stru.findAllStatements(Statements.Select);
|
|
65812
65901
|
selects.push(...stru.findAllStatements(Statements.SelectLoop));
|
|
65813
65902
|
for (const s of selects) {
|
|
65814
|
-
const
|
|
65815
|
-
if (
|
|
65903
|
+
const concat = s.concatTokens().toUpperCase();
|
|
65904
|
+
if (concat.startsWith("SELECT SINGLE ")) {
|
|
65905
|
+
continue;
|
|
65906
|
+
}
|
|
65907
|
+
else if (((_a = this.getConfig()) === null || _a === void 0 ? void 0 : _a.skipForAllEntries) === true && concat.includes(" FOR ALL ENTRIES ")) {
|
|
65816
65908
|
continue;
|
|
65817
65909
|
}
|
|
65818
65910
|
// skip COUNT(*)
|
|
65819
65911
|
const list = s.findAllExpressions(Expressions.SQLField);
|
|
65820
|
-
if (list.length === 1 && ((
|
|
65912
|
+
if (list.length === 1 && ((_b = list[0].getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.SQLAggregation) {
|
|
65821
65913
|
continue;
|
|
65822
65914
|
}
|
|
65823
65915
|
else if (s.findFirstExpression(Expressions.SQLOrderBy)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.102.
|
|
3
|
+
"version": "2.102.59",
|
|
4
4
|
"description": "abaplint - Command Line Interface",
|
|
5
5
|
"funding": "https://github.com/sponsors/larshp",
|
|
6
6
|
"bin": {
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"homepage": "https://abaplint.org",
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@abaplint/core": "^2.102.
|
|
42
|
-
"@types/chai": "^4.3.
|
|
41
|
+
"@abaplint/core": "^2.102.59",
|
|
42
|
+
"@types/chai": "^4.3.8",
|
|
43
43
|
"@types/glob": "^7.2.0",
|
|
44
44
|
"@types/minimist": "^1.2.3",
|
|
45
45
|
"@types/mocha": "^10.0.2",
|
|
46
|
-
"@types/node": "^20.8.
|
|
46
|
+
"@types/node": "^20.8.6",
|
|
47
47
|
"@types/progress": "^2.0.5",
|
|
48
48
|
"chai": "^4.3.10",
|
|
49
49
|
"chalk": "^5.3.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"mocha": "^10.2.0",
|
|
56
56
|
"progress": "^2.0.3",
|
|
57
57
|
"typescript": "^5.2.2",
|
|
58
|
-
"webpack": "^5.
|
|
58
|
+
"webpack": "^5.89.0",
|
|
59
59
|
"webpack-cli": "^5.1.4",
|
|
60
60
|
"xml-js": "^1.6.11"
|
|
61
61
|
},
|