(filePath = "")
| 139 | console.log("Create new thread ID:", threadId, "\tFiles:", filesPath.length); |
| 140 | |
| 141 | async function readOneFile(filePath = "") { |
| 142 | const fileContent = await fs.promises.readFile(filePath, "utf-8"); |
| 143 | for (const key of langKeys.keys()) { |
| 144 | if (fileContent.includes(key)) { |
| 145 | parentPort?.postMessage({ |
| 146 | type: "key", |
| 147 | data: key |
| 148 | }); |
| 149 | } |
| 150 | } |
| 151 | } |
| 152 | |
| 153 | const promises = []; |
| 154 | for (const filePath of filesPath) { |