UNPKG

vlt

Version:
49 lines (47 loc) 1.34 kB
var global = globalThis; import {Buffer} from "node:buffer"; import {setTimeout,clearTimeout,setImmediate,clearImmediate,setInterval,clearInterval} from "node:timers"; import {createRequire as _vlt_createRequire} from "node:module"; var require = _vlt_createRequire(import.meta.filename); import { RegistryClient } from "./chunk-OTLTOVZN.js"; import { commandUsage } from "./chunk-L3E552CT.js"; import "./chunk-KPA4XNCN.js"; import "./chunk-VYJVN3B6.js"; import "./chunk-B4MAUXR2.js"; import "./chunk-W7RMFRDJ.js"; import "./chunk-O57KIW5U.js"; import "./chunk-JBBINXAZ.js"; import "./chunk-OAYCZMD4.js"; import "./chunk-BA67AKYJ.js"; import "./chunk-KVH5ECIG.js"; import "./chunk-AECDW3EJ.js"; // ../../src/cli-sdk/src/commands/whoami.ts var usage = () => commandUsage({ command: "whoami", usage: [""], description: `Look up the username for the currently active token, when logged into a registry.` }); var views = { human: (r) => r.username, json: (r) => r }; var command = async (conf) => { const rc = new RegistryClient(conf.options); const response = await rc.request( new URL("-/whoami", conf.options.registry), { useCache: false } ); const { username } = response.json(); return { username }; }; export { command, usage, views }; //# sourceMappingURL=whoami-FEDLJCBP.js.map