{"name":"libnpmteam","version":"2.0.4","author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"ISC","_id":"libnpmteam@2.0.4","maintainers":[{"name":"gimli01","email":"gimli01@github.com"},{"name":"gar","email":"gar+npm@danger.computer"},{"name":"isaacs","email":"i@izs.me"},{"name":"darcyclarke","email":"darcy@darcyclarke.me"},{"name":"ruyadorno","email":"ruyadorno@hotmail.com"},{"name":"nlf","email":"quitlahok@gmail.com"}],"homepage":"https://npmjs.com/package/libnpmteam","bugs":{"url":"https://github.com/npm/libnpmteam/issues"},"tap":{"check-coverage":true},"dist":{"shasum":"9dbe2e18ae3cb97551ec07d2a2daf9944f3edc4c","tarball":"http://registry-npm.ywwl.com/libnpmteam/download/libnpmteam-2.0.4.tgz","fileCount":4,"integrity":"sha512-FPrVJWv820FZFXaflAEVTLRWZrerCvfe7ZHSMzJ/62EBlho2KFlYKjyNEsPW3JiV7TLSXi3vo8u0gMwIkXSMTw==","signatures":[{"sig":"MEQCIC2OTjfNfCpq+RVTn/m41U2MMECQaCh0W/u52/VSFvOqAiBV43pln3+R4S9hF/qSh3IlZUh1/oepqctHAPfTPpeSaQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8714,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgt8FzCRA9TVsSAnZWagAAJCoP/3vwB8vsZ9ylZibOKaBc\nLEayY5jd3pcegefwuSzooC/UXJ0z9WQX8zJguibSt6JFD6yZwUCjZzOo1lmz\nU26UExc5MP52ACEAIe0wdAIaRZmMMoKtUj5GUaSY+Ah8wH/fAPsku2a0i985\nLFEjBHbkOCn2kfXLmH3FzPLd0OXO4+DX3mYBOrjJzkZS+T9ELnurS0UlKwvB\nyaLhgHOVWXitNNScSqbaHNyLh4TBy2uL1L60uHSz02xwYgI1Ucc6gPVvf8yR\nNWaKGBQtPL2IqXtbToAGYxb9zqERhObzMVCVWkUvcusGbD8QDDyvWVVL7/DT\n7yODiR3QutIENUWeHWGip9lhgwQo93WWUFzpW9pVcbr0lZFBfMQcB7gYEYjm\nHvxWgRDkGLAKa8VMCUecjlxWR0R5R2UKYDw4/gic3O2SrRg8tN3WQ7JkZJGW\n5AvSW7mCBbnNMh1wI9b2WY7xuZ5XpzDEECUSASG7FddRh8QjxZQ7GcKYpIlM\n9GvjwSHU7xV342EVXmQC+mPhRUNJxu6zzfGfSPqvY1544GGSQogip50pF/rV\nJi8KDvY6cuL/LMsPOjDvsN0UfjLcXydU/TqLdC3sF2/s0z6xc+S6gH86M51w\ndRXi9krrbqOQqD6khtGPoQXc0iMtWNTd8txWf0zBvxkMuN2cVloX9111kOuz\n9BNm\r\n=FW0a\r\n-----END PGP SIGNATURE-----\r\n","size":3145,"noattachment":false,"key":"/libnpmteam/-/libnpmteam-2.0.4.tgz"},"engines":{"node":">=10"},"gitHead":"a8df748b3a87cd22ab4a312ba6f644af62b6fb0c","scripts":{"lint":"standard","test":"tap","posttest":"npm run lint","preversion":"npm test","postversion":"npm publish","prepublishOnly":"git push origin --follow-tags"},"_npmUser":{"name":"nlf","email":"quitlahok@gmail.com"},"repository":{"url":"git+https://github.com/npm/libnpmteam.git","type":"git"},"_npmVersion":"7.15.1","description":"npm Team management APIs","directories":{},"_nodeVersion":"15.11.0","dependencies":{"aproba":"^2.0.0","npm-registry-fetch":"^11.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tap":"^14.10.6","nock":"^12.0.1","standard":"^14.3.1"},"_npmOperationalInternal":{"tmp":"tmp/libnpmteam_2.0.4_1622655347179_0.373630587233043","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":1622655347322,"_cnpm_publish_time":1622655347322,"dist-tags":{"backport":"5.0.4","latest":"9.0.0","prerelease":"9.0.0-pre.0"}}