MCPcopy Create free account
hub / github.com/FlashpointProject/launcher / loadExecMappingsFile

Function loadExecMappingsFile

src/back/Execs.ts:23–29  ·  view source on GitHub ↗
(jsonFolder: string, onError?: (error: string) => void)

Source from the content-addressed store, hash-verified

21 * @param onError Callback for error
22 */
23export function loadExecMappingsFile(jsonFolder: string, onError?: (error: string) => void): Promise<ExecMapping[]> {
24 return new Promise((resolve, reject) => {
25 readJsonFile(path.join(jsonFolder, filePath), 'utf8')
26 .then((json) => { resolve(parseExecMappingsFile(json, onError).execs); })
27 .catch(reject);
28 });
29}
30
31function parseExecMappingsFile(data: any, onError?: (error: string) => void) : ExecMappingFile {
32 const parsed: ExecMappingFile = {

Callers 1

initializeFunction · 0.90

Calls 2

readJsonFileFunction · 0.90
parseExecMappingsFileFunction · 0.85

Tested by

no test coverage detected