@abaplint/cli 2.113.3 → 2.113.5

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 +64 -13
  2. package/package.json +3 -3
package/build/cli.js CHANGED
@@ -7487,7 +7487,7 @@ class SelectLoop extends combi_1.Expression {
7487
7487
  const packTab = (0, combi_1.seq)(pack, _1.SQLIntoTable);
7488
7488
  const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
7489
7489
  const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, into, packTab));
7490
- const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields), where, into, sql_up_to_1.SQLUpTo);
7490
+ const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, _1.SQLFields), (0, combi_1.optPrio)((0, combi_1.seq)(where, into, sql_up_to_1.SQLUpTo)));
7491
7491
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
7492
7492
  return ret;
7493
7493
  }
@@ -35218,6 +35218,7 @@ exports.SELECTION_EVENTS = [
35218
35218
  Statements.EndOfSelection,
35219
35219
  Statements.Initialization,
35220
35220
  Statements.TopOfPage,
35221
+ Statements.LoadOfProgram,
35221
35222
  Statements.EndOfPage,
35222
35223
  ];
35223
35224
  exports.DECLARATION_STUFF = [
@@ -35465,6 +35466,7 @@ class StatementFlow {
35465
35466
  graph.addEdge(loopName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.false);
35466
35467
  }
35467
35468
  else if (type instanceof Structures.Data
35469
+ || type instanceof Structures.Constants
35468
35470
  || type instanceof Structures.Types) {
35469
35471
  // these doesnt affect control flow, so just take the first statement
35470
35472
  const statement = n.getFirstStatement();
@@ -46628,6 +46630,7 @@ class DataElement extends _abstract_object_1.AbstractObject {
46628
46630
  }
46629
46631
  getDescription() {
46630
46632
  var _a;
46633
+ this.parse();
46631
46634
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.description;
46632
46635
  }
46633
46636
  getAllowedNaming() {
@@ -46645,6 +46648,11 @@ class DataElement extends _abstract_object_1.AbstractObject {
46645
46648
  this.parse();
46646
46649
  return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.domname;
46647
46650
  }
46651
+ getTexts() {
46652
+ var _a;
46653
+ this.parse();
46654
+ return (_a = this.parsedXML) === null || _a === void 0 ? void 0 : _a.texts;
46655
+ }
46648
46656
  parseType(reg) {
46649
46657
  const references = [];
46650
46658
  let lookup = undefined;
@@ -46703,6 +46711,12 @@ class DataElement extends _abstract_object_1.AbstractObject {
46703
46711
  datatype: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DATATYPE,
46704
46712
  leng: dd04v === null || dd04v === void 0 ? void 0 : dd04v.LENG,
46705
46713
  decimals: dd04v === null || dd04v === void 0 ? void 0 : dd04v.DECIMALS,
46714
+ texts: {
46715
+ short: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_S,
46716
+ medium: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_M,
46717
+ long: dd04v === null || dd04v === void 0 ? void 0 : dd04v.SCRTEXT_L,
46718
+ heading: dd04v === null || dd04v === void 0 ? void 0 : dd04v.REPTEXT,
46719
+ },
46706
46720
  };
46707
46721
  const end = Date.now();
46708
46722
  return { updated: true, runtime: end - start };
@@ -52682,7 +52696,7 @@ class Registry {
52682
52696
  }
52683
52697
  static abaplintVersion() {
52684
52698
  // magic, see build script "version.sh"
52685
- return "2.113.3";
52699
+ return "2.113.5";
52686
52700
  }
52687
52701
  getDDICReferences() {
52688
52702
  return this.ddicReferences;
@@ -76412,6 +76426,35 @@ module.exports = {
76412
76426
 
76413
76427
  /***/ }),
76414
76428
 
76429
+ /***/ "./node_modules/fast-xml-parser/src/ignoreAttributes.js":
76430
+ /*!**************************************************************!*\
76431
+ !*** ./node_modules/fast-xml-parser/src/ignoreAttributes.js ***!
76432
+ \**************************************************************/
76433
+ /***/ ((module) => {
76434
+
76435
+ function getIgnoreAttributesFn(ignoreAttributes) {
76436
+ if (typeof ignoreAttributes === 'function') {
76437
+ return ignoreAttributes
76438
+ }
76439
+ if (Array.isArray(ignoreAttributes)) {
76440
+ return (attrName) => {
76441
+ for (const pattern of ignoreAttributes) {
76442
+ if (typeof pattern === 'string' && attrName === pattern) {
76443
+ return true
76444
+ }
76445
+ if (pattern instanceof RegExp && pattern.test(attrName)) {
76446
+ return true
76447
+ }
76448
+ }
76449
+ }
76450
+ }
76451
+ return () => false
76452
+ }
76453
+
76454
+ module.exports = getIgnoreAttributesFn
76455
+
76456
+ /***/ }),
76457
+
76415
76458
  /***/ "./node_modules/fast-xml-parser/src/util.js":
76416
76459
  /*!**************************************************!*\
76417
76460
  !*** ./node_modules/fast-xml-parser/src/util.js ***!
@@ -76941,6 +76984,7 @@ function getPositionFromMatch(match) {
76941
76984
 
76942
76985
  //parse Empty Node as self closing node
76943
76986
  const buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ "./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js");
76987
+ const getIgnoreAttributesFn = __webpack_require__(/*! ../ignoreAttributes */ "./node_modules/fast-xml-parser/src/ignoreAttributes.js")
76944
76988
 
76945
76989
  const defaultOptions = {
76946
76990
  attributeNamePrefix: '@_',
@@ -76978,11 +77022,12 @@ const defaultOptions = {
76978
77022
 
76979
77023
  function Builder(options) {
76980
77024
  this.options = Object.assign({}, defaultOptions, options);
76981
- if (this.options.ignoreAttributes || this.options.attributesGroupName) {
77025
+ if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
76982
77026
  this.isAttribute = function(/*a*/) {
76983
77027
  return false;
76984
77028
  };
76985
77029
  } else {
77030
+ this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
76986
77031
  this.attrPrefixLen = this.options.attributeNamePrefix.length;
76987
77032
  this.isAttribute = isAttribute;
76988
77033
  }
@@ -77011,13 +77056,14 @@ Builder.prototype.build = function(jObj) {
77011
77056
  [this.options.arrayNodeName] : jObj
77012
77057
  }
77013
77058
  }
77014
- return this.j2x(jObj, 0).val;
77059
+ return this.j2x(jObj, 0, []).val;
77015
77060
  }
77016
77061
  };
77017
77062
 
77018
- Builder.prototype.j2x = function(jObj, level) {
77063
+ Builder.prototype.j2x = function(jObj, level, ajPath) {
77019
77064
  let attrStr = '';
77020
77065
  let val = '';
77066
+ const jPath = ajPath.join('.')
77021
77067
  for (let key in jObj) {
77022
77068
  if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;
77023
77069
  if (typeof jObj[key] === 'undefined') {
@@ -77040,9 +77086,9 @@ Builder.prototype.j2x = function(jObj, level) {
77040
77086
  } else if (typeof jObj[key] !== 'object') {
77041
77087
  //premitive type
77042
77088
  const attr = this.isAttribute(key);
77043
- if (attr) {
77089
+ if (attr && !this.ignoreAttributesFn(attr, jPath)) {
77044
77090
  attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);
77045
- }else {
77091
+ } else if (!attr) {
77046
77092
  //tag value
77047
77093
  if (key === this.options.textNodeName) {
77048
77094
  let newval = this.options.tagValueProcessor(key, '' + jObj[key]);
@@ -77066,13 +77112,13 @@ Builder.prototype.j2x = function(jObj, level) {
77066
77112
  // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
77067
77113
  } else if (typeof item === 'object') {
77068
77114
  if(this.options.oneListGroup){
77069
- const result = this.j2x(item, level + 1);
77115
+ const result = this.j2x(item, level + 1, ajPath.concat(key));
77070
77116
  listTagVal += result.val;
77071
77117
  if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
77072
77118
  listTagAttr += result.attrStr
77073
77119
  }
77074
77120
  }else{
77075
- listTagVal += this.processTextOrObjNode(item, key, level)
77121
+ listTagVal += this.processTextOrObjNode(item, key, level, ajPath)
77076
77122
  }
77077
77123
  } else {
77078
77124
  if (this.options.oneListGroup) {
@@ -77097,7 +77143,7 @@ Builder.prototype.j2x = function(jObj, level) {
77097
77143
  attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);
77098
77144
  }
77099
77145
  } else {
77100
- val += this.processTextOrObjNode(jObj[key], key, level)
77146
+ val += this.processTextOrObjNode(jObj[key], key, level, ajPath)
77101
77147
  }
77102
77148
  }
77103
77149
  }
@@ -77112,8 +77158,8 @@ Builder.prototype.buildAttrPairStr = function(attrName, val){
77112
77158
  } else return ' ' + attrName + '="' + val + '"';
77113
77159
  }
77114
77160
 
77115
- function processTextOrObjNode (object, key, level) {
77116
- const result = this.j2x(object, level + 1);
77161
+ function processTextOrObjNode (object, key, level, ajPath) {
77162
+ const result = this.j2x(object, level + 1, ajPath.concat(key));
77117
77163
  if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {
77118
77164
  return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);
77119
77165
  } else {
@@ -77601,6 +77647,7 @@ const util = __webpack_require__(/*! ../util */ "./node_modules/fast-xml-parser/
77601
77647
  const xmlNode = __webpack_require__(/*! ./xmlNode */ "./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js");
77602
77648
  const readDocType = __webpack_require__(/*! ./DocTypeReader */ "./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js");
77603
77649
  const toNumber = __webpack_require__(/*! strnum */ "./node_modules/strnum/strnum.js");
77650
+ const getIgnoreAttributesFn = __webpack_require__(/*! ../ignoreAttributes */ "./node_modules/fast-xml-parser/src/ignoreAttributes.js")
77604
77651
 
77605
77652
  // const regx =
77606
77653
  // '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
@@ -77649,6 +77696,7 @@ class OrderedObjParser{
77649
77696
  this.readStopNodeData = readStopNodeData;
77650
77697
  this.saveTextToParentTag = saveTextToParentTag;
77651
77698
  this.addChild = addChild;
77699
+ this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
77652
77700
  }
77653
77701
 
77654
77702
  }
@@ -77721,7 +77769,7 @@ function resolveNameSpace(tagname) {
77721
77769
  const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
77722
77770
 
77723
77771
  function buildAttributesMap(attrStr, jPath, tagName) {
77724
- if (!this.options.ignoreAttributes && typeof attrStr === 'string') {
77772
+ if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {
77725
77773
  // attrStr = attrStr.replace(/\r?\n/g, ' ');
77726
77774
  //attrStr = attrStr || attrStr.trim();
77727
77775
 
@@ -77730,6 +77778,9 @@ function buildAttributesMap(attrStr, jPath, tagName) {
77730
77778
  const attrs = {};
77731
77779
  for (let i = 0; i < len; i++) {
77732
77780
  const attrName = this.resolveNameSpace(matches[i][1]);
77781
+ if (this.ignoreAttributesFn(attrName, jPath)) {
77782
+ continue
77783
+ }
77733
77784
  let oldVal = matches[i][4];
77734
77785
  let aName = this.options.attributeNamePrefix + attrName;
77735
77786
  if (attrName.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.3",
3
+ "version": "2.113.5",
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.3",
41
+ "@abaplint/core": "^2.113.5",
42
42
  "@types/chai": "^4.3.19",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",
45
45
  "@types/mocha": "^10.0.7",
46
- "@types/node": "^22.5.2",
46
+ "@types/node": "^22.5.4",
47
47
  "@types/progress": "^2.0.7",
48
48
  "chai": "^4.5.0",
49
49
  "chalk": "^5.3.0",