| 27 | import {BaseTool} from './base-tool.js'; |
| 28 | |
| 29 | export class StringsTool extends BaseTool { |
| 30 | static get key() { |
| 31 | return 'strings-tool'; |
| 32 | } |
| 33 | |
| 34 | override async runTool(compilationInfo: CompilationInfo, inputFilepath?: string, args?: string[]) { |
| 35 | if (!compilationInfo.filters.binary) { |
| 36 | return this.createErrorResponse(`${this.tool.name ?? 'Strings'} requires an executable`); |
| 37 | } |
| 38 | if (await fileExists(compilationInfo.executableFilename)) { |
| 39 | return super.runTool(compilationInfo, compilationInfo.executableFilename, args); |
| 40 | } |
| 41 | return super.runTool(compilationInfo, compilationInfo.outputFilename, args); |
| 42 | } |
| 43 | } |
nothing calls this directly
no outgoing calls
no test coverage detected