async unzip(zipFile) {
    const readStream = fs.createReadStream(zipFile);
    const unzipStream = readStream.pipe(unzipper.Parse());
    const files = [];

    unzipStream.on('entry', (entry) => {
      const fileName = entry.path;

      if (fileName === this.growiBridgeService.getMetaFileName()) {
        // skip meta.json
        entry.autodrain();
      }
      else {
        const jsonFile = path.join(this.baseDir, fileName);
        const writeStream = fs.createWriteStream(jsonFile, { encoding: this.growiBridgeService.getEncoding() });
        entry.pipe(writeStream);
        files.push(jsonFile);
      }
    });

    await streamToPromise(unzipStream);

    return files;
  }
/**
   * extract a zip file
   *
   * @memberOf ImportService
   * @param {string} zipFile absolute path to zip file
   * @return {Array.<string>} array of absolute paths to extracted files
   */
extract a zip file
@memberOf ImportService
@param {string} zipFile absolute path to zip file
@return {Array.} array of absolute paths to extracted files
extract a zip file @memberOf ImportService @param { string } zipFile absolute path to zip file @return { Array . } array of absolute paths to extracted files
async unzip(zipFile) {
    const readStream = fs.createReadStream(zipFile);
    const unzipStream = readStream.pipe(unzipper.Parse());
    const files = [];
    unzipStream.on('entry', (entry) => {
      const fileName = entry.path;
      if (fileName === this.growiBridgeService.getMetaFileName()) {
        entry.autodrain();
      }
      else {
        const jsonFile = path.join(this.baseDir, fileName);
        const writeStream = fs.createWriteStream(jsonFile, { encoding: this.growiBridgeService.getEncoding() });
        entry.pipe(writeStream);
        files.push(jsonFile);
      }
    });
    await streamToPromise(unzipStream);
    return files;
  }
async unzip ( zipFile ) { const readStream = fs . createReadStream ( zipFile ) ; const unzipStream = readStream . pipe ( unzipper . Parse ( ) ) ; const files = [ ] ; unzipStream . on ( 'entry' , ( entry ) => { const fileName = entry . path ; if ( fileName === this . growiBridgeService . getMetaFileName ( ) ) { entry . autodrain ( ) ; } else { const jsonFile = path . join ( this . baseDir , fileName ) ; const writeStream = fs . createWriteStream ( jsonFile , { encoding : this . growiBridgeService . getEncoding ( ) } ) ; entry . pipe ( writeStream ) ; files . push ( jsonFile ) ; } } ) ; await streamToPromise ( unzipStream ) ; return files ; }
extract a zip file
 @memberOf ImportService
 @param {string} zipFile absolute path to zip file
 @return {Array.<string>} array of absolute paths to extracted files
extract a zip file @memberOf ImportService @param { string } zipFile absolute path to zip file @return { Array . <string > } array of absolute paths to extracted files
// skip meta.json