UNPKG

lerna

Version:

Lerna is a fast, modern build system for managing and publishing multiple JavaScript/TypeScript packages from the same repository

22 lines (19 loc) 530 B
import { pulseTillDone } from "./chunk-WC2B4V4E.js"; // libs/commands/publish/src/lib/get-profile-data.ts import fetch from "npm-registry-fetch"; function getProfileData(opts) { opts.log.verbose("", "Retrieving npm user profile"); return pulseTillDone(fetch.json("/-/npm/v1/user", opts)).then((data) => { opts.log.silly("npm profile get", "received %j", data); return Object.assign( // remap to match legacy whoami format { username: data.name }, data ); }); } export { getProfileData };