code: function cleanupTempFiles (options) {
    return new Promise((resolve, reject) => {
      if (options.tempDir) {
        if (path.dirname(options.sourceMap) === options.tempDir) {
          fs.unlinkSync(options.sourceMap)
        }
        fs.rmdir(options.tempDir, (err) => {
          if (err) {
            reject(err)
          } else {
            resolve()
          };
        })
      } else {
        resolve()
      }
    })
  }
docs: Removes temporary files generated by the upload process.
  
  @param {object} options The options
  @returns {Promise<object>}