@abaplint/cli 2.113.90 → 2.113.92

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 +132 -25
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -19243,15 +19243,11 @@ exports.Do = Do;
19243
19243
 
19244
19244
  Object.defineProperty(exports, "__esModule", ({ value: true }));
19245
19245
  exports.DynproLogic = void 0;
19246
- 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");
19247
19247
  const _combi_1 = __webpack_require__(/*! ./_combi */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/_combi.js");
19248
- const chain_1 = __webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js");
19249
19248
  class DynproLogic {
19250
19249
  getMatcher() {
19251
- 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)));
19252
- 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)));
19253
- const pov = (0, _combi_1.star)((0, _combi_1.sta)(Statements.Field));
19254
- 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)));
19255
19251
  }
19256
19252
  }
19257
19253
  exports.DynproLogic = DynproLogic;
@@ -19482,10 +19478,10 @@ __exportStar(__webpack_require__(/*! ./case_type */ "./node_modules/@abaplint/co
19482
19478
  __exportStar(__webpack_require__(/*! ./case */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/case.js"), exports);
19483
19479
  __exportStar(__webpack_require__(/*! ./catch_system_exceptions */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/catch_system_exceptions.js"), exports);
19484
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);
19485
19482
  __exportStar(__webpack_require__(/*! ./class_data */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_data.js"), exports);
19486
19483
  __exportStar(__webpack_require__(/*! ./class_definition */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_definition.js"), exports);
19487
19484
  __exportStar(__webpack_require__(/*! ./class_global */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_global.js"), exports);
19488
- __exportStar(__webpack_require__(/*! ./chain */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/chain.js"), exports);
19489
19485
  __exportStar(__webpack_require__(/*! ./class_implementation */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/class_implementation.js"), exports);
19490
19486
  __exportStar(__webpack_require__(/*! ./cleanup */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/cleanup.js"), exports);
19491
19487
  __exportStar(__webpack_require__(/*! ./constants */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/constants.js"), exports);
@@ -19510,6 +19506,9 @@ __exportStar(__webpack_require__(/*! ./module */ "./node_modules/@abaplint/core/
19510
19506
  __exportStar(__webpack_require__(/*! ./normal */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/normal.js"), exports);
19511
19507
  __exportStar(__webpack_require__(/*! ./on_change */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/on_change.js"), exports);
19512
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);
19513
19512
  __exportStar(__webpack_require__(/*! ./protected_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js"), exports);
19514
19513
  __exportStar(__webpack_require__(/*! ./provide */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/provide.js"), exports);
19515
19514
  __exportStar(__webpack_require__(/*! ./public_section */ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/public_section.js"), exports);
@@ -19742,6 +19741,76 @@ exports.PrivateSection = PrivateSection;
19742
19741
 
19743
19742
  /***/ }),
19744
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
+
19745
19814
  /***/ "./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js":
19746
19815
  /*!*************************************************************************************************!*\
19747
19816
  !*** ./node_modules/@abaplint/core/build/src/abap/3_structures/structures/protected_section.js ***!
@@ -40318,6 +40387,13 @@ class CDSDetermineTypes {
40318
40387
  continue;
40319
40388
  }
40320
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
+ }
40321
40397
  components.push({
40322
40398
  name: f.name,
40323
40399
  type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
@@ -40753,14 +40829,14 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40753
40829
  const cds_integer_1 = __webpack_require__(/*! ./cds_integer */ "./node_modules/@abaplint/core/build/src/cds/expressions/cds_integer.js");
40754
40830
  class CDSArithmetics extends combi_1.Expression {
40755
40831
  getRunnable() {
40756
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40757
- const val = (0, combi_1.alt)(cds_integer_1.CDSInteger, name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
40832
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40833
+ const val = (0, combi_1.altPrio)(cds_integer_1.CDSInteger, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString, name);
40758
40834
  const operator = (0, combi_1.altPrio)("+", "-", "*", "/");
40759
40835
  const operatorValue = (0, combi_1.seq)(operator, val);
40760
- const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
40761
- const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
40836
+ const paren = (0, combi_1.seq)("(", val, (0, combi_1.plusPrio)(operatorValue), ")");
40837
+ const noParen = (0, combi_1.seq)(val, (0, combi_1.plusPrio)(operatorValue));
40762
40838
  // todo: this is pretty bad, it needs a rewrite
40763
- return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plus)(operatorValue)), paren, noParen);
40839
+ return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plusPrio)(operatorValue)), paren, noParen);
40764
40840
  }
40765
40841
  }
40766
40842
  exports.CDSArithmetics = CDSArithmetics;
@@ -40850,10 +40926,10 @@ const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node
40850
40926
  class CDSCase extends combi_1.Expression {
40851
40927
  getRunnable() {
40852
40928
  const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40853
- const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
40854
- 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");
40855
- 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");
40856
- return (0, combi_1.altPrio)(simple, complex);
40929
+ const value = (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSString, CDSCase, _1.CDSCast, _1.CDSArithmetics, name);
40930
+ const simple = (0, combi_1.seq)((0, combi_1.altPrio)(_1.CDSFunction, name), (0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value);
40931
+ const complex = (0, combi_1.seq)((0, combi_1.plusPrio)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.optPrio)((0, combi_1.seq)("ELSE", value)));
40932
+ return (0, combi_1.seq)("CASE", (0, combi_1.altPrio)(complex, simple), "END");
40857
40933
  }
40858
40934
  }
40859
40935
  exports.CDSCase = CDSCase;
@@ -40875,8 +40951,8 @@ const _1 = __webpack_require__(/*! . */ "./node_modules/@abaplint/core/build/src
40875
40951
  const combi_1 = __webpack_require__(/*! ../../abap/2_statements/combi */ "./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js");
40876
40952
  class CDSCast extends combi_1.Expression {
40877
40953
  getRunnable() {
40878
- const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
40879
- return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
40954
+ const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.optPrio)((0, combi_1.seq)(".", _1.CDSName)));
40955
+ return (0, combi_1.seq)("CAST", "(", (0, combi_1.altPrio)(_1.CDSFunction, _1.CDSCase, _1.CDSAggregate, CDSCast, _1.CDSString, _1.CDSArithmetics, name), "AS", _1.CDSType, (0, combi_1.optPrio)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
40880
40956
  }
40881
40957
  }
40882
40958
  exports.CDSCast = CDSCast;
@@ -44174,17 +44250,38 @@ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modu
44174
44250
  const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
44175
44251
  const dump_scope_1 = __webpack_require__(/*! ./dump_scope */ "./node_modules/@abaplint/core/build/src/lsp/dump_scope.js");
44176
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");
44177
44254
  class Help {
44178
44255
  static find(reg, textDocument, position) {
44179
- 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);
44180
44261
  if (file === undefined) {
44181
- return "file not found";
44262
+ return "File not found: " + textDocument.uri;
44182
44263
  }
44183
- else {
44184
- return this.dumpABAP(file, reg, textDocument, position);
44264
+ const obj = reg.findObjectForFile(file);
44265
+ if (obj instanceof objects_1.DataDefinition) {
44266
+ return this.dumpDDLS(obj, reg);
44185
44267
  }
44268
+ return "Unhandled object type: " + obj.getType();
44186
44269
  }
44187
44270
  /////////////////////////////////////////////////
44271
+ static dumpDDLS(obj, reg) {
44272
+ let content = "";
44273
+ content += "<h1>" + obj.getType + " " + obj.getName() + "</h1>\n";
44274
+ content += obj.getDescription() + "\n";
44275
+ content += obj.getParsingIssues().map(i => i.getMessage()).join("<br>\n");
44276
+ content += `<hr>\n`;
44277
+ const parsed = obj.getParsedData();
44278
+ parsed === null || parsed === void 0 ? true : delete parsed.tree;
44279
+ content += `<pre>` + JSON.stringify(parsed, null, 2) + "</pre>\n";
44280
+ content += `<hr>\n`;
44281
+ content += `<pre>` + obj.parseType(reg).toText(0) + "</pre>\n";
44282
+ content += `<hr>\n`;
44283
+ return content;
44284
+ }
44188
44285
  static dumpABAP(file, reg, textDocument, position) {
44189
44286
  let content = "";
44190
44287
  content = `
@@ -53674,7 +53771,7 @@ class Registry {
53674
53771
  }
53675
53772
  static abaplintVersion() {
53676
53773
  // magic, see build script "version.sh"
53677
- return "2.113.90";
53774
+ return "2.113.92";
53678
53775
  }
53679
53776
  getDDICReferences() {
53680
53777
  return this.ddicReferences;
@@ -63156,7 +63253,7 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
63156
63253
  runParsed(file) {
63157
63254
  const issues = [];
63158
63255
  for (const statement of file.getStatements()) {
63159
- if (!(statement.get() instanceof Statements.Data)) {
63256
+ if (!(statement.get() instanceof Statements.Data || statement.get() instanceof Statements.Type)) {
63160
63257
  continue;
63161
63258
  }
63162
63259
  const tt = statement.findFirstExpression(Expressions.TypeTable);
@@ -66107,7 +66204,7 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
66107
66204
  this.conf = conf;
66108
66205
  }
66109
66206
  runParsed(file, obj) {
66110
- var _a;
66207
+ var _a, _b, _c;
66111
66208
  const issues = [];
66112
66209
  if (this.reg.getConfig().getVersion() === version_1.Version.v700) {
66113
66210
  // 700 does not have testclass includes
@@ -66133,6 +66230,16 @@ class LocalTestclassConsistency extends _abap_rule_1.ABAPRule {
66133
66230
  issues.push(issue);
66134
66231
  }
66135
66232
  }
66233
+ if (file.getFilename() === ((_b = obj.getMainABAPFile()) === null || _b === void 0 ? void 0 : _b.getFilename())
66234
+ && obj.getTestclassFile() === undefined
66235
+ && ((_c = obj.getXML()) === null || _c === void 0 ? void 0 : _c.includes("<WITH_UNIT_TESTS>X</WITH_UNIT_TESTS>")) === true) {
66236
+ const id = obj.getIdentifier();
66237
+ if (id) {
66238
+ const message = "Has <WITH_UNIT_TESTS> set in XML, but no testclasses";
66239
+ const issue = issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity);
66240
+ issues.push(issue);
66241
+ }
66242
+ }
66136
66243
  return issues;
66137
66244
  }
66138
66245
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.90",
3
+ "version": "2.113.92",
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.90",
41
+ "@abaplint/core": "^2.113.92",
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.6",
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",