protected getExportedDataFromFile()

in src/base-exported-backend.ts [137:143]


  protected getExportedDataFromFile<T>(fileName: string): T {
    const filePath = path.join(this.exportPath, fileName);
    if (!fs.existsSync(filePath)) {
      throw new Error(`Cannot find ${fileName} in the directory ${this.exportPath}`);
    }
    return JSON.parse(fs.readFileSync(filePath, { encoding: 'utf-8' })) as T;
  }