@abaplint/cli 2.97.14 → 2.97.15

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 +4 -4
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -4669,7 +4669,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
4669
4669
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
4670
4670
 
4671
4671
  "use strict";
4672
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodDef = void 0;\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nclass MethodDef {\n getMatcher() {\n const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"DEFAULT\", (0, combi_1.altPrio)(\"FAIL\", \"IGNORE\")));\n const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)(\"FINAL\", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\n const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), \"FOR TESTING\", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\n // todo, this is only from version something\n const tableFunction = (0, combi_1.seq)(\"TABLE FUNCTION\", (0, combi_1.regex)(/^\\w+?$/));\n // todo, this is only from version something\n const ddl = \"DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED\";\n const result = (0, combi_1.seq)(\"RESULT\", expressions_1.MethodParamName);\n const link = (0, combi_1.seq)(\"LINK\", expressions_1.MethodParamName);\n const full = (0, combi_1.seq)(\"FULL\", expressions_1.MethodParamName);\n const modify = (0, combi_1.alt)((0, combi_1.seq)(\"FOR ACTION\", expressions_1.TypeName, (0, combi_1.optPrio)(result)), (0, combi_1.seq)(\"FOR CREATE\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)(\"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"FOR UPDATE\", expressions_1.TypeName));\n const behavior = (0, combi_1.altPrio)((0, combi_1.seq)(\"VALIDATE ON SAVE IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, modify), (0, combi_1.seq)(\"READ IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)(\"FEATURES IMPORTING\", expressions_1.MethodParamName, \"REQUEST\", expressions_1.NamespaceSimpleName, \"FOR\", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)(\"BEHAVIOR IMPORTING\", expressions_1.MethodParamName, \"FOR CREATE\", expressions_1.TypeName, expressions_1.MethodParamName, \"FOR UPDATE\", expressions_1.TypeName, expressions_1.MethodParamName, \"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"BEHAVIOR IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)(\"BEHAVIOR\", \"LOCK\"), \"IMPORTING\", expressions_1.MethodParamName, \"FOR LOCK\", expressions_1.TypeName), (0, combi_1.seq)(\"DETERMINE\", (0, combi_1.alt)(\"ON MODIFY\", \"ON SAVE\"), \"IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"GLOBAL AUTHORIZATION IMPORTING REQUEST\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName, result));\n // todo, this is only from version something\n const amdp = (0, combi_1.seq)(\"AMDP OPTIONS CDS SESSION CLIENT CURRENT\", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));\n const ret = (0, combi_1.seq)((0, combi_1.altPrio)(\"CLASS-METHODS\", \"METHODS\"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)(\"FOR\", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, \"NOT AT END OF MODE\", (0, combi_1.optPrio)(expressions_1.Redefinition)));\n return ret;\n }\n}\nexports.MethodDef = MethodDef;\n//# sourceMappingURL=method_def.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js?");
4672
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.MethodDef = void 0;\nconst version_1 = __webpack_require__(/*! ../../../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nconst combi_1 = __webpack_require__(/*! ../combi */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/combi.js\");\nconst expressions_1 = __webpack_require__(/*! ../expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nclass MethodDef {\n getMatcher() {\n const def = (0, combi_1.ver)(version_1.Version.v740sp08, (0, combi_1.seq)(\"DEFAULT\", (0, combi_1.altPrio)(\"FAIL\", \"IGNORE\")));\n const parameters = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.altPrio)(\"FINAL\", def, expressions_1.Abstract)), (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefChanging), (0, combi_1.optPrio)(expressions_1.MethodDefReturning), (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\n const testing = (0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), \"FOR TESTING\", (0, combi_1.optPrio)((0, combi_1.altPrio)(expressions_1.MethodDefRaising, expressions_1.MethodDefExceptions)));\n // todo, this is only from version something\n const tableFunction = (0, combi_1.seq)(\"TABLE FUNCTION\", (0, combi_1.regex)(/^\\w+?$/));\n // todo, this is only from version something\n const ddl = \"DDL OBJECT OPTIONS CDS SESSION CLIENT REQUIRED\";\n const result = (0, combi_1.seq)(\"RESULT\", expressions_1.MethodParamName);\n const link = (0, combi_1.seq)(\"LINK\", expressions_1.MethodParamName);\n const full = (0, combi_1.seq)(\"FULL\", expressions_1.MethodParamName);\n const modify = (0, combi_1.alt)((0, combi_1.seq)(\"FOR ACTION\", expressions_1.TypeName, (0, combi_1.optPrio)(result)), (0, combi_1.seq)(\"FOR CREATE\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation)), (0, combi_1.seq)(\"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"FOR UPDATE\", expressions_1.TypeName));\n const behavior = (0, combi_1.altPrio)((0, combi_1.seq)(\"VALIDATE ON SAVE IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"MODIFY IMPORTING\", expressions_1.MethodParamName, modify), (0, combi_1.seq)(\"READ IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", (0, combi_1.alt)(expressions_1.TypeName, expressions_1.EntityAssociation), (0, combi_1.optPrio)(full), result, (0, combi_1.optPrio)(link)), (0, combi_1.seq)(\"FEATURES IMPORTING\", expressions_1.MethodParamName, \"REQUEST\", expressions_1.NamespaceSimpleName, \"FOR\", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)(\"BEHAVIOR IMPORTING\", expressions_1.MethodParamName, \"FOR CREATE\", expressions_1.TypeName, expressions_1.MethodParamName, \"FOR UPDATE\", expressions_1.TypeName, expressions_1.MethodParamName, \"FOR DELETE\", expressions_1.TypeName), (0, combi_1.seq)(\"BEHAVIOR IMPORTING\", expressions_1.MethodParamName, \"FOR READ\", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)(\"BEHAVIOR\", \"LOCK\"), \"IMPORTING\", expressions_1.MethodParamName, \"FOR LOCK\", expressions_1.TypeName), (0, combi_1.seq)(\"DETERMINE\", (0, combi_1.alt)(\"ON MODIFY\", \"ON SAVE\"), \"IMPORTING\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName), (0, combi_1.seq)(\"GLOBAL AUTHORIZATION IMPORTING REQUEST\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName, result), (0, combi_1.seq)(\"INSTANCE AUTHORIZATION IMPORTING\", expressions_1.MethodParamName, \"REQUEST\", expressions_1.MethodParamName, \"FOR\", expressions_1.TypeName, result));\n // todo, this is only from version something\n const amdp = (0, combi_1.seq)(\"AMDP OPTIONS CDS SESSION CLIENT CURRENT\", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));\n const ret = (0, combi_1.seq)((0, combi_1.altPrio)(\"CLASS-METHODS\", \"METHODS\"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)(\"FOR\", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, \"NOT AT END OF MODE\", (0, combi_1.optPrio)(expressions_1.Redefinition)));\n return ret;\n }\n}\nexports.MethodDef = MethodDef;\n//# sourceMappingURL=method_def.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/2_statements/statements/method_def.js?");
4673
4673
 
4674
4674
  /***/ }),
4675
4675
 
@@ -8079,7 +8079,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
8079
8079
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
8080
8080
 
8081
8081
  "use strict";
8082
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IncludeType = void 0;\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nclass IncludeType {\n runSyntax(node, scope, filename) {\n var _a, _b;\n const components = [];\n const iname = node.findFirstExpression(Expressions.TypeName);\n if (iname === undefined) {\n throw new Error(\"IncludeType, unexpected node structure\");\n }\n const name = iname.getFirstToken().getStr();\n let ityp = new basic_types_1.BasicTypes(filename, scope).parseType(iname);\n const as = (_a = node.findExpressionAfterToken(\"AS\")) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (as && ityp instanceof basic_1.StructureType) {\n ityp = new basic_1.StructureType(ityp.getComponents().concat([{ name: as, type: ityp }]));\n }\n const suffix = (_b = node.findExpressionAfterToken(\"SUFFIX\")) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (suffix && ityp instanceof basic_1.StructureType) {\n const components = [];\n for (const c of ityp.getComponents()) {\n if (c.name === as) {\n components.push(c);\n continue;\n }\n components.push({\n name: c.name + suffix,\n type: c.type,\n });\n }\n ityp = new basic_1.StructureType(components);\n }\n if (ityp\n && ityp instanceof _typed_identifier_1.TypedIdentifier\n && ityp.getType() instanceof basic_1.StructureType) {\n const stru = ityp.getType();\n components.push(...stru.getComponents());\n }\n else if (ityp && ityp instanceof basic_1.StructureType) {\n components.push(...ityp.getComponents());\n }\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\n return new basic_1.VoidType(name);\n }\n else {\n throw new Error(\"IncludeType, type not found \\\"\" + iname.concatTokens() + \"\\\"\");\n }\n return components;\n }\n}\nexports.IncludeType = IncludeType;\n//# sourceMappingURL=include_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js?");
8082
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.IncludeType = void 0;\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst basic_types_1 = __webpack_require__(/*! ../basic_types */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/basic_types.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nclass IncludeType {\n runSyntax(node, scope, filename) {\n var _a, _b;\n const components = [];\n const iname = node.findFirstExpression(Expressions.TypeName);\n if (iname === undefined) {\n throw new Error(\"IncludeType, unexpected node structure\");\n }\n const name = iname.getFirstToken().getStr();\n let ityp = new basic_types_1.BasicTypes(filename, scope).parseType(iname);\n const as = (_a = node.findExpressionAfterToken(\"AS\")) === null || _a === void 0 ? void 0 : _a.concatTokens();\n if (as && ityp instanceof basic_1.StructureType) {\n ityp = new basic_1.StructureType(ityp.getComponents().concat([{ name: as, type: ityp }]));\n }\n const suffix = (_b = node.findExpressionAfterToken(\"SUFFIX\")) === null || _b === void 0 ? void 0 : _b.concatTokens();\n if (suffix && ityp instanceof basic_1.StructureType) {\n const components = [];\n for (const c of ityp.getComponents()) {\n if (c.name === as) {\n components.push(c);\n continue;\n }\n components.push({\n name: c.name + suffix,\n type: c.type,\n });\n }\n ityp = new basic_1.StructureType(components);\n }\n if (ityp\n && ityp instanceof _typed_identifier_1.TypedIdentifier\n && ityp.getType() instanceof basic_1.StructureType) {\n const stru = ityp.getType();\n components.push(...stru.getComponents());\n }\n else if (ityp && ityp instanceof basic_1.StructureType) {\n components.push(...ityp.getComponents());\n }\n else if (ityp && ityp instanceof basic_1.VoidType) {\n return ityp;\n }\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\n return new basic_1.VoidType(name);\n }\n else {\n throw new Error(\"IncludeType, type not found \\\"\" + iname.concatTokens() + \"\\\"\");\n }\n return components;\n }\n}\nexports.IncludeType = IncludeType;\n//# sourceMappingURL=include_type.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/include_type.js?");
8083
8083
 
8084
8084
  /***/ }),
8085
8085
 
@@ -11632,7 +11632,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
11632
11632
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11633
11633
 
11634
11634
  "use strict";
11635
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Table = exports.TableCategory = exports.EnhancementCategory = void 0;\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nvar EnhancementCategory;\n(function (EnhancementCategory) {\n EnhancementCategory[\"NotClassified\"] = \"0\";\n EnhancementCategory[\"CannotBeEhanced\"] = \"1\";\n EnhancementCategory[\"Character\"] = \"2\";\n EnhancementCategory[\"CharacterOrNumeric\"] = \"3\";\n EnhancementCategory[\"Deep\"] = \"4\";\n})(EnhancementCategory = exports.EnhancementCategory || (exports.EnhancementCategory = {}));\nvar TableCategory;\n(function (TableCategory) {\n TableCategory[\"Transparent\"] = \"TRANSP\";\n TableCategory[\"Structure\"] = \"INTTAB\";\n TableCategory[\"Cluster\"] = \"CLUSTER\";\n TableCategory[\"Pooled\"] = \"POOL\";\n TableCategory[\"View\"] = \"VIEW\";\n TableCategory[\"Append\"] = \"APPEND\";\n})(TableCategory = exports.TableCategory || (exports.TableCategory = {}));\nclass Table extends _abstract_object_1.AbstractObject {\n getType() {\n return \"TABL\";\n }\n getDescription() {\n // todo\n return undefined;\n }\n getAllowedNaming() {\n let length = 30;\n if (this.getTableCategory() === TableCategory.Transparent) {\n length = 16;\n }\n return {\n maxLength: length,\n allowNamespace: true,\n };\n }\n setDirty() {\n this.parsedData = undefined;\n super.setDirty();\n }\n listKeys(reg) {\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n if (this.parsedData === undefined) {\n return [];\n }\n const ret = [];\n for (const p of this.parsedData.fields) {\n if (p.KEYFLAG === \"X\" && p.FIELDNAME === \".INCLUDE\") {\n const lookup = new ddic_1.DDIC(reg).lookupTableOrView(p.PRECFIELD).type;\n if (lookup instanceof Types.StructureType) {\n for (const c of lookup.getComponents()) {\n ret.push(c.name);\n }\n }\n }\n else if (p.KEYFLAG === \"X\") {\n ret.push(p.FIELDNAME);\n }\n }\n return ret;\n }\n parseType(reg) {\n var _a, _b;\n if (this.parsedData === undefined) {\n this.parseXML();\n if (this.parsedData === undefined) {\n return new Types.UnknownType(\"Table, parser error\");\n }\n }\n const references = [];\n const components = [];\n const ddic = new ddic_1.DDIC(reg);\n for (const field of this.parsedData.fields) {\n const comptype = field.COMPTYPE ? field.COMPTYPE : \"\";\n if (comptype === \"E\") { // data element\n const lookup = ddic.lookupDataElement(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.FIELDNAME === \".INCLUDE\" || field.FIELDNAME === \".INCLU--AP\") { // incude or append structure\n if (field.PRECFIELD === undefined) {\n return new Types.UnknownType(\"Table, parser error, PRECFIELD undefined\");\n }\n const lookup = ddic.lookupTableOrView(field.PRECFIELD);\n let found = lookup.type;\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\n found = found.getType();\n }\n if (found instanceof Types.StructureType) {\n if (field.GROUPNAME !== undefined) {\n components.push({ name: field.GROUPNAME, type: found });\n }\n for (const c of found.getComponents()) {\n components.push({ name: c.name, type: c.type });\n }\n }\n else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith(\"CI_\")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith(\"SI_\")))\n && found instanceof Types.UnknownType) {\n continue;\n }\n else if (found instanceof Types.UnknownType) {\n return found;\n }\n else if (found instanceof Types.VoidType) {\n // set the full structure to void\n return found;\n }\n else {\n components.push({ name: field.FIELDNAME, type: found });\n }\n }\n else if (comptype === \"S\" && field.FIELDNAME.startsWith(\".INCLU-\")) {\n const lookup = ddic.lookupTableOrView(field.PRECFIELD);\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n const found = lookup.type;\n if (found instanceof Types.VoidType) {\n // set the full structure to void\n return found;\n }\n else if (found instanceof Types.StructureType) {\n const suffix = field.FIELDNAME.split(\"-\")[1];\n for (const c of found.getComponents()) {\n components.push({ name: c.name + suffix, type: c.type });\n }\n }\n else if (found instanceof Types.UnknownType) {\n return found;\n }\n }\n else if (comptype === \"S\") {\n const lookup = ddic.lookupTableOrView(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (comptype === \"R\") {\n if (field.ROLLNAME === undefined) {\n throw new Error(\"Expected ROLLNAME\");\n }\n if (field.ROLLNAME === \"DATA\") {\n components.push({\n name: field.FIELDNAME,\n type: new basic_1.DataReference(new basic_1.AnyType())\n });\n }\n else if (field.ROLLNAME === \"OBJECT\") {\n components.push({\n name: field.FIELDNAME,\n type: new basic_1.GenericObjectReferenceType()\n });\n }\n else if (field.REFTYPE === \"S\") {\n const lookup = ddic.lookupTableOrView(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.REFTYPE === \"L\") {\n const lookup = ddic.lookupTableType(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.REFTYPE === \"E\") {\n const lookup = ddic.lookupDataElement(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else {\n const lookup = ddic.lookupObject(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n }\n else if (comptype === \"L\") {\n const lookup = ddic.lookupTableType(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (comptype === \"\") { // built in\n const datatype = field.DATATYPE;\n if (datatype === undefined) {\n throw new Error(\"Expected DATATYPE, while parsing TABL \" + this.getName());\n }\n const length = field.LENG ? field.LENG : field.INTLEN;\n components.push({\n name: field.FIELDNAME,\n type: ddic.textToType(datatype, length, field.DECIMALS, this.getName() + \"-\" + field.FIELDNAME)\n });\n }\n else {\n components.push({\n name: field.FIELDNAME,\n type: new Types.UnknownType(\"Table \" + this.getName() + \", unknown component type \\\"\" + comptype + \"\\\"\")\n });\n }\n if (field.CHECKTABLE) {\n const lookup = ddic.lookupTableOrView2(field.CHECKTABLE);\n if (lookup) {\n references.push({ object: lookup });\n }\n }\n }\n if (components.length === 0) {\n return new Types.UnknownType(\"Table/Structure \" + this.getName() + \" does not contain any components\");\n }\n reg.getDDICReferences().setUsing(this, references);\n return new Types.StructureType(components, this.getName(), this.getName());\n }\n getTableCategory() {\n var _a;\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.tableCategory;\n }\n getEnhancementCategory() {\n var _a;\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n if (((_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.enhancementCategory) === undefined) {\n return EnhancementCategory.NotClassified;\n }\n return this.parsedData.enhancementCategory;\n }\n ///////////////\n parseXML() {\n var _a, _b, _c, _d, _e, _f, _g;\n const parsed = super.parseRaw2();\n if (parsed === undefined) {\n return;\n }\n this.parsedData = { fields: [] };\n if (parsed.abapGit === undefined) {\n return;\n }\n // enhancement category\n if (((_b = (_a = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _a === void 0 ? void 0 : _a.DD02V) === null || _b === void 0 ? void 0 : _b.EXCLASS) === undefined) {\n this.parsedData.enhancementCategory = EnhancementCategory.NotClassified;\n }\n else {\n this.parsedData.enhancementCategory = (_d = (_c = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD02V) === null || _d === void 0 ? void 0 : _d.EXCLASS;\n }\n // table category\n this.parsedData.tableCategory = (_f = (_e = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _e === void 0 ? void 0 : _e.DD02V) === null || _f === void 0 ? void 0 : _f.TABCLASS;\n // fields\n const fields = (_g = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _g === void 0 ? void 0 : _g.DD03P_TABLE;\n for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD03P)) {\n this.parsedData.fields.push({\n FIELDNAME: field.FIELDNAME,\n ROLLNAME: field.ROLLNAME,\n COMPTYPE: field.COMPTYPE,\n PRECFIELD: field.PRECFIELD,\n LENG: field.LENG,\n INTLEN: field.INTLEN,\n DATATYPE: field.DATATYPE,\n DECIMALS: field.DECIMALS,\n KEYFLAG: field.KEYFLAG,\n GROUPNAME: field.GROUPNAME,\n CHECKTABLE: field.CHECKTABLE,\n REFTYPE: field.REFTYPE,\n });\n }\n }\n}\nexports.Table = Table;\n//# sourceMappingURL=table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/table.js?");
11635
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Table = exports.TableCategory = exports.EnhancementCategory = void 0;\nconst Types = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ \"./node_modules/@abaplint/core/build/src/objects/_abstract_object.js\");\nconst xml_utils_1 = __webpack_require__(/*! ../xml_utils */ \"./node_modules/@abaplint/core/build/src/xml_utils.js\");\nconst ddic_1 = __webpack_require__(/*! ../ddic */ \"./node_modules/@abaplint/core/build/src/ddic.js\");\nconst _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\nconst basic_1 = __webpack_require__(/*! ../abap/types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\nvar EnhancementCategory;\n(function (EnhancementCategory) {\n EnhancementCategory[\"NotClassified\"] = \"0\";\n EnhancementCategory[\"CannotBeEhanced\"] = \"1\";\n EnhancementCategory[\"Character\"] = \"2\";\n EnhancementCategory[\"CharacterOrNumeric\"] = \"3\";\n EnhancementCategory[\"Deep\"] = \"4\";\n})(EnhancementCategory = exports.EnhancementCategory || (exports.EnhancementCategory = {}));\nvar TableCategory;\n(function (TableCategory) {\n TableCategory[\"Transparent\"] = \"TRANSP\";\n TableCategory[\"Structure\"] = \"INTTAB\";\n TableCategory[\"Cluster\"] = \"CLUSTER\";\n TableCategory[\"Pooled\"] = \"POOL\";\n TableCategory[\"View\"] = \"VIEW\";\n TableCategory[\"Append\"] = \"APPEND\";\n})(TableCategory = exports.TableCategory || (exports.TableCategory = {}));\nclass Table extends _abstract_object_1.AbstractObject {\n getType() {\n return \"TABL\";\n }\n getDescription() {\n // todo\n return undefined;\n }\n getAllowedNaming() {\n let length = 30;\n if (this.getTableCategory() === TableCategory.Transparent) {\n length = 16;\n }\n return {\n maxLength: length,\n allowNamespace: true,\n };\n }\n setDirty() {\n this.parsedData = undefined;\n super.setDirty();\n }\n listKeys(reg) {\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n if (this.parsedData === undefined) {\n return [];\n }\n const ret = [];\n for (const p of this.parsedData.fields) {\n if (p.KEYFLAG === \"X\" && p.FIELDNAME === \".INCLUDE\") {\n const lookup = new ddic_1.DDIC(reg).lookupTableOrView(p.PRECFIELD).type;\n if (lookup instanceof Types.StructureType) {\n for (const c of lookup.getComponents()) {\n ret.push(c.name);\n }\n }\n }\n else if (p.KEYFLAG === \"X\") {\n ret.push(p.FIELDNAME);\n }\n }\n return ret;\n }\n parseType(reg) {\n var _a, _b;\n if (this.parsedData === undefined) {\n this.parseXML();\n if (this.parsedData === undefined) {\n return new Types.UnknownType(\"Table, parser error\");\n }\n }\n if (reg.getConfig().getVersion() === version_1.Version.Cloud\n && this.parsedData.dataClass === \"USER3\") {\n return new Types.UnknownType(\"Data class = USER3 not allowed in cloud\");\n }\n const references = [];\n const components = [];\n const ddic = new ddic_1.DDIC(reg);\n for (const field of this.parsedData.fields) {\n const comptype = field.COMPTYPE ? field.COMPTYPE : \"\";\n if (comptype === \"E\") { // data element\n const lookup = ddic.lookupDataElement(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.FIELDNAME === \".INCLUDE\" || field.FIELDNAME === \".INCLU--AP\") { // incude or append structure\n if (field.PRECFIELD === undefined) {\n return new Types.UnknownType(\"Table, parser error, PRECFIELD undefined\");\n }\n const lookup = ddic.lookupTableOrView(field.PRECFIELD);\n let found = lookup.type;\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n if (found instanceof _typed_identifier_1.TypedIdentifier) {\n found = found.getType();\n }\n if (found instanceof Types.StructureType) {\n if (field.GROUPNAME !== undefined) {\n components.push({ name: field.GROUPNAME, type: found });\n }\n for (const c of found.getComponents()) {\n components.push({ name: c.name, type: c.type });\n }\n }\n else if ((((_a = field.PRECFIELD) === null || _a === void 0 ? void 0 : _a.startsWith(\"CI_\")) || ((_b = field.PRECFIELD) === null || _b === void 0 ? void 0 : _b.startsWith(\"SI_\")))\n && found instanceof Types.UnknownType) {\n continue;\n }\n else if (found instanceof Types.UnknownType) {\n return found;\n }\n else if (found instanceof Types.VoidType) {\n // set the full structure to void\n return found;\n }\n else {\n components.push({ name: field.FIELDNAME, type: found });\n }\n }\n else if (comptype === \"S\" && field.FIELDNAME.startsWith(\".INCLU-\")) {\n const lookup = ddic.lookupTableOrView(field.PRECFIELD);\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n const found = lookup.type;\n if (found instanceof Types.VoidType) {\n // set the full structure to void\n return found;\n }\n else if (found instanceof Types.StructureType) {\n const suffix = field.FIELDNAME.split(\"-\")[1];\n for (const c of found.getComponents()) {\n components.push({ name: c.name + suffix, type: c.type });\n }\n }\n else if (found instanceof Types.UnknownType) {\n return found;\n }\n }\n else if (comptype === \"S\") {\n const lookup = ddic.lookupTableOrView(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (comptype === \"R\") {\n if (field.ROLLNAME === undefined) {\n throw new Error(\"Expected ROLLNAME\");\n }\n if (field.ROLLNAME === \"DATA\") {\n components.push({\n name: field.FIELDNAME,\n type: new basic_1.DataReference(new basic_1.AnyType())\n });\n }\n else if (field.ROLLNAME === \"OBJECT\") {\n components.push({\n name: field.FIELDNAME,\n type: new basic_1.GenericObjectReferenceType()\n });\n }\n else if (field.REFTYPE === \"S\") {\n const lookup = ddic.lookupTableOrView(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.REFTYPE === \"L\") {\n const lookup = ddic.lookupTableType(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (field.REFTYPE === \"E\") {\n const lookup = ddic.lookupDataElement(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else {\n const lookup = ddic.lookupObject(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n }\n else if (comptype === \"L\") {\n const lookup = ddic.lookupTableType(field.ROLLNAME);\n components.push({ name: field.FIELDNAME, type: lookup.type });\n if (lookup.object) {\n references.push({ object: lookup.object });\n }\n }\n else if (comptype === \"\") { // built in\n const datatype = field.DATATYPE;\n if (datatype === undefined) {\n throw new Error(\"Expected DATATYPE, while parsing TABL \" + this.getName());\n }\n const length = field.LENG ? field.LENG : field.INTLEN;\n components.push({\n name: field.FIELDNAME,\n type: ddic.textToType(datatype, length, field.DECIMALS, this.getName() + \"-\" + field.FIELDNAME)\n });\n }\n else {\n components.push({\n name: field.FIELDNAME,\n type: new Types.UnknownType(\"Table \" + this.getName() + \", unknown component type \\\"\" + comptype + \"\\\"\")\n });\n }\n if (field.CHECKTABLE) {\n const lookup = ddic.lookupTableOrView2(field.CHECKTABLE);\n if (lookup) {\n references.push({ object: lookup });\n }\n }\n }\n if (components.length === 0) {\n return new Types.UnknownType(\"Table/Structure \" + this.getName() + \" does not contain any components\");\n }\n reg.getDDICReferences().setUsing(this, references);\n return new Types.StructureType(components, this.getName(), this.getName());\n }\n getTableCategory() {\n var _a;\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n return (_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.tableCategory;\n }\n getEnhancementCategory() {\n var _a;\n if (this.parsedData === undefined) {\n this.parseXML();\n }\n if (((_a = this.parsedData) === null || _a === void 0 ? void 0 : _a.enhancementCategory) === undefined) {\n return EnhancementCategory.NotClassified;\n }\n return this.parsedData.enhancementCategory;\n }\n ///////////////\n parseXML() {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n const parsed = super.parseRaw2();\n if (parsed === undefined) {\n return;\n }\n this.parsedData = { fields: [] };\n if (parsed.abapGit === undefined) {\n return;\n }\n // enhancement category\n if (((_b = (_a = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _a === void 0 ? void 0 : _a.DD02V) === null || _b === void 0 ? void 0 : _b.EXCLASS) === undefined) {\n this.parsedData.enhancementCategory = EnhancementCategory.NotClassified;\n }\n else {\n this.parsedData.enhancementCategory = (_d = (_c = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _c === void 0 ? void 0 : _c.DD02V) === null || _d === void 0 ? void 0 : _d.EXCLASS;\n }\n // table category\n this.parsedData.tableCategory = (_f = (_e = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _e === void 0 ? void 0 : _e.DD02V) === null || _f === void 0 ? void 0 : _f.TABCLASS;\n this.parsedData.dataClass = (_h = (_g = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _g === void 0 ? void 0 : _g.DD09L) === null || _h === void 0 ? void 0 : _h.TABART;\n // fields\n const fields = (_j = parsed.abapGit[\"asx:abap\"][\"asx:values\"]) === null || _j === void 0 ? void 0 : _j.DD03P_TABLE;\n for (const field of (0, xml_utils_1.xmlToArray)(fields === null || fields === void 0 ? void 0 : fields.DD03P)) {\n this.parsedData.fields.push({\n FIELDNAME: field.FIELDNAME,\n ROLLNAME: field.ROLLNAME,\n COMPTYPE: field.COMPTYPE,\n PRECFIELD: field.PRECFIELD,\n LENG: field.LENG,\n INTLEN: field.INTLEN,\n DATATYPE: field.DATATYPE,\n DECIMALS: field.DECIMALS,\n KEYFLAG: field.KEYFLAG,\n GROUPNAME: field.GROUPNAME,\n CHECKTABLE: field.CHECKTABLE,\n REFTYPE: field.REFTYPE,\n });\n }\n }\n}\nexports.Table = Table;\n//# sourceMappingURL=table.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/objects/table.js?");
11636
11636
 
11637
11637
  /***/ }),
11638
11638
 
@@ -11841,7 +11841,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
11841
11841
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
11842
11842
 
11843
11843
  "use strict";
11844
- 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 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 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\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.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 this.dependencies = {};\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.97.14\";\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 // todo: performance? cache regexp?\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, dependency) {\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 let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === 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 new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), 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 new rules_runner_1.RulesRunner(this).runRules([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 for (const o of this.getObjects()) {\n this.parsePrivate(o);\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 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 }\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 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?");
11844
+ 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 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 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\");\nconst rules_runner_1 = __webpack_require__(/*! ./rules_runner */ \"./node_modules/@abaplint/core/build/src/rules_runner.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 this.dependencies = {};\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.97.15\";\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 // todo: performance? cache regexp?\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, dependency) {\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 let found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n if (dependency === false && found && this.isDependency(found)) {\n this.removeDependency(found);\n found = this.findOrCreate(f.getObjectName(), f.getObjectType());\n }\n found.addFile(f);\n }\n return this;\n }\n addFiles(files) {\n this._addFiles(files, false);\n return this;\n }\n addDependencies(files) {\n for (const f of files) {\n this.addDependency(f);\n }\n return this;\n }\n addDependency(file) {\n var _a;\n const type = (_a = file.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return this;\n }\n const name = file.getObjectName().toUpperCase();\n if (this.dependencies[type] === undefined) {\n this.dependencies[type] = {};\n }\n this.dependencies[type][name] = true;\n this._addFiles([file], true);\n return this;\n }\n removeDependency(obj) {\n var _a;\n (_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? true : delete _a[obj.getName()];\n this.removeObject(obj);\n }\n isDependency(obj) {\n var _a;\n return ((_a = this.dependencies[obj.getType()]) === null || _a === void 0 ? void 0 : _a[obj.getName()]) === true;\n }\n isFileDependency(filename) {\n var _a, _b;\n const f = this.getFileByName(filename);\n if (f === undefined) {\n return false;\n }\n const type = (_a = f.getObjectType()) === null || _a === void 0 ? void 0 : _a.toUpperCase();\n if (type === undefined) {\n return false;\n }\n const name = f.getObjectName().toUpperCase();\n return ((_b = this.dependencies[type]) === null || _b === void 0 ? void 0 : _b[name]) === 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 new rules_runner_1.RulesRunner(this).runRules(this.getObjects(), 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 new rules_runner_1.RulesRunner(this).runRules([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 for (const o of this.getObjects()) {\n this.parsePrivate(o);\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 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 }\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 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?");
11845
11845
 
11846
11846
  /***/ }),
11847
11847
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.97.14",
3
+ "version": "2.97.15",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "bin": {
6
6
  "abaplint": "./abaplint"
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "homepage": "https://abaplint.org",
39
39
  "devDependencies": {
40
- "@abaplint/core": "^2.97.14",
40
+ "@abaplint/core": "^2.97.15",
41
41
  "@types/chai": "^4.3.4",
42
42
  "@types/glob": "^7.2.0",
43
43
  "@types/minimist": "^1.2.2",