code: function upload (options, callback) {
    const promise = (
      Promise.resolve(options)
        .then(applyDefaults)
        .then(validateOptions)
        .then(opts => {
          options = opts
          return options
        })
        .then(transformOptions)
        .then(prepareRequest)
        .then(sendRequest)
        .catch(err => {
          return cleanupTempFiles(options)
            .then(() => Promise.reject(err))
        })
        .then(cleanupTempFiles)
    )
    if (callback) {
      promise
        .then(message => callback(null, message))
        .catch(err => callback(err, null))
    }
    return promise
  }
docs: Upload source map to Bugsnag.
  
  @param {object} options The options
  @param {function} [callback] The node-style callback (optional)
  @returns {Promise<string>}