(config)
| 21 | const loadJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf8')) |
| 22 | |
| 23 | const assertAsarUnpackInSync = (config) => { |
| 24 | const electronBuilder = loadJson(builderConfigPath) |
| 25 | const unpackList = electronBuilder.asarUnpack || [] |
| 26 | const missingFromBuilder = config.asarUnpackModules.filter( |
| 27 | (modulePath) => !unpackList.includes(modulePath), |
| 28 | ) |
| 29 | |
| 30 | if (missingFromBuilder.length) { |
| 31 | throw new Error( |
| 32 | `electron-builder asarUnpack is missing modules: ${missingFromBuilder.join(', ')}`, |
| 33 | ) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | const discoverAsarUnpackedDirs = () => { |
| 38 | if (!hasPath(releaseDir)) { |
no test coverage detected