@abaplint/cli 2.113.2 → 2.113.4
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 +60 -14
- 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
|
}
|
|
@@ -35259,7 +35259,9 @@ class StatementFlow {
|
|
|
35259
35259
|
var _a, _b, _c, _d;
|
|
35260
35260
|
const ret = [];
|
|
35261
35261
|
let name = "";
|
|
35262
|
-
const structures = stru.findAllStructuresMulti([
|
|
35262
|
+
const structures = stru.findAllStructuresMulti([
|
|
35263
|
+
Structures.Form, Structures.ClassImplementation, Structures.FunctionModule, Structures.Module
|
|
35264
|
+
]);
|
|
35263
35265
|
for (const s of structures) {
|
|
35264
35266
|
if (s.get() instanceof Structures.Form) {
|
|
35265
35267
|
name = "FORM " + ((_a = s.findFirstExpression(Expressions.FormName)) === null || _a === void 0 ? void 0 : _a.concatTokens());
|
|
@@ -35277,6 +35279,10 @@ class StatementFlow {
|
|
|
35277
35279
|
name = "FUNCTION " + ((_d = s.findFirstExpression(Expressions.Field)) === null || _d === void 0 ? void 0 : _d.concatTokens());
|
|
35278
35280
|
ret.push(this.run(s, name));
|
|
35279
35281
|
}
|
|
35282
|
+
else if (s.get() instanceof Structures.Module) {
|
|
35283
|
+
name = s.getFirstStatement().concatTokens().toUpperCase();
|
|
35284
|
+
ret.push(this.run(s, name));
|
|
35285
|
+
}
|
|
35280
35286
|
else {
|
|
35281
35287
|
throw new Error("StatementFlow, unknown structure");
|
|
35282
35288
|
}
|
|
@@ -35459,6 +35465,7 @@ class StatementFlow {
|
|
|
35459
35465
|
graph.addEdge(loopName, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.false);
|
|
35460
35466
|
}
|
|
35461
35467
|
else if (type instanceof Structures.Data
|
|
35468
|
+
|| type instanceof Structures.Constants
|
|
35462
35469
|
|| type instanceof Structures.Types) {
|
|
35463
35470
|
// these doesnt affect control flow, so just take the first statement
|
|
35464
35471
|
const statement = n.getFirstStatement();
|
|
@@ -44919,6 +44926,8 @@ function parseDynpros(parsed) {
|
|
|
44919
44926
|
}
|
|
44920
44927
|
dynpros.push({
|
|
44921
44928
|
number: d.HEADER.SCREEN,
|
|
44929
|
+
description: d.HEADER.DESCRIPT,
|
|
44930
|
+
nextScreen: d.HEADER.NEXTSCREEN,
|
|
44922
44931
|
fields: fields,
|
|
44923
44932
|
});
|
|
44924
44933
|
}
|
|
@@ -52674,7 +52683,7 @@ class Registry {
|
|
|
52674
52683
|
}
|
|
52675
52684
|
static abaplintVersion() {
|
|
52676
52685
|
// magic, see build script "version.sh"
|
|
52677
|
-
return "2.113.
|
|
52686
|
+
return "2.113.4";
|
|
52678
52687
|
}
|
|
52679
52688
|
getDDICReferences() {
|
|
52680
52689
|
return this.ddicReferences;
|
|
@@ -76404,6 +76413,35 @@ module.exports = {
|
|
|
76404
76413
|
|
|
76405
76414
|
/***/ }),
|
|
76406
76415
|
|
|
76416
|
+
/***/ "./node_modules/fast-xml-parser/src/ignoreAttributes.js":
|
|
76417
|
+
/*!**************************************************************!*\
|
|
76418
|
+
!*** ./node_modules/fast-xml-parser/src/ignoreAttributes.js ***!
|
|
76419
|
+
\**************************************************************/
|
|
76420
|
+
/***/ ((module) => {
|
|
76421
|
+
|
|
76422
|
+
function getIgnoreAttributesFn(ignoreAttributes) {
|
|
76423
|
+
if (typeof ignoreAttributes === 'function') {
|
|
76424
|
+
return ignoreAttributes
|
|
76425
|
+
}
|
|
76426
|
+
if (Array.isArray(ignoreAttributes)) {
|
|
76427
|
+
return (attrName) => {
|
|
76428
|
+
for (const pattern of ignoreAttributes) {
|
|
76429
|
+
if (typeof pattern === 'string' && attrName === pattern) {
|
|
76430
|
+
return true
|
|
76431
|
+
}
|
|
76432
|
+
if (pattern instanceof RegExp && pattern.test(attrName)) {
|
|
76433
|
+
return true
|
|
76434
|
+
}
|
|
76435
|
+
}
|
|
76436
|
+
}
|
|
76437
|
+
}
|
|
76438
|
+
return () => false
|
|
76439
|
+
}
|
|
76440
|
+
|
|
76441
|
+
module.exports = getIgnoreAttributesFn
|
|
76442
|
+
|
|
76443
|
+
/***/ }),
|
|
76444
|
+
|
|
76407
76445
|
/***/ "./node_modules/fast-xml-parser/src/util.js":
|
|
76408
76446
|
/*!**************************************************!*\
|
|
76409
76447
|
!*** ./node_modules/fast-xml-parser/src/util.js ***!
|
|
@@ -76933,6 +76971,7 @@ function getPositionFromMatch(match) {
|
|
|
76933
76971
|
|
|
76934
76972
|
//parse Empty Node as self closing node
|
|
76935
76973
|
const buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ "./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js");
|
|
76974
|
+
const getIgnoreAttributesFn = __webpack_require__(/*! ../ignoreAttributes */ "./node_modules/fast-xml-parser/src/ignoreAttributes.js")
|
|
76936
76975
|
|
|
76937
76976
|
const defaultOptions = {
|
|
76938
76977
|
attributeNamePrefix: '@_',
|
|
@@ -76970,11 +77009,12 @@ const defaultOptions = {
|
|
|
76970
77009
|
|
|
76971
77010
|
function Builder(options) {
|
|
76972
77011
|
this.options = Object.assign({}, defaultOptions, options);
|
|
76973
|
-
if (this.options.ignoreAttributes || this.options.attributesGroupName) {
|
|
77012
|
+
if (this.options.ignoreAttributes === true || this.options.attributesGroupName) {
|
|
76974
77013
|
this.isAttribute = function(/*a*/) {
|
|
76975
77014
|
return false;
|
|
76976
77015
|
};
|
|
76977
77016
|
} else {
|
|
77017
|
+
this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
|
|
76978
77018
|
this.attrPrefixLen = this.options.attributeNamePrefix.length;
|
|
76979
77019
|
this.isAttribute = isAttribute;
|
|
76980
77020
|
}
|
|
@@ -77003,13 +77043,14 @@ Builder.prototype.build = function(jObj) {
|
|
|
77003
77043
|
[this.options.arrayNodeName] : jObj
|
|
77004
77044
|
}
|
|
77005
77045
|
}
|
|
77006
|
-
return this.j2x(jObj, 0).val;
|
|
77046
|
+
return this.j2x(jObj, 0, []).val;
|
|
77007
77047
|
}
|
|
77008
77048
|
};
|
|
77009
77049
|
|
|
77010
|
-
Builder.prototype.j2x = function(jObj, level) {
|
|
77050
|
+
Builder.prototype.j2x = function(jObj, level, ajPath) {
|
|
77011
77051
|
let attrStr = '';
|
|
77012
77052
|
let val = '';
|
|
77053
|
+
const jPath = ajPath.join('.')
|
|
77013
77054
|
for (let key in jObj) {
|
|
77014
77055
|
if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;
|
|
77015
77056
|
if (typeof jObj[key] === 'undefined') {
|
|
@@ -77032,9 +77073,9 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
77032
77073
|
} else if (typeof jObj[key] !== 'object') {
|
|
77033
77074
|
//premitive type
|
|
77034
77075
|
const attr = this.isAttribute(key);
|
|
77035
|
-
if (attr) {
|
|
77076
|
+
if (attr && !this.ignoreAttributesFn(attr, jPath)) {
|
|
77036
77077
|
attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);
|
|
77037
|
-
}else {
|
|
77078
|
+
} else if (!attr) {
|
|
77038
77079
|
//tag value
|
|
77039
77080
|
if (key === this.options.textNodeName) {
|
|
77040
77081
|
let newval = this.options.tagValueProcessor(key, '' + jObj[key]);
|
|
@@ -77058,13 +77099,13 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
77058
77099
|
// val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;
|
|
77059
77100
|
} else if (typeof item === 'object') {
|
|
77060
77101
|
if(this.options.oneListGroup){
|
|
77061
|
-
const result = this.j2x(item, level + 1);
|
|
77102
|
+
const result = this.j2x(item, level + 1, ajPath.concat(key));
|
|
77062
77103
|
listTagVal += result.val;
|
|
77063
77104
|
if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {
|
|
77064
77105
|
listTagAttr += result.attrStr
|
|
77065
77106
|
}
|
|
77066
77107
|
}else{
|
|
77067
|
-
listTagVal += this.processTextOrObjNode(item, key, level)
|
|
77108
|
+
listTagVal += this.processTextOrObjNode(item, key, level, ajPath)
|
|
77068
77109
|
}
|
|
77069
77110
|
} else {
|
|
77070
77111
|
if (this.options.oneListGroup) {
|
|
@@ -77089,7 +77130,7 @@ Builder.prototype.j2x = function(jObj, level) {
|
|
|
77089
77130
|
attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);
|
|
77090
77131
|
}
|
|
77091
77132
|
} else {
|
|
77092
|
-
val += this.processTextOrObjNode(jObj[key], key, level)
|
|
77133
|
+
val += this.processTextOrObjNode(jObj[key], key, level, ajPath)
|
|
77093
77134
|
}
|
|
77094
77135
|
}
|
|
77095
77136
|
}
|
|
@@ -77104,8 +77145,8 @@ Builder.prototype.buildAttrPairStr = function(attrName, val){
|
|
|
77104
77145
|
} else return ' ' + attrName + '="' + val + '"';
|
|
77105
77146
|
}
|
|
77106
77147
|
|
|
77107
|
-
function processTextOrObjNode (object, key, level) {
|
|
77108
|
-
const result = this.j2x(object, level + 1);
|
|
77148
|
+
function processTextOrObjNode (object, key, level, ajPath) {
|
|
77149
|
+
const result = this.j2x(object, level + 1, ajPath.concat(key));
|
|
77109
77150
|
if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {
|
|
77110
77151
|
return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);
|
|
77111
77152
|
} else {
|
|
@@ -77593,6 +77634,7 @@ const util = __webpack_require__(/*! ../util */ "./node_modules/fast-xml-parser/
|
|
|
77593
77634
|
const xmlNode = __webpack_require__(/*! ./xmlNode */ "./node_modules/fast-xml-parser/src/xmlparser/xmlNode.js");
|
|
77594
77635
|
const readDocType = __webpack_require__(/*! ./DocTypeReader */ "./node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js");
|
|
77595
77636
|
const toNumber = __webpack_require__(/*! strnum */ "./node_modules/strnum/strnum.js");
|
|
77637
|
+
const getIgnoreAttributesFn = __webpack_require__(/*! ../ignoreAttributes */ "./node_modules/fast-xml-parser/src/ignoreAttributes.js")
|
|
77596
77638
|
|
|
77597
77639
|
// const regx =
|
|
77598
77640
|
// '<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)'
|
|
@@ -77641,6 +77683,7 @@ class OrderedObjParser{
|
|
|
77641
77683
|
this.readStopNodeData = readStopNodeData;
|
|
77642
77684
|
this.saveTextToParentTag = saveTextToParentTag;
|
|
77643
77685
|
this.addChild = addChild;
|
|
77686
|
+
this.ignoreAttributesFn = getIgnoreAttributesFn(this.options.ignoreAttributes)
|
|
77644
77687
|
}
|
|
77645
77688
|
|
|
77646
77689
|
}
|
|
@@ -77713,7 +77756,7 @@ function resolveNameSpace(tagname) {
|
|
|
77713
77756
|
const attrsRegx = new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?', 'gm');
|
|
77714
77757
|
|
|
77715
77758
|
function buildAttributesMap(attrStr, jPath, tagName) {
|
|
77716
|
-
if (
|
|
77759
|
+
if (this.options.ignoreAttributes !== true && typeof attrStr === 'string') {
|
|
77717
77760
|
// attrStr = attrStr.replace(/\r?\n/g, ' ');
|
|
77718
77761
|
//attrStr = attrStr || attrStr.trim();
|
|
77719
77762
|
|
|
@@ -77722,6 +77765,9 @@ function buildAttributesMap(attrStr, jPath, tagName) {
|
|
|
77722
77765
|
const attrs = {};
|
|
77723
77766
|
for (let i = 0; i < len; i++) {
|
|
77724
77767
|
const attrName = this.resolveNameSpace(matches[i][1]);
|
|
77768
|
+
if (this.ignoreAttributesFn(attrName, jPath)) {
|
|
77769
|
+
continue
|
|
77770
|
+
}
|
|
77725
77771
|
let oldVal = matches[i][4];
|
|
77726
77772
|
let aName = this.options.attributeNamePrefix + attrName;
|
|
77727
77773
|
if (attrName.length) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.113.
|
|
3
|
+
"version": "2.113.4",
|
|
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.
|
|
41
|
+
"@abaplint/core": "^2.113.4",
|
|
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.
|
|
46
|
+
"@types/node": "^22.5.2",
|
|
47
47
|
"@types/progress": "^2.0.7",
|
|
48
48
|
"chai": "^4.5.0",
|
|
49
49
|
"chalk": "^5.3.0",
|