@abaplint/cli 2.85.42 → 2.85.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cli.js +86 -139
- package/build/src/formatters/codeframe.js +4 -4
- package/package.json +3 -3
package/build/cli.js
CHANGED
|
@@ -82,7 +82,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
82
82
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
83
83
|
|
|
84
84
|
"use strict";
|
|
85
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CodeFrame = void 0;\r\nconst total_1 = __webpack_require__(/*! ./total */ \"./build/src/formatters/total.js\");\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst chalk_1 = __webpack_require__(/*! chalk */ \"./node_modules/chalk/source/index.js\");\r\nfunction issueSort(a, b) {\r\n return a.filename.localeCompare(b.filename)\r\n || (a.row - b.row)\r\n || (a.col - b.col);\r\n}\r\nclass CodeFrame {\r\n constructor() {\r\n this.currentFilename = \"\";\r\n this.currentFileLinesCount = 0;\r\n this.fileContent = [];\r\n }\r\n output(issues, fileCount) {\r\n const builtIssues = this.convertAllIssues(issues).sort(issueSort); // Make sure it is sorted by filename for caching to work\r\n return [\r\n ...builtIssues.map(i => this.renderIssue(i)),\r\n (issues.length > 0 ?
|
|
85
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CodeFrame = void 0;\r\nconst total_1 = __webpack_require__(/*! ./total */ \"./build/src/formatters/total.js\");\r\nconst fs = __webpack_require__(/*! fs */ \"fs\");\r\nconst chalk_1 = __webpack_require__(/*! chalk */ \"./node_modules/chalk/source/index.js\");\r\nfunction issueSort(a, b) {\r\n return a.filename.localeCompare(b.filename)\r\n || (a.row - b.row)\r\n || (a.col - b.col);\r\n}\r\nclass CodeFrame {\r\n constructor() {\r\n this.currentFilename = \"\";\r\n this.currentFileLinesCount = 0;\r\n this.fileContent = [];\r\n }\r\n output(issues, fileCount) {\r\n const builtIssues = this.convertAllIssues(issues).sort(issueSort); // Make sure it is sorted by filename for caching to work\r\n return [\r\n ...builtIssues.map(i => this.renderIssue(i)),\r\n (issues.length > 0 ? chalk_1.default.red(new total_1.Total().output(issues, fileCount)) : chalk_1.default.green(new total_1.Total().output(issues, fileCount))),\r\n ].join(\"\\n\");\r\n }\r\n convertAllIssues(issues) {\r\n return issues.map(i => this.convertIssue(i));\r\n }\r\n cacheFile(filename) {\r\n if (filename !== this.currentFilename) {\r\n this.currentFilename = filename;\r\n this.fileContent = fs.readFileSync(filename, \"utf8\").split(/\\r?\\n/);\r\n this.currentFileLinesCount = this.fileContent.length;\r\n }\r\n }\r\n renderIssue(issue) {\r\n this.cacheFile(issue.filename);\r\n const frameSize = 1;\r\n const lineFrom = Math.max(issue.row - frameSize, 1);\r\n const lineTo = Math.min(issue.row + frameSize, this.currentFileLinesCount);\r\n const issueLineIndex = issue.row - 1;\r\n const padSize = Math.ceil(Math.log10(lineTo)) + 4;\r\n const code = [];\r\n for (let lineIndex = lineFrom - 1; lineIndex < lineTo; lineIndex++) {\r\n const prefix = `${ /*(lineIndex === issueLineIndex) ? \">\" :*/\" \"}${lineIndex + 1} |`.padStart(padSize);\r\n code.push(prefix + this.fileContent[lineIndex]);\r\n if (lineIndex === issueLineIndex) {\r\n code.push(\"|\".padStart(padSize) + \" \".repeat(issue.col - 1) + \"^\");\r\n }\r\n }\r\n const severityStr = issue.severity === \"E\"\r\n ? chalk_1.default.red(issue.severity)\r\n : chalk_1.default.yellow(issue.severity);\r\n return `[${severityStr}] ${issue.description} (${issue.issueKey}) @ ${issue.location}`\r\n + \"\\n\"\r\n + code.map(str => chalk_1.default.grey(str)).join(\"\\n\")\r\n + \"\\n\";\r\n }\r\n renderLocation(issue) {\r\n return issue.getFilename() + \"[\" + issue.getStart().getRow() + \", \" + issue.getStart().getCol() + \"]\";\r\n }\r\n convertIssue(issue) {\r\n return {\r\n location: this.renderLocation(issue),\r\n description: issue.getMessage(),\r\n issueKey: issue.getKey(),\r\n filename: issue.getFilename(),\r\n severity: issue.getSeverity().toString().charAt(0),\r\n row: issue.getStart().getRow(),\r\n col: issue.getStart().getCol(),\r\n };\r\n }\r\n}\r\nexports.CodeFrame = CodeFrame;\r\n//# sourceMappingURL=codeframe.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./build/src/formatters/codeframe.js?");
|
|
86
86
|
|
|
87
87
|
/***/ }),
|
|
88
88
|
|
|
@@ -6396,7 +6396,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
6396
6396
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
6397
6397
|
|
|
6398
6398
|
"use strict";
|
|
6399
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPFileInformation = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ./_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ./visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ABAPFileInformation {\r\n constructor(structure, filename) {\r\n this.forms = [];\r\n this.implementations = [];\r\n this.interfaces = [];\r\n this.classes = [];\r\n this.filename = filename;\r\n this.parse(structure);\r\n }\r\n listClassImplementations() {\r\n return this.implementations;\r\n }\r\n listInterfaceDefinitions() {\r\n return this.interfaces;\r\n }\r\n getInterfaceDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const i of this.listInterfaceDefinitions()) {\r\n if (i.identifier.getName().toUpperCase() === upper) {\r\n return i;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listClassDefinitions() {\r\n return this.classes;\r\n }\r\n getClassDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const d of this.listClassDefinitions()) {\r\n if (d.identifier.getName().toUpperCase() === upper) {\r\n return d;\r\n }\r\n }\r\n return undefined;\r\n }\r\n getClassImplementationByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const impl of this.listClassImplementations()) {\r\n if (impl.identifier.getName().toUpperCase() === upper) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listFormDefinitions() {\r\n return this.forms;\r\n }\r\n ///////////////////////\r\n parse(structure) {\r\n var _a;\r\n if (structure === undefined) {\r\n return;\r\n }\r\n this.parseClasses(structure);\r\n this.parseInterfaces(structure);\r\n for (const found of structure.findAllStructures(Structures.ClassImplementation)) {\r\n const methods = [];\r\n for (const method of found.findAllStructures(Structures.Method)) {\r\n const methodName = (_a = method.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName) {\r\n methods.push(new _identifier_1.Identifier(methodName, this.filename));\r\n }\r\n }\r\n const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n this.implementations.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n methods,\r\n });\r\n }\r\n for (const statement of structure.findAllStructures(Structures.Form)) {\r\n // FORMs can contain a dash in the name\r\n const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();\r\n const name = statement.findFirstExpression(Expressions.FormName).concatTokens();\r\n const nameToken = new Tokens.Identifier(pos, name);\r\n this.forms.push({\r\n name: nameToken.getStr(),\r\n identifier: new _identifier_1.Identifier(nameToken, this.filename),\r\n });\r\n }\r\n }\r\n parseInterfaces(structure) {\r\n for (const found of structure.findDirectStructures(Structures.Interface)) {\r\n const i = found.findFirstStatement(Statements.Interface);\r\n if (i === undefined) {\r\n throw new Error(\"Interface expected, parseInterfaces\");\r\n }\r\n const interfaceName = i.findDirectExpression(Expressions.InterfaceName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found, visibility_1.Visibility.Public);\r\n const attributes = this.parseAttributes(found, visibility_1.Visibility.Public);\r\n const aliases = this.parseAliases(found, visibility_1.Visibility.Public);\r\n const constants = this.parseConstants(found, visibility_1.Visibility.Public);\r\n const g = i.findDirectExpression(Expressions.ClassGlobal);\r\n this.interfaces.push({\r\n name: interfaceName.getStr(),\r\n identifier: new _identifier_1.Identifier(interfaceName, this.filename),\r\n isLocal: g === undefined,\r\n isGlobal: g !== undefined,\r\n interfaces: this.getImplementing(found),\r\n aliases,\r\n methods,\r\n constants,\r\n attributes,\r\n });\r\n }\r\n }\r\n parseClasses(structure) {\r\n var _a;\r\n for (const found of structure.findAllStructures(Structures.ClassDefinition)) {\r\n const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const attributes = this.parseAttributes(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const aliases = this.parseAliases(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const constants = this.parseConstants(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const superClassName = (_a = found.findFirstExpression(Expressions.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n const containsGlobal = found.findFirstExpression(Expressions.ClassGlobal);\r\n const concat = found.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.classes.push({\r\n name: className.getStr(),\r\n identifier: new _identifier_1.Identifier(className, this.filename),\r\n isLocal: containsGlobal === undefined,\r\n isGlobal: containsGlobal !== undefined,\r\n methods,\r\n superClassName,\r\n interfaces: this.getImplementing(found),\r\n isForTesting: concat.includes(\" FOR TESTING\"),\r\n isAbstract: concat.includes(\" ABSTRACT\"),\r\n isFinal: found.findFirstExpression(Expressions.ClassFinal) !== undefined,\r\n aliases,\r\n attributes,\r\n constants,\r\n });\r\n }\r\n }\r\n ///////////////////\r\n getImplementing(input) {\r\n const ret = [];\r\n for (const node of input.findAllStatements(Statements.InterfaceDef)) {\r\n const abstract = node.findDirectExpression(Expressions.AbstractMethods);\r\n const abstractMethods = [];\r\n if (abstract) {\r\n for (const m of abstract.findDirectExpressions(Expressions.MethodName)) {\r\n abstractMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const final = node.findDirectExpression(Expressions.FinalMethods);\r\n const finalMethods = [];\r\n if (final) {\r\n for (const m of final.findDirectExpressions(Expressions.MethodName)) {\r\n finalMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n const allAbstract = concat.includes(\" ALL METHODS ABSTRACT\");\r\n const partial = concat.includes(\" PARTIALLY IMPLEMENTED\");\r\n const name = node.findFirstExpression(Expressions.InterfaceName).getFirstToken().getStr().toUpperCase();\r\n ret.push({\r\n name,\r\n partial,\r\n allAbstract,\r\n abstractMethods,\r\n finalMethods,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseAliases(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const a of node.findAllStatements(Statements.Aliases)) {\r\n const name = a.findFirstExpression(Expressions.SimpleName).getFirstToken();\r\n const comp = a.findFirstExpression(Expressions.Field).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n component: comp.getStr(),\r\n });\r\n }\r\n return ret;\r\n }\r\n parseConstants(node, visibility) {\r\n var _a, _b;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const results = [];\r\n for (const constant of node.findAllStatements(Statements.Constant)) {\r\n const name = constant.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n const typeName = constant.findFirstExpression(Expressions.TypeName);\r\n // VALUE `const_value` -> `const_value`\r\n const literal = (_b = (_a = constant.findFirstExpression(Expressions.Value)) === null || _a === void 0 ? void 0 : _a.getTokens()[1].getStr()) !== null && _b !== void 0 ? _b : \"``\";\r\n // `const_value` -> const_value\r\n const value = literal.slice(1, (literal === null || literal === void 0 ? void 0 : literal.length) - 1);\r\n results.push({\r\n name: name.getStr(),\r\n typeName: typeName ? typeName.getFirstToken().getStr() : \"\",\r\n value: value,\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n });\r\n }\r\n return results;\r\n }\r\n parseAttributes(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const contents = node.findFirstStructure(Structures.SectionContents);\r\n if (contents === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of contents.findDirectStatements(Statements.Data)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Instance,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.ClassData)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Static,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.Constant)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Constant,\r\n readOnly: true,\r\n visibility,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseMethodDefinition(node, visibility) {\r\n var _a;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const methods = [];\r\n for (const def of node.findAllStatements(Statements.MethodDef)) {\r\n const methodName = (_a = def.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName === undefined) {\r\n continue;\r\n }\r\n const parameters = this.parseMethodParameters(def);\r\n methods.push({\r\n name: methodName.getStr(),\r\n identifier: new _identifier_1.Identifier(methodName, this.filename),\r\n isRedefinition: def.findDirectExpression(Expressions.Redefinition) !== undefined,\r\n isForTesting: def.concatTokens().toUpperCase().includes(\" FOR TESTING\"),\r\n isAbstract: def.findDirectExpression(Expressions.Abstract) !== undefined,\r\n isEventHandler: def.findDirectExpression(Expressions.EventHandler) !== undefined,\r\n visibility,\r\n parameters,\r\n exceptions: [], // todo\r\n });\r\n }\r\n return methods;\r\n }\r\n // todo, refactor this method, it is too long\r\n parseMethodParameters(node) {\r\n var _a, _b, _c, _d;\r\n const ret = [];\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n for (const param of importing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_a = param.findDirectExpression(Expressions.MethodParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Importing,\r\n });\r\n }\r\n }\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n for (const param of exporting.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_b = param.findDirectExpression(Expressions.MethodParamName)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Exporting,\r\n });\r\n }\r\n }\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n for (const param of changing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_c = param.findDirectExpression(Expressions.MethodParamName)) === null || _c === void 0 ? void 0 : _c.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Changing,\r\n });\r\n }\r\n }\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n const name = (_d = returning.findDirectExpression(Expressions.MethodParamName)) === null || _d === void 0 ? void 0 : _d.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Returning,\r\n });\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ABAPFileInformation = ABAPFileInformation;\r\n//# sourceMappingURL=abap_file_information.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js?");
|
|
6399
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ABAPFileInformation = void 0;\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst _abap_file_information_1 = __webpack_require__(/*! ./_abap_file_information */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_abap_file_information.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ./_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst Tokens = __webpack_require__(/*! ../1_lexer/tokens */ \"./node_modules/@abaplint/core/build/src/abap/1_lexer/tokens/index.js\");\r\nconst visibility_1 = __webpack_require__(/*! ./visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nclass ABAPFileInformation {\r\n constructor(structure, filename) {\r\n this.forms = [];\r\n this.implementations = [];\r\n this.interfaces = [];\r\n this.classes = [];\r\n this.filename = filename;\r\n this.parse(structure);\r\n }\r\n listClassImplementations() {\r\n return this.implementations;\r\n }\r\n listInterfaceDefinitions() {\r\n return this.interfaces;\r\n }\r\n getInterfaceDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const i of this.listInterfaceDefinitions()) {\r\n if (i.identifier.getName().toUpperCase() === upper) {\r\n return i;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listClassDefinitions() {\r\n return this.classes;\r\n }\r\n getClassDefinitionByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const d of this.listClassDefinitions()) {\r\n if (d.identifier.getName().toUpperCase() === upper) {\r\n return d;\r\n }\r\n }\r\n return undefined;\r\n }\r\n getClassImplementationByName(name) {\r\n const upper = name.toUpperCase();\r\n for (const impl of this.listClassImplementations()) {\r\n if (impl.identifier.getName().toUpperCase() === upper) {\r\n return impl;\r\n }\r\n }\r\n return undefined;\r\n }\r\n listFormDefinitions() {\r\n return this.forms;\r\n }\r\n ///////////////////////\r\n parse(structure) {\r\n var _a;\r\n if (structure === undefined) {\r\n return;\r\n }\r\n this.parseClasses(structure);\r\n this.parseInterfaces(structure);\r\n for (const found of structure.findAllStructures(Structures.ClassImplementation)) {\r\n const methods = [];\r\n for (const method of found.findAllStructures(Structures.Method)) {\r\n const methodName = (_a = method.findFirstExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName) {\r\n methods.push(new _identifier_1.Identifier(methodName, this.filename));\r\n }\r\n }\r\n const name = found.findFirstStatement(Statements.ClassImplementation).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n this.implementations.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n methods,\r\n });\r\n }\r\n for (const statement of structure.findAllStructures(Structures.Form)) {\r\n // FORMs can contain a dash in the name\r\n const pos = statement.findFirstExpression(Expressions.FormName).getFirstToken().getStart();\r\n const name = statement.findFirstExpression(Expressions.FormName).concatTokens();\r\n const nameToken = new Tokens.Identifier(pos, name);\r\n this.forms.push({\r\n name: nameToken.getStr(),\r\n identifier: new _identifier_1.Identifier(nameToken, this.filename),\r\n });\r\n }\r\n }\r\n parseInterfaces(structure) {\r\n for (const found of structure.findDirectStructures(Structures.Interface)) {\r\n const i = found.findFirstStatement(Statements.Interface);\r\n if (i === undefined) {\r\n throw new Error(\"Interface expected, parseInterfaces\");\r\n }\r\n const interfaceName = i.findDirectExpression(Expressions.InterfaceName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found, visibility_1.Visibility.Public);\r\n const attributes = this.parseAttributes(found, visibility_1.Visibility.Public);\r\n const aliases = this.parseAliases(found, visibility_1.Visibility.Public);\r\n const constants = this.parseConstants(found, visibility_1.Visibility.Public);\r\n const g = i.findDirectExpression(Expressions.ClassGlobal);\r\n this.interfaces.push({\r\n name: interfaceName.getStr(),\r\n identifier: new _identifier_1.Identifier(interfaceName, this.filename),\r\n isLocal: g === undefined,\r\n isGlobal: g !== undefined,\r\n interfaces: this.getImplementing(found),\r\n aliases,\r\n methods,\r\n constants,\r\n attributes,\r\n });\r\n }\r\n }\r\n parseClasses(structure) {\r\n var _a;\r\n for (const found of structure.findAllStructures(Structures.ClassDefinition)) {\r\n const className = found.findFirstStatement(Statements.ClassDefinition).findFirstExpression(Expressions.ClassName).getFirstToken();\r\n const methods = this.parseMethodDefinition(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n methods.push(...this.parseMethodDefinition(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const attributes = this.parseAttributes(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n attributes.push(...this.parseAttributes(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const aliases = this.parseAliases(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n aliases.push(...this.parseAliases(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const constants = this.parseConstants(found.findFirstStructure(Structures.PublicSection), visibility_1.Visibility.Public);\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.ProtectedSection), visibility_1.Visibility.Protected));\r\n constants.push(...this.parseConstants(found.findFirstStructure(Structures.PrivateSection), visibility_1.Visibility.Private));\r\n const superClassName = (_a = found.findFirstExpression(Expressions.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n const containsGlobal = found.findFirstExpression(Expressions.ClassGlobal);\r\n const concat = found.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.classes.push({\r\n name: className.getStr(),\r\n identifier: new _identifier_1.Identifier(className, this.filename),\r\n isLocal: containsGlobal === undefined,\r\n isGlobal: containsGlobal !== undefined,\r\n methods,\r\n superClassName,\r\n interfaces: this.getImplementing(found),\r\n isForTesting: concat.includes(\" FOR TESTING\"),\r\n isAbstract: concat.includes(\" ABSTRACT\"),\r\n isSharedMemory: concat.includes(\" SHARED MEMORY ENABLED\"),\r\n isFinal: found.findFirstExpression(Expressions.ClassFinal) !== undefined,\r\n aliases,\r\n attributes,\r\n constants,\r\n });\r\n }\r\n }\r\n ///////////////////\r\n getImplementing(input) {\r\n const ret = [];\r\n for (const node of input.findAllStatements(Statements.InterfaceDef)) {\r\n const abstract = node.findDirectExpression(Expressions.AbstractMethods);\r\n const abstractMethods = [];\r\n if (abstract) {\r\n for (const m of abstract.findDirectExpressions(Expressions.MethodName)) {\r\n abstractMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const final = node.findDirectExpression(Expressions.FinalMethods);\r\n const finalMethods = [];\r\n if (final) {\r\n for (const m of final.findDirectExpressions(Expressions.MethodName)) {\r\n finalMethods.push(m.concatTokens().toUpperCase());\r\n }\r\n }\r\n const concat = node.concatTokens().toUpperCase();\r\n const allAbstract = concat.includes(\" ALL METHODS ABSTRACT\");\r\n const partial = concat.includes(\" PARTIALLY IMPLEMENTED\");\r\n const name = node.findFirstExpression(Expressions.InterfaceName).getFirstToken().getStr().toUpperCase();\r\n ret.push({\r\n name,\r\n partial,\r\n allAbstract,\r\n abstractMethods,\r\n finalMethods,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseAliases(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const a of node.findAllStatements(Statements.Aliases)) {\r\n const name = a.findFirstExpression(Expressions.SimpleName).getFirstToken();\r\n const comp = a.findFirstExpression(Expressions.Field).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n component: comp.getStr(),\r\n });\r\n }\r\n return ret;\r\n }\r\n parseConstants(node, visibility) {\r\n var _a, _b;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const results = [];\r\n for (const constant of node.findAllStatements(Statements.Constant)) {\r\n const name = constant.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n const typeName = constant.findFirstExpression(Expressions.TypeName);\r\n // VALUE `const_value` -> `const_value`\r\n const literal = (_b = (_a = constant.findFirstExpression(Expressions.Value)) === null || _a === void 0 ? void 0 : _a.getTokens()[1].getStr()) !== null && _b !== void 0 ? _b : \"``\";\r\n // `const_value` -> const_value\r\n const value = literal.slice(1, (literal === null || literal === void 0 ? void 0 : literal.length) - 1);\r\n results.push({\r\n name: name.getStr(),\r\n typeName: typeName ? typeName.getFirstToken().getStr() : \"\",\r\n value: value,\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n visibility,\r\n });\r\n }\r\n return results;\r\n }\r\n parseAttributes(node, visibility) {\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const contents = node.findFirstStructure(Structures.SectionContents);\r\n if (contents === undefined) {\r\n return [];\r\n }\r\n const ret = [];\r\n for (const d of contents.findDirectStatements(Statements.Data)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Instance,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.ClassData)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Static,\r\n readOnly: d.concatTokens().toUpperCase().includes(\" READ-ONLY\"),\r\n visibility,\r\n });\r\n }\r\n for (const d of contents.findDirectStatements(Statements.Constant)) {\r\n const name = d.findFirstExpression(Expressions.DefinitionName).getFirstToken();\r\n ret.push({\r\n name: name.getStr(),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n level: _abap_file_information_1.AttributeLevel.Constant,\r\n readOnly: true,\r\n visibility,\r\n });\r\n }\r\n return ret;\r\n }\r\n parseMethodDefinition(node, visibility) {\r\n var _a;\r\n if (node === undefined) {\r\n return [];\r\n }\r\n const methods = [];\r\n for (const def of node.findAllStatements(Statements.MethodDef)) {\r\n const methodName = (_a = def.findDirectExpression(Expressions.MethodName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (methodName === undefined) {\r\n continue;\r\n }\r\n const parameters = this.parseMethodParameters(def);\r\n methods.push({\r\n name: methodName.getStr(),\r\n identifier: new _identifier_1.Identifier(methodName, this.filename),\r\n isRedefinition: def.findDirectExpression(Expressions.Redefinition) !== undefined,\r\n isForTesting: def.concatTokens().toUpperCase().includes(\" FOR TESTING\"),\r\n isAbstract: def.findDirectExpression(Expressions.Abstract) !== undefined,\r\n isEventHandler: def.findDirectExpression(Expressions.EventHandler) !== undefined,\r\n visibility,\r\n parameters,\r\n exceptions: [], // todo\r\n });\r\n }\r\n return methods;\r\n }\r\n // todo, refactor this method, it is too long\r\n parseMethodParameters(node) {\r\n var _a, _b, _c, _d;\r\n const ret = [];\r\n const importing = node.findFirstExpression(Expressions.MethodDefImporting);\r\n if (importing) {\r\n for (const param of importing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_a = param.findDirectExpression(Expressions.MethodParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Importing,\r\n });\r\n }\r\n }\r\n }\r\n const exporting = node.findFirstExpression(Expressions.MethodDefExporting);\r\n if (exporting) {\r\n for (const param of exporting.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_b = param.findDirectExpression(Expressions.MethodParamName)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Exporting,\r\n });\r\n }\r\n }\r\n }\r\n const changing = node.findFirstExpression(Expressions.MethodDefChanging);\r\n if (changing) {\r\n for (const param of changing.findAllExpressions(Expressions.MethodParam)) {\r\n const name = (_c = param.findDirectExpression(Expressions.MethodParamName)) === null || _c === void 0 ? void 0 : _c.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Changing,\r\n });\r\n }\r\n }\r\n }\r\n const returning = node.findFirstExpression(Expressions.MethodDefReturning);\r\n if (returning) {\r\n const name = (_d = returning.findDirectExpression(Expressions.MethodParamName)) === null || _d === void 0 ? void 0 : _d.getFirstToken();\r\n if (name) {\r\n ret.push({\r\n name: name.getStr().replace(\"!\", \"\"),\r\n identifier: new _identifier_1.Identifier(name, this.filename),\r\n direction: _abap_file_information_1.MethodParameterDirection.Returning,\r\n });\r\n }\r\n }\r\n return ret;\r\n }\r\n}\r\nexports.ABAPFileInformation = ABAPFileInformation;\r\n//# sourceMappingURL=abap_file_information.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/4_file_information/abap_file_information.js?");
|
|
6400
6400
|
|
|
6401
6401
|
/***/ }),
|
|
6402
6402
|
|
|
@@ -7276,7 +7276,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
7276
7276
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
7277
7277
|
|
|
7278
7278
|
"use strict";
|
|
7279
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Catch = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass Catch {\r\n runSyntax(node, scope, filename) {\r\n var _a, _b;\r\n for (const c of node.findDirectExpressions(Expressions.ClassName)) {\r\n const token = c.getFirstToken();\r\n const className = token.getStr();\r\n const found = scope.existsObject(className);\r\n if (found.found === true && found.id) {\r\n scope.addReference(token, found.id, found.type, filename);\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(className) === false) {\r\n const extra = { ooName: className, ooType: \"Void\" };\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, extra);\r\n }\r\n else {\r\n throw new Error(\"CATCH, unknown class \" + className);\r\n }\r\n }\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const firstClassName = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {\r\n const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const found = scope.existsObject(firstClassName);\r\n if (token && found.found === true && firstClassName && found.id) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token && scope.getDDIC().inErrorNamespace(firstClassName) === false) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token) {\r\n const message = \"Catch, could not determine type for \\\"\" + token.getStr() + \"\\\"\";\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n }\r\n else if (target) {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Catch = Catch;\r\n//# sourceMappingURL=catch.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js?");
|
|
7279
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.Catch = void 0;\r\nconst Expressions = __webpack_require__(/*! ../../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst _typed_identifier_1 = __webpack_require__(/*! ../../types/_typed_identifier */ \"./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js\");\r\nconst unknown_type_1 = __webpack_require__(/*! ../../types/basic/unknown_type */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js\");\r\nconst basic_1 = __webpack_require__(/*! ../../types/basic */ \"./node_modules/@abaplint/core/build/src/abap/types/basic/index.js\");\r\nconst target_1 = __webpack_require__(/*! ../expressions/target */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass Catch {\r\n runSyntax(node, scope, filename) {\r\n var _a, _b;\r\n const names = new Set();\r\n for (const c of node.findDirectExpressions(Expressions.ClassName)) {\r\n const token = c.getFirstToken();\r\n const className = token.getStr().toUpperCase();\r\n const found = scope.existsObject(className);\r\n if (found.found === true && found.id) {\r\n scope.addReference(token, found.id, found.type, filename);\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(className) === false) {\r\n const extra = { ooName: className, ooType: \"Void\" };\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, extra);\r\n }\r\n else {\r\n throw new Error(\"CATCH, unknown class \" + className);\r\n }\r\n if (names.has(className)) {\r\n throw new Error(\"Duplicate class name in CATCH: \" + className);\r\n }\r\n names.add(className);\r\n }\r\n const target = node.findDirectExpression(Expressions.Target);\r\n const firstClassName = (_a = node.findDirectExpression(Expressions.ClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();\r\n if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {\r\n const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();\r\n const found = scope.existsObject(firstClassName);\r\n if (token && found.found === true && firstClassName && found.id) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token && scope.getDDIC().inErrorNamespace(firstClassName) === false) {\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n else if (token) {\r\n const message = \"Catch, could not determine type for \\\"\" + token.getStr() + \"\\\"\";\r\n const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), [\"inline\" /* InlineDefinition */]);\r\n scope.addIdentifier(identifier);\r\n scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);\r\n }\r\n }\r\n else if (target) {\r\n new target_1.Target().runSyntax(target, scope, filename);\r\n }\r\n }\r\n}\r\nexports.Catch = Catch;\r\n//# sourceMappingURL=catch.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/5_syntax/statements/catch.js?");
|
|
7280
7280
|
|
|
7281
7281
|
/***/ }),
|
|
7282
7282
|
|
|
@@ -9003,7 +9003,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
9003
9003
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
9004
9004
|
|
|
9005
9005
|
"use strict";
|
|
9006
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassDefinition = void 0;\r\nconst method_definitions_1 = __webpack_require__(/*! ./method_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst class_attributes_1 = __webpack_require__(/*! ./class_attributes */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst aliases_1 = __webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/types/aliases.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst event_definition_1 = __webpack_require__(/*! ./event_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/event_definition.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ClassDefinition extends _identifier_1.Identifier {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof Structures.ClassDefinition)) {\r\n throw new Error(\"ClassDefinition, unexpected node type\");\r\n }\r\n const def = node.findFirstStatement(Statements.ClassDefinition);\r\n const name = def.findDirectExpression(Expressions.ClassName).getFirstToken();\r\n super(name, filename);\r\n scope.addClassDefinition(this);\r\n this.node = node;\r\n this.events = [];\r\n this.implementing = [];\r\n scope.push(_scope_type_1.ScopeType.ClassDefinition, name.getStr(), name.getStart(), filename);\r\n this.superClass = this.findSuper(def, filename, scope);\r\n this.friends = this.findFriends(def, filename, scope);\r\n this.parse(filename, scope);\r\n const helper = new _object_oriented_1.ObjectOriented(scope);\r\n helper.fromSuperClassesAndInterfaces(this);\r\n helper.addAliasedTypes(this.aliases);\r\n this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);\r\n this.types = this.attributes.getTypes();\r\n const events = this.node.findAllStatements(Statements.Events);\r\n for (const e of events) {\r\n this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public\r\n }\r\n this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\r\n scope.pop(node.getLastToken().getEnd());\r\n const concat = this.node.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.testing = concat.includes(\" FOR TESTING\");\r\n this.abstract = concat.includes(\" ABSTRACT\");\r\n }\r\n getFriends() {\r\n return this.friends;\r\n }\r\n getEvents() {\r\n return this.events;\r\n }\r\n getMethodDefinitions() {\r\n return this.methodDefs;\r\n }\r\n getTypeDefinitions() {\r\n return this.types;\r\n }\r\n getSuperClass() {\r\n return this.superClass;\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n isGlobal() {\r\n return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;\r\n }\r\n isFinal() {\r\n return this.node.findFirstExpression(Expressions.ClassFinal) !== undefined;\r\n }\r\n getImplementing() {\r\n return this.implementing;\r\n }\r\n getAliases() {\r\n return this.aliases;\r\n }\r\n isForTesting() {\r\n return this.testing;\r\n }\r\n isAbstract() {\r\n return this.abstract;\r\n }\r\n /*\r\n public getEvents() {\r\n }\r\n */\r\n ///////////////////\r\n findSuper(def, filename, scope) {\r\n var _a;\r\n const token = (_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(expressions_1.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n return name;\r\n }\r\n findFriends(def, filename, scope) {\r\n var _a;\r\n const result = [];\r\n for (const n of ((_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(Expressions.ClassFriends)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.ClassName)) || []) {\r\n const token = n.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token.getStr();\r\n result.push(name);\r\n }\r\n return result;\r\n }\r\n addReference(token, filename, scope) {\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n if (name) {\r\n const s = scope.findClassDefinition(name);\r\n if (s) {\r\n scope.addReference(token, s, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"CLAS\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename);\r\n }\r\n }\r\n }\r\n parse(filename, scope) {\r\n var _a;\r\n for (const node of this.node.findAllStatements(Statements.InterfaceDef)) {\r\n const partial = node.concatTokens().toUpperCase().includes(\" PARTIALLY IMPLEMENTED\");\r\n const token = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (token === undefined) {\r\n throw new Error(\"ClassDefinition, unable to find interface token\");\r\n }\r\n const name = token.getStr().toUpperCase();\r\n this.implementing.push({ name, partial });\r\n const intf = scope.findInterfaceDefinition(name);\r\n if (intf) {\r\n scope.addReference(token, intf, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n }\r\n this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);\r\n }\r\n}\r\nexports.ClassDefinition = ClassDefinition;\r\n//# sourceMappingURL=class_definition.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/class_definition.js?");
|
|
9006
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.ClassDefinition = void 0;\r\nconst method_definitions_1 = __webpack_require__(/*! ./method_definitions */ \"./node_modules/@abaplint/core/build/src/abap/types/method_definitions.js\");\r\nconst expressions_1 = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst Statements = __webpack_require__(/*! ../2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Structures = __webpack_require__(/*! ../3_structures/structures */ \"./node_modules/@abaplint/core/build/src/abap/3_structures/structures/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst class_attributes_1 = __webpack_require__(/*! ./class_attributes */ \"./node_modules/@abaplint/core/build/src/abap/types/class_attributes.js\");\r\nconst _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js\");\r\nconst aliases_1 = __webpack_require__(/*! ./aliases */ \"./node_modules/@abaplint/core/build/src/abap/types/aliases.js\");\r\nconst _scope_type_1 = __webpack_require__(/*! ../5_syntax/_scope_type */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js\");\r\nconst event_definition_1 = __webpack_require__(/*! ./event_definition */ \"./node_modules/@abaplint/core/build/src/abap/types/event_definition.js\");\r\nconst visibility_1 = __webpack_require__(/*! ../4_file_information/visibility */ \"./node_modules/@abaplint/core/build/src/abap/4_file_information/visibility.js\");\r\nconst _object_oriented_1 = __webpack_require__(/*! ../5_syntax/_object_oriented */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_object_oriented.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js\");\r\nclass ClassDefinition extends _identifier_1.Identifier {\r\n constructor(node, filename, scope) {\r\n if (!(node.get() instanceof Structures.ClassDefinition)) {\r\n throw new Error(\"ClassDefinition, unexpected node type\");\r\n }\r\n const def = node.findFirstStatement(Statements.ClassDefinition);\r\n const name = def.findDirectExpression(Expressions.ClassName).getFirstToken();\r\n super(name, filename);\r\n scope.addClassDefinition(this);\r\n this.node = node;\r\n this.events = [];\r\n this.implementing = [];\r\n scope.push(_scope_type_1.ScopeType.ClassDefinition, name.getStr(), name.getStart(), filename);\r\n this.superClass = this.findSuper(def, filename, scope);\r\n this.friends = this.findFriends(def, filename, scope);\r\n this.parse(filename, scope);\r\n const helper = new _object_oriented_1.ObjectOriented(scope);\r\n helper.fromSuperClassesAndInterfaces(this);\r\n helper.addAliasedTypes(this.aliases);\r\n this.attributes = new class_attributes_1.Attributes(this.node, this.filename, scope);\r\n this.types = this.attributes.getTypes();\r\n const events = this.node.findAllStatements(Statements.Events);\r\n for (const e of events) {\r\n this.events.push(new event_definition_1.EventDefinition(e, visibility_1.Visibility.Public, this.filename, scope)); // todo, all these are not Public\r\n }\r\n this.methodDefs = new method_definitions_1.MethodDefinitions(this.node, this.filename, scope);\r\n scope.pop(node.getLastToken().getEnd());\r\n const concat = this.node.findFirstStatement(Statements.ClassDefinition).concatTokens().toUpperCase();\r\n this.testing = concat.includes(\" FOR TESTING\");\r\n this.sharedMemory = concat.includes(\" SHARED MEMORY ENABLED\");\r\n this.abstract = concat.includes(\" ABSTRACT\");\r\n }\r\n getFriends() {\r\n return this.friends;\r\n }\r\n getEvents() {\r\n return this.events;\r\n }\r\n getMethodDefinitions() {\r\n return this.methodDefs;\r\n }\r\n getTypeDefinitions() {\r\n return this.types;\r\n }\r\n getSuperClass() {\r\n return this.superClass;\r\n }\r\n getAttributes() {\r\n return this.attributes;\r\n }\r\n isGlobal() {\r\n return this.node.findFirstExpression(Expressions.ClassGlobal) !== undefined;\r\n }\r\n isFinal() {\r\n return this.node.findFirstExpression(Expressions.ClassFinal) !== undefined;\r\n }\r\n getImplementing() {\r\n return this.implementing;\r\n }\r\n getAliases() {\r\n return this.aliases;\r\n }\r\n isForTesting() {\r\n return this.testing;\r\n }\r\n isAbstract() {\r\n return this.abstract;\r\n }\r\n isSharedMemory() {\r\n return this.sharedMemory;\r\n }\r\n /*\r\n public getEvents() {\r\n }\r\n */\r\n ///////////////////\r\n findSuper(def, filename, scope) {\r\n var _a;\r\n const token = (_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(expressions_1.SuperClassName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n return name;\r\n }\r\n findFriends(def, filename, scope) {\r\n var _a;\r\n const result = [];\r\n for (const n of ((_a = def === null || def === void 0 ? void 0 : def.findDirectExpression(Expressions.ClassFriends)) === null || _a === void 0 ? void 0 : _a.findDirectExpressions(Expressions.ClassName)) || []) {\r\n const token = n.getFirstToken();\r\n this.addReference(token, filename, scope);\r\n const name = token.getStr();\r\n result.push(name);\r\n }\r\n return result;\r\n }\r\n addReference(token, filename, scope) {\r\n const name = token === null || token === void 0 ? void 0 : token.getStr();\r\n if (name) {\r\n const s = scope.findClassDefinition(name);\r\n if (s) {\r\n scope.addReference(token, s, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"CLAS\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename);\r\n }\r\n }\r\n }\r\n parse(filename, scope) {\r\n var _a;\r\n for (const node of this.node.findAllStatements(Statements.InterfaceDef)) {\r\n const partial = node.concatTokens().toUpperCase().includes(\" PARTIALLY IMPLEMENTED\");\r\n const token = (_a = node.findFirstExpression(Expressions.InterfaceName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();\r\n if (token === undefined) {\r\n throw new Error(\"ClassDefinition, unable to find interface token\");\r\n }\r\n const name = token.getStr().toUpperCase();\r\n this.implementing.push({ name, partial });\r\n const intf = scope.findInterfaceDefinition(name);\r\n if (intf) {\r\n scope.addReference(token, intf, _reference_1.ReferenceType.ObjectOrientedReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else if (scope.getDDIC().inErrorNamespace(name) === false) {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedVoidReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n else {\r\n scope.addReference(token, undefined, _reference_1.ReferenceType.ObjectOrientedUnknownReference, filename, { ooName: name.toUpperCase(), ooType: \"INTF\" });\r\n }\r\n }\r\n this.aliases = new aliases_1.Aliases(this.node, this.filename, scope);\r\n }\r\n}\r\nexports.ClassDefinition = ClassDefinition;\r\n//# sourceMappingURL=class_definition.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/abap/types/class_definition.js?");
|
|
9007
9007
|
|
|
9008
9008
|
/***/ }),
|
|
9009
9009
|
|
|
@@ -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.42\";\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.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?");
|
|
11229
11229
|
|
|
11230
11230
|
/***/ }),
|
|
11231
11231
|
|
|
@@ -11588,7 +11588,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
11588
11588
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
11589
11589
|
|
|
11590
11590
|
"use strict";
|
|
11591
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CyclicOO = exports.CyclicOOConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.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_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nclass CyclicOOConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of object names to skip, must be full upper case name\r\n * @uniqueItems true\r\n */\r\n this.skip = [];\r\n }\r\n}\r\nexports.CyclicOOConf = CyclicOOConf;\r\nclass CyclicOO {\r\n constructor() {\r\n this.conf = new CyclicOOConf();\r\n this.edges = {};\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"cyclic_oo\",\r\n title: \"Cyclic OO\",\r\n shortDescription: `Finds cyclic OO references`,\r\n extendedInformation: `Runs for global INTF + CLAS objects`,\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 if (this.conf.skip === undefined) {\r\n this.conf.skip = [];\r\n }\r\n }\r\n initialize(reg) {\r\n this.reg = reg;\r\n this.edges = {};\r\n for (const obj of this.reg.getObjectsByType(\"CLAS\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof
|
|
11591
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.CyclicOO = exports.CyclicOOConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.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 objects_1 = __webpack_require__(/*! ../objects */ \"./node_modules/@abaplint/core/build/src/objects/index.js\");\r\nconst syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js\");\r\nconst _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ \"./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.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_object_1 = __webpack_require__(/*! ../objects/_abap_object */ \"./node_modules/@abaplint/core/build/src/objects/_abap_object.js\");\r\nclass CyclicOOConf extends _basic_rule_config_1.BasicRuleConfig {\r\n constructor() {\r\n super(...arguments);\r\n /** List of object names to skip, must be full upper case name\r\n * @uniqueItems true\r\n */\r\n this.skip = [];\r\n /** Skips shared memory enabled classes*/\r\n this.skipSharedMemory = true;\r\n }\r\n}\r\nexports.CyclicOOConf = CyclicOOConf;\r\nclass CyclicOO {\r\n constructor() {\r\n this.conf = new CyclicOOConf();\r\n this.edges = {};\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"cyclic_oo\",\r\n title: \"Cyclic OO\",\r\n shortDescription: `Finds cyclic OO references`,\r\n extendedInformation: `Runs for global INTF + CLAS objects`,\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 if (this.conf.skip === undefined) {\r\n this.conf.skip = [];\r\n }\r\n }\r\n initialize(reg) {\r\n var _a;\r\n this.reg = reg;\r\n this.edges = {};\r\n for (const obj of this.reg.getObjectsByType(\"CLAS\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof objects_1.Class)) {\r\n continue;\r\n }\r\n else if (this.conf.skip.indexOf(name) >= 0) {\r\n continue;\r\n }\r\n else if (this.conf.skipSharedMemory === true && ((_a = obj.getClassDefinition()) === null || _a === void 0 ? void 0 : _a.isSharedMemory) === true) {\r\n continue;\r\n }\r\n this.buildEdges(name, new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n for (const obj of this.reg.getObjectsByType(\"INTF\")) {\r\n const name = obj.getName().toUpperCase();\r\n if (!(obj instanceof _abap_object_1.ABAPObject)) {\r\n continue;\r\n }\r\n else if (this.conf.skip.indexOf(name) >= 0) {\r\n continue;\r\n }\r\n this.buildEdges(name, new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop());\r\n }\r\n return this;\r\n }\r\n run(obj) {\r\n if (!(obj instanceof objects_1.Interface) && !(obj instanceof objects_1.Class)) {\r\n return [];\r\n }\r\n const id = obj.getIdentifier();\r\n if (id === undefined) {\r\n return [];\r\n }\r\n const path = this.findCycle(obj.getName(), obj.getName(), [obj.getName()]);\r\n if (path) {\r\n const message = \"Cyclic definition/usage: \" + path;\r\n return [issue_1.Issue.atIdentifier(id, message, this.getMetadata().key, this.conf.severity)];\r\n }\r\n return [];\r\n }\r\n /////////////////////////////\r\n findCycle(source, current, previous) {\r\n if (this.edges[current] === undefined) {\r\n return undefined;\r\n }\r\n for (const e of this.edges[current]) {\r\n if (e === source) {\r\n return previous.join(\" -> \") + \" -> \" + source;\r\n }\r\n if (previous.indexOf(e) < 0) { // dont revisit vertices\r\n const found = this.findCycle(source, e, previous.concat([e]));\r\n if (found) {\r\n return found;\r\n }\r\n }\r\n }\r\n return undefined;\r\n }\r\n buildEdges(from, node) {\r\n var _a;\r\n for (const r of node.getData().references) {\r\n if (r.resolved === undefined\r\n || node.getIdentifier().filename === r.resolved.getFilename()\r\n || r.resolved.getFilename() === _builtin_1.BuiltIn.filename) {\r\n continue;\r\n }\r\n if (r.referenceType === _reference_1.ReferenceType.ObjectOrientedReference\r\n && ((_a = r.extra) === null || _a === void 0 ? void 0 : _a.ooName)) {\r\n if (this.edges[from] === undefined) {\r\n this.edges[from] = [];\r\n }\r\n const name = r.extra.ooName.toUpperCase();\r\n if (name !== from && this.edges[from].indexOf(name) < 0) {\r\n this.edges[from].push(name);\r\n }\r\n }\r\n }\r\n for (const c of node.getChildren()) {\r\n this.buildEdges(from, c);\r\n }\r\n }\r\n}\r\nexports.CyclicOO = CyclicOO;\r\n//# sourceMappingURL=cyclic_oo.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/cyclic_oo.js?");
|
|
11592
11592
|
|
|
11593
11593
|
/***/ }),
|
|
11594
11594
|
|
|
@@ -12798,7 +12798,7 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12798
12798
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
12799
12799
|
|
|
12800
12800
|
"use strict";
|
|
12801
|
-
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.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 expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\r\n\r\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued\r\n\r\nApplicable from v740sp02 and up`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\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, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
|
|
12801
|
+
eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\nexports.UseNew = exports.UseNewConf = void 0;\r\nconst issue_1 = __webpack_require__(/*! ../issue */ \"./node_modules/@abaplint/core/build/src/issue.js\");\r\nconst Statements = __webpack_require__(/*! ../abap/2_statements/statements */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js\");\r\nconst Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.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 expressions_1 = __webpack_require__(/*! ../abap/2_statements/expressions */ \"./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js\");\r\nconst version_1 = __webpack_require__(/*! ../version */ \"./node_modules/@abaplint/core/build/src/version.js\");\r\nconst _irule_1 = __webpack_require__(/*! ./_irule */ \"./node_modules/@abaplint/core/build/src/rules/_irule.js\");\r\nconst edit_helper_1 = __webpack_require__(/*! ../edit_helper */ \"./node_modules/@abaplint/core/build/src/edit_helper.js\");\r\nclass UseNewConf extends _basic_rule_config_1.BasicRuleConfig {\r\n}\r\nexports.UseNewConf = UseNewConf;\r\nclass UseNew extends _abap_rule_1.ABAPRule {\r\n constructor() {\r\n super(...arguments);\r\n this.conf = new UseNewConf();\r\n }\r\n getMetadata() {\r\n return {\r\n key: \"use_new\",\r\n title: \"Use NEW\",\r\n shortDescription: `Checks for deprecated CREATE OBJECT statements.`,\r\n extendedInformation: `https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-new-to-create-object\r\n\r\nIf the target variable is referenced in the CREATE OBJECT statement, no errors are issued\r\n\r\nApplicable from v740sp02 and up`,\r\n badExample: `CREATE OBJECT ref.`,\r\n goodExample: `ref = NEW #( ).`,\r\n tags: [_irule_1.RuleTag.Upport, _irule_1.RuleTag.Styleguide, _irule_1.RuleTag.Quickfix, _irule_1.RuleTag.SingleFile],\r\n };\r\n }\r\n getMessage() {\r\n return \"Use NEW #( ) to instantiate object.\";\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, obj) {\r\n var _a;\r\n const issues = [];\r\n if (obj.getType() === \"INTF\") {\r\n return [];\r\n }\r\n if (this.reg.getConfig().getVersion() < version_1.Version.v740sp02 && this.reg.getConfig().getVersion() !== version_1.Version.Cloud) {\r\n return [];\r\n }\r\n for (const statement of file.getStatements()) {\r\n if (statement.get() instanceof Statements.CreateObject) {\r\n if (statement.findFirstExpression(expressions_1.Dynamic)) {\r\n continue;\r\n }\r\n else if (statement.findDirectExpression(expressions_1.ParameterListExceptions)) {\r\n continue;\r\n }\r\n else if (statement.findDirectTokenByText(\"AREA\")) {\r\n continue;\r\n }\r\n const target = ((_a = statement.findDirectExpression(expressions_1.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens()) + \"->\";\r\n if (statement.concatTokens().includes(target)) {\r\n continue;\r\n }\r\n const fix = this.buildFix(file, statement);\r\n const issue = issue_1.Issue.atPosition(file, statement.getStart(), this.getMessage(), this.getMetadata().key, this.conf.severity, fix);\r\n issues.push(issue);\r\n }\r\n }\r\n return issues;\r\n }\r\n buildFix(file, statement) {\r\n var _a, _b;\r\n const target = (_a = statement.findDirectExpression(Expressions.Target)) === null || _a === void 0 ? void 0 : _a.concatTokens();\r\n if (target === undefined) {\r\n return undefined;\r\n }\r\n const parameters = statement.findDirectExpression(Expressions.ParameterListS);\r\n const param = parameters ? parameters.concatTokens() + \" \" : \"\";\r\n let type = (_b = statement.findDirectExpression(Expressions.ClassName)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();\r\n if (type === undefined) {\r\n type = \"#\";\r\n }\r\n const string = `${target} = NEW ${type}( ${param}).`;\r\n return edit_helper_1.EditHelper.replaceRange(file, statement.getStart(), statement.getEnd(), string);\r\n }\r\n}\r\nexports.UseNew = UseNew;\r\n//# sourceMappingURL=use_new.js.map\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/@abaplint/core/build/src/rules/use_new.js?");
|
|
12802
12802
|
|
|
12803
12803
|
/***/ }),
|
|
12804
12804
|
|
|
@@ -12945,17 +12945,6 @@ eval("\r\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\r\n
|
|
|
12945
12945
|
|
|
12946
12946
|
/***/ }),
|
|
12947
12947
|
|
|
12948
|
-
/***/ "./node_modules/ansi-styles/index.js":
|
|
12949
|
-
/*!*******************************************!*\
|
|
12950
|
-
!*** ./node_modules/ansi-styles/index.js ***!
|
|
12951
|
-
\*******************************************/
|
|
12952
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12953
|
-
|
|
12954
|
-
"use strict";
|
|
12955
|
-
eval("/* module decorator */ module = __webpack_require__.nmd(module);\n\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = __webpack_require__(/*! color-convert */ \"./node_modules/color-convert/index.js\");\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/ansi-styles/index.js?");
|
|
12956
|
-
|
|
12957
|
-
/***/ }),
|
|
12958
|
-
|
|
12959
12948
|
/***/ "./node_modules/balanced-match/index.js":
|
|
12960
12949
|
/*!**********************************************!*\
|
|
12961
12950
|
!*** ./node_modules/balanced-match/index.js ***!
|
|
@@ -12977,80 +12966,6 @@ eval("var concatMap = __webpack_require__(/*! concat-map */ \"./node_modules/con
|
|
|
12977
12966
|
|
|
12978
12967
|
/***/ }),
|
|
12979
12968
|
|
|
12980
|
-
/***/ "./node_modules/chalk/source/index.js":
|
|
12981
|
-
/*!********************************************!*\
|
|
12982
|
-
!*** ./node_modules/chalk/source/index.js ***!
|
|
12983
|
-
\********************************************/
|
|
12984
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
12985
|
-
|
|
12986
|
-
"use strict";
|
|
12987
|
-
eval("\nconst ansiStyles = __webpack_require__(/*! ansi-styles */ \"./node_modules/ansi-styles/index.js\");\nconst {stdout: stdoutColor, stderr: stderrColor} = __webpack_require__(/*! supports-color */ \"./node_modules/supports-color/index.js\");\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = __webpack_require__(/*! ./util */ \"./node_modules/chalk/source/util.js\");\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = __webpack_require__(/*! ./templates */ \"./node_modules/chalk/source/templates.js\");\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/index.js?");
|
|
12988
|
-
|
|
12989
|
-
/***/ }),
|
|
12990
|
-
|
|
12991
|
-
/***/ "./node_modules/chalk/source/templates.js":
|
|
12992
|
-
/*!************************************************!*\
|
|
12993
|
-
!*** ./node_modules/chalk/source/templates.js ***!
|
|
12994
|
-
\************************************************/
|
|
12995
|
-
/***/ ((module) => {
|
|
12996
|
-
|
|
12997
|
-
"use strict";
|
|
12998
|
-
eval("\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/templates.js?");
|
|
12999
|
-
|
|
13000
|
-
/***/ }),
|
|
13001
|
-
|
|
13002
|
-
/***/ "./node_modules/chalk/source/util.js":
|
|
13003
|
-
/*!*******************************************!*\
|
|
13004
|
-
!*** ./node_modules/chalk/source/util.js ***!
|
|
13005
|
-
\*******************************************/
|
|
13006
|
-
/***/ ((module) => {
|
|
13007
|
-
|
|
13008
|
-
"use strict";
|
|
13009
|
-
eval("\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/util.js?");
|
|
13010
|
-
|
|
13011
|
-
/***/ }),
|
|
13012
|
-
|
|
13013
|
-
/***/ "./node_modules/color-convert/conversions.js":
|
|
13014
|
-
/*!***************************************************!*\
|
|
13015
|
-
!*** ./node_modules/color-convert/conversions.js ***!
|
|
13016
|
-
\***************************************************/
|
|
13017
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13018
|
-
|
|
13019
|
-
eval("/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = __webpack_require__(/*! color-name */ \"./node_modules/color-name/index.js\");\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/conversions.js?");
|
|
13020
|
-
|
|
13021
|
-
/***/ }),
|
|
13022
|
-
|
|
13023
|
-
/***/ "./node_modules/color-convert/index.js":
|
|
13024
|
-
/*!*********************************************!*\
|
|
13025
|
-
!*** ./node_modules/color-convert/index.js ***!
|
|
13026
|
-
\*********************************************/
|
|
13027
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13028
|
-
|
|
13029
|
-
eval("const conversions = __webpack_require__(/*! ./conversions */ \"./node_modules/color-convert/conversions.js\");\nconst route = __webpack_require__(/*! ./route */ \"./node_modules/color-convert/route.js\");\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/index.js?");
|
|
13030
|
-
|
|
13031
|
-
/***/ }),
|
|
13032
|
-
|
|
13033
|
-
/***/ "./node_modules/color-convert/route.js":
|
|
13034
|
-
/*!*********************************************!*\
|
|
13035
|
-
!*** ./node_modules/color-convert/route.js ***!
|
|
13036
|
-
\*********************************************/
|
|
13037
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13038
|
-
|
|
13039
|
-
eval("const conversions = __webpack_require__(/*! ./conversions */ \"./node_modules/color-convert/conversions.js\");\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-convert/route.js?");
|
|
13040
|
-
|
|
13041
|
-
/***/ }),
|
|
13042
|
-
|
|
13043
|
-
/***/ "./node_modules/color-name/index.js":
|
|
13044
|
-
/*!******************************************!*\
|
|
13045
|
-
!*** ./node_modules/color-name/index.js ***!
|
|
13046
|
-
\******************************************/
|
|
13047
|
-
/***/ ((module) => {
|
|
13048
|
-
|
|
13049
|
-
"use strict";
|
|
13050
|
-
eval("\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/color-name/index.js?");
|
|
13051
|
-
|
|
13052
|
-
/***/ }),
|
|
13053
|
-
|
|
13054
12969
|
/***/ "./node_modules/concat-map/index.js":
|
|
13055
12970
|
/*!******************************************!*\
|
|
13056
12971
|
!*** ./node_modules/concat-map/index.js ***!
|
|
@@ -13228,17 +13143,6 @@ eval("module.exports = globSync\nglobSync.GlobSync = GlobSync\n\nvar rp = __webp
|
|
|
13228
13143
|
|
|
13229
13144
|
/***/ }),
|
|
13230
13145
|
|
|
13231
|
-
/***/ "./node_modules/has-flag/index.js":
|
|
13232
|
-
/*!****************************************!*\
|
|
13233
|
-
!*** ./node_modules/has-flag/index.js ***!
|
|
13234
|
-
\****************************************/
|
|
13235
|
-
/***/ ((module) => {
|
|
13236
|
-
|
|
13237
|
-
"use strict";
|
|
13238
|
-
eval("\n\nmodule.exports = (flag, argv = process.argv) => {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/has-flag/index.js?");
|
|
13239
|
-
|
|
13240
|
-
/***/ }),
|
|
13241
|
-
|
|
13242
13146
|
/***/ "./node_modules/inflight/inflight.js":
|
|
13243
13147
|
/*!*******************************************!*\
|
|
13244
13148
|
!*** ./node_modules/inflight/inflight.js ***!
|
|
@@ -13350,17 +13254,6 @@ eval("const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;\nconst numRegex = /^([\\-\\+])?(
|
|
|
13350
13254
|
|
|
13351
13255
|
/***/ }),
|
|
13352
13256
|
|
|
13353
|
-
/***/ "./node_modules/supports-color/index.js":
|
|
13354
|
-
/*!**********************************************!*\
|
|
13355
|
-
!*** ./node_modules/supports-color/index.js ***!
|
|
13356
|
-
\**********************************************/
|
|
13357
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
13358
|
-
|
|
13359
|
-
"use strict";
|
|
13360
|
-
eval("\nconst os = __webpack_require__(/*! os */ \"os\");\nconst tty = __webpack_require__(/*! tty */ \"tty\");\nconst hasFlag = __webpack_require__(/*! has-flag */ \"./node_modules/has-flag/index.js\");\n\nconst {env} = process;\n\nlet forceColor;\nif (hasFlag('no-color') ||\n\thasFlag('no-colors') ||\n\thasFlag('color=false') ||\n\thasFlag('color=never')) {\n\tforceColor = 0;\n} else if (hasFlag('color') ||\n\thasFlag('colors') ||\n\thasFlag('color=true') ||\n\thasFlag('color=always')) {\n\tforceColor = 1;\n}\n\nif ('FORCE_COLOR' in env) {\n\tif (env.FORCE_COLOR === 'true') {\n\t\tforceColor = 1;\n\t} else if (env.FORCE_COLOR === 'false') {\n\t\tforceColor = 0;\n\t} else {\n\t\tforceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3\n\t};\n}\n\nfunction supportsColor(haveStream, streamIsTTY) {\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (hasFlag('color=16m') ||\n\t\thasFlag('color=full') ||\n\t\thasFlag('color=truecolor')) {\n\t\treturn 3;\n\t}\n\n\tif (hasFlag('color=256')) {\n\t\treturn 2;\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = os.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10 &&\n\t\t\tNumber(osRelease[2]) >= 10586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction getSupportLevel(stream) {\n\tconst level = supportsColor(stream, stream && stream.isTTY);\n\treturn translateLevel(level);\n}\n\nmodule.exports = {\n\tsupportsColor: getSupportLevel,\n\tstdout: translateLevel(supportsColor(true, tty.isatty(1))),\n\tstderr: translateLevel(supportsColor(true, tty.isatty(2)))\n};\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/supports-color/index.js?");
|
|
13361
|
-
|
|
13362
|
-
/***/ }),
|
|
13363
|
-
|
|
13364
13257
|
/***/ "./node_modules/vscode-jsonrpc/lib/common/api.js":
|
|
13365
13258
|
/*!*******************************************************!*\
|
|
13366
13259
|
!*** ./node_modules/vscode-jsonrpc/lib/common/api.js ***!
|
|
@@ -13705,6 +13598,39 @@ module.exports = require("net");
|
|
|
13705
13598
|
|
|
13706
13599
|
/***/ }),
|
|
13707
13600
|
|
|
13601
|
+
/***/ "node:os":
|
|
13602
|
+
/*!**************************!*\
|
|
13603
|
+
!*** external "node:os" ***!
|
|
13604
|
+
\**************************/
|
|
13605
|
+
/***/ ((module) => {
|
|
13606
|
+
|
|
13607
|
+
"use strict";
|
|
13608
|
+
module.exports = require("node:os");
|
|
13609
|
+
|
|
13610
|
+
/***/ }),
|
|
13611
|
+
|
|
13612
|
+
/***/ "node:process":
|
|
13613
|
+
/*!*******************************!*\
|
|
13614
|
+
!*** external "node:process" ***!
|
|
13615
|
+
\*******************************/
|
|
13616
|
+
/***/ ((module) => {
|
|
13617
|
+
|
|
13618
|
+
"use strict";
|
|
13619
|
+
module.exports = require("node:process");
|
|
13620
|
+
|
|
13621
|
+
/***/ }),
|
|
13622
|
+
|
|
13623
|
+
/***/ "node:tty":
|
|
13624
|
+
/*!***************************!*\
|
|
13625
|
+
!*** external "node:tty" ***!
|
|
13626
|
+
\***************************/
|
|
13627
|
+
/***/ ((module) => {
|
|
13628
|
+
|
|
13629
|
+
"use strict";
|
|
13630
|
+
module.exports = require("node:tty");
|
|
13631
|
+
|
|
13632
|
+
/***/ }),
|
|
13633
|
+
|
|
13708
13634
|
/***/ "os":
|
|
13709
13635
|
/*!*********************!*\
|
|
13710
13636
|
!*** external "os" ***!
|
|
@@ -13749,17 +13675,6 @@ module.exports = require("string_decoder");
|
|
|
13749
13675
|
|
|
13750
13676
|
/***/ }),
|
|
13751
13677
|
|
|
13752
|
-
/***/ "tty":
|
|
13753
|
-
/*!**********************!*\
|
|
13754
|
-
!*** external "tty" ***!
|
|
13755
|
-
\**********************/
|
|
13756
|
-
/***/ ((module) => {
|
|
13757
|
-
|
|
13758
|
-
"use strict";
|
|
13759
|
-
module.exports = require("tty");
|
|
13760
|
-
|
|
13761
|
-
/***/ }),
|
|
13762
|
-
|
|
13763
13678
|
/***/ "util":
|
|
13764
13679
|
/*!***********************!*\
|
|
13765
13680
|
!*** external "util" ***!
|
|
@@ -13782,6 +13697,50 @@ module.exports = require("zlib");
|
|
|
13782
13697
|
|
|
13783
13698
|
/***/ }),
|
|
13784
13699
|
|
|
13700
|
+
/***/ "./node_modules/chalk/source/index.js":
|
|
13701
|
+
/*!********************************************!*\
|
|
13702
|
+
!*** ./node_modules/chalk/source/index.js ***!
|
|
13703
|
+
\********************************************/
|
|
13704
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13705
|
+
|
|
13706
|
+
"use strict";
|
|
13707
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"Chalk\": () => (/* binding */ Chalk),\n/* harmony export */ \"chalkStderr\": () => (/* binding */ chalkStderr),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ \"supportsColor\": () => (/* binding */ stdoutColor),\n/* harmony export */ \"supportsColorStderr\": () => (/* binding */ stderrColor)\n/* harmony export */ });\n/* harmony import */ var _ansi_styles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! #ansi-styles */ \"./node_modules/chalk/source/vendor/ansi-styles/index.js\");\n/* harmony import */ var _supports_color__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! #supports-color */ \"./node_modules/chalk/source/vendor/supports-color/index.js\");\n/* harmony import */ var _utilities_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utilities.js */ \"./node_modules/chalk/source/utilities.js\");\n\n\n\n\nconst {stdout: stdoutColor, stderr: stderrColor} = _supports_color__WEBPACK_IMPORTED_MODULE_1__[\"default\"];\n\nconst GENERATOR = Symbol('GENERATOR');\nconst STYLER = Symbol('STYLER');\nconst IS_EMPTY = Symbol('IS_EMPTY');\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m',\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass Chalk {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = (...strings) => strings.join(' ');\n\tapplyOptions(chalk, options);\n\n\tObject.setPrototypeOf(chalk, createChalk.prototype);\n\n\treturn chalk;\n};\n\nfunction createChalk(options) {\n\treturn chalkFactory(options);\n}\n\nObject.setPrototypeOf(createChalk.prototype, Function.prototype);\n\nfor (const [styleName, style] of Object.entries(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"])) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t},\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this[STYLER], true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t},\n};\n\nconst getModelAnsi = (model, level, type, ...arguments_) => {\n\tif (model === 'rgb') {\n\t\tif (level === 'ansi16m') {\n\t\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi16m(...arguments_);\n\t\t}\n\n\t\tif (level === 'ansi256') {\n\t\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi256(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rgbToAnsi256(...arguments_));\n\t\t}\n\n\t\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type].ansi(_ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].rgbToAnsi(...arguments_));\n\t}\n\n\tif (model === 'hex') {\n\t\treturn getModelAnsi('rgb', level, type, ..._ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].hexToRgb(...arguments_));\n\t}\n\n\treturn _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"][type][model](...arguments_);\n};\n\nconst usedModels = ['rgb', 'hex', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'color', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].color.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(getModelAnsi(model, levelMapping[level], 'bgColor', ...arguments_), _ansi_styles__WEBPACK_IMPORTED_MODULE_0__[\"default\"].bgColor.close, this[STYLER]);\n\t\t\t\treturn createBuilder(this, styler, this[IS_EMPTY]);\n\t\t\t};\n\t\t},\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this[GENERATOR].level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis[GENERATOR].level = level;\n\t\t},\n\t},\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent,\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\t// Single argument is hot path, implicit coercion is faster than anything\n\t// eslint-disable-next-line no-implicit-coercion\n\tconst builder = (...arguments_) => applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder[GENERATOR] = self;\n\tbuilder[STYLER] = _styler;\n\tbuilder[IS_EMPTY] = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self[IS_EMPTY] ? '' : string;\n\t}\n\n\tlet styler = self[STYLER];\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.includes('\\u001B')) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = (0,_utilities_js__WEBPACK_IMPORTED_MODULE_2__.stringReplaceAll)(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = (0,_utilities_js__WEBPACK_IMPORTED_MODULE_2__.stringEncaseCRLFWithFirstIndex)(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nObject.defineProperties(createChalk.prototype, styles);\n\nconst chalk = createChalk();\nconst chalkStderr = createChalk({level: stderrColor ? stderrColor.level : 0});\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chalk);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/index.js?");
|
|
13708
|
+
|
|
13709
|
+
/***/ }),
|
|
13710
|
+
|
|
13711
|
+
/***/ "./node_modules/chalk/source/utilities.js":
|
|
13712
|
+
/*!************************************************!*\
|
|
13713
|
+
!*** ./node_modules/chalk/source/utilities.js ***!
|
|
13714
|
+
\************************************************/
|
|
13715
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13716
|
+
|
|
13717
|
+
"use strict";
|
|
13718
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"stringEncaseCRLFWithFirstIndex\": () => (/* binding */ stringEncaseCRLFWithFirstIndex),\n/* harmony export */ \"stringReplaceAll\": () => (/* binding */ stringReplaceAll)\n/* harmony export */ });\n// TODO: When targeting Node.js 16, use `String.prototype.replaceAll`.\nfunction stringReplaceAll(string, substring, replacer) {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\nfunction stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.slice(endIndex);\n\treturn returnValue;\n}\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/utilities.js?");
|
|
13719
|
+
|
|
13720
|
+
/***/ }),
|
|
13721
|
+
|
|
13722
|
+
/***/ "./node_modules/chalk/source/vendor/ansi-styles/index.js":
|
|
13723
|
+
/*!***************************************************************!*\
|
|
13724
|
+
!*** ./node_modules/chalk/source/vendor/ansi-styles/index.js ***!
|
|
13725
|
+
\***************************************************************/
|
|
13726
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13727
|
+
|
|
13728
|
+
"use strict";
|
|
13729
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\nconst ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi16 = (offset = 0) => code => `\\u001B[${code + offset}m`;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\toverline: [53, 55],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29],\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39],\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49],\n\t\t},\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`,\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false,\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false,\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi = wrapAnsi16();\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16\n\t\t\t\t\t+ (36 * Math.round(red / 255 * 5))\n\t\t\t\t\t+ (6 * Math.round(green / 255 * 5))\n\t\t\t\t\t+ Math.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /(?<colorString>[a-f\\d]{6}|[a-f\\d]{3})/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet {colorString} = matches.groups;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = [...colorString].map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t/* eslint-disable no-bitwise */\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF,\n\t\t\t\t\t/* eslint-enable no-bitwise */\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t\tansi256ToAnsi: {\n\t\t\tvalue: code => {\n\t\t\t\tif (code < 8) {\n\t\t\t\t\treturn 30 + code;\n\t\t\t\t}\n\n\t\t\t\tif (code < 16) {\n\t\t\t\t\treturn 90 + (code - 8);\n\t\t\t\t}\n\n\t\t\t\tlet red;\n\t\t\t\tlet green;\n\t\t\t\tlet blue;\n\n\t\t\t\tif (code >= 232) {\n\t\t\t\t\tred = (((code - 232) * 10) + 8) / 255;\n\t\t\t\t\tgreen = red;\n\t\t\t\t\tblue = red;\n\t\t\t\t} else {\n\t\t\t\t\tcode -= 16;\n\n\t\t\t\t\tconst remainder = code % 36;\n\n\t\t\t\t\tred = Math.floor(code / 36) / 5;\n\t\t\t\t\tgreen = Math.floor(remainder / 6) / 5;\n\t\t\t\t\tblue = (remainder % 6) / 5;\n\t\t\t\t}\n\n\t\t\t\tconst value = Math.max(red, green, blue) * 2;\n\n\t\t\t\tif (value === 0) {\n\t\t\t\t\treturn 30;\n\t\t\t\t}\n\n\t\t\t\t// eslint-disable-next-line no-bitwise\n\t\t\t\tlet result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red));\n\n\t\t\t\tif (value === 2) {\n\t\t\t\t\tresult += 60;\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t},\n\t\trgbToAnsi: {\n\t\t\tvalue: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),\n\t\t\tenumerable: false,\n\t\t},\n\t\thexToAnsi: {\n\t\t\tvalue: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),\n\t\t\tenumerable: false,\n\t\t},\n\t});\n\n\treturn styles;\n}\n\nconst ansiStyles = assembleStyles();\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ansiStyles);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/vendor/ansi-styles/index.js?");
|
|
13730
|
+
|
|
13731
|
+
/***/ }),
|
|
13732
|
+
|
|
13733
|
+
/***/ "./node_modules/chalk/source/vendor/supports-color/index.js":
|
|
13734
|
+
/*!******************************************************************!*\
|
|
13735
|
+
!*** ./node_modules/chalk/source/vendor/supports-color/index.js ***!
|
|
13736
|
+
\******************************************************************/
|
|
13737
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
13738
|
+
|
|
13739
|
+
"use strict";
|
|
13740
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createSupportsColor\": () => (/* binding */ createSupportsColor),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var node_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! node:process */ \"node:process\");\n/* harmony import */ var node_os__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! node:os */ \"node:os\");\n/* harmony import */ var node_tty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! node:tty */ \"node:tty\");\n\n\n\n\n// From: https://github.com/sindresorhus/has-flag/blob/main/index.js\nfunction hasFlag(flag, argv = node_process__WEBPACK_IMPORTED_MODULE_0__.argv) {\n\tconst prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');\n\tconst position = argv.indexOf(prefix + flag);\n\tconst terminatorPosition = argv.indexOf('--');\n\treturn position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);\n}\n\nconst {env} = node_process__WEBPACK_IMPORTED_MODULE_0__;\n\nlet flagForceColor;\nif (\n\thasFlag('no-color')\n\t|| hasFlag('no-colors')\n\t|| hasFlag('color=false')\n\t|| hasFlag('color=never')\n) {\n\tflagForceColor = 0;\n} else if (\n\thasFlag('color')\n\t|| hasFlag('colors')\n\t|| hasFlag('color=true')\n\t|| hasFlag('color=always')\n) {\n\tflagForceColor = 1;\n}\n\nfunction envForceColor() {\n\tif ('FORCE_COLOR' in env) {\n\t\tif (env.FORCE_COLOR === 'true') {\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (env.FORCE_COLOR === 'false') {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);\n\t}\n}\n\nfunction translateLevel(level) {\n\tif (level === 0) {\n\t\treturn false;\n\t}\n\n\treturn {\n\t\tlevel,\n\t\thasBasic: true,\n\t\thas256: level >= 2,\n\t\thas16m: level >= 3,\n\t};\n}\n\nfunction _supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {\n\tconst noFlagForceColor = envForceColor();\n\tif (noFlagForceColor !== undefined) {\n\t\tflagForceColor = noFlagForceColor;\n\t}\n\n\tconst forceColor = sniffFlags ? flagForceColor : noFlagForceColor;\n\n\tif (forceColor === 0) {\n\t\treturn 0;\n\t}\n\n\tif (sniffFlags) {\n\t\tif (hasFlag('color=16m')\n\t\t\t|| hasFlag('color=full')\n\t\t\t|| hasFlag('color=truecolor')) {\n\t\t\treturn 3;\n\t\t}\n\n\t\tif (hasFlag('color=256')) {\n\t\t\treturn 2;\n\t\t}\n\t}\n\n\tif (haveStream && !streamIsTTY && forceColor === undefined) {\n\t\treturn 0;\n\t}\n\n\tconst min = forceColor || 0;\n\n\tif (env.TERM === 'dumb') {\n\t\treturn min;\n\t}\n\n\tif (node_process__WEBPACK_IMPORTED_MODULE_0__.platform === 'win32') {\n\t\t// Windows 10 build 10586 is the first Windows release that supports 256 colors.\n\t\t// Windows 10 build 14931 is the first release that supports 16m/TrueColor.\n\t\tconst osRelease = node_os__WEBPACK_IMPORTED_MODULE_1__.release().split('.');\n\t\tif (\n\t\t\tNumber(osRelease[0]) >= 10\n\t\t\t&& Number(osRelease[2]) >= 10_586\n\t\t) {\n\t\t\treturn Number(osRelease[2]) >= 14_931 ? 3 : 2;\n\t\t}\n\n\t\treturn 1;\n\t}\n\n\tif ('CI' in env) {\n\t\tif (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn min;\n\t}\n\n\tif ('TEAMCITY_VERSION' in env) {\n\t\treturn /^(9\\.(0*[1-9]\\d*)\\.|\\d{2,}\\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;\n\t}\n\n\t// Check for Azure DevOps pipelines\n\tif ('TF_BUILD' in env && 'AGENT_NAME' in env) {\n\t\treturn 1;\n\t}\n\n\tif (env.COLORTERM === 'truecolor') {\n\t\treturn 3;\n\t}\n\n\tif ('TERM_PROGRAM' in env) {\n\t\tconst version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);\n\n\t\tswitch (env.TERM_PROGRAM) {\n\t\t\tcase 'iTerm.app':\n\t\t\t\treturn version >= 3 ? 3 : 2;\n\t\t\tcase 'Apple_Terminal':\n\t\t\t\treturn 2;\n\t\t\t// No default\n\t\t}\n\t}\n\n\tif (/-256(color)?$/i.test(env.TERM)) {\n\t\treturn 2;\n\t}\n\n\tif (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {\n\t\treturn 1;\n\t}\n\n\tif ('COLORTERM' in env) {\n\t\treturn 1;\n\t}\n\n\treturn min;\n}\n\nfunction createSupportsColor(stream, options = {}) {\n\tconst level = _supportsColor(stream, {\n\t\tstreamIsTTY: stream && stream.isTTY,\n\t\t...options,\n\t});\n\n\treturn translateLevel(level);\n}\n\nconst supportsColor = {\n\tstdout: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(1)}),\n\tstderr: createSupportsColor({isTTY: node_tty__WEBPACK_IMPORTED_MODULE_2__.isatty(2)}),\n};\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (supportsColor);\n\n\n//# sourceURL=webpack://@abaplint/cli/./node_modules/chalk/source/vendor/supports-color/index.js?");
|
|
13741
|
+
|
|
13742
|
+
/***/ }),
|
|
13743
|
+
|
|
13785
13744
|
/***/ "./node_modules/json5/dist/index.mjs":
|
|
13786
13745
|
/*!*******************************************!*\
|
|
13787
13746
|
!*** ./node_modules/json5/dist/index.mjs ***!
|
|
@@ -13807,17 +13766,14 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
13807
13766
|
/******/ }
|
|
13808
13767
|
/******/ // Create a new module (and put it into the cache)
|
|
13809
13768
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
13810
|
-
/******/ id
|
|
13811
|
-
/******/ loaded
|
|
13769
|
+
/******/ // no module.id needed
|
|
13770
|
+
/******/ // no module.loaded needed
|
|
13812
13771
|
/******/ exports: {}
|
|
13813
13772
|
/******/ };
|
|
13814
13773
|
/******/
|
|
13815
13774
|
/******/ // Execute the module function
|
|
13816
13775
|
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
13817
13776
|
/******/
|
|
13818
|
-
/******/ // Flag the module as loaded
|
|
13819
|
-
/******/ module.loaded = true;
|
|
13820
|
-
/******/
|
|
13821
13777
|
/******/ // Return the exports of the module
|
|
13822
13778
|
/******/ return module.exports;
|
|
13823
13779
|
/******/ }
|
|
@@ -13851,15 +13807,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
13851
13807
|
/******/ };
|
|
13852
13808
|
/******/ })();
|
|
13853
13809
|
/******/
|
|
13854
|
-
/******/ /* webpack/runtime/node module decorator */
|
|
13855
|
-
/******/ (() => {
|
|
13856
|
-
/******/ __webpack_require__.nmd = (module) => {
|
|
13857
|
-
/******/ module.paths = [];
|
|
13858
|
-
/******/ if (!module.children) module.children = [];
|
|
13859
|
-
/******/ return module;
|
|
13860
|
-
/******/ };
|
|
13861
|
-
/******/ })();
|
|
13862
|
-
/******/
|
|
13863
13810
|
/************************************************************************/
|
|
13864
13811
|
/******/
|
|
13865
13812
|
/******/ // startup
|
|
@@ -19,7 +19,7 @@ class CodeFrame {
|
|
|
19
19
|
const builtIssues = this.convertAllIssues(issues).sort(issueSort); // Make sure it is sorted by filename for caching to work
|
|
20
20
|
return [
|
|
21
21
|
...builtIssues.map(i => this.renderIssue(i)),
|
|
22
|
-
(issues.length > 0 ?
|
|
22
|
+
(issues.length > 0 ? chalk_1.default.red(new total_1.Total().output(issues, fileCount)) : chalk_1.default.green(new total_1.Total().output(issues, fileCount))),
|
|
23
23
|
].join("\n");
|
|
24
24
|
}
|
|
25
25
|
convertAllIssues(issues) {
|
|
@@ -48,11 +48,11 @@ class CodeFrame {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
const severityStr = issue.severity === "E"
|
|
51
|
-
?
|
|
52
|
-
:
|
|
51
|
+
? chalk_1.default.red(issue.severity)
|
|
52
|
+
: chalk_1.default.yellow(issue.severity);
|
|
53
53
|
return `[${severityStr}] ${issue.description} (${issue.issueKey}) @ ${issue.location}`
|
|
54
54
|
+ "\n"
|
|
55
|
-
+ code.map(str =>
|
|
55
|
+
+ code.map(str => chalk_1.default.grey(str)).join("\n")
|
|
56
56
|
+ "\n";
|
|
57
57
|
}
|
|
58
58
|
renderLocation(issue) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/cli",
|
|
3
|
-
"version": "2.85.
|
|
3
|
+
"version": "2.85.43",
|
|
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.
|
|
42
|
+
"@abaplint/core": "^2.85.43",
|
|
43
43
|
"@types/chai": "^4.3.0",
|
|
44
44
|
"@types/glob": "^7.2.0",
|
|
45
45
|
"@types/minimist": "^1.2.2",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@types/node": "^17.0.21",
|
|
48
48
|
"@types/progress": "^2.0.5",
|
|
49
49
|
"chai": "^4.3.6",
|
|
50
|
-
"chalk": "
|
|
50
|
+
"chalk": "^5.0.1",
|
|
51
51
|
"eslint": "^8.10.0",
|
|
52
52
|
"glob": "^7.2.0",
|
|
53
53
|
"json5": "^2.2.0",
|