@abaplint/cli 2.102.70 → 2.103.0

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 +107 -5
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -47327,6 +47327,7 @@ exports.PersonalizationObject = PersonalizationObject;
47327
47327
  Object.defineProperty(exports, "__esModule", ({ value: true }));
47328
47328
  exports.Program = void 0;
47329
47329
  const _abap_object_1 = __webpack_require__(/*! ./_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
47330
+ const xml_utils_1 = __webpack_require__(/*! ../xml_utils */ "./node_modules/@abaplint/core/build/src/xml_utils.js");
47330
47331
  class Program extends _abap_object_1.ABAPObject {
47331
47332
  getType() {
47332
47333
  return "PROG";
@@ -47360,14 +47361,49 @@ class Program extends _abap_object_1.ABAPObject {
47360
47361
  this.parseXML();
47361
47362
  return this.parsedXML.isModulePool;
47362
47363
  }
47364
+ getDynpros() {
47365
+ this.parseXML();
47366
+ return this.parsedXML.dynpros;
47367
+ }
47368
+ ////////////////////////////
47363
47369
  parseXML() {
47364
- if (this.parsedXML === undefined) {
47365
- const file = this.getXMLFile();
47370
+ var _a, _b, _c, _d;
47371
+ if (this.parsedXML !== undefined) {
47372
+ return;
47373
+ }
47374
+ const file = this.getXMLFile();
47375
+ const parsed = this.parseRaw2();
47376
+ if (parsed === undefined) {
47366
47377
  this.parsedXML = {
47367
- isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47368
- isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47378
+ isInclude: false,
47379
+ isModulePool: false,
47380
+ dynpros: [],
47369
47381
  };
47382
+ return;
47370
47383
  }
47384
+ const dynpros = [];
47385
+ const xmlDynpros = (_c = (_b = (_a = parsed.abapGit) === null || _a === void 0 ? void 0 : _a["asx:abap"]) === null || _b === void 0 ? void 0 : _b["asx:values"]) === null || _c === void 0 ? void 0 : _c.DYNPROS;
47386
+ if (xmlDynpros !== undefined) {
47387
+ for (const d of (0, xml_utils_1.xmlToArray)(xmlDynpros.item)) {
47388
+ const fields = [];
47389
+ for (const f of (0, xml_utils_1.xmlToArray)((_d = d.FIELDS) === null || _d === void 0 ? void 0 : _d.RPY_DYFATC)) {
47390
+ fields.push({
47391
+ name: f.NAME,
47392
+ type: f.TYPE,
47393
+ length: f.LENGTH,
47394
+ });
47395
+ }
47396
+ dynpros.push({
47397
+ number: d.HEADER.SCREEN,
47398
+ fields: fields,
47399
+ });
47400
+ }
47401
+ }
47402
+ this.parsedXML = {
47403
+ isInclude: file ? file.getRaw().includes("<SUBC>I</SUBC>") : false,
47404
+ isModulePool: file ? file.getRaw().includes("<SUBC>M</SUBC>") : false,
47405
+ dynpros: dynpros,
47406
+ };
47371
47407
  }
47372
47408
  }
47373
47409
  exports.Program = Program;
@@ -50698,7 +50734,7 @@ class Registry {
50698
50734
  }
50699
50735
  static abaplintVersion() {
50700
50736
  // magic, see build script "version.sh"
50701
- return "2.102.70";
50737
+ return "2.103.0";
50702
50738
  }
50703
50739
  getDDICReferences() {
50704
50740
  return this.ddicReferences;
@@ -58207,6 +58243,71 @@ exports.Downport = Downport;
58207
58243
 
58208
58244
  /***/ }),
58209
58245
 
58246
+ /***/ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js":
58247
+ /*!**********************************************************************!*\
58248
+ !*** ./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js ***!
58249
+ \**********************************************************************/
58250
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
58251
+
58252
+ "use strict";
58253
+
58254
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
58255
+ exports.DynproChecks = exports.DynproChecksConf = void 0;
58256
+ const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
58257
+ const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
58258
+ const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
58259
+ const objects_1 = __webpack_require__(/*! ../objects */ "./node_modules/@abaplint/core/build/src/objects/index.js");
58260
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
58261
+ class DynproChecksConf extends _basic_rule_config_1.BasicRuleConfig {
58262
+ }
58263
+ exports.DynproChecksConf = DynproChecksConf;
58264
+ class DynproChecks {
58265
+ constructor() {
58266
+ this.conf = new DynproChecksConf();
58267
+ }
58268
+ getMetadata() {
58269
+ return {
58270
+ key: "dynpro_checks",
58271
+ title: "Dynpro Checks",
58272
+ shortDescription: `Various Dynpro checks`,
58273
+ extendedInformation: `* Check length of PUSH elements less than 132`,
58274
+ tags: [_irule_1.RuleTag.Syntax],
58275
+ };
58276
+ }
58277
+ initialize(_reg) {
58278
+ return this;
58279
+ }
58280
+ getConfig() {
58281
+ return this.conf;
58282
+ }
58283
+ setConfig(conf) {
58284
+ this.conf = conf;
58285
+ }
58286
+ run(obj) {
58287
+ const ret = [];
58288
+ if (!(obj instanceof objects_1.Program)) {
58289
+ return [];
58290
+ }
58291
+ const file = obj.getXMLFile();
58292
+ if (file === undefined) {
58293
+ return [];
58294
+ }
58295
+ for (const dynpro of obj.getDynpros()) {
58296
+ for (const field of dynpro.fields) {
58297
+ if (field.type === "PUSH" && field.length > 132) {
58298
+ const message = `Screen ${dynpro.number}, field ${field.name} LENGTH longer than 132`;
58299
+ ret.push(issue_1.Issue.atPosition(file, new position_1.Position(1, 1), message, this.getMetadata().key, this.getConfig().severity));
58300
+ }
58301
+ }
58302
+ }
58303
+ return ret;
58304
+ }
58305
+ }
58306
+ exports.DynproChecks = DynproChecks;
58307
+ //# sourceMappingURL=dynpro_checks.js.map
58308
+
58309
+ /***/ }),
58310
+
58210
58311
  /***/ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js":
58211
58312
  /*!******************************************************************************!*\
58212
58313
  !*** ./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js ***!
@@ -60924,6 +61025,7 @@ __exportStar(__webpack_require__(/*! ./definitions_top */ "./node_modules/@abapl
60924
61025
  __exportStar(__webpack_require__(/*! ./description_empty */ "./node_modules/@abaplint/core/build/src/rules/description_empty.js"), exports);
60925
61026
  __exportStar(__webpack_require__(/*! ./double_space */ "./node_modules/@abaplint/core/build/src/rules/double_space.js"), exports);
60926
61027
  __exportStar(__webpack_require__(/*! ./downport */ "./node_modules/@abaplint/core/build/src/rules/downport.js"), exports);
61028
+ __exportStar(__webpack_require__(/*! ./dynpro_checks */ "./node_modules/@abaplint/core/build/src/rules/dynpro_checks.js"), exports);
60927
61029
  __exportStar(__webpack_require__(/*! ./easy_to_find_messages */ "./node_modules/@abaplint/core/build/src/rules/easy_to_find_messages.js"), exports);
60928
61030
  __exportStar(__webpack_require__(/*! ./empty_line_in_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_line_in_statement.js"), exports);
60929
61031
  __exportStar(__webpack_require__(/*! ./empty_statement */ "./node_modules/@abaplint/core/build/src/rules/empty_statement.js"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.102.70",
3
+ "version": "2.103.0",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.102.70",
41
+ "@abaplint/core": "^2.103.0",
42
42
  "@types/chai": "^4.3.9",
43
43
  "@types/glob": "^7.2.0",
44
44
  "@types/minimist": "^1.2.4",