@abaplint/cli 2.85.43 → 2.85.44

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 +7 -7
  2. package/package.json +4 -4
package/build/cli.js CHANGED
@@ -6484,7 +6484,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
6484
6484
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6485
6485
 
6486
6486
  "use strict";
6487
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeUtils = void 0;\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass TypeUtils {\r\n constructor(scope) {\r\n this.scope = scope;\r\n }\r\n isCharLike(type) {\r\n if (type === undefined) {\r\n return false;\r\n }\r\n else if (type instanceof basic_1.TableType && type.isWithHeader()) {\r\n return this.isCharLike(type.getRowType());\r\n }\r\n else if (type instanceof basic_1.StructureType) {\r\n for (const c of type.getComponents()) {\r\n if (this.isCharLike(c.type) === false) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (type instanceof basic_1.StringType\r\n || type instanceof basic_1.VoidType\r\n || type instanceof basic_1.AnyType\r\n || type instanceof basic_1.UnknownType\r\n || type instanceof basic_1.NumericType\r\n || type instanceof basic_1.IntegerType\r\n || type instanceof basic_1.FloatType\r\n || type instanceof basic_1.FloatingPointType\r\n || type instanceof basic_1.DecFloatType\r\n || type instanceof basic_1.DecFloat16Type\r\n || type instanceof basic_1.DecFloat34Type\r\n || type instanceof basic_1.NumericGenericType\r\n || type instanceof basic_1.CSequenceType\r\n || type instanceof basic_1.DateType\r\n || type instanceof basic_1.CLikeType\r\n || type instanceof basic_1.PackedType\r\n || type instanceof basic_1.TimeType\r\n || type instanceof basic_1.CharacterType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isHexLike(type) {\r\n if (type === undefined) {\r\n return false;\r\n }\r\n else if (type instanceof basic_1.StructureType) {\r\n for (const c of type.getComponents()) {\r\n if (this.isHexLike(c.type) === false) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (type instanceof basic_1.XStringType\r\n || type instanceof basic_1.HexType\r\n || type instanceof basic_1.VoidType\r\n || type instanceof basic_1.AnyType\r\n || type instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isOOAssignable(source, target) {\r\n let sid = source.getIdentifier();\r\n let tid = target.getIdentifier();\r\n const tname = tid.getName().toUpperCase();\r\n const sname = sid.getName().toUpperCase();\r\n if (tname === sname) {\r\n return true;\r\n }\r\n if (!(sid instanceof types_1.ClassDefinition || sid instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(sid.getName());\r\n if (found) {\r\n sid = found;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (!(tid instanceof types_1.ClassDefinition || tid instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(tid.getName());\r\n if (found) {\r\n tid = found;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.ClassDefinition) {\r\n if (sname === tname) {\r\n return true;\r\n }\r\n const slist = this.listAllSupers(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n else if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.InterfaceDefinition) {\r\n if (sid.getImplementing().some(i => i.name === tname)) {\r\n return true;\r\n }\r\n const slist = this.listAllInterfaces(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n else if (sid instanceof types_1.InterfaceDefinition && tid instanceof types_1.InterfaceDefinition) {\r\n if (sname === tname) {\r\n return true;\r\n }\r\n if (sid.getImplementing().some(i => i.name === tname)) {\r\n return true;\r\n }\r\n const slist = this.listAllInterfaces(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n listAllInterfaces(cdef) {\r\n var _a;\r\n const ret = new Set();\r\n const stack = [];\r\n // initialize\r\n cdef.getImplementing().forEach(i => stack.push(i.name));\r\n if (cdef instanceof types_1.ClassDefinition) {\r\n const supers = this.listAllSupers(cdef);\r\n for (const s of supers) {\r\n (_a = this.scope.findClassDefinition(s)) === null || _a === void 0 ? void 0 : _a.getImplementing().forEach(i => stack.push(i.name));\r\n }\r\n }\r\n // main loop\r\n while (stack.length > 0) {\r\n const intf = stack.pop().toUpperCase();\r\n ret.add(intf);\r\n const idef = this.scope.findInterfaceDefinition(intf);\r\n idef === null || idef === void 0 ? void 0 : idef.getImplementing().forEach(i => stack.push(i.name));\r\n }\r\n return Array.from(ret.values());\r\n }\r\n listAllSupers(cdef) {\r\n var _a, _b;\r\n const ret = [];\r\n let sup = cdef.getSuperClass();\r\n while (sup !== undefined) {\r\n ret.push(sup === null || sup === void 0 ? void 0 : sup.toUpperCase());\r\n sup = (_b = (_a = this.scope.findClassDefinition(sup)) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase();\r\n }\r\n return ret;\r\n }\r\n isCastable(_source, _target) {\r\n // todo\r\n return true;\r\n }\r\n isAssignable(source, target) {\r\n /*\r\n console.dir(source);\r\n console.dir(target);\r\n */\r\n if (target instanceof basic_1.TableType) {\r\n if (target.isWithHeader()) {\r\n return this.isAssignable(source, target.getRowType());\r\n }\r\n if (source instanceof basic_1.TableType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.ObjectReferenceType && source instanceof basic_1.ObjectReferenceType) {\r\n return this.isOOAssignable(source, target);\r\n }\r\n else if (target instanceof basic_1.ObjectReferenceType\r\n || target instanceof basic_1.GenericObjectReferenceType) {\r\n if (source instanceof basic_1.ObjectReferenceType\r\n || source instanceof basic_1.GenericObjectReferenceType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.DataReference) {\r\n if (source instanceof basic_1.DataReference\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.StructureType) {\r\n if (source instanceof basic_1.TableType && source.isWithHeader()) {\r\n return this.isAssignable(source.getRowType(), target);\r\n }\r\n else if (source instanceof basic_1.StructureType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n else if (target.containsVoid() === true) {\r\n return true;\r\n }\r\n else if (source instanceof basic_1.IntegerType) {\r\n return false;\r\n }\r\n else if (this.isCharLike(target) && this.isCharLike(source)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.IntegerType\r\n || target instanceof basic_1.StringType) {\r\n if (source instanceof basic_1.TableType && source.isWithHeader() === false) {\r\n return false;\r\n }\r\n else if (source instanceof basic_1.DataReference\r\n || source instanceof basic_1.ObjectReferenceType\r\n || source instanceof basic_1.GenericObjectReferenceType) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return true;\r\n }\r\n}\r\nexports.TypeUtils = TypeUtils;\r\n//# sourceMappingURL=_type_utils.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js?");
6487
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.TypeUtils = void 0;\r\nconst types_1 = __webpack_require__(/*! ../types */ \"./node_modules/@abaplint/core/build/src/abap/types/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nclass TypeUtils {\r\n constructor(scope) {\r\n this.scope = scope;\r\n }\r\n isCharLikeStrict(type) {\r\n if (type === undefined) {\r\n return false;\r\n }\r\n else if (type instanceof basic_1.StructureType) {\r\n for (const c of type.getComponents()) {\r\n if (this.isCharLikeStrict(c.type) === false) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (type instanceof basic_1.StringType\r\n || type instanceof basic_1.AnyType\r\n || type instanceof basic_1.CharacterType\r\n || type instanceof basic_1.CLikeType\r\n || type instanceof basic_1.DateType\r\n || type instanceof basic_1.CSequenceType\r\n || type instanceof basic_1.NumericGenericType\r\n || type instanceof basic_1.NumericType\r\n || type instanceof basic_1.TimeType\r\n || type instanceof basic_1.UnknownType\r\n || type instanceof basic_1.VoidType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isCharLike(type) {\r\n if (type === undefined) {\r\n return false;\r\n }\r\n else if (type instanceof basic_1.TableType && type.isWithHeader()) {\r\n return this.isCharLike(type.getRowType());\r\n }\r\n else if (type instanceof basic_1.StructureType) {\r\n for (const c of type.getComponents()) {\r\n if (this.isCharLike(c.type) === false) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (type instanceof basic_1.StringType\r\n || type instanceof basic_1.VoidType\r\n || type instanceof basic_1.AnyType\r\n || type instanceof basic_1.UnknownType\r\n || type instanceof basic_1.NumericType\r\n || type instanceof basic_1.IntegerType\r\n || type instanceof basic_1.FloatType\r\n || type instanceof basic_1.FloatingPointType\r\n || type instanceof basic_1.DecFloatType\r\n || type instanceof basic_1.DecFloat16Type\r\n || type instanceof basic_1.DecFloat34Type\r\n || type instanceof basic_1.NumericGenericType\r\n || type instanceof basic_1.CSequenceType\r\n || type instanceof basic_1.DateType\r\n || type instanceof basic_1.CLikeType\r\n || type instanceof basic_1.PackedType\r\n || type instanceof basic_1.TimeType\r\n || type instanceof basic_1.CharacterType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isHexLike(type) {\r\n if (type === undefined) {\r\n return false;\r\n }\r\n else if (type instanceof basic_1.StructureType) {\r\n for (const c of type.getComponents()) {\r\n if (this.isHexLike(c.type) === false) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n else if (type instanceof basic_1.XStringType\r\n || type instanceof basic_1.HexType\r\n || type instanceof basic_1.VoidType\r\n || type instanceof basic_1.AnyType\r\n || type instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n isOOAssignable(source, target) {\r\n let sid = source.getIdentifier();\r\n let tid = target.getIdentifier();\r\n const tname = tid.getName().toUpperCase();\r\n const sname = sid.getName().toUpperCase();\r\n if (tname === sname) {\r\n return true;\r\n }\r\n if (!(sid instanceof types_1.ClassDefinition || sid instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(sid.getName());\r\n if (found) {\r\n sid = found;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (!(tid instanceof types_1.ClassDefinition || tid instanceof types_1.InterfaceDefinition)) {\r\n const found = this.scope.findObjectDefinition(tid.getName());\r\n if (found) {\r\n tid = found;\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.ClassDefinition) {\r\n if (sname === tname) {\r\n return true;\r\n }\r\n const slist = this.listAllSupers(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n else if (sid instanceof types_1.ClassDefinition && tid instanceof types_1.InterfaceDefinition) {\r\n if (sid.getImplementing().some(i => i.name === tname)) {\r\n return true;\r\n }\r\n const slist = this.listAllInterfaces(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n else if (sid instanceof types_1.InterfaceDefinition && tid instanceof types_1.InterfaceDefinition) {\r\n if (sname === tname) {\r\n return true;\r\n }\r\n if (sid.getImplementing().some(i => i.name === tname)) {\r\n return true;\r\n }\r\n const slist = this.listAllInterfaces(sid);\r\n if (slist.indexOf(tname) >= 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n listAllInterfaces(cdef) {\r\n var _a;\r\n const ret = new Set();\r\n const stack = [];\r\n // initialize\r\n cdef.getImplementing().forEach(i => stack.push(i.name));\r\n if (cdef instanceof types_1.ClassDefinition) {\r\n const supers = this.listAllSupers(cdef);\r\n for (const s of supers) {\r\n (_a = this.scope.findClassDefinition(s)) === null || _a === void 0 ? void 0 : _a.getImplementing().forEach(i => stack.push(i.name));\r\n }\r\n }\r\n // main loop\r\n while (stack.length > 0) {\r\n const intf = stack.pop().toUpperCase();\r\n ret.add(intf);\r\n const idef = this.scope.findInterfaceDefinition(intf);\r\n idef === null || idef === void 0 ? void 0 : idef.getImplementing().forEach(i => stack.push(i.name));\r\n }\r\n return Array.from(ret.values());\r\n }\r\n listAllSupers(cdef) {\r\n var _a, _b;\r\n const ret = [];\r\n let sup = cdef.getSuperClass();\r\n while (sup !== undefined) {\r\n ret.push(sup === null || sup === void 0 ? void 0 : sup.toUpperCase());\r\n sup = (_b = (_a = this.scope.findClassDefinition(sup)) === null || _a === void 0 ? void 0 : _a.getSuperClass()) === null || _b === void 0 ? void 0 : _b.toUpperCase();\r\n }\r\n return ret;\r\n }\r\n isCastable(_source, _target) {\r\n // todo\r\n return true;\r\n }\r\n isAssignable(source, target) {\r\n /*\r\n console.dir(source);\r\n console.dir(target);\r\n */\r\n if (target instanceof basic_1.TableType) {\r\n if (target.isWithHeader()) {\r\n return this.isAssignable(source, target.getRowType());\r\n }\r\n if (source instanceof basic_1.TableType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.ObjectReferenceType && source instanceof basic_1.ObjectReferenceType) {\r\n return this.isOOAssignable(source, target);\r\n }\r\n else if (target instanceof basic_1.ObjectReferenceType\r\n || target instanceof basic_1.GenericObjectReferenceType) {\r\n if (source instanceof basic_1.ObjectReferenceType\r\n || source instanceof basic_1.GenericObjectReferenceType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.DataReference) {\r\n if (source instanceof basic_1.DataReference\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.StructureType) {\r\n if (source instanceof basic_1.TableType && source.isWithHeader()) {\r\n return this.isAssignable(source.getRowType(), target);\r\n }\r\n else if (source instanceof basic_1.StructureType\r\n || source instanceof basic_1.VoidType\r\n || source instanceof basic_1.AnyType\r\n || source instanceof basic_1.UnknownType) {\r\n return true;\r\n }\r\n else if (target.containsVoid() === true) {\r\n return true;\r\n }\r\n else if (source instanceof basic_1.IntegerType) {\r\n return false;\r\n }\r\n else if (this.isCharLike(target) && this.isCharLike(source)) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n else if (target instanceof basic_1.IntegerType\r\n || target instanceof basic_1.StringType) {\r\n if (source instanceof basic_1.TableType && source.isWithHeader() === false) {\r\n return false;\r\n }\r\n else if (source instanceof basic_1.DataReference\r\n || source instanceof basic_1.ObjectReferenceType\r\n || source instanceof basic_1.GenericObjectReferenceType) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return true;\r\n }\r\n}\r\nexports.TypeUtils = TypeUtils;\r\n//# sourceMappingURL=_type_utils.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js?");
6488
6488
 
6489
6489
  /***/ }),
6490
6490
 
@@ -8167,7 +8167,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
8167
8167
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8168
8168
 
8169
8169
  "use strict";
8170
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Split = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nclass Split {\r\n runSyntax(node, scope, filename) {\r\n const type = node.findTokenSequencePosition(\"INTO\", \"TABLE\") ? new basic_1.TableType(new basic_1.StringType(), { withHeader: false }) : new basic_1.StringType();\r\n for (const target of node.findAllExpressions(Expressions.Target)) {\r\n const inline = target.findDirectExpression(Expressions.InlineData);\r\n if (inline) {\r\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);\r\n }\r\n else {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n }\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Split = Split;\r\n//# sourceMappingURL=split.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js?");
8170
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Split = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js\");\r\nconst source_1 = __webpack_require__(/*! ../expressions/source */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst _type_utils_1 = __webpack_require__(/*! ../_type_utils */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js\");\r\nclass Split {\r\n runSyntax(node, scope, filename) {\r\n const intoTable = node.findTokenSequencePosition(\"INTO\", \"TABLE\") !== undefined;\r\n const type = intoTable ? new basic_1.TableType(new basic_1.StringType(), { withHeader: false }) : new basic_1.StringType();\r\n for (const target of node.findAllExpressions(Expressions.Target)) {\r\n const inline = target.findDirectExpression(Expressions.InlineData);\r\n if (inline) {\r\n new inline_data_1.InlineData().runSyntax(inline, scope, filename, type);\r\n }\r\n else {\r\n let targetType = new target_1.Target().runSyntax(target, scope, filename);\r\n if (intoTable) {\r\n if (!(targetType instanceof basic_1.TableType)\r\n && !(targetType instanceof basic_1.UnknownType)\r\n && !(targetType instanceof basic_1.VoidType)) {\r\n throw new Error(\"Into must be table typed\");\r\n }\r\n if (targetType instanceof basic_1.TableType) {\r\n targetType = targetType.getRowType();\r\n }\r\n }\r\n if (new _type_utils_1.TypeUtils(scope).isCharLikeStrict(targetType) === false) {\r\n throw new Error(\"Incompatible, target not character like\");\r\n }\r\n }\r\n }\r\n for (const s of node.findDirectExpressions(Expressions.Source)) {\r\n new source_1.Source().runSyntax(s, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Split = Split;\r\n//# sourceMappingURL=split.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/split.js?");
8171
8171
 
8172
8172
  /***/ }),
8173
8173
 
@@ -11225,7 +11225,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
11225
11225
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11226
11226
 
11227
11227
  "use strict";
11228
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.85.43\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n addFiles(files) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(undefined, iobj);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n this.issues = [];\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11228
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Registry = void 0;\nconst config_1 = __webpack_require__(/*! ./config */ \"./node_modules/@abaplint/core/build/src/config.js\");\nconst artifacts_objects_1 = __webpack_require__(/*! ./artifacts_objects */ \"./node_modules/@abaplint/core/build/src/artifacts_objects.js\");\nconst artifacts_rules_1 = __webpack_require__(/*! ./artifacts_rules */ \"./node_modules/@abaplint/core/build/src/artifacts_rules.js\");\nconst skip_logic_1 = __webpack_require__(/*! ./skip_logic */ \"./node_modules/@abaplint/core/build/src/skip_logic.js\");\nconst _abap_object_1 = __webpack_require__(/*! ./objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\nconst find_global_definitions_1 = __webpack_require__(/*! ./abap/5_syntax/global_definitions/find_global_definitions */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/global_definitions/find_global_definitions.js\");\nconst syntax_1 = __webpack_require__(/*! ./abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\nconst excludeHelper_1 = __webpack_require__(/*! ./utils/excludeHelper */ \"./node_modules/@abaplint/core/build/src/utils/excludeHelper.js\");\nconst ddic_references_1 = __webpack_require__(/*! ./ddic_references */ \"./node_modules/@abaplint/core/build/src/ddic_references.js\");\n// todo, this should really be an instance in case there are multiple Registry'ies\nclass ParsingPerformance {\n static clear() {\n this.results = [];\n this.lexing = 0;\n this.statements = 0;\n this.structure = 0;\n }\n static push(obj, result) {\n if (result.runtimeExtra) {\n this.lexing += result.runtimeExtra.lexing;\n this.statements += result.runtimeExtra.statements;\n this.structure += result.runtimeExtra.structure;\n }\n if (result.runtime < 100) {\n return;\n }\n if (this.results === undefined) {\n this.results = [];\n }\n let extra = \"\";\n if (result.runtimeExtra) {\n extra = `\\t(lexing: ${result.runtimeExtra.lexing}ms, statements: ${result.runtimeExtra.statements}ms, structure: ${result.runtimeExtra.structure}ms)`;\n }\n this.results.push({\n runtime: result.runtime,\n extra,\n name: obj.getType() + \" \" + obj.getName(),\n });\n }\n static output() {\n const MAX = 10;\n this.results.sort((a, b) => { return b.runtime - a.runtime; });\n for (let i = 0; i < MAX; i++) {\n const row = this.results[i];\n if (row === undefined) {\n break;\n }\n process.stderr.write(`\\t${row.runtime}ms\\t${row.name} ${row.extra}\\n`);\n }\n process.stderr.write(`\\tTotal lexing: ${this.lexing}ms\\n`);\n process.stderr.write(`\\tTotal statements: ${this.statements}ms\\n`);\n process.stderr.write(`\\tTotal structure: ${this.structure}ms\\n`);\n }\n}\n///////////////////////////////////////////////////////////////////////////////////////////////\nclass Registry {\n constructor(conf) {\n this.objects = {};\n this.objectsByType = {};\n /** object containing filenames of dependencies */\n this.dependencies = {};\n this.issues = [];\n this.conf = conf ? conf : config_1.Config.getDefault();\n this.references = new ddic_references_1.DDICReferences();\n }\n static abaplintVersion() {\n // magic, see build script \"version.sh\"\n return \"2.85.44\";\n }\n getDDICReferences() {\n return this.references;\n }\n *getObjects() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n yield this.objects[name][type];\n }\n }\n }\n *getObjectsByType(type) {\n for (const name in this.objectsByType[type] || []) {\n yield this.objectsByType[type][name];\n }\n }\n *getFiles() {\n for (const obj of this.getObjects()) {\n for (const file of obj.getFiles()) {\n yield file;\n }\n }\n }\n getFirstObject() {\n for (const name in this.objects) {\n for (const type in this.objects[name]) {\n return this.objects[name][type];\n }\n }\n return undefined;\n }\n getObjectCount(skipDependencies = true) {\n let res = 0;\n for (const o of this.getObjects()) {\n if (skipDependencies === true && this.isDependency(o)) {\n continue;\n }\n res = res + 1;\n }\n return res;\n }\n getFileByName(filename) {\n const upper = filename.toUpperCase();\n for (const o of this.getObjects()) {\n for (const f of o.getFiles()) {\n if (f.getFilename().toUpperCase() === upper) {\n return f;\n }\n }\n }\n return undefined;\n }\n getObject(type, name) {\n if (type === undefined || name === undefined) {\n return undefined;\n }\n const searchName = name.toUpperCase();\n if (this.objects[searchName]) {\n return this.objects[searchName][type];\n }\n return undefined;\n }\n getConfig() {\n return this.conf;\n }\n // assumption: Config is immutable, and can only be changed via this method\n setConfig(conf) {\n for (const obj of this.getObjects()) {\n obj.setDirty();\n }\n this.conf = conf;\n return this;\n }\n inErrorNamespace(name) {\n const reg = new RegExp(this.getConfig().getSyntaxSetttings().errorNamespace, \"i\");\n return reg.test(name);\n }\n addFile(file) {\n return this.addFiles([file]);\n }\n updateFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.updateFile(file);\n return this;\n }\n removeFile(file) {\n const obj = this.find(file.getObjectName(), file.getObjectType());\n obj.removeFile(file);\n if (obj.getFiles().length === 0) {\n this.references.clear(obj);\n this.removeObject(obj);\n }\n return this;\n }\n addFiles(files) {\n var _a;\n const globalExclude = ((_a = this.conf.getGlobal().exclude) !== null && _a !== void 0 ? _a : [])\n .map(pattern => new RegExp(pattern, \"i\"));\n for (const f of files) {\n const filename = f.getFilename();\n const isNotAbapgitFile = filename.split(\".\").length <= 2;\n if (isNotAbapgitFile || excludeHelper_1.ExcludeHelper.isExcluded(filename, globalExclude)) {\n continue;\n }\n const found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n found.addFile(f);\n }\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.dependencies[f.getFilename().toUpperCase()] = true;\n }\n return this.addFiles(files);\n }\n addDependency(file) {\n this.dependencies[file.getFilename().toUpperCase()] = true;\n this.addFile(file);\n return this;\n }\n isDependency(obj) {\n const filename = obj.getFiles()[0].getFilename().toUpperCase();\n return this.dependencies[filename] === true;\n }\n isFileDependency(filename) {\n return this.dependencies[filename.toUpperCase()] === true;\n }\n // assumption: the file is already in the registry\n findObjectForFile(file) {\n const filename = file.getFilename();\n for (const obj of this.getObjects()) {\n for (const ofile of obj.getFiles()) {\n if (ofile.getFilename() === filename) {\n return obj;\n }\n }\n }\n return undefined;\n }\n // todo, this will be changed to async sometime\n findIssues(input) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(input);\n }\n // todo, this will be changed to async sometime\n findIssuesObject(iobj) {\n if (this.isDirty() === true) {\n this.parse();\n }\n return this.runRules(undefined, iobj);\n }\n // todo, this will be changed to async sometime\n parse() {\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n this.issues = [];\n for (const o of this.getObjects()) {\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run();\n return this;\n }\n async parseAsync(input) {\n var _a, _b;\n if (this.isDirty() === false) {\n return this;\n }\n ParsingPerformance.clear();\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(this.getObjectCount(false), \"Lexing and parsing\");\n this.issues = [];\n for (const o of this.getObjects()) {\n await ((_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Lexing and parsing(\" + this.conf.getVersion() + \") - \" + o.getType() + \" \" + o.getName()));\n this.parsePrivate(o);\n this.issues.push(...o.getParsingIssues());\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n ParsingPerformance.output();\n }\n new find_global_definitions_1.FindGlobalDefinitions(this).run(input === null || input === void 0 ? void 0 : input.progress);\n return this;\n }\n //////////////////////////////////////////\n // todo, refactor, this is a mess, see where-used, a lot of the code should be in this method instead\n parsePrivate(input) {\n const config = this.getConfig();\n const result = input.parse(config.getVersion(), config.getSyntaxSetttings().globalMacros, this);\n ParsingPerformance.push(input, result);\n }\n isDirty() {\n for (const o of this.getObjects()) {\n const dirty = o.isDirty();\n if (dirty === true) {\n return true;\n }\n }\n return false;\n }\n runRules(input, iobj) {\n var _a, _b, _c, _d, _e, _f;\n const rulePerformance = {};\n const issues = this.issues.slice(0);\n const objects = iobj ? [iobj] : this.getObjects();\n const rules = this.conf.getEnabledRules();\n const skipLogic = new skip_logic_1.SkipLogic(this);\n (_a = input === null || input === void 0 ? void 0 : input.progress) === null || _a === void 0 ? void 0 : _a.set(iobj ? 1 : this.getObjectCount(false), \"Run Syntax\");\n const check = [];\n for (const obj of objects) {\n (_b = input === null || input === void 0 ? void 0 : input.progress) === null || _b === void 0 ? void 0 : _b.tick(\"Run Syntax - \" + obj.getName());\n if (skipLogic.skip(obj) || this.isDependency(obj)) {\n continue;\n }\n if (obj instanceof _abap_object_1.ABAPObject) {\n new syntax_1.SyntaxLogic(this, obj).run();\n }\n check.push(obj);\n }\n (_c = input === null || input === void 0 ? void 0 : input.progress) === null || _c === void 0 ? void 0 : _c.set(rules.length, \"Initialize Rules\");\n for (const rule of rules) {\n (_d = input === null || input === void 0 ? void 0 : input.progress) === null || _d === void 0 ? void 0 : _d.tick(\"Initialize Rules - \" + rule.getMetadata().key);\n if (rule.initialize === undefined) {\n throw new Error(rule.getMetadata().key + \" missing initialize method\");\n }\n rule.initialize(this);\n rulePerformance[rule.getMetadata().key] = 0;\n }\n (_e = input === null || input === void 0 ? void 0 : input.progress) === null || _e === void 0 ? void 0 : _e.set(check.length, \"Finding Issues\");\n for (const obj of check) {\n (_f = input === null || input === void 0 ? void 0 : input.progress) === null || _f === void 0 ? void 0 : _f.tick(\"Finding Issues - \" + obj.getType() + \" \" + obj.getName());\n for (const rule of rules) {\n const before = Date.now();\n issues.push(...rule.run(obj));\n const runtime = Date.now() - before;\n rulePerformance[rule.getMetadata().key] = rulePerformance[rule.getMetadata().key] + runtime;\n }\n }\n if ((input === null || input === void 0 ? void 0 : input.outputPerformance) === true) {\n const perf = [];\n for (const p in rulePerformance) {\n if (rulePerformance[p] > 100) { // ignore rules if it takes less than 100ms\n perf.push({ name: p, time: rulePerformance[p] });\n }\n }\n perf.sort((a, b) => { return b.time - a.time; });\n for (const p of perf) {\n process.stderr.write(\"\\t\" + p.time + \"ms\\t\" + p.name + \"\\n\");\n }\n }\n return this.excludeIssues(issues);\n }\n excludeIssues(issues) {\n var _a;\n const ret = issues;\n const globalNoIssues = this.conf.getGlobal().noIssues || [];\n const globalNoIssuesPatterns = globalNoIssues.map(x => new RegExp(x, \"i\"));\n if (globalNoIssuesPatterns.length > 0) {\n for (let i = ret.length - 1; i >= 0; i--) {\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, globalNoIssuesPatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n // exclude issues, as now we know both the filename and issue key\n for (const rule of artifacts_rules_1.ArtifactsRules.getRules()) {\n const key = rule.getMetadata().key;\n const ruleExclude = (_a = this.conf.readByKey(key, \"exclude\")) !== null && _a !== void 0 ? _a : [];\n if (ruleExclude.length === 0) {\n continue;\n }\n const ruleExcludePatterns = ruleExclude.map(x => new RegExp(x, \"i\"));\n for (let i = ret.length - 1; i >= 0; i--) {\n if (ret[i].getKey() !== key) {\n continue;\n }\n const filename = ret[i].getFilename();\n if (excludeHelper_1.ExcludeHelper.isExcluded(filename, ruleExcludePatterns)) {\n ret.splice(i, 1);\n }\n }\n }\n return ret;\n }\n findOrCreate(name, type) {\n try {\n return this.find(name, type);\n }\n catch (_a) {\n const newName = name.toUpperCase();\n const newType = type ? type : \"UNKNOWN\";\n const add = artifacts_objects_1.ArtifactsObjects.newObject(newName, newType);\n if (this.objects[newName] === undefined) {\n this.objects[newName] = {};\n }\n this.objects[newName][newType] = add;\n if (this.objectsByType[newType] === undefined) {\n this.objectsByType[newType] = {};\n }\n this.objectsByType[newType][newName] = add;\n return add;\n }\n }\n removeObject(remove) {\n if (remove === undefined) {\n return;\n }\n if (this.objects[remove.getName()][remove.getType()] === undefined) {\n throw new Error(\"removeObject: object not found\");\n }\n if (Object.keys(this.objects[remove.getName()]).length === 1) {\n delete this.objects[remove.getName()];\n }\n else {\n delete this.objects[remove.getName()][remove.getType()];\n }\n if (Object.keys(this.objectsByType[remove.getType()]).length === 1) {\n delete this.objectsByType[remove.getType()];\n }\n else {\n delete this.objectsByType[remove.getType()][remove.getName()];\n }\n }\n find(name, type) {\n const searchType = type ? type : \"UNKNOWN\";\n const searchName = name.toUpperCase();\n if (this.objects[searchName] !== undefined\n && this.objects[searchName][searchType]) {\n return this.objects[searchName][searchType];\n }\n throw new Error(\"find: object not found, \" + type + \" \" + name);\n }\n}\nexports.Registry = Registry;\n//# sourceMappingURL=registry.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/registry.js?");
11229
11229
 
11230
11230
  /***/ }),
11231
11231
 
@@ -12116,7 +12116,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12116
12116
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12117
12117
 
12118
12118
  "use strict";
12119
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodOverwritesBuiltIn = exports.MethodOverwritesBuiltInConf = void 0;\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass MethodOverwritesBuiltInConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MethodOverwritesBuiltInConf = MethodOverwritesBuiltInConf;\r\nclass MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MethodOverwritesBuiltInConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"method_overwrites_builtin\",\r\n title: \"Method name overwrites builtin function\",\r\n shortDescription: `Checks Method names that overwrite builtin SAP functions`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let methods = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n methods = methods.concat(classDef.methods);\r\n }\r\n for (const intfDef of file.getInfo().listInterfaceDefinitions()) {\r\n methods = methods.concat(intfDef.methods);\r\n }\r\n const builtIn = new _builtin_1.BuiltIn();\r\n for (const method of methods) {\r\n if (builtIn.searchBuiltin(method.name.toUpperCase())) {\r\n const message = `Method name \"${method.name}\" overwrites built-in SAP function name`;\r\n issues.push(__1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MethodOverwritesBuiltIn = MethodOverwritesBuiltIn;\r\n//# sourceMappingURL=method_overwrites_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js?");
12119
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.MethodOverwritesBuiltIn = exports.MethodOverwritesBuiltInConf = void 0;\r\nconst __1 = __webpack_require__(/*! .. */ \"./node_modules/@abaplint/core/build/src/index.js\");\r\nconst _builtin_1 = __webpack_require__(/*! ../abap/5_syntax/_builtin */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_builtin.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass MethodOverwritesBuiltInConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.MethodOverwritesBuiltInConf = MethodOverwritesBuiltInConf;\r\nclass MethodOverwritesBuiltIn extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new MethodOverwritesBuiltInConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"method_overwrites_builtin\",\r\n title: \"Method name overwrites builtin function\",\r\n shortDescription: `Checks Method names that overwrite builtin SAP functions`,\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_752_index_htm/7.52/en-us/abenbuilt_in_functions_overview.htm\r\n\r\nhttps://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-obscuring-built-in-functions`,\r\n tags: [_irule_1.RuleTag.Naming, _irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n let methods = [];\r\n for (const classDef of file.getInfo().listClassDefinitions()) {\r\n methods = methods.concat(classDef.methods);\r\n }\r\n for (const intfDef of file.getInfo().listInterfaceDefinitions()) {\r\n methods = methods.concat(intfDef.methods);\r\n }\r\n const builtIn = new _builtin_1.BuiltIn();\r\n for (const method of methods) {\r\n if (builtIn.searchBuiltin(method.name.toUpperCase())) {\r\n const message = `Method name \"${method.name}\" overwrites built-in SAP function name`;\r\n issues.push(__1.Issue.atIdentifier(method.identifier, message, this.getMetadata().key));\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.MethodOverwritesBuiltIn = MethodOverwritesBuiltIn;\r\n//# sourceMappingURL=method_overwrites_builtin.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/method_overwrites_builtin.js?");
12120
12120
 
12121
12121
  /***/ }),
12122
12122
 
@@ -12336,7 +12336,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
12336
12336
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
12337
12337
 
12338
12338
  "use strict";
12339
- eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PragmaPlacement = exports.PragmaPlacementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass PragmaPlacementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PragmaPlacementConf = PragmaPlacementConf;\r\nclass PragmaPlacement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PragmaPlacementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"pragma_placement\",\r\n title: \"Pragma Placement\",\r\n shortDescription: `Place pragmas at end of statements`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n badExample: `DATA field ##NO_TEXT TYPE i.`,\r\n goodExample: `DATA field TYPE i ##NO_TEXT.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n if (s.getPragmas().length === 0) {\r\n continue;\r\n }\r\n for (const p of s.getPragmas()) {\r\n const children = s.getChildren();\r\n if (children.length === 1) {\r\n break; // empty statement with pragma\r\n }\r\n if (children[children.length - 2].getLastToken().getStart().isAfter(p.getStart())) {\r\n const message = \"Place pragma at end of statement\";\r\n const issue = issue_1.Issue.atStatement(file, s, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue; // max one finding per statement\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.PragmaPlacement = PragmaPlacement;\r\n//# sourceMappingURL=pragma_placement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/pragma_placement.js?");
12339
+ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.PragmaPlacement = exports.PragmaPlacementConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ \"./node_modules/@abaplint/core/build/src/rules/_abap_rule.js\");\r\nconst _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ \"./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nclass PragmaPlacementConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.PragmaPlacementConf = PragmaPlacementConf;\r\nclass PragmaPlacement extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new PragmaPlacementConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"pragma_placement\",\r\n title: \"Pragma Placement\",\r\n shortDescription: `Place pragmas at end of statements`,\r\n tags: [_irule_1.RuleTag.SingleFile],\r\n extendedInformation: `https://help.sap.com/doc/abapdocu_cp_index_htm/CLOUD/en-US/abenpragma.htm`,\r\n badExample: `DATA field ##NO_TEXT TYPE i.`,\r\n goodExample: `DATA field TYPE i ##NO_TEXT.`,\r\n };\r\n }\r\n getConfig() {\r\n return this.conf;\r\n }\r\n setConfig(conf) {\r\n this.conf = conf;\r\n }\r\n runParsed(file) {\r\n const issues = [];\r\n for (const s of file.getStatements()) {\r\n if (s.getPragmas().length === 0) {\r\n continue;\r\n }\r\n for (const p of s.getPragmas()) {\r\n const children = s.getChildren();\r\n if (children.length === 1) {\r\n break; // empty statement with pragma\r\n }\r\n if (children[children.length - 2].getLastToken().getStart().isAfter(p.getStart())) {\r\n const message = \"Place pragma at end of statement\";\r\n const issue = issue_1.Issue.atToken(file, p, message, this.getMetadata().key, this.conf.severity);\r\n issues.push(issue);\r\n continue; // max one finding per statement\r\n }\r\n }\r\n }\r\n return issues;\r\n }\r\n}\r\nexports.PragmaPlacement = PragmaPlacement;\r\n//# sourceMappingURL=pragma_placement.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/pragma_placement.js?");
12340
12340
 
12341
12341
  /***/ }),
12342
12342
 
@@ -13016,7 +13016,7 @@ eval("\n\nconst util = __webpack_require__(/*! ./util */ \"./node_modules/fast-x
13016
13016
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
13017
13017
 
13018
13018
  "use strict";
13019
- eval("\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ \"./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js\");\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"&apos;\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \"&quot;\" }\n ],\n processEntities: true,\n stopNodes: []\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.suppressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.buildAttrPairStr = buildAttrPairStr;\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n val += this.processTextOrObjNode(item, key, level)\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction buildAttrPairStr(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjNode(result.val, key, result.attrStr, level);\n }\n}\n\nfunction buildObjectNode(val, key, attrStr, level) {\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n\n if (attrStr && val.indexOf('<') === -1) {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' +\n val +\n tagEndExp );\n } else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n }\n}\n\nfunction buildTextValNode(val, key, attrStr, level) {\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n\n if( textValue === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n }else{\n return (\n this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar );\n }\n}\n\nfunction replaceEntitiesValue(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; i<this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction buildEmptyTextNode(val, key, attrStr, level) {\n if( val === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n }else if (val !== '') { //empty\n return this.buildTextValNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; //PI tag\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; //normal\n }\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix)) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\nmodule.exports = Builder;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js?");
13019
+ eval("\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = __webpack_require__(/*! ./orderedJs2Xml */ \"./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js\");\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&amp;\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \"&gt;\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"&lt;\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"&apos;\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \"&quot;\" }\n ],\n processEntities: true,\n stopNodes: []\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n\n if (this.options.suppressEmptyNode) {\n this.buildTextNode = buildEmptyTextNode;\n this.buildObjNode = buildEmptyObjNode;\n } else {\n this.buildTextNode = buildTextValNode;\n this.buildObjNode = buildObjectNode;\n }\n\n this.buildTextValNode = buildTextValNode;\n this.buildObjectNode = buildObjectNode;\n\n this.replaceEntitiesValue = replaceEntitiesValue;\n this.buildAttrPairStr = buildAttrPairStr;\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node\n } else if (jObj[key] === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n val += this.processTextOrObjNode(item, key, level)\n } else {\n val += this.buildTextNode(item, key, '', level);\n }\n }\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nfunction buildAttrPairStr(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjNode(result.val, key, result.attrStr, level);\n }\n}\n\nfunction buildObjectNode(val, key, attrStr, level) {\n let tagEndExp = '</' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n\n if (attrStr && val.indexOf('<') === -1) {\n return ( this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n }\n}\n\nfunction buildTextValNode(val, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `<![CDATA[${val}]]>` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `<!--${val}-->` + this.newLine;\n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n } else{\n return (\n this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '</' + key + this.tagEndChar );\n }\n\n }\n}\n\nfunction replaceEntitiesValue(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; i<this.options.entities.length; i++) {\n const entity = this.options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n}\n\nfunction buildEmptyTextNode(val, key, attrStr, level) {\n if( val === '' && this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(this.options.suppressUnpairedNode){\n return this.indentate(level) + '<' + key + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + \"/\" + this.tagEndChar;\n }\n }else if (val !== '') { //empty\n return this.buildTextValNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; //PI tag\n else return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar; //normal\n }\n}\n\nfunction indentate(level) {\n return this.options.indentBy.repeat(level);\n}\n\nfunction isAttribute(name /*, options*/) {\n if (name.startsWith(this.options.attributeNamePrefix)) {\n return name.substr(this.attrPrefixLen);\n } else {\n return false;\n }\n}\n\nmodule.exports = Builder;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js?");
13020
13020
 
13021
13021
  /***/ }),
13022
13022
 
@@ -13026,7 +13026,7 @@ eval("\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = __we
13026
13026
  \**********************************************************************/
13027
13027
  /***/ ((module) => {
13028
13028
 
13029
- eval("const EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nfunction toXml(jArray, options){\n return arrToStr( jArray, options, \"\", 0);\n}\n\nfunction arrToStr(arr, options, jPath, level){\n let xmlStr = \"\";\n\n let indentation = \"\";\n if(options.format && options.indentBy.length > 0){//TODO: this logic can be avoided for each call\n indentation = EOL + \"\" + options.indentBy.repeat(level);\n }\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n let newJPath = \"\";\n if(jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if(tagName === options.textNodeName){\n let tagText = tagObj[tagName];\n if(!isStopNode(newJPath, options)){\n tagText = options.tagValueProcessor( tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n xmlStr += indentation + tagText;\n continue;\n }else if( tagName === options.cdataPropName){\n xmlStr += indentation + `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n continue;\n }else if( tagName === options.commentPropName){\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n continue;\n }else if( tagName[0] === \"?\"){\n const attStr = attr_to_str(tagObj[\":@\"], options);\n xmlStr += indentation + `<${tagName} ${tagObj[tagName][0][options.textNodeName]} ${attStr}?>`;\n continue;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n let tagStart = indentation + `<${tagName}${attStr}`;\n let tagValue = arrToStr(tagObj[tagName], options, newJPath, level + 1);\n if(options.unpairedTags.indexOf(tagName) !== -1){\n if(options.suppressUnpairedNode) xmlStr += tagStart + \">\"; \n else xmlStr += tagStart + \"/>\"; \n }else if( (!tagValue || tagValue.length === 0) && options.suppressEmptyNode){ \n xmlStr += tagStart + \"/>\"; \n }else{ \n //TODO: node with only text value should not parse the text value in next line\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>` ;\n }\n }\n \n return xmlStr;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n }\n\nfunction attr_to_str(attrMap, options){\n let attrStr = \"\";\n if(attrMap && !options.ignoreAttributes){\n for (let attr in attrMap){\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if(attrVal === true && options.suppressBooleanAttributes){\n attrStr+= ` ${attr.substr(options.attributeNamePrefix.length)}`;\n }else{\n attrStr+= ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options){\n jPath = jPath.substr(0,jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for(let index in options.stopNodes){\n if(options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\"+tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options){\n if(textValue && textValue.length > 0 && options.processEntities){\n for (let i=0; i< options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n }\nmodule.exports = toXml;\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js?");
13029
+ eval("const EOL = \"\\n\";\n\n/**\n * \n * @param {array} jArray \n * @param {any} options \n * @returns \n */\nfunction toXml(jArray, options){\n return arrToStr( jArray, options, \"\", 0);\n}\n\nfunction arrToStr(arr, options, jPath, level){\n let xmlStr = \"\";\n\n let indentation = \"\";\n if(options.format && options.indentBy.length > 0){//TODO: this logic can be avoided for each call\n indentation = EOL + \"\" + options.indentBy.repeat(level);\n }\n\n for (let i = 0; i < arr.length; i++) {\n const tagObj = arr[i];\n const tagName = propName(tagObj);\n let newJPath = \"\";\n if(jPath.length === 0) newJPath = tagName\n else newJPath = `${jPath}.${tagName}`;\n\n if(tagName === options.textNodeName){\n let tagText = tagObj[tagName];\n if(!isStopNode(newJPath, options)){\n tagText = options.tagValueProcessor( tagName, tagText);\n tagText = replaceEntitiesValue(tagText, options);\n }\n xmlStr += indentation + tagText;\n continue;\n }else if( tagName === options.cdataPropName){\n xmlStr += indentation + `<![CDATA[${tagObj[tagName][0][options.textNodeName]}]]>`;\n continue;\n }else if( tagName === options.commentPropName){\n xmlStr += indentation + `<!--${tagObj[tagName][0][options.textNodeName]}-->`;\n continue;\n }else if( tagName[0] === \"?\"){\n const attStr = attr_to_str(tagObj[\":@\"], options);\n const tempInd = tagName === \"?xml\" ? \"\" : indentation;\n let piTextNodeName = tagObj[tagName][0][options.textNodeName];\n piTextNodeName = piTextNodeName.length !== 0 ? \" \" + piTextNodeName : \"\"; //remove extra spacing\n xmlStr += tempInd + `<${tagName}${piTextNodeName}${attStr}?>`;\n continue;\n }\n const attStr = attr_to_str(tagObj[\":@\"], options);\n let tagStart = indentation + `<${tagName}${attStr}`;\n let tagValue = arrToStr(tagObj[tagName], options, newJPath, level + 1);\n if(options.unpairedTags.indexOf(tagName) !== -1){\n if(options.suppressUnpairedNode) xmlStr += tagStart + \">\"; \n else xmlStr += tagStart + \"/>\"; \n }else if( (!tagValue || tagValue.length === 0) && options.suppressEmptyNode){ \n xmlStr += tagStart + \"/>\"; \n }else{ \n //TODO: node with only text value should not parse the text value in next line\n xmlStr += tagStart + `>${tagValue}${indentation}</${tagName}>` ;\n }\n }\n \n return xmlStr;\n}\n\nfunction propName(obj){\n const keys = Object.keys(obj);\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if(key !== \":@\") return key;\n }\n }\n\nfunction attr_to_str(attrMap, options){\n let attrStr = \"\";\n if(attrMap && !options.ignoreAttributes){\n for (let attr in attrMap){\n let attrVal = options.attributeValueProcessor(attr, attrMap[attr]);\n attrVal = replaceEntitiesValue(attrVal, options);\n if(attrVal === true && options.suppressBooleanAttributes){\n attrStr+= ` ${attr.substr(options.attributeNamePrefix.length)}`;\n }else{\n attrStr+= ` ${attr.substr(options.attributeNamePrefix.length)}=\"${attrVal}\"`;\n }\n }\n }\n return attrStr;\n}\n\nfunction isStopNode(jPath, options){\n jPath = jPath.substr(0,jPath.length - options.textNodeName.length - 1);\n let tagName = jPath.substr(jPath.lastIndexOf(\".\") + 1);\n for(let index in options.stopNodes){\n if(options.stopNodes[index] === jPath || options.stopNodes[index] === \"*.\"+tagName) return true;\n }\n return false;\n}\n\nfunction replaceEntitiesValue(textValue, options){\n if(textValue && textValue.length > 0 && options.processEntities){\n for (let i=0; i< options.entities.length; i++) {\n const entity = options.entities[i];\n textValue = textValue.replace(entity.regex, entity.val);\n }\n }\n return textValue;\n }\nmodule.exports = toXml;\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js?");
13030
13030
 
13031
13031
  /***/ }),
13032
13032
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.85.43",
3
+ "version": "2.85.44",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "homepage": "https://abaplint.org",
41
41
  "devDependencies": {
42
- "@abaplint/core": "^2.85.43",
42
+ "@abaplint/core": "^2.85.44",
43
43
  "@types/chai": "^4.3.0",
44
44
  "@types/glob": "^7.2.0",
45
45
  "@types/minimist": "^1.2.2",
@@ -48,12 +48,12 @@
48
48
  "@types/progress": "^2.0.5",
49
49
  "chai": "^4.3.6",
50
50
  "chalk": "^5.0.1",
51
- "eslint": "^8.10.0",
51
+ "eslint": "^8.11.0",
52
52
  "glob": "^7.2.0",
53
53
  "json5": "^2.2.0",
54
54
  "memfs": "^3.4.1",
55
55
  "minimist": "^1.2.5",
56
- "mocha": "^9.2.1",
56
+ "mocha": "^9.2.2",
57
57
  "progress": "^2.0.3",
58
58
  "typescript": "^4.6.2",
59
59
  "webpack": "^5.70.0",