diff --git a/.github/workflows/analysis-of-endpoint-connections.yml b/.github/workflows/analysis-of-endpoint-connections.yml index a67ad36fde98..25849bddd012 100644 --- a/.github/workflows/analysis-of-endpoint-connections.yml +++ b/.github/workflows/analysis-of-endpoint-connections.yml @@ -1,36 +1,62 @@ -# As this GitHub Workflow currently fails for many valid pull requests, it is currently disabled. - -#name: Analysis-of-Endpoint-Connections -# -#on: -# pull_request: -# types: -# - opened -# - synchronize -# paths: -# - 'src/main/java/**' -# - 'src/main/webapp/**' -# -#jobs: -# analysis-of-endpoint-connections: -# timeout-minutes: 10 -# runs-on: ubuntu-latest -# steps: -# - name: Checkout code -# uses: actions/checkout@v4 -# with: -# fetch-depth: 0 -# -# - name: Get list of modified files -# run: | -# git diff --name-only origin/${{ github.event.pull_request.base.ref }} HEAD > modified_files.txt -# -# - name: Set up JDK 21 -# uses: actions/setup-java@v2 -# with: -# java-version: '21' -# distribution: 'adopt' -# -# - name: Run analysis-of-endpoint-connections -# run: | -# ./gradlew :supporting_scripts:analysis-of-endpoint-connections:run --args="$(cat modified_files.txt)" +on: + workflow_dispatch: + pull_request: + types: + - opened + - synchronize + paths: + - 'src/main/java/**' + - 'src/main/webapp/**' + +# Keep in sync with build.yml and test.yml and codeql-analysis.yml +env: + CI: true + node: 20 + java: 21 + +jobs: + analysis-of-endpoint-connections: + timeout-minutes: 10 + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get list of modified files + run: | + git diff --name-only origin/${{ github.event.pull_request.base.ref }} HEAD > modified_files.txt + + # Analyze the client sided REST-API calls + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '${{ env.node }}' + + - name: Install and compile TypeScript + run: | + cd supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/ + npm install + tsc -p tsconfig.analysisOfEndpointConnections.json + + - name: Run analysis-of-endpoint-connections-client + run: | + node supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.js + + - name: Upload JSON file + uses: actions/upload-artifact@v4 + with: + name: rest-calls-json + path: supporting_scripts/analysis-of-endpoint-connections/restCalls.json + + # Analyze the server sided endpoints + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '${{ env.java }}' + + - name: Run analysis-of-endpoint-connections + run: | + ./gradlew :supporting_scripts:analysis-of-endpoint-connections:run --args="$(cat modified_files.txt)" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7e331174d286..214a4a08e343 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,7 +31,7 @@ on: types: - created -# Keep in sync with codeql-analysis.yml and test.yml +# Keep in sync with codeql-analysis.yml and test.yml and analysis-of-endpoint-connections.yml env: CI: true node: 20 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 49f98bc74ad6..785d5f58fd7b 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -27,7 +27,7 @@ on: schedule: - cron: '0 16 * * 0' -# Keep in sync with build.yml and test.yml +# Keep in sync with build.yml and test.yml and analysis-of-endpoint-connections.yml env: CI: true node: 20 diff --git a/supporting_scripts/analysis-of-endpoint-connections/eslint.conjig.json b/supporting_scripts/analysis-of-endpoint-connections/eslint.conjig.json new file mode 100644 index 000000000000..0b47d7836035 --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/eslint.conjig.json @@ -0,0 +1,19 @@ +{ + "parser": "@typescript-eslint/parser", + "extends": [ + "plugin:@typescript-eslint/recommended" + ], + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": {}, + "settings": { + "react": { + "version": "detect" + } + } +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts new file mode 100644 index 000000000000..f774acfdc92b --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/AnalysisOfEndpointConnectionsClient.ts @@ -0,0 +1,49 @@ +import { readdirSync } from 'node:fs'; +import { join, resolve } from 'node:path'; +import { Preprocessor } from './Preprocessor'; +import { Postprocessor } from './Postprocessor'; +import { writeFileSync } from 'node:fs'; + +/** + * Recursively collects all TypeScript files in a directory. + * + * @param dir - The directory to search for TypeScript files. + * @param files - An array to store the collected TypeScript file paths. + * @returns An array of TypeScript file paths relative to 'src/main/webapp/app'. + */ +function collectTypeScriptFiles(dir: string, files: string[] = []) : string[] { + const entries = readdirSync(dir, { withFileTypes: true }); + for (const entry of entries) { + const fullPath = join(dir, entry.name); + + const filePathFromSrcFolder = fullPath.substring(fullPath.indexOf('src/main/webapp/app')); + if (entry.isDirectory()) { + collectTypeScriptFiles(fullPath, files); + } else if (entry.isFile() && entry.name.endsWith('.ts')) { + files.push(filePathFromSrcFolder); + } + } + return files; +} + +const clientDirPath = resolve('src/main/webapp/app'); + +const tsFiles = collectTypeScriptFiles(clientDirPath); + +// preprocess each file +tsFiles.forEach((filePath) => { + const preProcessor = new Preprocessor(filePath); + preProcessor.preprocessFile(); +}); + +// postprocess each file +tsFiles.forEach((filePath) => { + const postProcessor = new Postprocessor(filePath); + postProcessor.extractRestCalls(); +}); + +try { + writeFileSync('supporting_scripts/analysis-of-endpoint-connections/restCalls.json', JSON.stringify(Postprocessor.filesWithRestCalls, null, 2)); +} catch (error) { + console.error('Failed to write REST calls to file:', error); +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts new file mode 100644 index 000000000000..b90d216a9796 --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Postprocessor.ts @@ -0,0 +1,632 @@ +import {Preprocessor} from "./Preprocessor"; +import { simpleTraverse, TSESTree } from '@typescript-eslint/typescript-estree'; + +interface RestCall { + method: string; + url: string; + line: number; + fileName: string; +} + +enum ParsingResultType { + EVALUATE_TEMPLATE_LITERAL_SUCCESS, + EVALUATE_TEMPLATE_LITERAL_FAILURE, + EVALUATE_BINARY_EXPRESSION_SUCCESS, + EVALUATE_BINARY_EXPRESSION_FAILURE, + EVALUATE_MEMBER_EXPRESSION_SUCCESS, + EVALUATE_MEMBER_EXPRESSION_FAILURE, + GET_VARIABLE_FROM_METHOD_SUCCESS, + GET_VARIABLE_FROM_METHOD_FAILURE, + EVALUATE_URL_SUCCESS, + EVALUATE_URL_FAILURE, + GET_URLS_FROM_CALLING_METHODS_SUCCESS, + GET_URLS_FROM_CALLING_METHODS_FAILURE, + GET_URL_FROM_GETTER_SUCCESS, + GET_URL_FROM_GETTER_FAILURE, + + UNABLE_TO_EVALUATE, // no matching URL Parser is found +} + +class ParsingResult { + resultType: ParsingResultType; + result: string[]; + + constructor(resultType: ParsingResultType, result: string[]) { + this.resultType = resultType; + this.result = result; + } +} + +export class Postprocessor { + static filesWithRestCalls: { filePath: string, restCalls: RestCall[] }[] = []; + private readonly restCalls: RestCall[] = []; + private readonly filePath: string; + private readonly ast: TSESTree.Program; + + constructor(filePath: string) { + this.filePath = filePath; + this.ast = Preprocessor.parseTypeScriptFile(Preprocessor.pathPrefix + filePath) + } + + extractRestCalls() { + this.extractRestCallsFromProgram(); + } + + extractRestCallsFromProgram() { + this.ast.body.forEach(node => { + if (node.type === 'ExportNamedDeclaration' && node.declaration?.type === 'ClassDeclaration') { + this.extractRestCallsFromClassDeclaration(node.declaration); + } else if (node.type === 'ClassDeclaration') { + this.extractRestCallsFromClassDeclaration(node); + } + }); + if (this.restCalls.length > 0) { + Postprocessor.filesWithRestCalls.push( {filePath: this.filePath, restCalls: this.restCalls} ); + } + } + + /** + * Extracts REST calls from the program's AST. + * + * This method iterates over the top-level nodes in the AST and checks if they are class declarations. + * If a class declaration is found, it calls `extractRestCallsFromClassDeclaration` to process it. + * After processing all nodes, if any REST calls were found, it adds them to the static `filesWithRestCalls` array. + */ + extractRestCallsFromClassDeclaration(classBody: TSESTree.ClassDeclaration) { + for (const propertyDefinition of classBody.body.body) { + if (propertyDefinition.type === 'MethodDefinition' && propertyDefinition.key.type === 'Identifier') { + this.extractRestCallsFromMethodDefinition(propertyDefinition, classBody); + } + } + } + + /** + * Extracts REST calls from a method definition within a class declaration. + * + * This method traverses the AST of the provided method definition to identify HTTP client calls. + * It checks if the call expression is a member of an HTTP client and if the method name is one of the HTTP methods (GET, POST, PUT, DELETE, PATCH). + * If a valid HTTP call is found, it evaluates the URL and adds the REST call details to the `restCalls` array. + * + * @param methodDefinition - The AST node representing the method definition to extract REST calls from. + * @param classBody - The AST node representing the class declaration containing the method. + */ + extractRestCallsFromMethodDefinition(methodDefinition: TSESTree.MethodDefinition, classBody: TSESTree.ClassDeclaration) { + simpleTraverse(methodDefinition, { + enter: (node) => { + if (node.type === 'CallExpression') { + if (node.callee.type === 'MemberExpression' ) { + const calleeIsHttpClient = this.isCalleeHttpClient(node.callee); + + if (calleeIsHttpClient && (node.callee.object.type === 'Identifier' || node.callee.object.type === 'MemberExpression')) { + if (node.callee.property.type === 'Identifier') { + if (['get', 'post', 'put', 'delete', 'patch'].includes(node.callee.property.name)) { + const method = node.callee.property.name.toUpperCase(); + let urlEvaluationResult: ParsingResult = new ParsingResult(ParsingResultType.EVALUATE_URL_FAILURE, []); + const line = node.loc.start.line; + + if (node.arguments.length > 0) { + urlEvaluationResult = this.evaluateUrl(node.arguments[0], methodDefinition, node, classBody); + } + + const fileName = this.filePath; + if (urlEvaluationResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS) { + for (let url of urlEvaluationResult.result) { + this.restCalls.push({ method, url, line, fileName }); + } + } + } + } + } else { + return; + } + } + } + }, + }); + } + + /** + * Evaluates a given AST node to determine its URL value. + * + * This method takes an AST node and determines its URL value by delegating to helper methods + * based on the node type. It supports various node types such as Literal, TemplateLiteral, + * MemberExpression, Identifier, BinaryExpression, and CallExpression. + * + * @param node - The AST node to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the node. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateUrl(node: TSESTree.Node, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + switch (node.type) { + case 'Literal': + return this.evaluateLiteralHelper(node); + case 'TemplateLiteral': + return this.evaluateTemplateLiteralHelper(node, methodDefinition, restCall, classBody); + case 'MemberExpression': + return this.evaluateMemberExpressionHelper(node, classBody); + case 'Identifier': + return this.evaluateIdentifierHelper(node, methodDefinition, restCall, classBody); + case 'BinaryExpression': + return this.evaluateBinaryExpressionHelper(node, methodDefinition, restCall, classBody); + case 'CallExpression': + return this.evaluateCallExpressionHelper(node, classBody); + default: + return new ParsingResult(ParsingResultType.UNABLE_TO_EVALUATE, ['FAILED_TO_EVALUATE_URL']); + } + } + + /** + * Evaluates a literal AST node to determine its URL value. + * + * This method checks if the provided literal node has a value. If it does, it converts the value to a string + * and returns a ParsingResult indicating success. If the node does not have a value, it returns a ParsingResult + * indicating failure. + * + * @param node - The AST node representing the literal to evaluate. + * @returns A ParsingResult object containing the evaluation result and the URL if successful. + */ + evaluateLiteralHelper(node: TSESTree.Literal): ParsingResult { + if (node.value) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, [node.value.toString()]); + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_FAILURE, []); + } + + /** + * Evaluates a template literal AST node to determine its URL value. + * + * This method evaluates the provided template literal node by calling `evaluateTemplateLiteralExpression`. + * If the evaluation is successful, it returns a ParsingResult indicating success. + * If the evaluation is unable to determine the URL, it returns a ParsingResult indicating that. + * Otherwise, it returns a ParsingResult indicating failure. + * + * @param node - The AST node representing the template literal to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the node. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateTemplateLiteralHelper(node: TSESTree.TemplateLiteral, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + const tempResult = this.evaluateTemplateLiteralExpression(node, methodDefinition, restCall, classBody); + if (tempResult.resultType === ParsingResultType.EVALUATE_TEMPLATE_LITERAL_SUCCESS) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } else if (tempResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + return new ParsingResult(ParsingResultType.UNABLE_TO_EVALUATE, []); + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_FAILURE, []); + } + + /** + * Evaluates a member expression AST node to determine its URL value. + * + * This method checks if the provided member expression node is a `this` expression or an identifier. + * If it is a `this` expression, it attempts to get the member expression value from the class body. + * If the evaluation fails, it tries to evaluate the member variable from child classes. + * If both evaluations fail, it returns a URL template string. + * If it is an identifier, it returns a URL template string directly. + * + * @param node - The AST node representing the member expression to evaluate. + * @param classBody - The AST node representing the class declaration containing the member expression. + * @returns A ParsingResult object containing the evaluation result and the URL if successful. + */ + evaluateMemberExpressionHelper(node: TSESTree.MemberExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + if (node.object.type === 'ThisExpression' && node.property.type === 'Identifier') { + let tempResult = this.getMemberExpressionValueFromNameAndClassBody(node.property.name, classBody); + if (tempResult.resultType === ParsingResultType.EVALUATE_MEMBER_EXPRESSION_FAILURE) { + tempResult = this.evaluateMemberVariableFromChildClasses(classBody, node.property.name); + if (tempResult.resultType === ParsingResultType.EVALUATE_MEMBER_EXPRESSION_FAILURE) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, [`\${this.${node.property.name}}`]); + } + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } else if (node.object.type === 'Identifier' && node.property.type === 'Identifier') { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, [`\${${node.object.name}.${node.property.name}}`]); + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_FAILURE, []); + } + + /** + * Evaluates an identifier AST node to determine its URL value. + * + * This method attempts to find the value of the identifier by checking the method's variables. + * If successful, it returns a ParsingResult indicating success. If not, it searches for method calls + * within the class body that match the method name and evaluates their URLs. + * If successful, it returns a ParsingResult indicating success. Otherwise, it returns a string in the format ${variableName}. + * + * @param node - The AST node representing the identifier to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the identifier. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateIdentifierHelper(node: TSESTree.Identifier, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + let tempResult = this.getMethodVariableValueFromNameAndMethod(node.name, node, methodDefinition, restCall, classBody); + if (tempResult.resultType === ParsingResultType.GET_VARIABLE_FROM_METHOD_SUCCESS) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } + + if (methodDefinition.key.type === 'Identifier') { + tempResult = this.findMethodCallsFromMethodNameAndClassBody(methodDefinition.key.name, classBody, restCall); + } + + if (tempResult.resultType === ParsingResultType.GET_URLS_FROM_CALLING_METHODS_SUCCESS) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, [`\${${node.name}}`]); + } + + evaluateBinaryExpressionHelper(node: TSESTree.BinaryExpression, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + const tempResult = this.evaluateBinaryExpression(node, methodDefinition, restCall, classBody); + if (tempResult.resultType === ParsingResultType.EVALUATE_BINARY_EXPRESSION_SUCCESS) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } else if (tempResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + return new ParsingResult(ParsingResultType.UNABLE_TO_EVALUATE, []); + } + return new ParsingResult(ParsingResultType.EVALUATE_URL_FAILURE, ['Unknown URL']); + } + + /** + * Evaluates a binary expression AST node to determine its URL value. + * + * This method evaluates the provided binary expression node by calling `evaluateBinaryExpression`. + * If the evaluation is successful, it returns a ParsingResult indicating success. + * If the evaluation is unable to determine the URL, it returns a ParsingResult indicating that. + * Otherwise, it returns a ParsingResult indicating failure. + * + * @param node - The AST node representing the binary expression to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the node. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateCallExpressionHelper(node: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + const tempResult = this.getUrlFromGetterMethodCall(node, classBody); + if (tempResult.resultType === ParsingResultType.GET_URL_FROM_GETTER_SUCCESS) { + return new ParsingResult(ParsingResultType.EVALUATE_URL_SUCCESS, tempResult.result); + } + return new ParsingResult(ParsingResultType.UNABLE_TO_EVALUATE, []); + } + + /** + * Checks if the callee is an HTTP client. + * + * This method determines if the provided member expression represents an HTTP client. + * It checks if the object of the member expression is another member expression and if its property is an identifier. + * If these conditions are met, it further checks if the type of the member expression is 'HttpClient'. + * + * @param callee - The AST node representing the member expression to check. + * @returns A boolean indicating whether the callee is an HTTP client. + */ + isCalleeHttpClient(callee: TSESTree.MemberExpression): boolean { + if (callee.object.type === 'MemberExpression' && callee.object.property.type === 'Identifier') { + return this.getMemberExpressionTypeFromName(callee.object.property.name) === 'HttpClient'; + } + return false; + } + + /** + * Evaluates a template literal AST node to determine its URL value. + * + * This method evaluates the provided template literal node by iterating over its quasis and expressions. + * It calls `evaluateUrl` on each expression and concatenates the results with the quasi values. + * If the evaluation of any expression fails, it updates the result type accordingly. + * + * @param templateLiteral - The AST node representing the template literal to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the template literal. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateTemplateLiteralExpression(templateLiteral: TSESTree.TemplateLiteral, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + let resultType = ParsingResultType.EVALUATE_TEMPLATE_LITERAL_SUCCESS; + + let evaluatedURL = ''; + for (let index = 0; index < templateLiteral.quasis.length; index++) { + const quasi = templateLiteral.quasis[index]; + let expression = 'Unknown URL'; + if (index < templateLiteral.expressions.length) { + let subResult = this.evaluateUrl(templateLiteral.expressions[index], methodDefinition, restCall, classBody); + + if (subResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS) { + if (subResult.result.length === 1) { + expression = subResult.result[0]; + } + } else if (subResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + resultType = ParsingResultType.UNABLE_TO_EVALUATE; + break; + } else { + resultType = ParsingResultType.EVALUATE_TEMPLATE_LITERAL_FAILURE; + } + + evaluatedURL += quasi.value.raw + expression; + } else { + evaluatedURL += quasi.value.raw; + } + } + + return new ParsingResult(resultType, [evaluatedURL]); + } + + /** + * Evaluates a binary expression AST node to determine its URL value. + * + * This method evaluates the left and right sides of the provided binary expression node by calling `evaluateUrl`. + * If both evaluations are successful, it concatenates the results and returns a ParsingResult indicating success. + * If either evaluation is unable to determine the URL, it returns a ParsingResult indicating that. + * Otherwise, it returns a ParsingResult indicating failure. + * + * @param binaryExpression - The AST node representing the binary expression to evaluate. + * @param methodDefinition - The AST node representing the method definition containing the binary expression. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + evaluateBinaryExpression(binaryExpression: TSESTree.BinaryExpression, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + const left = binaryExpression.left; + const right = binaryExpression.right; + let leftParsingResult = this.evaluateUrl(left, methodDefinition, restCall, classBody); + let rightParsingResult = this.evaluateUrl(right, methodDefinition, restCall, classBody); + + let parsingResult: string[] = []; + let parsingResultType = ParsingResultType.EVALUATE_BINARY_EXPRESSION_FAILURE; + + if (leftParsingResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS && rightParsingResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS) { + parsingResult.push(leftParsingResult.result[0] + rightParsingResult.result[0]); + parsingResultType = ParsingResultType.EVALUATE_BINARY_EXPRESSION_SUCCESS; + } else if (leftParsingResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE || rightParsingResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + parsingResultType = ParsingResultType.UNABLE_TO_EVALUATE; + } + + return new ParsingResult(parsingResultType, parsingResult); + } + + /** + * Finds and collects method calls by a specified method name within a given class body. + * This function iterates through all method definitions in the class body. For each method, + * it uses a simple traversal to search for call expressions that match the specified method name. + * If a matching call expression is found, the function extracts the value of the first argument + * (assuming it's an identifier) and stores both the call expression and the extracted parameter value + * in an array. This array is then returned, providing insights into where and how the specified method + * is being called within the class. + * + * @param methodName - The name of the method to search for within the class body. + * @param classBody - The AST representation of the class to search within. + * @returns An array of objects, each containing a `callExpression` and a `parameterValue`. + * `callExpression` is the AST node representing the found call expression, + * and `parameterValue` is the value of the first argument passed to the call expression. + */ + findMethodCallsFromMethodNameAndClassBody(methodName: string, classBody: TSESTree.ClassDeclaration, restCall: TSESTree.CallExpression): ParsingResult { + let methodCalls: { callExpression: TSESTree.CallExpression, parameterValue: string }[] = []; + let parsingResultType = ParsingResultType.GET_URLS_FROM_CALLING_METHODS_FAILURE; + + for (const methodDefinition of classBody.body.body) { + if (methodDefinition.type === 'MethodDefinition' && methodDefinition.key.type === 'Identifier') { + simpleTraverse(methodDefinition, { + enter: (node) => { + if (node.type === 'CallExpression' && node.callee.type === 'MemberExpression' && node.callee.object.type === 'ThisExpression' && node.callee.property.type === 'Identifier' && + node.callee.property.name === methodName && node.arguments[0].type === 'Identifier') { + let parameterValue = this.getMethodVariableValueFromNameAndMethod(node.arguments[0].name, node, methodDefinition, restCall, classBody); + if (parameterValue.resultType === ParsingResultType.GET_VARIABLE_FROM_METHOD_SUCCESS) { + methodCalls.push({ callExpression: node, parameterValue: parameterValue.result[0] }); + } else if (parameterValue.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + parsingResultType = ParsingResultType.UNABLE_TO_EVALUATE; + } + } + } + }); + } + } + + let result: string[] = []; + for (const methodCall of methodCalls) { + result.push(methodCall.parameterValue); + } + + if (result.length > 0) { + parsingResultType = ParsingResultType.GET_URLS_FROM_CALLING_METHODS_SUCCESS; + } + return new ParsingResult(parsingResultType, result); + } + + /** + * Retrieves the value of a member expression from a class body by its name. + * + * This method traverses the class body to find a property definition that matches the provided name. + * If a matching property definition is found and its value is a literal, the value is added to the result array. + * The result type is updated to indicate success if a matching property is found. + * + * @param name - The name of the member expression to find. + * @param classBody - The AST node representing the class declaration containing the member expression. + * @returns A ParsingResult object containing the evaluation result and the member expression value(s) if successful. + */ + getMemberExpressionValueFromNameAndClassBody(name: string, classBody: TSESTree.ClassDeclaration): ParsingResult { + let memberExpressionResult: string[] = []; + let resultType = ParsingResultType.EVALUATE_MEMBER_EXPRESSION_FAILURE; + simpleTraverse(classBody, { + enter(node) { + if (node.type === 'PropertyDefinition' && node.value?.type === 'Literal' && node.key.type === 'Identifier' && node.value.value && node.key.name === name) { + memberExpressionResult.push(node.value.value.toString()); + resultType = ParsingResultType.EVALUATE_MEMBER_EXPRESSION_SUCCESS; + return; + } + } + }); + return new ParsingResult(resultType, memberExpressionResult); + } + + /** + * Retrieves the type of a member expression by its name. + * + * This method traverses the AST to find a property definition or parameter property that matches the provided name. + * If a matching property definition is found, it returns the type of the property. + * If a matching parameter property is found, it returns the type of the parameter. + * If no match is found, it returns 'Unknown Type'. + * + * @param name - The name of the member expression to find the type for. + * @returns A string representing the type of the member expression. + */ + getMemberExpressionTypeFromName(name: string): string { + let memberExpressionType = 'Unknown Type'; + simpleTraverse(this.ast, { + enter: (node) => { + if (node.type === 'PropertyDefinition' && node.value?.type === 'Literal' && node.key.type === 'Identifier' && node.value.value && node.key.name === name) { + memberExpressionType = node.value.type; + } else if (node.type === 'TSParameterProperty' && node.parameter.type === 'Identifier' && node.parameter.name === name && + node.parameter.typeAnnotation?.type === 'TSTypeAnnotation' && node.parameter.typeAnnotation.typeAnnotation.type === 'TSTypeReference' && + node.parameter.typeAnnotation.typeAnnotation.typeName.type === 'Identifier') { + memberExpressionType = node.parameter.typeAnnotation.typeAnnotation.typeName.name; + } + } + }); + return memberExpressionType; + } + + /** + * Retrieves the URL from a getter method call. + * + * This method evaluates a call expression to determine if it is a call to a getter method. + * If it is, it traverses the class body to find the corresponding method definition. + * It then evaluates the return statement of the getter method to extract the URL. + * + * @param callExpression - The AST node representing the call expression to evaluate. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the URL(s) if successful. + */ + getUrlFromGetterMethodCall(callExpression: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + let parsingResultType = ParsingResultType.GET_URL_FROM_GETTER_FAILURE; + let parsingResult: string[] = []; + + if (callExpression.callee.type === 'MemberExpression' && callExpression.callee.property.type === 'Identifier') { + const methodName = callExpression.callee.property.name; + for (const methodDefinition of classBody.body.body) { + // find the getter method + if (methodDefinition.type === 'MethodDefinition' && methodDefinition.key.type === 'Identifier' && methodDefinition.key.name === methodName && methodDefinition.value.type === 'FunctionExpression') { + for (const node of methodDefinition.value.body.body) { + if (node.type === 'ReturnStatement' && node.argument) { + const tempResult = this.evaluateUrl(node.argument, methodDefinition, callExpression, classBody); + if (tempResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS) { + parsingResult = tempResult.result; + parsingResultType = ParsingResultType.GET_URL_FROM_GETTER_SUCCESS; + } else if (tempResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + parsingResultType = ParsingResultType.UNABLE_TO_EVALUATE; + } + } + } + } + } + } + + return new ParsingResult(parsingResultType, parsingResult); + } + + /** + * Retrieves the value of a variable from a method by its name. + * + * This method traverses the provided method definition to find a variable declaration that matches the provided name. + * If a matching variable declaration is found and its initializer can be evaluated to a URL, the value is added to the result array. + * The result type is updated to indicate success if a matching variable is found. + * + * @param name - The name of the variable to find. + * @param node - The AST node representing the current node in the traversal. + * @param methodDefinition - The AST node representing the method definition containing the variable. + * @param restCall - The AST node representing the REST call expression. + * @param classBody - The AST node representing the class declaration containing the method. + * @returns A ParsingResult object containing the evaluation result and the variable value(s) if successful. + */ + getMethodVariableValueFromNameAndMethod(name: string, node: TSESTree.Node, methodDefinition: TSESTree.MethodDefinition, restCall: TSESTree.CallExpression, classBody: TSESTree.ClassDeclaration): ParsingResult { + let result: string[] = []; + let resultType = ParsingResultType.GET_VARIABLE_FROM_METHOD_FAILURE; + simpleTraverse(methodDefinition, { + enter: (node) => { + if (node.type === 'VariableDeclaration') { + for (let decl of node.declarations) { + if (decl.id.type === 'Identifier' && decl.id.name === name && decl.init) { + const tempResult = this.evaluateUrl(decl.init, methodDefinition, restCall, classBody); + if (tempResult.resultType === ParsingResultType.EVALUATE_URL_SUCCESS) { + result = tempResult.result; + resultType = ParsingResultType.GET_VARIABLE_FROM_METHOD_SUCCESS; + } else if (tempResult.resultType === ParsingResultType.UNABLE_TO_EVALUATE) { + resultType = ParsingResultType.UNABLE_TO_EVALUATE; + } + return; + } + } + } + } + }); + return new ParsingResult(resultType, result); + } + + /** + * Retrieves the class name from a class declaration AST node. + * + * This method checks if the provided class declaration node has an identifier. + * If it does, it returns the name of the class. If the class declaration does not have an identifier, + * it returns 'Unknown URL'. + * + * @param classBody - The AST node representing the class declaration to extract the name from. + * @returns A string representing the name of the class, or 'Unknown URL' if the class has no identifier. + */ + getClassNameFromClassBody(classBody: TSESTree.ClassDeclaration): string { + if (classBody.id?.type === 'Identifier') { + return classBody.id.name; + } + return 'Unknown URL'; + } + + /** + * Retrieves the constructor arguments from a class body. + * + * This method iterates over the nodes in the class body to find the constructor method definition. + * If the constructor is found, it returns the parameters of the constructor. + * If no constructor is found, it returns an empty array. + * + * @param classBody - The AST node representing the class body to extract constructor arguments from. + * @returns An array of AST nodes representing the parameters of the constructor. + */ + getConstructorArgumentsFromClassBody(classBody: TSESTree.ClassBody): TSESTree.Parameter[] { + for (let node of classBody.body) { + if (node.type === 'MethodDefinition' && node.key.type === 'Identifier' && node.key.name === 'constructor') { + return node.value.params; + } + } + + return []; + } + + /** + * Evaluates the value of a member variable from child classes. + * + * This method attempts to find the value of a member variable by traversing the class hierarchy. + * It first retrieves the superclass information from the preprocessing results. + * Then, it iterates over the constructor arguments of the superclass to find a match for the member variable. + * If a match is found, the value is added to the result array and the result type is updated to indicate success. + * + * @param classBody - The AST node representing the class declaration containing the member variable. + * @param memberExprKey - The name of the member variable to evaluate. + * @returns A ParsingResult object containing the evaluation result and the member variable value(s) if successful. + */ + evaluateMemberVariableFromChildClasses(classBody: TSESTree.ClassDeclaration, memberExprKey: string): ParsingResult { + let memberExpressionResult: string[] = []; + let resultType = ParsingResultType.EVALUATE_MEMBER_EXPRESSION_FAILURE; + + const superClass = Preprocessor.PREPROCESSING_RESULTS.get(this.getClassNameFromClassBody(classBody)); + if (superClass) { + const constructorArguments = this.getConstructorArgumentsFromClassBody(classBody.body); + for (let superConstructorCallArguments of superClass.superConstructorCalls) { + for (let i = 0; i < superConstructorCallArguments.arguments.length; i++) { + let constructorArgument = constructorArguments[i]; + if (superConstructorCallArguments.arguments[i] !== '' && constructorArgument.type === 'TSParameterProperty' + && constructorArgument.parameter.type === 'Identifier' && constructorArgument.parameter.name === memberExprKey) { + memberExpressionResult.push(superConstructorCallArguments.arguments[i]); + resultType = ParsingResultType.EVALUATE_MEMBER_EXPRESSION_SUCCESS; + } + } + } + } + + return new ParsingResult(resultType, memberExpressionResult); + } +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts new file mode 100644 index 000000000000..a90f30fb7a5e --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/Preprocessor.ts @@ -0,0 +1,314 @@ +import { parse, TSESTree } from '@typescript-eslint/typescript-estree'; +import { readFileSync } from 'node:fs'; + +interface SuperClass { + name: string; + path: string; + superConstructorCalls: { arguments: string[] }[]; + childClasses: ChildClass[]; +} + +interface ChildClass { + superClass: string; + name: string; + memberVariables: Map; + parentMethodCalls: ParentMethodCalls[]; +} + +interface ParentMethodCalls { + name: string; + parameters: MemberVariable[]; +} + +interface MemberVariable { + name: string; + type: string; + value?: string; +} + +export class Preprocessor { + public static PREPROCESSING_RESULTS = new Map(); + public static readonly pathPrefix = '' + private readonly directoryPrefix = 'src/main/webapp/'; + private readonly fileToPreprocess: string; + private ast: TSESTree.Program; + + private memberVariables: Map = new Map(); + + constructor(fileToPreprocess: string) { + this.fileToPreprocess = fileToPreprocess; + this.ast = Preprocessor.parseTypeScriptFile(Preprocessor.pathPrefix + this.fileToPreprocess); + } + + /** + * Preprocesses the TypeScript file. + * This method checks if the AST (Abstract Syntax Tree) type is 'Program'. + * If it is, it iterates over the body of the AST to find class declarations. + * For each class declaration found, it calls the `preprocessClass` method to process the class. + * It also handles named exports that are class declarations. + */ + preprocessFile() { + if (this.ast.type !== 'Program') { + return; + } + + this.ast.body.forEach((node) => { + if (node.type === 'ClassDeclaration') { + this.preprocessClass(node); + } else if (node.type === 'ExportNamedDeclaration' && node.declaration?.type === 'ClassDeclaration') { + this.preprocessClass(node.declaration); + } + }); + } + + /** + * Preprocesses a class declaration. + * This method checks if the class has a superclass. If it does, it identifies and stores the member variables + * from the class body and then identifies the superclass and processes its related information. + * + * @param classDeclaration - The class declaration node to preprocess. + */ + preprocessClass(classDeclaration: TSESTree.ClassDeclaration) { + if (classDeclaration.superClass) { + this.identifyMemberVariablesFromClassBody(classDeclaration); + this.identifySuperClass(classDeclaration); + } + } + + /** + * Evaluates a binary expression to find its corresponding value. + * This method processes the left and right nodes of the binary expression. + * If a node is a member expression, it evaluates the member expression to find its value. + * If a node is a literal, it converts the literal value to a string. + * The method concatenates the evaluated values of the left and right nodes and returns the result as a string. + * + * @param binaryExpression - The binary expression to be evaluated. + * @returns The evaluated value of the binary expression as a string. + */ + evaluateBinaryExpression(binaryExpression: TSESTree.BinaryExpression): string { + const left = binaryExpression.left; + const right = binaryExpression.right; + let result = ''; + [left, right].forEach((node) => { + let parameterValue = ''; + if (node.type === 'MemberExpression') { + if (node.object.type === 'Identifier' && node.property.type === 'Identifier') { + const parameterObjectName = node.object.name; + const parameterName = node.property.name; + parameterValue = this.findParameterValueByParameterNameAndFilePath(parameterName, this.identifyImportedClassByName(parameterObjectName)); + } else if (node.object.type === 'Literal' && node.object.value) { + parameterValue = node.object.value.toString(); + } + result += parameterValue; + } else if (node.type === 'Literal' && node.value) { + result += node.value.toString(); + } + }); + + return result; + } + + /** + * Identifies and stores member variables of a class. + * This method iterates over the body of a class, looking for property definitions. + * When a property definition is found, it checks the type of the property's value. + * If the value is a literal, it stores the property's name, type as 'string', and its literal value. + * If the value is a template literal, it stores the property's name and type as 'string', but does not store a value. + * These member variables are stored in the `memberVariables` map with the property's name as the key. + * + * @param classDeclaration - The class declaration node of the class from which to identify member variables. + */ + identifyMemberVariablesFromClassBody(classDeclaration: TSESTree.ClassDeclaration) { + classDeclaration.body.body.forEach((node) => { + if (node.type === 'PropertyDefinition' && node.key.type === 'Identifier') { + if (node.value?.type === 'Literal' && node.value.value) { + this.memberVariables.set(node.key.name, { name: node.key.name, type: 'string', value: node.value.value.toString() }); + } else if (node.value?.type === 'TemplateLiteral') { + this.memberVariables.set(node.key.name, { name: node.key.name, type: 'string' }); + } + } + }); + } + + /** + * Identifies the superclass of a given class declaration and processes its related information. + * This method examines the `superClass` property of a class declaration to determine if the class extends another class. + * If a superclass is identified, the method retrieves its name and the path to its definition. + * It then constructs a `ChildClass` object containing information about the current class, such as its name, + * an empty map for member variables, and an empty array for parent method calls. + * This `ChildClass` object is added to the `PREPROCESSING_RESULTS`, which track the relationships between superclasses + * and their child classes. If the superclass is already present in the map, the current class is added to its + * list of child classes. Otherwise, a new entry for the superclass is created in the map. + * Finally, the method calls `identifySuperConstructorCalls` to process any calls to the superclass constructor + * within the current class. + * + * @param classDeclaration - The class declaration node to process. + */ + identifySuperClass(classDeclaration: TSESTree.ClassDeclaration) { + if (classDeclaration.superClass && classDeclaration.superClass.type === 'Identifier') { + const superClassName = classDeclaration.superClass.name; + const superClassPath = this.identifyImportedClassByName(superClassName); + const childClassName = classDeclaration.id?.name ?? ''; + const childClass = { superClass: superClassName, name: childClassName, memberVariables: this.memberVariables, parentMethodCalls: [] }; + + const superConstructorCall = this.identifySuperConstructorCalls(classDeclaration, superClassName); + + if (Preprocessor.PREPROCESSING_RESULTS.has(superClassName)) { + Preprocessor.PREPROCESSING_RESULTS.get(superClassName)?.childClasses.push(childClass); + Preprocessor.PREPROCESSING_RESULTS.get(superClassName)?.superConstructorCalls.concat(... superConstructorCall) + } else { + Preprocessor.PREPROCESSING_RESULTS.set(superClassName, { name: superClassName, path: superClassPath, childClasses: [childClass], superConstructorCalls: superConstructorCall}); + } + } + } + + /** + * Identifies calls to the superclass constructor within a class declaration. + * This method iterates over the body of the class to find the constructor method. + * Within the constructor, it looks for call expressions to `super` and evaluates their arguments. + * The evaluated arguments are collected and returned as an array of objects, each containing an `arguments` array. + * + * @param classDeclaration - The class declaration node to process. + * @param superClassName - The name of the superclass to identify constructor calls for. + * @returns An array of objects, each containing an `arguments` array with the evaluated values of the super constructor call arguments. + */ + identifySuperConstructorCalls(classDeclaration: TSESTree.ClassDeclaration, superClassName: string): { arguments: string[] }[] { + const result: { arguments: string[] }[]= []; + classDeclaration.body.body.forEach((node) => { + if (node.type === 'MethodDefinition' && node.kind === 'constructor' && node.value.type === 'FunctionExpression') { + node.value.body.body.forEach((statement) => { + if (statement.type === 'ExpressionStatement' && statement.expression.type === 'CallExpression' && statement.expression.callee.type === 'Super') { + const superConstructorCall = statement.expression; + const superConstructorCallParameters = superConstructorCall.arguments; + const superConstructorCallParameterValues: string[] = []; + superConstructorCallParameters.forEach((parameter) => { + superConstructorCallParameterValues.push(this.evaluateCallExpressionArgument(parameter)); + }); + result.push({arguments: superConstructorCallParameterValues}); + } + }) + } + }); + + return result; + } + + /** + * Evaluates a call expression argument to find its corresponding value. + * This method checks the type of the call expression argument and processes it accordingly. + * If the argument is an identifier, it evaluates the identifier to find its value. + * If the argument is a binary expression, it evaluates the binary expression to find its value. + * If the argument is a literal, it converts the literal value to a string. + * The method returns the evaluated value as a string, or an empty string if no value is found. + * + * @param callExpressionArgument - The call expression argument to be evaluated. + * @returns The evaluated value of the call expression argument as a string, or an empty string if no value is found. + */ + evaluateCallExpressionArgument(callExpressionArgument: TSESTree.CallExpressionArgument): string { + let result = ''; + if (callExpressionArgument.type === 'Identifier') { + result = this.evaluateIdentifierArgument(callExpressionArgument) ?? ''; + } else if (callExpressionArgument.type === 'BinaryExpression') { + result = this.evaluateBinaryExpression(callExpressionArgument); + } else if (callExpressionArgument.type === 'Literal' && callExpressionArgument.value) { + result = callExpressionArgument.value.toString(); + } + return result ?? ''; + } + + /** + * Evaluates an identifier argument to find its corresponding value. + * This method checks if the identifier name exists in the `memberVariables` map. + * If it exists, it returns the value associated with the identifier name. + * If it does not exist, it returns an empty string. + * + * @param identifier - The identifier whose value is to be evaluated. + * @returns The value of the identifier if found; otherwise, an empty string. + */ + evaluateIdentifierArgument(identifier: TSESTree.Identifier): string { + return this.memberVariables.get(identifier.name)?.value ?? ''; + } + + /** + * Identifies the path of an imported class by its name. + * This method iterates over all import declarations in the AST of the file being preprocessed. + * If an import declaration matches the specified class name, the source value (path) of the import is stored. + * + * @param className - The name of the class to find the import path for. + * @returns The path of the imported class, or an empty string if the class is not found. + */ + identifyImportedClassByName(className: string): string { + for (const node of this.ast.body) { + if (node.type === 'ImportDeclaration' && node.specifiers[0].local.name === className) { + return node.source.value; + } + }; + return ''; + } + + /** + * Finds the value of a parameter by its name within a specified file. + * This method loads the TypeScript file at the given file path, parses it to create an AST (Abstract Syntax Tree), + * and then iterates over the AST to find a class declaration. Once a class declaration is found, + * it delegates the search for the parameter value to `findParameterValueByParameterNameAndAST`, + * which scans the class body for a property matching the parameter name and returns its value. + * + * @param parameterName - The name of the parameter whose value is to be found. + * @param filePath - The path to the TypeScript file (relative to the base directory set in `pathPrefix` and `directoryPrefix`) where the parameter value is to be searched. + * @returns The value of the parameter if found; otherwise, an empty string. + */ + findParameterValueByParameterNameAndFilePath (parameterName: string, filePath: string): string { + const targetAST = Preprocessor.parseTypeScriptFile(`${Preprocessor.pathPrefix}${this.directoryPrefix}${filePath}.ts`); + + for (const node of targetAST.body) { + if (node.type === 'ExportNamedDeclaration' && node.declaration?.type === 'ClassDeclaration') { + return Preprocessor.findParameterValueByParameterNameAndAST(parameterName, node.declaration.body); + } + if (node.type === 'ClassDeclaration') { + return Preprocessor.findParameterValueByParameterNameAndAST(parameterName, node.body); + } + } + + return ''; + } + + /** + * Finds the value of a parameter by its name within a given AST (Abstract Syntax Tree). + * This method iterates over the body of a class to find a property definition that matches the specified parameter name. + * If a matching property definition is found and its value is a literal, the method returns the string representation of the value. + * If no matching property definition is found, the method returns an empty string. + * + * @param parameterName - The name of the parameter whose value is to be found. + * @param ast - The AST of the class body to search within. + * @returns The value of the parameter if found; otherwise, an empty string. + */ + private static findParameterValueByParameterNameAndAST(parameterName: string, ast: TSESTree.ClassBody): string { + for (const classBodyNode of ast.body) { + if (classBodyNode.type === 'PropertyDefinition' && classBodyNode.key.type === 'Identifier' && classBodyNode.key.name === parameterName) { + if (classBodyNode.value?.type === 'Literal' && classBodyNode.value.value) { + return classBodyNode.value.value.toString(); + } + } + }; + + return ''; + } + + /** + * Parses a TypeScript file and returns its Abstract Syntax Tree (AST). + * + * @param filePath - The path to the TypeScript file to be parsed. + * @returns The AST of the parsed TypeScript file. + */ + static parseTypeScriptFile(filePath: string): TSESTree.Program { + const code = readFileSync(filePath, 'utf8'); + return parse(code, { + loc: true, + comment: true, + tokens: true, + ecmaVersion: 2020, + sourceType: 'module', + }); + } + +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package-lock.json b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package-lock.json new file mode 100644 index 000000000000..d55648326e00 --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package-lock.json @@ -0,0 +1,1704 @@ +{ + "name": "analysis-of-endpoint-connections", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "analysis-of-endpoint-connections", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "@eslint/js": "^9.6.0", + "@types/eslint__js": "^8.42.3", + "@types/node": "20.14.08", + "eslint": "^8.57.0", + "typescript": "^5.5.3", + "typescript-eslint": "^7.15.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.6.0.tgz", + "integrity": "sha512-D9B0/3vNg44ZeWbYMpBoXqNP4j6eQD5vNwIlGAuFRRzK/WtT/jvDQW3Bi9kkf3PMDMlM7Yi+73VLUsn5bJcl8A==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "dependencies": { + "@types/eslint": "*" + } + }, + "node_modules/@types/estree": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "20.14.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.8.tgz", + "integrity": "sha512-DO+2/jZinXfROG7j7WKFn/3C6nFwxy2lLpgLjEXJz+0XKphZlTLJ14mo8Vfg8X5BWN6XjyESXq+LcYdT7tR3bA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.15.0.tgz", + "integrity": "sha512-uiNHpyjZtFrLwLDpHnzaDlP3Tt6sGMqTCiqmxaN4n4RP0EfYZDODJyddiFDF44Hjwxr5xAcaYxVKm9QKQFJFLA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/type-utils": "7.15.0", + "@typescript-eslint/utils": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", + "graphemer": "^1.4.0", + "ignore": "^5.3.1", + "natural-compare": "^1.4.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.15.0.tgz", + "integrity": "sha512-k9fYuQNnypLFcqORNClRykkGOMOj+pV6V91R4GO/l1FDGwpqmSwoOQrOHo3cGaH63e+D3ZiCAOsuS/D2c99j/A==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz", + "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.15.0.tgz", + "integrity": "sha512-SkgriaeV6PDvpA6253PDVep0qCqgbO1IOBiycjnXsszNTVQe5flN5wR5jiczoEoDEnAqYFSFFc9al9BSGVltkg==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/utils": "7.15.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.15.0.tgz", + "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz", + "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.15.0.tgz", + "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz", + "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.15.0", + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", + "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-7.15.0.tgz", + "integrity": "sha512-Ta40FhMXBCwHura4X4fncaCVkVcnJ9jnOq5+Lp4lN8F4DzHZtOwZdRvVBiNUGznUDHPwdGnrnwxmUOU2fFQqFA==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/utils": "7.15.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package.json b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package.json new file mode 100644 index 000000000000..2cf9dd7ba054 --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/package.json @@ -0,0 +1,19 @@ +{ + "type": "commonjs", + "name": "analysis-of-endpoint-connections", + "version": "1.0.0", + "description": "Parses Typescript files and generates a report of all the endpoint connections in the file.", + "main": "AnalysisOfEndpointConnectionsClient.ts", + "license": "MIT", + "scripts": { + "start": "node -r esm AnalysisOfEndpointConnectionsClient.ts" + }, + "devDependencies": { + "@eslint/js": "9.8.0", + "@types/eslint__js": "8.42.3", + "@types/node": "22.1.0", + "eslint": "9.8", + "typescript": "5.5.4", + "typescript-eslint": "8.0.0" + } +} diff --git a/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/tsconfig.analysisOfEndpointConnections.json b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/tsconfig.analysisOfEndpointConnections.json new file mode 100644 index 000000000000..d07efe5d2d74 --- /dev/null +++ b/supporting_scripts/analysis-of-endpoint-connections/src/main/typeScript/tsconfig.analysisOfEndpointConnections.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "module": "CommonJS", + "target": "es2022", + "lib": ["es2022", "dom"], + "types": ["node"], + "moduleResolution": "node" + }, + "include": ["AnalysisOfEndpointConnectionsClient.ts", "Preprocessor.ts", "Postprocessor.ts"], + "exclude": ["node_modules"] +}