(base: string, output: string)
| 6 | } |
| 7 | |
| 8 | function addMissingKeysToFile(base: string, output: string) { |
| 9 | const basePath = path.join(process.cwd(), base); |
| 10 | const outputPath = path.join(process.cwd(), output); |
| 11 | const baseFile = JSON.parse(fs.readFileSync(basePath, "utf8")); |
| 12 | const outputFile = JSON.parse(fs.readFileSync(outputPath, "utf8")); |
| 13 | |
| 14 | const updatedFile = addMissingKeys(baseFile, outputFile); |
| 15 | |
| 16 | fs.writeFileSync(outputPath, JSON.stringify(updatedFile)); |
| 17 | } |
| 18 | |
| 19 | function addMissingKeys(nodeA: any, nodeB: any): any { |
| 20 | for (const key in nodeA) { |
no test coverage detected