{"name":"libnpmteam","version":"4.0.3","author":{"name":"GitHub Inc."},"license":"ISC","_id":"libnpmteam@4.0.3","maintainers":[{"name":"fritzy","email":"fritzy@github.com"},{"name":"darcyclarke","email":"darcy@darcyclarke.me"},{"name":"ruyadorno","email":"ruyadorno@hotmail.com"},{"name":"nlf","email":"quitlahok@gmail.com"},{"name":"gar","email":"gar+npm@danger.computer"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"homepage":"https://npmjs.com/package/libnpmteam","bugs":{"url":"https://github.com/npm/cli/issues"},"tap":{"check-coverage":true},"dist":{"shasum":"9335fbbd032b3770f5c9b7ffc6203f47d1ed144a","tarball":"http://registry-npm.ywwl.com/libnpmteam/download/libnpmteam-4.0.3.tgz","fileCount":4,"integrity":"sha512-LsYYLz4TlTpcqkusInY5MhKjiHFaCx1GV0LmydXJ/QMh+3IWBJpUhes4ynTZuFoJKkDIFjxyMU09ul+RZixgdg==","signatures":[{"sig":"MEQCIC9KMCpl39DZ0v6algUE1eoR0r1r4WfPvhKtvtECv0zGAiBNLMMLnHgSaN2fS8DSBwMfyaL7FySQaaUrUycsf3j8WQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT1DrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrXEQ/+PUfY60CTU4jZpQvmX64d8C3Gm+GnjTikNvhDOys/kr1Yk3u6\r\np70AQ7Ru9ya3cTZ/oii7MUNplikz0VGHX3xGmATIZeEDt+Rn/FtcFtp99Tq/\r\n6aW+sSZrSLRLSBnYHJjYXFk70O0t/ydnqapyOne1DDpZ4HtU8pZJbOqOTP90\r\nX5L5dS/kK/ZnaAEpsXO1Abn7x1ATwtPOepCsKWLqlnJS8XDicsWAOeLJJ2JI\r\ni8ZiMisGnFQ1FmaEoSgWRxBKzrF+RoQJmnYM+TxfguUR1Ji3hKtL64Kloc7B\r\n9m62z+GLjr5qlXg0WqB/pXtbJLuqcjsSHyDgpxK0w4MsNrDLW/79b4wNO6eQ\r\nIYj1zC+ni5qAyllGwpvYzcJOola8A9Ay8nTOpZ0jvA/cPw+PPW16zMK5y2Td\r\nfHVM0iteivedUgJFcOi7y+H27oXVCINtRguZzAxo8G6zr+cystqO/9JInm6b\r\nfIHSXNHZlpZzKEhbS5szltYZ8Ta5/A+mLs3KIbiR9s1ONlm58BUDL0IotfPv\r\nAOCyNYX8/NU2m/rBn+NuKjEHqtWuaHo/kFwn7OF2+Bb6jviy6bv0Sq9IzzTD\r\nXjeQdMvVrRyr0wu6rLXVSQrcj/BF98rf/tEXu+nf4rgNR4mPJCREvVriAnZc\r\nNaCQHbea77Ofw1eAoU7px2WusujznldtBuo=\r\n=tM8o\r\n-----END PGP SIGNATURE-----\r\n","size":3280,"noattachment":false,"key":"/libnpmteam/-/libnpmteam-4.0.3.tgz"},"main":"lib/index.js","engines":{"node":"^12.13.0 || ^14.15.0 || >=16.0.0"},"gitHead":"1617bce61663a743435d162b003d3b99376d426f","scripts":{"lint":"eslint \"**/*.js\"","snap":"tap","test":"tap","lintfix":"npm run lint -- --fix","postlint":"template-oss-check","posttest":"npm run lint","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"gar","email":"gar+npm@danger.computer"},"repository":{"url":"git+https://github.com/npm/cli.git","type":"git","directory":"workspaces/libnpmteam"},"_npmVersion":"8.6.0","description":"npm Team management APIs","directories":{},"templateOSS":{"version":"3.3.2","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"16.14.2","dependencies":{"aproba":"^2.0.0","npm-registry-fetch":"^13.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^16.0.1","nock":"^13.2.4","@npmcli/template-oss":"3.3.2","@npmcli/eslint-config":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/libnpmteam_4.0.3_1649365227258_0.197899594448242","host":"s3://npm-registry-packages"},"readme":"# libnpmteam\n\n[![npm version](https://img.shields.io/npm/v/libnpmteam.svg)](https://npm.im/libnpmteam)\n[![license](https://img.shields.io/npm/l/libnpmteam.svg)](https://npm.im/libnpmteam)\n[![CI - libnpmteam](https://github.com/npm/cli/actions/workflows/ci-libnpmteam.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmteam.yml)\n\n[`libnpmteam`](https://github.com/npm/libnpmteam) is a Node.js\nlibrary that provides programmatic access to the guts of the npm CLI's `npm\nteam` command and its various subcommands.\n\n## Example\n\n```javascript\nconst team = require('libnpmteam')\n\n// List all teams for the @npm org.\nconsole.log(await team.lsTeams('npm'))\n```\n\n## Publishing\n1. Manually create CHANGELOG.md file\n1. Commit changes to CHANGELOG.md\n    ```bash\n    $ git commit -m \"chore: updated CHANGELOG.md\"\n    ```\n1. Run `npm version {newVersion}`\n    ```bash\n    # Example\n    $ npm version patch\n    # 1. Runs `coverage` and `lint` scripts\n    # 2. Bumps package version; and **create commit/tag**\n    # 3. Runs `npm publish`; publishing directory with **unpushed commit**\n    # 4. Runs `git push origin --follow-tags`\n    ```\n\n## Table of Contents\n\n* [Installing](#install)\n* [Example](#example)\n* [API](#api)\n  * [team opts](#opts)\n  * [`create()`](#create)\n  * [`destroy()`](#destroy)\n  * [`add()`](#add)\n  * [`rm()`](#rm)\n  * [`lsTeams()`](#ls-teams)\n  * [`lsTeams.stream()`](#ls-teams-stream)\n  * [`lsUsers()`](#ls-users)\n  * [`lsUsers.stream()`](#ls-users-stream)\n\n### Install\n\n`$ npm install libnpmteam`\n\n### API\n\n#### <a name=\"opts\"></a> `opts` for `libnpmteam` commands\n\n`libnpmteam` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).\nAll options are passed through directly to that library, so please refer to [its\nown `opts`\ndocumentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)\nfor options that can be passed in.\n\nA couple of options of note for those in a hurry:\n\n* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.\n* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmteam` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`\n\n#### <a name=\"create\"></a> `> team.create(team, [opts]) -> Promise`\n\nCreates a team named `team`. Team names use the format `@<scope>:<name>`, with\nthe `@` being optional.\n\nAdditionally, `opts.description` may be passed in to include a description.\n\n##### Example\n\n```javascript\nawait team.create('@npm:cli', {token: 'myregistrytoken'})\n// The @npm:cli team now exists.\n```\n\n#### <a name=\"destroy\"></a> `> team.destroy(team, [opts]) -> Promise`\n\nDestroys a team named `team`. Team names use the format `@<scope>:<name>`, with\nthe `@` being optional.\n\n##### Example\n\n```javascript\nawait team.destroy('@npm:cli', {token: 'myregistrytoken'})\n// The @npm:cli team has been destroyed.\n```\n\n#### <a name=\"add\"></a> `> team.add(user, team, [opts]) -> Promise`\n\nAdds `user` to `team`.\n\n##### Example\n\n```javascript\nawait team.add('zkat', '@npm:cli', {token: 'myregistrytoken'})\n// @zkat now belongs to the @npm:cli team.\n```\n\n#### <a name=\"rm\"></a> `> team.rm(user, team, [opts]) -> Promise`\n\nRemoves `user` from `team`.\n\n##### Example\n\n```javascript\nawait team.rm('zkat', '@npm:cli', {token: 'myregistrytoken'})\n// @zkat is no longer part of the @npm:cli team.\n```\n\n#### <a name=\"ls-teams\"></a> `> team.lsTeams(scope, [opts]) -> Promise`\n\nResolves to an array of team names belonging to `scope`.\n\n##### Example\n\n```javascript\nawait team.lsTeams('@npm', {token: 'myregistrytoken'})\n=>\n[\n  'npm:cli',\n  'npm:web',\n  'npm:registry',\n  'npm:developers'\n]\n```\n\n#### <a name=\"ls-teams-stream\"></a> `> team.lsTeams.stream(scope, [opts]) -> Stream`\n\nReturns a stream of teams belonging to `scope`.\n\nFor a Promise-based version of these results, see [`team.lsTeams()`](#ls-teams).\n\n##### Example\n\n```javascript\nfor await (let team of team.lsTeams.stream('@npm', {token: 'myregistrytoken'})) {\n  console.log(team)\n}\n\n// outputs\n// npm:cli\n// npm:web\n// npm:registry\n// npm:developers\n```\n\n#### <a name=\"ls-users\"></a> `> team.lsUsers(team, [opts]) -> Promise`\n\nResolves to an array of usernames belonging to `team`.\n\nFor a streamed version of these results, see [`team.lsUsers.stream()`](#ls-users-stream).\n\n##### Example\n\n```javascript\nawait team.lsUsers('@npm:cli', {token: 'myregistrytoken'})\n=>\n[\n  'iarna',\n  'zkat'\n]\n```\n\n#### <a name=\"ls-users-stream\"></a> `> team.lsUsers.stream(team, [opts]) -> Stream`\n\nReturns a stream of usernames belonging to `team`.\n\nFor a Promise-based version of these results, see [`team.lsUsers()`](#ls-users).\n\n##### Example\n\n```javascript\nfor await (let user of team.lsUsers.stream('@npm:cli', {token: 'myregistrytoken'})) {\n  console.log(user)\n}\n\n// outputs\n// iarna\n// zkat\n```\n","publish_time":1649365227398,"_cnpm_publish_time":1649365227398,"dist-tags":{"backport":"5.0.4","latest":"9.0.0","prerelease":"9.0.0-pre.0"}}