MCPcopy Create free account
hub / github.com/redis/RedisInsight / assertAsarUnpackInSync

Function assertAsarUnpackInSync

scripts/verify-native-modules-linux.js:23–35  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

21const loadJson = (filePath) => JSON.parse(fs.readFileSync(filePath, 'utf8'))
22
23const 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
37const discoverAsarUnpackedDirs = () => {
38 if (!hasPath(releaseDir)) {

Callers 1

Calls 1

loadJsonFunction · 0.85

Tested by

no test coverage detected