code: function getRegistryUrl (resolved) {
    if (!resolved) {
      return ''
    }
  
    let resolvedUrl = ''
  
    try {
      const urlObj = new url.URL(resolved)
      resolvedUrl = `${urlObj.protocol}//${urlObj.host}`
    } catch (error) {
      debug('url parse error: %o', error)
    }
  
    return resolvedUrl
  }
docs: @typedef PresetInfo
  @property {stirng} name preset 名称
  @property {stirng} version 版本
  @property {stirng} registryUrl 仓库地址
   
  从 registry 中解析出仓库地址
  
  @param {string} resolved package.json 或 package-lock.json 中的 resolved 字段
  @returns {string} 解析后的 registry 地址