{"name":"libnpmteam","version":"1.0.0","author":{"name":"Kat Marchán","email":"kzm@zkat.tech"},"license":"ISC","_id":"libnpmteam@1.0.0","maintainers":[{"name":"zkat","email":"npm@zkat.tech"}],"homepage":"https://npmjs.com/package/libnpmteam","bugs":{"url":"https://github.com/npm/libnpmteam/issues"},"dist":{"shasum":"318c100b1573b8685ac7b51402d13157e378f200","tarball":"http://registry-npm.ywwl.com/libnpmteam/download/libnpmteam-1.0.0.tgz","fileCount":12,"integrity":"sha512-kD+nyXWz6F3FIt6zCKbgiBc3wANkT0JIpF0s+w1TUtRYk9N7XpJuWdhl1w3YSSJYP6jViPFp2tFVtfSlECofJQ==","signatures":[{"sig":"MEUCIGWSTCxdEvfpqv6TwvGzBKxucCdxGa/4kaDnNTGIh2lTAiEAqNodQ0BfXAnnsd0NLkrviXnO/cS9CUe8trlpWLl3pU4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47203,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfLosCRA9TVsSAnZWagAAKQwP/2uH3VzksWuZTiLT+mTx\nvBOSxNHT7l8X+7hGpkyRGDAwnAhOv52cVrxojU31mEi/OMntlFnqSJTh1eTa\nlM4j+qD5vQd+1vxpLiImJ+tNCp/rVaYR2wktrl277bpB20XzQYGE9NhMIFWg\nbMXuwE8c97TSJhD2v9s9jJsAgebE6yKL/SQgd9Qoj6R4u53UsYH19Jvh6YNi\nimYvcWRZNfwlsQ4Kr5Kfj3VZTOQaKAYORDkjZHZxXrxMJaziTCi5LQJ0b3yE\nD6005hwixahgW9FV1kKRjw3eLGDaDsznDE/itLEtYgTFqgKknUl5qmquYzLY\nSCWfvWKuj6kw7PuRrXuT7k6ML2Maivb01YnNoYF7faK3nTsONFGqajqcCRjd\nCYY3gc6kUaBoLa6g6Z1cnZ9X3WRB6IytvgNDVaikwIIMRjPaHEbPSlLG7O+j\n5ap8Ik62A90rUTA8fF4Pw2918QFMo7XtVIiaJhbJ+EXx/+hIO0Uq8ZS6Fqee\nzf9RzeJv27ip3xufJk+f4RGDdfm+ikZT4aal+/cF3+8jprothinBrAETH467\nIN9ozJQlTmSRWqCw6mp9xbc2J2Tp3H6suCsy+u/tKfRgFecqLdqCQZt70osO\n+RPC73e1LTVl1Dej1gewIxxWlpBNdOUPDiF2OMyLnnDYLfwWjSEbl2hxTsus\nepWd\r\n=TKSX\r\n-----END PGP SIGNATURE-----\r\n","size":16444,"noattachment":false,"key":"/libnpmteam/-/libnpmteam-1.0.0.tgz"},"gitHead":"3165be738f2f145cf955aeb25c8098524729cff9","scripts":{"test":"tap -J --100 test/*.js","pretest":"standard","release":"standard-version -s","prerelease":"npm t","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","postrelease":"npm publish && git push --follow-tags","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"_npmUser":{"name":"zkat","email":"npm@zkat.tech"},"repository":{"url":"git+https://github.com/npm/libnpmteam.git","type":"git"},"_npmVersion":"6.4.0","description":"npm Team management APIs","directories":{},"_nodeVersion":"10.6.0","dependencies":{"aproba":"^2.0.0","JSONStream":"^1.3.4","get-stream":"^4.0.0","figgy-pudding":"^3.4.1","npm-registry-fetch":"^3.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tap":"*","nock":"^9.6.1","standard":"*","weallbehave":"*","weallcontribute":"*","standard-version":"*"},"_npmOperationalInternal":{"tmp":"tmp/libnpmteam_1.0.0_1534900779602_0.4034653945961184","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":1534900779674,"_cnpm_publish_time":1534900779674,"dist-tags":{"backport":"5.0.4","latest":"9.0.0","prerelease":"9.0.0-pre.0"}}