@abaplint/cli 2.113.89 → 2.113.91

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.
Files changed (2) hide show
  1. package/build/cli.js +116 -18
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -7928,7 +7928,7 @@ exports.SQLAliasField = void 0;
7928
7928
  const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
7929
7929
  class SQLAliasField extends combi_1.Expression {
7930
7930
  getRunnable() {
7931
- return (0, combi_1.regex)(/^(\/\w+\/)?\w+~\w+$/);
7931
+ return (0, combi_1.regex)(/^(\/\w+\/)?\w+~(\/\w+\/)?\w+$/);
7932
7932
  }
7933
7933
  }
7934
7934
  exports.SQLAliasField = SQLAliasField;
@@ -8468,8 +8468,12 @@ class SQLFunction extends combi_1.Expression {
8468
8468
  const round = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^round$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8469
8469
  const upper = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^upper$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, (0, combi_1.tok)(tokens_1.WParenRightW)));
8470
8470
  const uuid = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), (0, combi_1.tok)(tokens_1.WParenRightW)));
8471
- const concat_with_space = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^uuid$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8472
- return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space);
8471
+ const concat_with_space = (0, combi_1.ver)(version_1.Version.v751, (0, combi_1.seq)((0, combi_1.regex)(/^concat_with_space$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8472
+ // dunno if the version for substring is correct
8473
+ const substring = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^substring$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8474
+ const ltrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^ltrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8475
+ const rtrim = (0, combi_1.ver)(version_1.Version.v750, (0, combi_1.seq)((0, combi_1.regex)(/^rtrim$/i), (0, combi_1.tok)(tokens_1.ParenLeftW), sql_function_input_1.SQLFunctionInput, commaParam, (0, combi_1.tok)(tokens_1.WParenRightW)));
8476
+ return (0, combi_1.altPrio)(uuid, abs, ceil, floor, cast, div, mod, coalesce, concat, replace, length, lower, upper, round, concat_with_space, ltrim, rtrim, substring);
8473
8477
  }
8474
8478
  }
8475
8479
  exports.SQLFunction = SQLFunction;
@@ -15037,7 +15041,7 @@ class ModifyLine {
15037
15041
  getMatcher() {
15038
15042
  const onOff = (0, combi_1.alt)("ON", "OFF");
15039
15043
  const eq = (0, combi_1.seq)("=", expressions_1.Source);
15040
- const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR", "HOTSPOT"), (0, combi_1.alt)(eq, onOff));
15044
+ const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR", "HOTSPOT"), (0, combi_1.opt)((0, combi_1.alt)(eq, onOff)));
15041
15045
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
15042
15046
  const value = (0, combi_1.seq)("FIELD VALUE", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.optPrio)(from))));
15043
15047
  const format = (0, combi_1.seq)("FIELD FORMAT", expressions_1.Source, (0, combi_1.opt)(form));
@@ -18126,7 +18130,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
18126
18130
  const version_1 = __webpack_require__(/*! ../../../version */ "./node_modules/@abaplint/core/build/src/version.js");
18127
18131
  class VerificationMessage {
18128
18132
  getMatcher() {
18129
- const ret = (0, combi_1.seq)("VERIFICATION-MESSAGE", expressions_1.Source, expressions_1.Source);
18133
+ const priority = (0, combi_1.seq)("PRIORITY", expressions_1.Source);
18134
+ const ret = (0, combi_1.seq)("VERIFICATION-MESSAGE", expressions_1.Source, expressions_1.Source, (0, combi_1.opt)(priority));
18130
18135
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
18131
18136
  }
18132
18137
  }
@@ -19238,15 +19243,11 @@ exports.Do = Do;
19238
19243
 
19239
19244
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19240
19245
  exports.DynproLogic = void 0;
19241
- const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19246
+ const Structures = __webpack_require__(/*! ./ */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js");
19242
19247
  const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
19243
- const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
19244
19248
  class DynproLogic {
19245
19249
  getMatcher() {
19246
- const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain)));
19247
- const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen)));
19248
- const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
19249
- return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo, (0, _combi_1.sta)(Statements.ProcessAfterInput), pai, (0, _combi_1.opt)((0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov)));
19250
+ return (0, _combi_1.seq)((0, _combi_1.sub)(Structures.ProcessBeforeOutput), (0, _combi_1.sub)(Structures.ProcessAfterInput), (0, _combi_1.opt)((0, _combi_1.sub)(Structures.ProcessOnValueRequest)));
19250
19251
  }
19251
19252
  }
19252
19253
  exports.DynproLogic = DynproLogic;
@@ -19477,10 +19478,10 @@ __exportStar(__webpack_require__(/*! ./case_type */ "./node_modules/@abaplint/co
19477
19478
  __exportStar(__webpack_require__(/*! ./case */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js"), exports);
19478
19479
  __exportStar(__webpack_require__(/*! ./catch_system_exceptions */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch_system_exceptions.js"), exports);
19479
19480
  __exportStar(__webpack_require__(/*! ./catch */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch.js"), exports);
19481
+ __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js"), exports);
19480
19482
  __exportStar(__webpack_require__(/*! ./class_data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js"), exports);
19481
19483
  __exportStar(__webpack_require__(/*! ./class_definition */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js"), exports);
19482
19484
  __exportStar(__webpack_require__(/*! ./class_global */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js"), exports);
19483
- __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js"), exports);
19484
19485
  __exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js"), exports);
19485
19486
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js"), exports);
19486
19487
  __exportStar(__webpack_require__(/*! ./constants */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js"), exports);
@@ -19505,6 +19506,9 @@ __exportStar(__webpack_require__(/*! ./module */ "./node_modules/@abaplint/core/
19505
19506
  __exportStar(__webpack_require__(/*! ./normal */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js"), exports);
19506
19507
  __exportStar(__webpack_require__(/*! ./on_change */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/on_change.js"), exports);
19507
19508
  __exportStar(__webpack_require__(/*! ./private_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/private_section.js"), exports);
19509
+ __exportStar(__webpack_require__(/*! ./process_after_input */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_after_input.js"), exports);
19510
+ __exportStar(__webpack_require__(/*! ./process_before_output */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_before_output.js"), exports);
19511
+ __exportStar(__webpack_require__(/*! ./process_on_value_request */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_on_value_request.js"), exports);
19508
19512
  __exportStar(__webpack_require__(/*! ./protected_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js"), exports);
19509
19513
  __exportStar(__webpack_require__(/*! ./provide */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/provide.js"), exports);
19510
19514
  __exportStar(__webpack_require__(/*! ./public_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js"), exports);
@@ -19737,6 +19741,76 @@ exports.PrivateSection = PrivateSection;
19737
19741
 
19738
19742
  /***/ }),
19739
19743
 
19744
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_after_input.js":
19745
+ /*!***************************************************************************************************!*\
19746
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_after_input.js ***!
19747
+ \***************************************************************************************************/
19748
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19749
+
19750
+ "use strict";
19751
+
19752
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
19753
+ exports.ProcessAfterInput = void 0;
19754
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19755
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
19756
+ const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
19757
+ class ProcessAfterInput {
19758
+ getMatcher() {
19759
+ const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain)));
19760
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
19761
+ }
19762
+ }
19763
+ exports.ProcessAfterInput = ProcessAfterInput;
19764
+ //# sourceMappingURL=process_after_input.js.map
19765
+
19766
+ /***/ }),
19767
+
19768
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_before_output.js":
19769
+ /*!*****************************************************************************************************!*\
19770
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_before_output.js ***!
19771
+ \*****************************************************************************************************/
19772
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19773
+
19774
+ "use strict";
19775
+
19776
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
19777
+ exports.ProcessBeforeOutput = void 0;
19778
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19779
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
19780
+ class ProcessBeforeOutput {
19781
+ getMatcher() {
19782
+ const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen)));
19783
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo);
19784
+ }
19785
+ }
19786
+ exports.ProcessBeforeOutput = ProcessBeforeOutput;
19787
+ //# sourceMappingURL=process_before_output.js.map
19788
+
19789
+ /***/ }),
19790
+
19791
+ /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_on_value_request.js":
19792
+ /*!********************************************************************************************************!*\
19793
+ !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/process_on_value_request.js ***!
19794
+ \********************************************************************************************************/
19795
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
19796
+
19797
+ "use strict";
19798
+
19799
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
19800
+ exports.ProcessOnValueRequest = void 0;
19801
+ const Statements = __webpack_require__(/*! ../../2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
19802
+ const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
19803
+ class ProcessOnValueRequest {
19804
+ getMatcher() {
19805
+ const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
19806
+ return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessOnValueRequest), pov);
19807
+ }
19808
+ }
19809
+ exports.ProcessOnValueRequest = ProcessOnValueRequest;
19810
+ //# sourceMappingURL=process_on_value_request.js.map
19811
+
19812
+ /***/ }),
19813
+
19740
19814
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js":
19741
19815
  /*!*************************************************************************************************!*\
19742
19816
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js ***!
@@ -40313,6 +40387,13 @@ class CDSDetermineTypes {
40313
40387
  continue;
40314
40388
  }
40315
40389
  if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
40390
+ if (prefixUpper.startsWith("_")) {
40391
+ components.push({
40392
+ name: f.name,
40393
+ type: new basic_1.VoidType("DDLS:association"),
40394
+ });
40395
+ continue;
40396
+ }
40316
40397
  components.push({
40317
40398
  name: f.name,
40318
40399
  type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
@@ -44169,15 +44250,22 @@ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modu
44169
44250
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
44170
44251
  const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
44171
44252
  const virtual_position_1 = __webpack_require__(/*! ../virtual_position */ "./node_modules/@abaplint/core/build/src/virtual_position.js");
44253
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
44172
44254
  class Help {
44173
44255
  static find(reg, textDocument, position) {
44174
- const file = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
44256
+ const abapFile = _lsp_utils_1.LSPUtils.getABAPFile(reg, textDocument.uri);
44257
+ if (abapFile !== undefined) {
44258
+ return this.dumpABAP(abapFile, reg, textDocument, position);
44259
+ }
44260
+ const file = reg.getFileByName(textDocument.uri);
44175
44261
  if (file === undefined) {
44176
- return "file not found";
44262
+ return "File not found: " + textDocument.uri;
44177
44263
  }
44178
- else {
44179
- return this.dumpABAP(file, reg, textDocument, position);
44264
+ const obj = reg.findObjectForFile(file);
44265
+ if (obj instanceof objects_1.DataDefinition) {
44266
+ return "Data definition, dump todo";
44180
44267
  }
44268
+ return "Unhandled object type: " + obj.getType();
44181
44269
  }
44182
44270
  /////////////////////////////////////////////////
44183
44271
  static dumpABAP(file, reg, textDocument, position) {
@@ -53669,7 +53757,7 @@ class Registry {
53669
53757
  }
53670
53758
  static abaplintVersion() {
53671
53759
  // magic, see build script "version.sh"
53672
- return "2.113.89";
53760
+ return "2.113.91";
53673
53761
  }
53674
53762
  getDDICReferences() {
53675
53763
  return this.ddicReferences;
@@ -66102,7 +66190,7 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
66102
66190
  this.conf = conf;
66103
66191
  }
66104
66192
  runParsed(file, obj) {
66105
- var _a;
66193
+ var _a, _b, _c;
66106
66194
  const issues = [];
66107
66195
  if (this.reg.getConfig().getVersion() === version_1.Version.v700) {
66108
66196
  // 700 does not have testclass includes
@@ -66128,6 +66216,16 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
66128
66216
  issues.push(issue);
66129
66217
  }
66130
66218
  }
66219
+ if (file.getFilename() === ((_b = obj.getMainABAPFile()) === null || _b === void 0 ? void 0 : _b.getFilename())
66220
+ && obj.getTestclassFile() === undefined
66221
+ && ((_c = obj.getXML()) === null || _c === void 0 ? void 0 : _c.includes("<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>")) === true) {
66222
+ const id = obj.getIdentifier();
66223
+ if (id) {
66224
+ const message = "Has <WITH_UNIT_TESTS> set in XML, but no testclasses";
66225
+ const issue = issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity);
66226
+ issues.push(issue);
66227
+ }
66228
+ }
66131
66229
  return issues;
66132
66230
  }
66133
66231
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.89",
3
+ "version": "2.113.91",
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.113.89",
41
+ "@abaplint/core": "^2.113.91",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.10",
46
- "@types/node": "^22.10.5",
46
+ "@types/node": "^22.10.7",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.4.1",