diff --git a/node_modules/libnpm/node_modules/libnpmaccess/.travis.yml b/node_modules/libnpm/node_modules/libnpmaccess/.travis.yml deleted file mode 100644 index db5ea8b018640..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -sudo: false -node_js: - - "10" - - "9" - - "8" - - "6" diff --git a/node_modules/libnpm/node_modules/libnpmaccess/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmaccess/CHANGELOG.md deleted file mode 100644 index cbec879a7db2e..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/CHANGELOG.md +++ /dev/null @@ -1,129 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [3.0.2](https://github.com/npm/libnpmaccess/compare/v3.0.1...v3.0.2) (2019-07-16) - - - - -## [3.0.1](https://github.com/npm/libnpmaccess/compare/v3.0.0...v3.0.1) (2018-11-12) - - -### Bug Fixes - -* **ls-packages:** fix confusing splitEntity arg check ([1769090](https://github.com/npm/libnpmaccess/commit/1769090)) - - - - -# [3.0.0](https://github.com/npm/libnpmaccess/compare/v2.0.1...v3.0.0) (2018-08-24) - - -### Features - -* **api:** overhaul API ergonomics ([1faf00a](https://github.com/npm/libnpmaccess/commit/1faf00a)) - - -### BREAKING CHANGES - -* **api:** all API calls where scope and team were separate, or -where team was an extra, optional argument should now use a -fully-qualified team name instead, in the `scope:team` format. - - - - -## [2.0.1](https://github.com/npm/libnpmaccess/compare/v2.0.0...v2.0.1) (2018-08-24) - - - - -# [2.0.0](https://github.com/npm/libnpmaccess/compare/v1.2.2...v2.0.0) (2018-08-21) - - -### Bug Fixes - -* **json:** stop trying to parse response JSON ([20fdd84](https://github.com/npm/libnpmaccess/commit/20fdd84)) -* **lsPackages:** team URL was wrong D: ([b52201c](https://github.com/npm/libnpmaccess/commit/b52201c)) - - -### BREAKING CHANGES - -* **json:** use cases where registries were returning JSON -strings in the response body will no longer have an effect. All -API functions except for lsPackages and lsCollaborators will return -`true` on completion. - - - - -## [1.2.2](https://github.com/npm/libnpmaccess/compare/v1.2.1...v1.2.2) (2018-08-20) - - -### Bug Fixes - -* **docs:** tiny doc hiccup fix ([106396f](https://github.com/npm/libnpmaccess/commit/106396f)) - - - - -## [1.2.1](https://github.com/npm/libnpmaccess/compare/v1.2.0...v1.2.1) (2018-08-20) - - -### Bug Fixes - -* **docs:** document the stream interfaces ([c435aa2](https://github.com/npm/libnpmaccess/commit/c435aa2)) - - - - -# [1.2.0](https://github.com/npm/libnpmaccess/compare/v1.1.0...v1.2.0) (2018-08-20) - - -### Bug Fixes - -* **readme:** fix up appveyor badge url ([42b45a1](https://github.com/npm/libnpmaccess/commit/42b45a1)) - - -### Features - -* **streams:** add streaming result support for lsPkg and lsCollab ([0f06f46](https://github.com/npm/libnpmaccess/commit/0f06f46)) - - - - -# [1.1.0](https://github.com/npm/libnpmaccess/compare/v1.0.0...v1.1.0) (2018-08-17) - - -### Bug Fixes - -* **2fa:** escape package names correctly ([f2d83fe](https://github.com/npm/libnpmaccess/commit/f2d83fe)) -* **grant:** fix permissions validation ([07f7435](https://github.com/npm/libnpmaccess/commit/07f7435)) -* **ls-collaborators:** fix package name escaping + query ([3c02858](https://github.com/npm/libnpmaccess/commit/3c02858)) -* **ls-packages:** add query + fix fallback request order ([bdc4791](https://github.com/npm/libnpmaccess/commit/bdc4791)) -* **node6:** stop using Object.entries() ([4fec03c](https://github.com/npm/libnpmaccess/commit/4fec03c)) -* **public/restricted:** body should be string, not bool ([cffc727](https://github.com/npm/libnpmaccess/commit/cffc727)) -* **readme:** fix up title and badges ([2bd6113](https://github.com/npm/libnpmaccess/commit/2bd6113)) -* **specs:** require specs to be registry specs ([7892891](https://github.com/npm/libnpmaccess/commit/7892891)) - - -### Features - -* **test:** add 100% coverage test suite ([22b5dec](https://github.com/npm/libnpmaccess/commit/22b5dec)) - - - - -# 1.0.0 (2018-08-17) - - -### Bug Fixes - -* **test:** -100 is apparently bad now ([a5ab879](https://github.com/npm/libnpmaccess/commit/a5ab879)) - - -### Features - -* **impl:** initial implementation of api ([7039390](https://github.com/npm/libnpmaccess/commit/7039390)) diff --git a/node_modules/libnpm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md b/node_modules/libnpm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md deleted file mode 100644 index aeb72f598dcb4..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,151 +0,0 @@ -# Code of Conduct - -## When Something Happens - -If you see a Code of Conduct violation, follow these steps: - -1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits. -2. That person should immediately stop the behavior and correct the issue. -3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers). -4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban. - -When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. - -**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples). - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - - * Using welcoming and inclusive language. - * Being respectful of differing viewpoints and experiences. - * Gracefully accepting constructive feedback. - * Focusing on what is best for the community. - * Showing empathy and kindness towards other community members. - * Encouraging and raising up your peers in the project so you can all bask in hacks and glory. - -Examples of unacceptable behavior by participants include: - - * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity. - * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology. - * Making light of/making mocking comments about trigger warnings and content warnings. - * Trolling, insulting/derogatory comments, and personal or political attacks. - * Public or private harassment, deliberate intimidation, or threats. - * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent. - * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent. - * Publishing of private communication that doesn't have to do with reporting harrassment. - * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism). - * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia". - * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are. - * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something. - * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)" - * Other conduct which could reasonably be considered inappropriate in a professional or community setting. - -## Scope - -This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members. - -Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members. - -### Other Community Standards - -As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/). - -Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct). - -Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities. - -## Maintainer Enforcement Process - -Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps. - -### Contacting Maintainers - -You may get in touch with the maintainer team through any of the following methods: - - * Through email: - * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán) - - * Through Twitter: - * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán) - -### Further Enforcement - -If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed: - - 1. Repeat the request to stop. - 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked. - 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours. - 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used. - -On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary. - -Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk. - -Members expelled from events or venues with any sort of paid attendance will not be refunded. - -### Who Watches the Watchers? - -Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community. - -Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures. - -### Enforcement Examples - -#### The Best Case - -The vast majority of situations work out like this. This interaction is common, and generally positive. - -> Alex: "Yeah I used X and it was really crazy!" - -> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?" - -> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!" - -#### The Maintainer Case - -Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**. - -> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job." - -> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that." - -> Patt: "I'm not attacking anyone, what's your problem?" - -> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope." - -> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space." - -> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you." - -> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?" - -> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble." - -> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!" - -#### The Nope Case - -> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable." - -> Patt: "NOOOOPE. OH NOPE NOPE." - -> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE" - -> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥" - -> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits. - -## Attribution - -This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of -Conduct](https://wealljs.org/code-of-conduct), which is itself based on -[Contributor Covenant](http://contributor-covenant.org), version 1.4, available -at -[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4), -and the LGBTQ in Technology Slack [Code of -Conduct](http://lgbtq.technology/coc.html). diff --git a/node_modules/libnpm/node_modules/libnpmaccess/CONTRIBUTING.md b/node_modules/libnpm/node_modules/libnpmaccess/CONTRIBUTING.md deleted file mode 100644 index e13356ea44497..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/CONTRIBUTING.md +++ /dev/null @@ -1,256 +0,0 @@ -# Contributing - -## How do I... - -* [Use This Guide](#introduction)? -* Ask or Say Something? 🤔🐛😱 - * [Request Support](#request-support) - * [Report an Error or Bug](#report-an-error-or-bug) - * [Request a Feature](#request-a-feature) -* Make Something? 🤓👩🏽‍💻📜🍳 - * [Project Setup](#project-setup) - * [Contribute Documentation](#contribute-documentation) - * [Contribute Code](#contribute-code) -* Manage Something ✅🙆🏼💃👔 - * [Provide Support on Issues](#provide-support-on-issues) - * [Label Issues](#label-issues) - * [Clean Up Issues and PRs](#clean-up-issues-and-prs) - * [Review Pull Requests](#review-pull-requests) - * [Merge Pull Requests](#merge-pull-requests) - * [Tag a Release](#tag-a-release) - * [Join the Project Team](#join-the-project-team) -* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻 - -## Introduction - -Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝 - -Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚 - -The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨ - -## Request Support - -If you have a question about this project, how to use it, or just need clarification about something: - -* Open an Issue at https://github.com/npm/libnpmaccess/issues -* Provide as much context as you can about what you're running into. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* Someone will try to have a response soon. -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. - -## Report an Error or Bug - -If you run into an error or bug with the project: - -* Open an Issue at https://github.com/npm/libnpmaccess/issues -* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. -* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code). -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. -* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline. - -## Request a Feature - -If the project doesn't do something you need or want it to do: - -* Open an Issue at https://github.com/npm/libnpmaccess/issues -* Provide as much context as you can about what you're running into. -* Please try and be clear about why existing features and alternatives would not work for you. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. -* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code). - -Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no. - -## Project Setup - -So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before. - -If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code). - -If you want to go the usual route and run the project locally, though: - -* [Install Node.js](https://nodejs.org/en/download/) -* [Fork the project](https://guides.github.com/activities/forking/#fork) - -Then in your terminal: -* `cd path/to/your/clone` -* `npm install` -* `npm test` - -And you should be ready to go! - -## Contribute Documentation - -Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance. - -Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake! - -To contribute documentation: - -* [Set up the project](#project-setup). -* Edit or add any relevant documentation. -* Make sure your changes are formatted correctly and consistently with the rest of the documentation. -* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything. -* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `. -* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Contribute Code - -We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others. - -Code contributions of just about any size are acceptable! - -The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution. - -To contribute code: - -* [Set up the project](#project-setup). -* Make any necessary changes to the source code. -* Include any [additional documentation](#contribute-documentation) the changes might need. -* Write tests that verify that your contribution works as expected. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). -* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion. -* Go to https://github.com/npm/libnpmaccess/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc). -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Provide Support on Issues - -[Needs Collaborator](#join-the-project-team): none - -Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug. - -Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it. - -In order to help other folks out with their questions: - -* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+label%3Asupport). -* Read through the list until you find something that you're familiar enough with to give an answer to. -* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on. -* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you. - -Some notes on picking up support issues: - -* Avoid responding to issues you don't know you can answer accurately. -* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format. -* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict). - -## Label Issues - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily. - -In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmaccess/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself! - -Label | Apply When | Notes ---- | --- | --- -`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label. -`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. | -`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`. -`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`) -`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. | -`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling. -`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete. -`performance` | This issue or PR is directly related to improving performance. | -`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. | -`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority. -`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes. -`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests) -`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not. - -## Clean Up Issues and PRs - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon. - -In these cases, they should be closed until they're brought up again or the interaction starts over. - -To clean up issues and PRs: - -* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today. -* Go through each issue *from oldest to newest*, and close them if **all of the following are true**: - * not opened by a maintainer - * not marked as `critical` - * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available) - * no explicit messages in the comments asking for it to be left open - * does not belong to a milestone -* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmaccess/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details." - -## Review Pull Requests - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions. - -PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration. - -Some notes: - -* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments". -* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers. -* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own. -* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it? - -## Merge Pull Requests - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. - -## Tag A Release - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org). - -## Join the Project Team - -### Ways to Join - -There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do. - -All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like. - -You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names. - -Permission | Description ---- | --- -Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. -Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. -Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. - -## Attribution - -This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)! diff --git a/node_modules/libnpm/node_modules/libnpmaccess/LICENSE b/node_modules/libnpm/node_modules/libnpmaccess/LICENSE deleted file mode 100644 index 209e4477f39c1..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE b/node_modules/libnpm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 9471c6d325f7e..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/node_modules/libnpm/node_modules/libnpmaccess/README.md b/node_modules/libnpm/node_modules/libnpmaccess/README.md deleted file mode 100644 index 2b639823a0641..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/README.md +++ /dev/null @@ -1,258 +0,0 @@ -# libnpmaccess [![npm version](https://img.shields.io/npm/v/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![license](https://img.shields.io/npm/l/libnpmaccess.svg)](https://npm.im/libnpmaccess) [![Travis](https://img.shields.io/travis/npm/libnpmaccess/latest.svg)](https://travis-ci.org/npm/libnpmaccess) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/libnpmaccess/latest.svg)](https://ci.appveyor.com/project/zkat/libnpmaccess) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmaccess/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmaccess?branch=latest) - -[`libnpmaccess`](https://github.com/npm/libnpmaccess) is a Node.js -library that provides programmatic access to the guts of the npm CLI's `npm -access` command and its various subcommands. This includes managing account 2FA, -listing packages and permissions, looking at package collaborators, and defining -package permissions for users, orgs, and teams. - -## Example - -```javascript -const access = require('libnpmaccess') - -// List all packages @zkat has access to on the npm registry. -console.log(Object.keys(await access.lsPackages('zkat'))) -``` - -## Table of Contents - -* [Installing](#install) -* [Example](#example) -* [Contributing](#contributing) -* [API](#api) - * [access opts](#opts) - * [`public()`](#public) - * [`restricted()`](#restricted) - * [`grant()`](#grant) - * [`revoke()`](#revoke) - * [`tfaRequired()`](#tfa-required) - * [`tfaNotRequired()`](#tfa-not-required) - * [`lsPackages()`](#ls-packages) - * [`lsPackages.stream()`](#ls-packages-stream) - * [`lsCollaborators()`](#ls-collaborators) - * [`lsCollaborators.stream()`](#ls-collaborators-stream) - -### Install - -`$ npm install libnpmaccess` - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The [Contributor -Guide](CONTRIBUTING.md) has all the information you need for everything from -reporting bugs to contributing entire new features. Please don't hesitate to -jump in if you'd like to, or even ask us questions if something isn't clear. - -All participants and maintainers in this project are expected to follow [Code of -Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `opts` for `libnpmaccess` commands - -`libnpmaccess` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `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. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmaccess` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmaccess` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> access.public(spec, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. - -Makes package described by `spec` public. - -##### Example - -```javascript -await access.public('@foo/bar', {token: 'myregistrytoken'}) -// `@foo/bar` is now public -``` - -#### `> access.restricted(spec, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. - -Makes package described by `spec` private/restricted. - -##### Example - -```javascript -await access.restricted('@foo/bar', {token: 'myregistrytoken'}) -// `@foo/bar` is now private -``` - -#### `> access.grant(spec, team, permissions, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `team` must be a fully-qualified team name, in the `scope:team` -format, with or without the `@` prefix, and the team must be a valid team within -that scope. `permissions` must be one of `'read-only'` or `'read-write'`. - -Grants `read-only` or `read-write` permissions for a certain package to a team. - -##### Example - -```javascript -await access.grant('@foo/bar', '@foo:myteam', 'read-write', { - token: 'myregistrytoken' -}) -// `@foo/bar` is now read/write enabled for the @foo:myteam team. -``` - -#### `> access.revoke(spec, team, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `team` must be a fully-qualified team name, in the `scope:team` -format, with or without the `@` prefix, and the team must be a valid team within -that scope. `permissions` must be one of `'read-only'` or `'read-write'`. - -Removes access to a package from a certain team. - -##### Example - -```javascript -await access.revoke('@foo/bar', '@foo:myteam', { - token: 'myregistrytoken' -}) -// @foo:myteam can no longer access `@foo/bar` -``` - -#### `> access.tfaRequired(spec, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. - -Makes it so publishing or managing a package requires using 2FA tokens to -complete operations. - -##### Example - -```javascript -await access.tfaRequires('lodash', {token: 'myregistrytoken'}) -// Publishing or changing dist-tags on `lodash` now require OTP to be enabled. -``` - -#### `> access.tfaNotRequired(spec, [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. - -Disabled the package-level 2FA requirement for `spec`. Note that you will need -to pass in an `otp` token in `opts` in order to complete this operation. - -##### Example - -```javascript -await access.tfaNotRequired('lodash', {otp: '123654', token: 'myregistrytoken'}) -// Publishing or editing dist-tags on `lodash` no longer requires OTP to be -// enabled. -``` - -#### `> access.lsPackages(entity, [opts]) -> Promise` - -`entity` must be either a valid org or user name, or a fully-qualified team name -in the `scope:team` format, with or without the `@` prefix. - -Lists out packages a user, org, or team has access to, with corresponding -permissions. Packages that the access token does not have access to won't be -listed. - -In order to disambiguate between users and orgs, two requests may end up being -made when listing orgs or users. - -For a streamed version of these results, see -[`access.lsPackages.stream()`](#ls-package-stream). - -##### Example - -```javascript -await access.lsPackages('zkat', { - token: 'myregistrytoken' -}) -// Lists all packages `@zkat` has access to on the registry, and the -// corresponding permissions. -``` - -#### `> access.lsPackages.stream(scope, [team], [opts]) -> Stream` - -`entity` must be either a valid org or user name, or a fully-qualified team name -in the `scope:team` format, with or without the `@` prefix. - -Streams out packages a user, org, or team has access to, with corresponding -permissions, with each stream entry being formatted like `[packageName, -permissions]`. Packages that the access token does not have access to won't be -listed. - -In order to disambiguate between users and orgs, two requests may end up being -made when listing orgs or users. - -The returned stream is a valid `asyncIterator`. - -##### Example - -```javascript -for await (let [pkg, perm] of access.lsPackages.stream('zkat')) { - console.log('zkat has', perm, 'access to', pkg) -} -// zkat has read-write access to eggplant -// zkat has read-only access to @npmcorp/secret -``` - -#### `> access.lsCollaborators(spec, [user], [opts]) -> Promise` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `user` must be a valid user name, with or without the `@` -prefix. - -Lists out access privileges for a certain package. Will only show permissions -for packages to which you have at least read access. If `user` is passed in, the -list is filtered only to teams _that_ user happens to belong to. - -For a streamed version of these results, see [`access.lsCollaborators.stream()`](#ls-collaborators-stream). - -##### Example - -```javascript -await access.lsCollaborators('@npm/foo', 'zkat', { - token: 'myregistrytoken' -}) -// Lists all teams with access to @npm/foo that @zkat belongs to. -``` - -#### `> access.lsCollaborators.stream(spec, [user], [opts]) -> Stream` - -`spec` must be an [`npm-package-arg`](https://npm.im/npm-package-arg)-compatible -registry spec. `user` must be a valid user name, with or without the `@` -prefix. - -Stream out access privileges for a certain package, with each entry in `[user, -permissions]` format. Will only show permissions for packages to which you have -at least read access. If `user` is passed in, the list is filtered only to teams -_that_ user happens to belong to. - -The returned stream is a valid `asyncIterator`. - -##### Example - -```javascript -for await (let [usr, perm] of access.lsCollaborators.stream('npm')) { - console.log(usr, 'has', perm, 'access to npm') -} -// zkat has read-write access to npm -// iarna has read-write access to npm -``` diff --git a/node_modules/libnpm/node_modules/libnpmaccess/appveyor.yml b/node_modules/libnpm/node_modules/libnpmaccess/appveyor.yml deleted file mode 100644 index 9cc64c58e02f9..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "6" - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm config set spin false - - npm install - -test_script: - - npm test - -matrix: - fast_finish: true - -build: off diff --git a/node_modules/libnpm/node_modules/libnpmaccess/index.js b/node_modules/libnpm/node_modules/libnpmaccess/index.js deleted file mode 100644 index e241fcbfc68a2..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/index.js +++ /dev/null @@ -1,201 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const npa = require('npm-package-arg') -const npmFetch = require('npm-registry-fetch') -const {PassThrough} = require('stream') -const validate = require('aproba') - -const AccessConfig = figgyPudding({ - Promise: {default: () => Promise} -}) - -const eu = encodeURIComponent -const npar = spec => { - spec = npa(spec) - if (!spec.registry) { - throw new Error('`spec` must be a registry spec') - } - return spec -} - -const cmd = module.exports = {} - -cmd.public = (spec, opts) => setAccess(spec, 'public', opts) -cmd.restricted = (spec, opts) => setAccess(spec, 'restricted', opts) -function setAccess (spec, access, opts) { - opts = AccessConfig(opts) - return pwrap(opts, () => { - spec = npar(spec) - validate('OSO', [spec, access, opts]) - const uri = `/-/package/${eu(spec.name)}/access` - return npmFetch(uri, opts.concat({ - method: 'POST', - body: {access}, - spec - })) - }).then(res => res.body.resume() && true) -} - -cmd.grant = (spec, entity, permissions, opts) => { - opts = AccessConfig(opts) - return pwrap(opts, () => { - spec = npar(spec) - const {scope, team} = splitEntity(entity) - validate('OSSSO', [spec, scope, team, permissions, opts]) - if (permissions !== 'read-write' && permissions !== 'read-only') { - throw new Error('`permissions` must be `read-write` or `read-only`. Got `' + permissions + '` instead') - } - const uri = `/-/team/${eu(scope)}/${eu(team)}/package` - return npmFetch(uri, opts.concat({ - method: 'PUT', - body: {package: spec.name, permissions}, - scope, - spec, - ignoreBody: true - })) - }).then(() => true) -} - -cmd.revoke = (spec, entity, opts) => { - opts = AccessConfig(opts) - return pwrap(opts, () => { - spec = npar(spec) - const {scope, team} = splitEntity(entity) - validate('OSSO', [spec, scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}/package` - return npmFetch(uri, opts.concat({ - method: 'DELETE', - body: {package: spec.name}, - scope, - spec, - ignoreBody: true - })) - }).then(() => true) -} - -cmd.lsPackages = (entity, opts) => { - opts = AccessConfig(opts) - return pwrap(opts, () => { - return getStream.array( - cmd.lsPackages.stream(entity, opts) - ).then(data => data.reduce((acc, [key, val]) => { - if (!acc) { - acc = {} - } - acc[key] = val - return acc - }, null)) - }) -} - -cmd.lsPackages.stream = (entity, opts) => { - validate('SO|SZ', [entity, opts]) - opts = AccessConfig(opts) - const {scope, team} = splitEntity(entity) - let uri - if (team) { - uri = `/-/team/${eu(scope)}/${eu(team)}/package` - } else { - uri = `/-/org/${eu(scope)}/package` - } - opts = opts.concat({ - query: {format: 'cli'}, - mapJson (value, [key]) { - if (value === 'read') { - return [key, 'read-only'] - } else if (value === 'write') { - return [key, 'read-write'] - } else { - return [key, value] - } - } - }) - const ret = new PassThrough({objectMode: true}) - npmFetch.json.stream(uri, '*', opts).on('error', err => { - if (err.code === 'E404' && !team) { - uri = `/-/user/${eu(scope)}/package` - npmFetch.json.stream(uri, '*', opts).on( - 'error', err => ret.emit('error', err) - ).pipe(ret) - } else { - ret.emit('error', err) - } - }).pipe(ret) - return ret -} - -cmd.lsCollaborators = (spec, user, opts) => { - if (typeof user === 'object' && !opts) { - opts = user - user = undefined - } - opts = AccessConfig(opts) - return pwrap(opts, () => { - return getStream.array( - cmd.lsCollaborators.stream(spec, user, opts) - ).then(data => data.reduce((acc, [key, val]) => { - if (!acc) { - acc = {} - } - acc[key] = val - return acc - }, null)) - }) -} - -cmd.lsCollaborators.stream = (spec, user, opts) => { - if (typeof user === 'object' && !opts) { - opts = user - user = undefined - } - opts = AccessConfig(opts) - spec = npar(spec) - validate('OSO|OZO', [spec, user, opts]) - const uri = `/-/package/${eu(spec.name)}/collaborators` - return npmFetch.json.stream(uri, '*', opts.concat({ - query: {format: 'cli', user: user || undefined}, - mapJson (value, [key]) { - if (value === 'read') { - return [key, 'read-only'] - } else if (value === 'write') { - return [key, 'read-write'] - } else { - return [key, value] - } - } - })) -} - -cmd.tfaRequired = (spec, opts) => setRequires2fa(spec, true, opts) -cmd.tfaNotRequired = (spec, opts) => setRequires2fa(spec, false, opts) -function setRequires2fa (spec, required, opts) { - opts = AccessConfig(opts) - return new opts.Promise((resolve, reject) => { - spec = npar(spec) - validate('OBO', [spec, required, opts]) - const uri = `/-/package/${eu(spec.name)}/access` - return npmFetch(uri, opts.concat({ - method: 'POST', - body: {publish_requires_tfa: required}, - spec, - ignoreBody: true - })).then(resolve, reject) - }).then(() => true) -} - -cmd.edit = () => { - throw new Error('Not implemented yet') -} - -function splitEntity (entity = '') { - let [, scope, team] = entity.match(/^@?([^:]+)(?::(.*))?$/) || [] - return {scope, team} -} - -function pwrap (opts, fn) { - return new opts.Promise((resolve, reject) => { - fn().then(resolve, reject) - }) -} diff --git a/node_modules/libnpm/node_modules/libnpmaccess/package.json b/node_modules/libnpm/node_modules/libnpmaccess/package.json deleted file mode 100644 index e121fc11ee143..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "libnpmaccess@^3.0.2", - "_id": "libnpmaccess@3.0.2", - "_inBundle": false, - "_integrity": "sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ==", - "_location": "/libnpm/libnpmaccess", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "libnpmaccess@^3.0.2", - "name": "libnpmaccess", - "escapedName": "libnpmaccess", - "rawSpec": "^3.0.2", - "saveSpec": null, - "fetchSpec": "^3.0.2" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.2.tgz", - "_shasum": "8b2d72345ba3bef90d3b4f694edd5c0417f58923", - "_spec": "libnpmaccess@^3.0.2", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech" - }, - "bugs": { - "url": "https://github.com/npm/libnpmaccess/issues" - }, - "bundleDependencies": false, - "dependencies": { - "aproba": "^2.0.0", - "get-stream": "^4.0.0", - "npm-package-arg": "^6.1.0", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "programmatic library for `npm access` commands", - "devDependencies": { - "nock": "^9.6.1", - "standard": "*", - "standard-version": "*", - "tap": "*", - "weallbehave": "*", - "weallcontribute": "*" - }, - "homepage": "https://npmjs.com/package/libnpmaccess", - "license": "ISC", - "name": "libnpmaccess", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmaccess.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "3.0.2" -} diff --git a/node_modules/libnpm/node_modules/libnpmaccess/test/index.js b/node_modules/libnpm/node_modules/libnpmaccess/test/index.js deleted file mode 100644 index b48815e79a1fb..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/test/index.js +++ /dev/null @@ -1,347 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const {test} = require('tap') -const tnock = require('./util/tnock.js') - -const access = require('../index.js') - -const REG = 'http://localhost:1337' -const OPTS = figgyPudding({})({ - registry: REG -}) - -test('access public', t => { - tnock(t, REG).post( - '/-/package/%40foo%2Fbar/access', {access: 'public'} - ).reply(200) - return access.public('@foo/bar', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access restricted', t => { - tnock(t, REG).post( - '/-/package/%40foo%2Fbar/access', {access: 'restricted'} - ).reply(200) - return access.restricted('@foo/bar', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access 2fa-required', t => { - tnock(t, REG).post('/-/package/%40foo%2Fbar/access', { - publish_requires_tfa: true - }).reply(200, {ok: true}) - return access.tfaRequired('@foo/bar', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access 2fa-not-required', t => { - tnock(t, REG).post('/-/package/%40foo%2Fbar/access', { - publish_requires_tfa: false - }).reply(200, {ok: true}) - return access.tfaNotRequired('@foo/bar', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access grant basic read-write', t => { - tnock(t, REG).put('/-/team/myorg/myteam/package', { - package: '@foo/bar', - permissions: 'read-write' - }).reply(201) - return access.grant( - '@foo/bar', 'myorg:myteam', 'read-write', OPTS - ).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access grant basic read-only', t => { - tnock(t, REG).put('/-/team/myorg/myteam/package', { - package: '@foo/bar', - permissions: 'read-only' - }).reply(201) - return access.grant( - '@foo/bar', 'myorg:myteam', 'read-only', OPTS - ).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access grant bad perm', t => { - return access.grant( - '@foo/bar', 'myorg:myteam', 'unknown', OPTS - ).then(ret => { - throw new Error('should not have succeeded') - }, err => { - t.match( - err.message, - /must be.*read-write.*read-only/, - 'only read-write and read-only are accepted' - ) - }) -}) - -test('access grant no entity', t => { - return access.grant( - '@foo/bar', undefined, 'read-write', OPTS - ).then(ret => { - throw new Error('should not have succeeded') - }, err => { - t.match( - err.message, - /Expected string/, - 'passing undefined entity gives useful error' - ) - }) -}) - -test('access grant basic unscoped', t => { - tnock(t, REG).put('/-/team/myorg/myteam/package', { - package: 'bar', - permissions: 'read-write' - }).reply(201) - return access.grant( - 'bar', 'myorg:myteam', 'read-write', OPTS - ).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access revoke basic', t => { - tnock(t, REG).delete('/-/team/myorg/myteam/package', { - package: '@foo/bar' - }).reply(200) - return access.revoke('@foo/bar', 'myorg:myteam', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('access revoke basic unscoped', t => { - tnock(t, REG).delete('/-/team/myorg/myteam/package', { - package: 'bar' - }).reply(200, {accessChanged: true}) - return access.revoke('bar', 'myorg:myteam', OPTS).then(ret => { - t.deepEqual(ret, true, 'request succeeded') - }) -}) - -test('ls-packages on team', t => { - const serverPackages = { - '@foo/bar': 'write', - '@foo/util': 'read', - '@foo/other': 'shrödinger' - } - const clientPackages = { - '@foo/bar': 'read-write', - '@foo/util': 'read-only', - '@foo/other': 'shrödinger' - } - tnock(t, REG).get( - '/-/team/myorg/myteam/package?format=cli' - ).reply(200, serverPackages) - return access.lsPackages('myorg:myteam', OPTS).then(data => { - t.deepEqual(data, clientPackages, 'got client package info') - }) -}) - -test('ls-packages on org', t => { - const serverPackages = { - '@foo/bar': 'write', - '@foo/util': 'read', - '@foo/other': 'shrödinger' - } - const clientPackages = { - '@foo/bar': 'read-write', - '@foo/util': 'read-only', - '@foo/other': 'shrödinger' - } - tnock(t, REG).get( - '/-/org/myorg/package?format=cli' - ).reply(200, serverPackages) - return access.lsPackages('myorg', OPTS).then(data => { - t.deepEqual(data, clientPackages, 'got client package info') - }) -}) - -test('ls-packages on user', t => { - const serverPackages = { - '@foo/bar': 'write', - '@foo/util': 'read', - '@foo/other': 'shrödinger' - } - const clientPackages = { - '@foo/bar': 'read-write', - '@foo/util': 'read-only', - '@foo/other': 'shrödinger' - } - const srv = tnock(t, REG) - srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'}) - srv.get('/-/user/myuser/package?format=cli').reply(200, serverPackages) - return access.lsPackages('myuser', OPTS).then(data => { - t.deepEqual(data, clientPackages, 'got client package info') - }) -}) - -test('ls-packages error on team', t => { - tnock(t, REG).get('/-/team/myorg/myteam/package?format=cli').reply(404) - return access.lsPackages('myorg:myteam', OPTS).then( - () => { throw new Error('should not have succeeded') }, - err => t.equal(err.code, 'E404', 'spit out 404 directly if team provided') - ) -}) - -test('ls-packages error on user', t => { - const srv = tnock(t, REG) - srv.get('/-/org/myuser/package?format=cli').reply(404, {error: 'not found'}) - srv.get('/-/user/myuser/package?format=cli').reply(404, {error: 'not found'}) - return access.lsPackages('myuser', OPTS).then( - () => { throw new Error('should not have succeeded') }, - err => t.equal(err.code, 'E404', 'spit out 404 if both reqs fail') - ) -}) - -test('ls-packages bad response', t => { - tnock(t, REG).get( - '/-/team/myorg/myteam/package?format=cli' - ).reply(200, JSON.stringify(null)) - return access.lsPackages('myorg:myteam', OPTS).then(data => { - t.deepEqual(data, null, 'succeeds with null') - }) -}) - -test('ls-packages stream', t => { - const serverPackages = { - '@foo/bar': 'write', - '@foo/util': 'read', - '@foo/other': 'shrödinger' - } - const clientPackages = [ - ['@foo/bar', 'read-write'], - ['@foo/util', 'read-only'], - ['@foo/other', 'shrödinger'] - ] - tnock(t, REG).get( - '/-/team/myorg/myteam/package?format=cli' - ).reply(200, serverPackages) - return getStream.array( - access.lsPackages.stream('myorg:myteam', OPTS) - ).then(data => { - t.deepEqual(data, clientPackages, 'got streamed client package info') - }) -}) - -test('ls-collaborators', t => { - const serverCollaborators = { - 'myorg:myteam': 'write', - 'myorg:anotherteam': 'read', - 'myorg:thirdteam': 'special-case' - } - const clientCollaborators = { - 'myorg:myteam': 'read-write', - 'myorg:anotherteam': 'read-only', - 'myorg:thirdteam': 'special-case' - } - tnock(t, REG).get( - '/-/package/%40foo%2Fbar/collaborators?format=cli' - ).reply(200, serverCollaborators) - return access.lsCollaborators('@foo/bar', OPTS).then(data => { - t.deepEqual(data, clientCollaborators, 'got collaborators') - }) -}) - -test('ls-collaborators stream', t => { - const serverCollaborators = { - 'myorg:myteam': 'write', - 'myorg:anotherteam': 'read', - 'myorg:thirdteam': 'special-case' - } - const clientCollaborators = [ - ['myorg:myteam', 'read-write'], - ['myorg:anotherteam', 'read-only'], - ['myorg:thirdteam', 'special-case'] - ] - tnock(t, REG).get( - '/-/package/%40foo%2Fbar/collaborators?format=cli' - ).reply(200, serverCollaborators) - return getStream.array( - access.lsCollaborators.stream('@foo/bar', OPTS) - ).then(data => { - t.deepEqual(data, clientCollaborators, 'got collaborators') - }) -}) - -test('ls-collaborators w/scope', t => { - const serverCollaborators = { - 'myorg:myteam': 'write', - 'myorg:anotherteam': 'read', - 'myorg:thirdteam': 'special-case' - } - const clientCollaborators = { - 'myorg:myteam': 'read-write', - 'myorg:anotherteam': 'read-only', - 'myorg:thirdteam': 'special-case' - } - tnock(t, REG).get( - '/-/package/%40foo%2Fbar/collaborators?format=cli&user=zkat' - ).reply(200, serverCollaborators) - return access.lsCollaborators('@foo/bar', 'zkat', OPTS).then(data => { - t.deepEqual(data, clientCollaborators, 'got collaborators') - }) -}) - -test('ls-collaborators w/o scope', t => { - const serverCollaborators = { - 'myorg:myteam': 'write', - 'myorg:anotherteam': 'read', - 'myorg:thirdteam': 'special-case' - } - const clientCollaborators = { - 'myorg:myteam': 'read-write', - 'myorg:anotherteam': 'read-only', - 'myorg:thirdteam': 'special-case' - } - tnock(t, REG).get( - '/-/package/bar/collaborators?format=cli&user=zkat' - ).reply(200, serverCollaborators) - return access.lsCollaborators('bar', 'zkat', OPTS).then(data => { - t.deepEqual(data, clientCollaborators, 'got collaborators') - }) -}) - -test('ls-collaborators bad response', t => { - tnock(t, REG).get( - '/-/package/%40foo%2Fbar/collaborators?format=cli' - ).reply(200, JSON.stringify(null)) - return access.lsCollaborators('@foo/bar', null, OPTS).then(data => { - t.deepEqual(data, null, 'succeeds with null') - }) -}) - -test('error on non-registry specs', t => { - const resolve = () => { throw new Error('should not succeed') } - const reject = err => t.match( - err.message, /spec.*must be a registry spec/, 'registry spec required' - ) - return Promise.all([ - access.public('foo/bar').then(resolve, reject), - access.restricted('foo/bar').then(resolve, reject), - access.grant('foo/bar', 'myorg', 'myteam', 'read-only').then(resolve, reject), - access.revoke('foo/bar', 'myorg', 'myteam').then(resolve, reject), - access.lsCollaborators('foo/bar').then(resolve, reject), - access.tfaRequired('foo/bar').then(resolve, reject), - access.tfaNotRequired('foo/bar').then(resolve, reject) - ]) -}) - -test('edit', t => { - t.equal(typeof access.edit, 'function', 'access.edit exists') - t.throws(() => { - access.edit() - }, /Not implemented/, 'directly throws NIY message') - t.done() -}) diff --git a/node_modules/libnpm/node_modules/libnpmaccess/test/util/tnock.js b/node_modules/libnpm/node_modules/libnpmaccess/test/util/tnock.js deleted file mode 100644 index 00b6e160e1019..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmaccess/test/util/tnock.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.tearDown(function () { - server.done() - }) - return server -} diff --git a/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md deleted file mode 100644 index 4121122e0b735..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [5.0.3](https://github.com/npm/libnpmhook/compare/v5.0.2...v5.0.3) (2019-07-16) - - - - -## [5.0.2](https://github.com/npm/libnpmhook/compare/v5.0.1...v5.0.2) (2018-08-24) - - - - -## [5.0.1](https://github.com/npm/libnpmhook/compare/v5.0.0...v5.0.1) (2018-08-23) - - -### Bug Fixes - -* **deps:** move JSONStream to prod deps ([bb63594](https://github.com/npm/libnpmhook/commit/bb63594)) - - - - -# [5.0.0](https://github.com/npm/libnpmhook/compare/v4.0.1...v5.0.0) (2018-08-21) - - -### Features - -* **api:** overhauled API ([46b271b](https://github.com/npm/libnpmhook/commit/46b271b)) - - -### BREAKING CHANGES - -* **api:** the API for ls() has changed, and rm() no longer errors on 404 - - - - -## [4.0.1](https://github.com/npm/libnpmhook/compare/v4.0.0...v4.0.1) (2018-04-09) - - - - -# [4.0.0](https://github.com/npm/libnpmhook/compare/v3.0.1...v4.0.0) (2018-04-08) - - -### meta - -* drop support for node 4 and 7 ([f2a301e](https://github.com/npm/libnpmhook/commit/f2a301e)) - - -### BREAKING CHANGES - -* node@4 and node@7 are no longer supported - - - - -## [3.0.1](https://github.com/npm/libnpmhook/compare/v3.0.0...v3.0.1) (2018-04-08) - - - - -# [3.0.0](https://github.com/npm/libnpmhook/compare/v2.0.1...v3.0.0) (2018-04-04) - - -### add - -* guess type based on name ([9418224](https://github.com/npm/libnpmhook/commit/9418224)) - - -### BREAKING CHANGES - -* hook type is now based on name prefix - - - - -## [2.0.1](https://github.com/npm/libnpmhook/compare/v2.0.0...v2.0.1) (2018-03-16) - - -### Bug Fixes - -* **urls:** was hitting the wrong URL endpoints ([10171a9](https://github.com/npm/libnpmhook/commit/10171a9)) - - - - -# [2.0.0](https://github.com/npm/libnpmhook/compare/v1.0.0...v2.0.0) (2018-03-16) - - - - -# 1.0.0 (2018-03-16) - - -### Features - -* **api:** baseline working api ([122658e](https://github.com/npm/npm-hooks/commit/122658e)) diff --git a/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md b/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md deleted file mode 100644 index 8d28acf866d93..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/LICENSE.md +++ /dev/null @@ -1,16 +0,0 @@ -ISC License - -Copyright (c) npm, Inc. - -Permission to use, copy, modify, and/or distribute this software for -any purpose with or without fee is hereby granted, provided that the -above copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE COPYRIGHT HOLDER DISCLAIMS -ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE -USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmhook/README.md b/node_modules/libnpm/node_modules/libnpmhook/README.md deleted file mode 100644 index 9a13d055317a5..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/README.md +++ /dev/null @@ -1,267 +0,0 @@ -# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmhook?svg=true)](https://ci.appveyor.com/project/zkat/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest) - -[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for -programmatically managing the npm registry's server-side hooks. - -For a more general introduction to managing hooks, see [the introductory blog -post](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm). - -## Example - -```js -const hooks = require('libnpmhook') - -console.log(await hooks.ls('mypkg', {token: 'deadbeef'})) -// array of hook objects on `mypkg`. -``` - -## Install - -`$ npm install libnpmhook` - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [hook opts](#opts) - * [`add()`](#add) - * [`rm()`](#rm) - * [`ls()`](#ls) - * [`ls.stream()`](#ls-stream) - * [`update()`](#update) - -### API - -#### `opts` for `libnpmhook` commands - -`libnpmhook` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `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. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmhook` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmhook` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> hooks.add(name, endpoint, secret, [opts]) -> Promise` - -`name` is the name of the package, org, or user/org scope to watch. The type is -determined by the name syntax: `'@foo/bar'` and `'foo'` are treated as packages, -`@foo` is treated as a scope, and `~user` is treated as an org name or scope. -Each type will attach to different events. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was created, -including its generated `id`. - -See also: [`POST -/v1/hooks/hook`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#post-v1hookshook) - -##### Example - -```javascript -await hooks.add('~zkat', 'https://zkat.tech/api/added', 'supersekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.find(id, [opts]) -> Promise` - -Returns the hook identified by `id`. - -The returned Promise resolves to the full hook object that was found, or error -with `err.code` of `'E404'` if it didn't exist. - -See also: [`GET -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hookshookid) - -##### Example - -```javascript -await hooks.find('16f7xoal', {token: 'myregistrytoken'}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.rm(id, [opts]) -> Promise` - -Removes the hook identified by `id`. - -The returned Promise resolves to the full hook object that was removed, if it -existed, or `null` if no such hook was there (instead of erroring). - -See also: [`DELETE -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#delete-v1hookshookid) - -##### Example - -```javascript -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/added', - secret: 'supersekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:05:25.125Z', - deleted: true, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } - -// Repeat it... -await hooks.rm('16f7xoal', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> null -``` - -#### `> hooks.update(id, endpoint, secret, [opts]) -> Promise` - -The `id` should be a hook ID from a previously-created hook. - -The `endpoint` should be a fully-qualified http URL for the endpoint the hook -will send its payload to when it fires. `secret` is a shared secret that the -hook will send to that endpoint to verify that it's actually coming from the -registry hook. - -The returned Promise resolves to the full hook object that was updated, if it -existed. Otherwise, it will error with an `'E404'` error code. - -See also: [`PUT -/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#put-v1hookshookid) - -##### Example - -```javascript -await hooks.update('16fxoal', 'https://zkat.tech/api/other', 'newsekrit', { - token: 'myregistrytoken', - otp: '694207' -}) - -=> - -{ id: '16f7xoal', - username: 'zkat', - name: 'zkat', - endpoint: 'https://zkat.tech/api/other', - secret: 'newsekrit', - type: 'owner', - created: '2018-08-21T20:05:25.125Z', - updated: '2018-08-21T20:14:41.964Z', - deleted: false, - delivered: false, - last_delivery: null, - response_code: 0, - status: 'active' } -``` - -#### `> hooks.ls([opts]) -> Promise` - -Resolves to an array of hook objects associated with the account you're -authenticated as. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls.stream()`](#ls-stream) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -await hooks.ls({token: 'myregistrytoken'}) - -=> -[ - { id: '16f7xoal', ... }, - { id: 'wnyf98a1', ... }, - ... -] -``` - -#### `> hooks.ls.stream([opts]) -> Stream` - -Returns a stream of hook objects associated with the account you're -authenticated as. The returned stream is a valid `Symbol.asyncIterator` on -`node@>=10`. - -Results can be further filtered with three values that can be passed in through -`opts`: - -* `opts.package` - filter results by package name -* `opts.limit` - maximum number of hooks to return -* `opts.offset` - pagination offset for results (use with `opts.limit`) - -See also: - * [`hooks.ls()`](#ls) - * [`GET -/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks) - -##### Example - -```javascript -for await (let hook of hooks.ls.stream({token: 'myregistrytoken'})) { - console.log('found hook:', hook.id) -} - -=> -// outputs: -// found hook: 16f7xoal -// found hook: wnyf98a1 -``` diff --git a/node_modules/libnpm/node_modules/libnpmhook/index.js b/node_modules/libnpm/node_modules/libnpmhook/index.js deleted file mode 100644 index b489294951dd0..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const fetch = require('npm-registry-fetch') -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const validate = require('aproba') - -const HooksConfig = figgyPudding({ - package: {}, - limit: {}, - offset: {}, - Promise: {default: () => Promise} -}) - -const eu = encodeURIComponent -const cmd = module.exports = {} -cmd.add = (name, endpoint, secret, opts) => { - opts = HooksConfig(opts) - validate('SSSO', [name, endpoint, secret, opts]) - let type = 'package' - if (name.match(/^@[^/]+$/)) { - type = 'scope' - } - if (name[0] === '~') { - type = 'owner' - name = name.substr(1) - } - return fetch.json('/-/npm/v1/hooks/hook', opts.concat({ - method: 'POST', - body: { type, name, endpoint, secret } - })) -} - -cmd.rm = (id, opts) => { - opts = HooksConfig(opts) - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({ - method: 'DELETE' - }, opts)).catch(err => { - if (err.code === 'E404') { - return null - } else { - throw err - } - }) -} - -cmd.update = (id, endpoint, secret, opts) => { - opts = HooksConfig(opts) - validate('SSSO', [id, endpoint, secret, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts.concat({ - method: 'PUT', - body: {endpoint, secret} - }, opts)) -} - -cmd.find = (id, opts) => { - opts = HooksConfig(opts) - validate('SO', [id, opts]) - return fetch.json(`/-/npm/v1/hooks/hook/${eu(id)}`, opts) -} - -cmd.ls = (opts) => { - return getStream.array(cmd.ls.stream(opts)) -} - -cmd.ls.stream = (opts) => { - opts = HooksConfig(opts) - const {package: pkg, limit, offset} = opts - validate('S|Z', [pkg]) - validate('N|Z', [limit]) - validate('N|Z', [offset]) - return fetch.json.stream('/-/npm/v1/hooks', 'objects.*', opts.concat({ - query: { - package: pkg, - limit, - offset - } - })) -} diff --git a/node_modules/libnpm/node_modules/libnpmhook/package.json b/node_modules/libnpm/node_modules/libnpmhook/package.json deleted file mode 100644 index 2c3b5f44ad547..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmhook/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "libnpmhook@^5.0.3", - "_id": "libnpmhook@5.0.3", - "_inBundle": false, - "_integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==", - "_location": "/libnpm/libnpmhook", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "libnpmhook@^5.0.3", - "name": "libnpmhook", - "escapedName": "libnpmhook", - "rawSpec": "^5.0.3", - "saveSpec": null, - "fetchSpec": "^5.0.3" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.3.tgz", - "_shasum": "4020c0f5edbf08ebe395325caa5ea01885b928f7", - "_spec": "libnpmhook@^5.0.3", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Kat Marchán", - "email": "kzm@sykosomatic.org" - }, - "bugs": { - "url": "https://github.com/npm/libnpmhook/issues" - }, - "bundleDependencies": false, - "dependencies": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "programmatic API for managing npm registry hooks", - "devDependencies": { - "nock": "^9.6.1", - "standard": "^11.0.1", - "standard-version": "^4.4.0", - "tap": "^12.0.1", - "weallbehave": "^1.2.0", - "weallcontribute": "^1.0.8" - }, - "files": [ - "*.js", - "lib" - ], - "homepage": "https://github.com/npm/libnpmhook#readme", - "keywords": [ - "npm", - "hooks", - "registry", - "npm api" - ], - "license": "ISC", - "main": "index.js", - "name": "libnpmhook", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmhook.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 --coverage test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "5.0.3" -} diff --git a/node_modules/libnpm/node_modules/libnpmorg/.travis.yml b/node_modules/libnpm/node_modules/libnpmorg/.travis.yml deleted file mode 100644 index db5ea8b018640..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -sudo: false -node_js: - - "10" - - "9" - - "8" - - "6" diff --git a/node_modules/libnpm/node_modules/libnpmorg/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmorg/CHANGELOG.md deleted file mode 100644 index 3d70c79c5614b..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [1.0.1](https://github.com/npm/libnpmorg/compare/v1.0.0...v1.0.1) (2019-07-16) - - -### Bug Fixes - -* **standard:** standard --fix ([5118358](https://github.com/npm/libnpmorg/commit/5118358)) - - - - -# 1.0.0 (2018-08-23) - - -### Features - -* **API:** implement org api ([731b9c6](https://github.com/npm/libnpmorg/commit/731b9c6)) diff --git a/node_modules/libnpm/node_modules/libnpmorg/CODE_OF_CONDUCT.md b/node_modules/libnpm/node_modules/libnpmorg/CODE_OF_CONDUCT.md deleted file mode 100644 index aeb72f598dcb4..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,151 +0,0 @@ -# Code of Conduct - -## When Something Happens - -If you see a Code of Conduct violation, follow these steps: - -1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits. -2. That person should immediately stop the behavior and correct the issue. -3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers). -4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban. - -When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. - -**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples). - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - - * Using welcoming and inclusive language. - * Being respectful of differing viewpoints and experiences. - * Gracefully accepting constructive feedback. - * Focusing on what is best for the community. - * Showing empathy and kindness towards other community members. - * Encouraging and raising up your peers in the project so you can all bask in hacks and glory. - -Examples of unacceptable behavior by participants include: - - * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity. - * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology. - * Making light of/making mocking comments about trigger warnings and content warnings. - * Trolling, insulting/derogatory comments, and personal or political attacks. - * Public or private harassment, deliberate intimidation, or threats. - * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent. - * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent. - * Publishing of private communication that doesn't have to do with reporting harrassment. - * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism). - * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia". - * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are. - * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something. - * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)" - * Other conduct which could reasonably be considered inappropriate in a professional or community setting. - -## Scope - -This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members. - -Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members. - -### Other Community Standards - -As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/). - -Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct). - -Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities. - -## Maintainer Enforcement Process - -Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps. - -### Contacting Maintainers - -You may get in touch with the maintainer team through any of the following methods: - - * Through email: - * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán) - - * Through Twitter: - * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán) - -### Further Enforcement - -If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed: - - 1. Repeat the request to stop. - 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked. - 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours. - 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used. - -On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary. - -Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk. - -Members expelled from events or venues with any sort of paid attendance will not be refunded. - -### Who Watches the Watchers? - -Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community. - -Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures. - -### Enforcement Examples - -#### The Best Case - -The vast majority of situations work out like this. This interaction is common, and generally positive. - -> Alex: "Yeah I used X and it was really crazy!" - -> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?" - -> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!" - -#### The Maintainer Case - -Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**. - -> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job." - -> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that." - -> Patt: "I'm not attacking anyone, what's your problem?" - -> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope." - -> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space." - -> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you." - -> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?" - -> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble." - -> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!" - -#### The Nope Case - -> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable." - -> Patt: "NOOOOPE. OH NOPE NOPE." - -> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE" - -> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥" - -> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits. - -## Attribution - -This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of -Conduct](https://wealljs.org/code-of-conduct), which is itself based on -[Contributor Covenant](http://contributor-covenant.org), version 1.4, available -at -[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4), -and the LGBTQ in Technology Slack [Code of -Conduct](http://lgbtq.technology/coc.html). diff --git a/node_modules/libnpm/node_modules/libnpmorg/CONTRIBUTING.md b/node_modules/libnpm/node_modules/libnpmorg/CONTRIBUTING.md deleted file mode 100644 index eb4b58b03ef1a..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/CONTRIBUTING.md +++ /dev/null @@ -1,256 +0,0 @@ -# Contributing - -## How do I... - -* [Use This Guide](#introduction)? -* Ask or Say Something? 🤔🐛😱 - * [Request Support](#request-support) - * [Report an Error or Bug](#report-an-error-or-bug) - * [Request a Feature](#request-a-feature) -* Make Something? 🤓👩🏽‍💻📜🍳 - * [Project Setup](#project-setup) - * [Contribute Documentation](#contribute-documentation) - * [Contribute Code](#contribute-code) -* Manage Something ✅🙆🏼💃👔 - * [Provide Support on Issues](#provide-support-on-issues) - * [Label Issues](#label-issues) - * [Clean Up Issues and PRs](#clean-up-issues-and-prs) - * [Review Pull Requests](#review-pull-requests) - * [Merge Pull Requests](#merge-pull-requests) - * [Tag a Release](#tag-a-release) - * [Join the Project Team](#join-the-project-team) -* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻 - -## Introduction - -Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝 - -Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚 - -The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨ - -## Request Support - -If you have a question about this project, how to use it, or just need clarification about something: - -* Open an Issue at https://github.com/npm/libnpmorg/issues -* Provide as much context as you can about what you're running into. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* Someone will try to have a response soon. -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. - -## Report an Error or Bug - -If you run into an error or bug with the project: - -* Open an Issue at https://github.com/npm/libnpmorg/issues -* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. -* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code). -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. -* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline. - -## Request a Feature - -If the project doesn't do something you need or want it to do: - -* Open an Issue at https://github.com/npm/libnpmorg/issues -* Provide as much context as you can about what you're running into. -* Please try and be clear about why existing features and alternatives would not work for you. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. -* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code). - -Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no. - -## Project Setup - -So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before. - -If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code). - -If you want to go the usual route and run the project locally, though: - -* [Install Node.js](https://nodejs.org/en/download/) -* [Fork the project](https://guides.github.com/activities/forking/#fork) - -Then in your terminal: -* `cd path/to/your/clone` -* `npm install` -* `npm test` - -And you should be ready to go! - -## Contribute Documentation - -Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance. - -Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake! - -To contribute documentation: - -* [Set up the project](#project-setup). -* Edit or add any relevant documentation. -* Make sure your changes are formatted correctly and consistently with the rest of the documentation. -* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything. -* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `. -* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Contribute Code - -We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others. - -Code contributions of just about any size are acceptable! - -The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution. - -To contribute code: - -* [Set up the project](#project-setup). -* Make any necessary changes to the source code. -* Include any [additional documentation](#contribute-documentation) the changes might need. -* Write tests that verify that your contribution works as expected. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). -* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion. -* Go to https://github.com/npm/libnpmorg/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc). -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Provide Support on Issues - -[Needs Collaborator](#join-the-project-team): none - -Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug. - -Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it. - -In order to help other folks out with their questions: - -* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+label%3Asupport). -* Read through the list until you find something that you're familiar enough with to give an answer to. -* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on. -* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you. - -Some notes on picking up support issues: - -* Avoid responding to issues you don't know you can answer accurately. -* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format. -* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict). - -## Label Issues - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily. - -In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmorg/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself! - -Label | Apply When | Notes ---- | --- | --- -`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label. -`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. | -`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`. -`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`) -`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. | -`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling. -`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete. -`performance` | This issue or PR is directly related to improving performance. | -`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. | -`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority. -`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes. -`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests) -`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not. - -## Clean Up Issues and PRs - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon. - -In these cases, they should be closed until they're brought up again or the interaction starts over. - -To clean up issues and PRs: - -* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today. -* Go through each issue *from oldest to newest*, and close them if **all of the following are true**: - * not opened by a maintainer - * not marked as `critical` - * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available) - * no explicit messages in the comments asking for it to be left open - * does not belong to a milestone -* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmorg/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details." - -## Review Pull Requests - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions. - -PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration. - -Some notes: - -* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments". -* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers. -* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own. -* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it? - -## Merge Pull Requests - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. - -## Tag A Release - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org). - -## Join the Project Team - -### Ways to Join - -There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do. - -All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like. - -You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names. - -Permission | Description ---- | --- -Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. -Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. -Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. - -## Attribution - -This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)! diff --git a/node_modules/libnpm/node_modules/libnpmorg/LICENSE b/node_modules/libnpm/node_modules/libnpmorg/LICENSE deleted file mode 100644 index 209e4477f39c1..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE b/node_modules/libnpm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 9471c6d325f7e..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/node_modules/libnpm/node_modules/libnpmorg/README.md b/node_modules/libnpm/node_modules/libnpmorg/README.md deleted file mode 100644 index 6244794eda016..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# libnpmorg [![npm version](https://img.shields.io/npm/v/libnpmorg.svg)](https://npm.im/libnpmorg) [![license](https://img.shields.io/npm/l/libnpmorg.svg)](https://npm.im/libnpmorg) [![Travis](https://img.shields.io/travis/npm/libnpmorg.svg)](https://travis-ci.org/npm/libnpmorg) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmorg?svg=true)](https://ci.appveyor.com/project/zkat/libnpmorg) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmorg/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmorg?branch=latest) - -[`libnpmorg`](https://github.com/npm/libnpmorg) is a Node.js library for -programmatically accessing the [npm Org membership -API](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail). - -## Example - -```js -const org = require('libnpmorg') - -console.log(await org.ls('myorg', {token: 'deadbeef'})) -=> -Roster { - zkat: 'developer', - iarna: 'admin', - isaacs: 'owner' -} -``` - -## Install - -`$ npm install libnpmorg` - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [hook opts](#opts) - * [`set()`](#set) - * [`rm()`](#rm) - * [`ls()`](#ls) - * [`ls.stream()`](#ls-stream) - -### API - -#### `opts` for `libnpmorg` commands - -`libnpmorg` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `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. -* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmorg` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}` -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmorg` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> org.set(org, user, [role], [opts]) -> Promise` - -The returned Promise resolves to a [Membership -Detail](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#membership-detail) -object. - -The `role` is optional and should be one of `admin`, `owner`, or `developer`. -`developer` is the default if no `role` is provided. - -`org` and `user` must be scope names for the org name and user name -respectively. They can optionally be prefixed with `@`. - -See also: [`PUT -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-replace) - -##### Example - -```javascript -await org.set('@myorg', '@myuser', 'admin', {token: 'deadbeef'}) -=> -MembershipDetail { - org: { - name: 'myorg', - size: 15 - }, - user: 'myuser', - role: 'admin' -} -``` - -#### `> org.rm(org, user, [opts]) -> Promise` - -The Promise resolves to `null` on success. - -`org` and `user` must be scope names for the org name and user name -respectively. They can optionally be prefixed with `@`. - -See also: [`DELETE -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-membership-delete) - -##### Example - -```javascript -await org.rm('myorg', 'myuser', {token: 'deadbeef'}) -``` - -#### `> org.ls(org, [opts]) -> Promise` - -The Promise resolves to a -[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster) -object. - -`org` must be a scope name for an org, and can be optionally prefixed with `@`. - -See also: [`GET -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster) - -##### Example - -```javascript -await org.ls('myorg', {token: 'deadbeef'}) -=> -Roster { - zkat: 'developer', - iarna: 'admin', - isaacs: 'owner' -} -``` - -#### `> org.ls.stream(org, [opts]) -> Stream` - -Returns a stream of entries for a -[Roster](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#roster), -with each emitted entry in `[key, value]` format. - -`org` must be a scope name for an org, and can be optionally prefixed with `@`. - -The returned stream is a valid `Symbol.asyncIterator`. - -See also: [`GET -/-/org/:scope/user`](https://github.com/npm/registry/blob/master/docs/orgs/memberships.md#org-roster) - -##### Example - -```javascript -for await (let [user, role] of org.ls.stream('myorg', {token: 'deadbeef'})) { - console.log(`user: ${user} (${role})`) -} -=> -user: zkat (developer) -user: iarna (admin) -user: isaacs (owner) -``` diff --git a/node_modules/libnpm/node_modules/libnpmorg/appveyor.yml b/node_modules/libnpm/node_modules/libnpmorg/appveyor.yml deleted file mode 100644 index 9cc64c58e02f9..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "6" - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm config set spin false - - npm install - -test_script: - - npm test - -matrix: - fast_finish: true - -build: off diff --git a/node_modules/libnpm/node_modules/libnpmorg/index.js b/node_modules/libnpm/node_modules/libnpmorg/index.js deleted file mode 100644 index cd3e51e6ad172..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/index.js +++ /dev/null @@ -1,71 +0,0 @@ -'use strict' - -const eu = encodeURIComponent -const fetch = require('npm-registry-fetch') -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const validate = require('aproba') - -const OrgConfig = figgyPudding({ - Promise: { default: () => Promise } -}) - -// From https://github.com/npm/registry/blob/master/docs/orgs/memberships.md -const cmd = module.exports = {} - -class MembershipDetail {} -cmd.set = (org, user, role, opts) => { - if (typeof role === 'object' && !opts) { - opts = role - role = undefined - } - opts = OrgConfig(opts) - return new opts.Promise((resolve, reject) => { - validate('SSSO|SSZO', [org, user, role, opts]) - user = user.replace(/^@?/, '') - org = org.replace(/^@?/, '') - fetch.json(`/-/org/${eu(org)}/user`, opts.concat({ - method: 'PUT', - body: { user, role } - })).then(resolve, reject) - }).then(ret => Object.assign(new MembershipDetail(), ret)) -} - -cmd.rm = (org, user, opts) => { - opts = OrgConfig(opts) - return new opts.Promise((resolve, reject) => { - validate('SSO', [org, user, opts]) - user = user.replace(/^@?/, '') - org = org.replace(/^@?/, '') - fetch(`/-/org/${eu(org)}/user`, opts.concat({ - method: 'DELETE', - body: { user }, - ignoreBody: true - })).then(resolve, reject) - }).then(() => null) -} - -class Roster {} -cmd.ls = (org, opts) => { - opts = OrgConfig(opts) - return new opts.Promise((resolve, reject) => { - getStream.array(cmd.ls.stream(org, opts)).then(entries => { - const obj = {} - for (let [key, val] of entries) { - obj[key] = val - } - return obj - }).then(resolve, reject) - }).then(ret => Object.assign(new Roster(), ret)) -} - -cmd.ls.stream = (org, opts) => { - opts = OrgConfig(opts) - validate('SO', [org, opts]) - org = org.replace(/^@?/, '') - return fetch.json.stream(`/-/org/${eu(org)}/user`, '*', opts.concat({ - mapJson (value, [key]) { - return [key, value] - } - })) -} diff --git a/node_modules/libnpm/node_modules/libnpmorg/package.json b/node_modules/libnpm/node_modules/libnpmorg/package.json deleted file mode 100644 index 449c0a1534cae..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "libnpmorg@^1.0.1", - "_id": "libnpmorg@1.0.1", - "_inBundle": false, - "_integrity": "sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww==", - "_location": "/libnpm/libnpmorg", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "libnpmorg@^1.0.1", - "name": "libnpmorg", - "escapedName": "libnpmorg", - "rawSpec": "^1.0.1", - "saveSpec": null, - "fetchSpec": "^1.0.1" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.1.tgz", - "_shasum": "5d2503f6ceb57f33dbdcc718e6698fea6d5ad087", - "_spec": "libnpmorg@^1.0.1", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech" - }, - "bugs": { - "url": "https://github.com/npm/libnpmorg/issues" - }, - "bundleDependencies": false, - "dependencies": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "Programmatic api for `npm org` commands", - "devDependencies": { - "nock": "^9.6.1", - "standard": "^12.0.0", - "standard-version": "*", - "tap": "*", - "weallbehave": "*", - "weallcontribute": "*" - }, - "homepage": "https://npmjs.com/package/libnpmorg", - "keywords": [ - "libnpm", - "npm", - "package manager", - "api", - "orgs", - "teams" - ], - "license": "ISC", - "name": "libnpmorg", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmorg.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "1.0.1" -} diff --git a/node_modules/libnpm/node_modules/libnpmorg/test/index.js b/node_modules/libnpm/node_modules/libnpmorg/test/index.js deleted file mode 100644 index e6ec33ab8a6c4..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/test/index.js +++ /dev/null @@ -1,81 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const test = require('tap').test -const tnock = require('./util/tnock.js') - -const org = require('../index.js') - -const OPTS = figgyPudding({ registry: {} })({ - registry: 'https://mock.reg/' -}) - -test('set', t => { - const memDeets = { - org: { - name: 'myorg', - size: 15 - }, - user: 'myuser', - role: 'admin' - } - tnock(t, OPTS.registry).put('/-/org/myorg/user', { - user: 'myuser', - role: 'admin' - }).reply(201, memDeets) - return org.set('myorg', 'myuser', 'admin', OPTS).then(res => { - t.deepEqual(res, memDeets, 'got a membership details object back') - }) -}) - -test('optional role for set', t => { - const memDeets = { - org: { - name: 'myorg', - size: 15 - }, - user: 'myuser', - role: 'developer' - } - tnock(t, OPTS.registry).put('/-/org/myorg/user', { - user: 'myuser' - }).reply(201, memDeets) - return org.set('myorg', 'myuser', OPTS).then(res => { - t.deepEqual(res, memDeets, 'got a membership details object back') - }) -}) - -test('rm', t => { - tnock(t, OPTS.registry).delete('/-/org/myorg/user', { - user: 'myuser' - }).reply(204) - return org.rm('myorg', 'myuser', OPTS).then(() => { - t.ok(true, 'request succeeded') - }) -}) - -test('ls', t => { - const roster = { - 'zkat': 'developer', - 'iarna': 'admin', - 'isaacs': 'owner' - } - tnock(t, OPTS.registry).get('/-/org/myorg/user').reply(200, roster) - return org.ls('myorg', OPTS).then(res => { - t.deepEqual(res, roster, 'got back a roster') - }) -}) - -test('ls stream', t => { - const roster = { - 'zkat': 'developer', - 'iarna': 'admin', - 'isaacs': 'owner' - } - const rosterArr = Object.keys(roster).map(k => [k, roster[k]]) - tnock(t, OPTS.registry).get('/-/org/myorg/user').reply(200, roster) - return getStream.array(org.ls.stream('myorg', OPTS)).then(res => { - t.deepEqual(res, rosterArr, 'got back a roster, in entries format') - }) -}) diff --git a/node_modules/libnpm/node_modules/libnpmorg/test/util/tnock.js b/node_modules/libnpm/node_modules/libnpmorg/test/util/tnock.js deleted file mode 100644 index 00b6e160e1019..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmorg/test/util/tnock.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.tearDown(function () { - server.done() - }) - return server -} diff --git a/node_modules/libnpm/node_modules/libnpmsearch/.travis.yml b/node_modules/libnpm/node_modules/libnpmsearch/.travis.yml deleted file mode 100644 index db5ea8b018640..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -sudo: false -node_js: - - "10" - - "9" - - "8" - - "6" diff --git a/node_modules/libnpm/node_modules/libnpmsearch/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmsearch/CHANGELOG.md deleted file mode 100644 index 1adf2d0db52ce..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/CHANGELOG.md +++ /dev/null @@ -1,42 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [2.0.2](https://github.com/npm/libnpmsearch/compare/v2.0.1...v2.0.2) (2019-07-16) - - - - -## [2.0.1](https://github.com/npm/libnpmsearch/compare/v2.0.0...v2.0.1) (2019-06-10) - - -### Bug Fixes - -* **opts:** support `opts.from` properly ([#2](https://github.com/npm/libnpmsearch/issues/2)) ([da6636c](https://github.com/npm/libnpmsearch/commit/da6636c)) -* **standard:** standard --fix ([beca19c](https://github.com/npm/libnpmsearch/commit/beca19c)) - - - - -# [2.0.0](https://github.com/npm/libnpmsearch/compare/v1.0.0...v2.0.0) (2018-08-28) - - -### Features - -* **opts:** added options for pagination, details, and sorting weights ([ff97eb5](https://github.com/npm/libnpmsearch/commit/ff97eb5)) - - -### BREAKING CHANGES - -* **opts:** this changes default requests and makes libnpmsearch return more complete data for individual packages, without null-defaulting - - - - -# 1.0.0 (2018-08-27) - - -### Features - -* **api:** got API working ([fe90008](https://github.com/npm/libnpmsearch/commit/fe90008)) diff --git a/node_modules/libnpm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md b/node_modules/libnpm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md deleted file mode 100644 index aeb72f598dcb4..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,151 +0,0 @@ -# Code of Conduct - -## When Something Happens - -If you see a Code of Conduct violation, follow these steps: - -1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits. -2. That person should immediately stop the behavior and correct the issue. -3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers). -4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban. - -When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. - -**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples). - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - - * Using welcoming and inclusive language. - * Being respectful of differing viewpoints and experiences. - * Gracefully accepting constructive feedback. - * Focusing on what is best for the community. - * Showing empathy and kindness towards other community members. - * Encouraging and raising up your peers in the project so you can all bask in hacks and glory. - -Examples of unacceptable behavior by participants include: - - * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity. - * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology. - * Making light of/making mocking comments about trigger warnings and content warnings. - * Trolling, insulting/derogatory comments, and personal or political attacks. - * Public or private harassment, deliberate intimidation, or threats. - * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent. - * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent. - * Publishing of private communication that doesn't have to do with reporting harrassment. - * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism). - * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia". - * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are. - * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something. - * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)" - * Other conduct which could reasonably be considered inappropriate in a professional or community setting. - -## Scope - -This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members. - -Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members. - -### Other Community Standards - -As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/). - -Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct). - -Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities. - -## Maintainer Enforcement Process - -Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps. - -### Contacting Maintainers - -You may get in touch with the maintainer team through any of the following methods: - - * Through email: - * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán) - - * Through Twitter: - * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán) - -### Further Enforcement - -If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed: - - 1. Repeat the request to stop. - 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked. - 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours. - 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used. - -On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary. - -Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk. - -Members expelled from events or venues with any sort of paid attendance will not be refunded. - -### Who Watches the Watchers? - -Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community. - -Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures. - -### Enforcement Examples - -#### The Best Case - -The vast majority of situations work out like this. This interaction is common, and generally positive. - -> Alex: "Yeah I used X and it was really crazy!" - -> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?" - -> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!" - -#### The Maintainer Case - -Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**. - -> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job." - -> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that." - -> Patt: "I'm not attacking anyone, what's your problem?" - -> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope." - -> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space." - -> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you." - -> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?" - -> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble." - -> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!" - -#### The Nope Case - -> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable." - -> Patt: "NOOOOPE. OH NOPE NOPE." - -> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE" - -> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥" - -> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits. - -## Attribution - -This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of -Conduct](https://wealljs.org/code-of-conduct), which is itself based on -[Contributor Covenant](http://contributor-covenant.org), version 1.4, available -at -[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4), -and the LGBTQ in Technology Slack [Code of -Conduct](http://lgbtq.technology/coc.html). diff --git a/node_modules/libnpm/node_modules/libnpmsearch/CONTRIBUTING.md b/node_modules/libnpm/node_modules/libnpmsearch/CONTRIBUTING.md deleted file mode 100644 index 1a61601a16dba..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/CONTRIBUTING.md +++ /dev/null @@ -1,256 +0,0 @@ -# Contributing - -## How do I... - -* [Use This Guide](#introduction)? -* Ask or Say Something? 🤔🐛😱 - * [Request Support](#request-support) - * [Report an Error or Bug](#report-an-error-or-bug) - * [Request a Feature](#request-a-feature) -* Make Something? 🤓👩🏽‍💻📜🍳 - * [Project Setup](#project-setup) - * [Contribute Documentation](#contribute-documentation) - * [Contribute Code](#contribute-code) -* Manage Something ✅🙆🏼💃👔 - * [Provide Support on Issues](#provide-support-on-issues) - * [Label Issues](#label-issues) - * [Clean Up Issues and PRs](#clean-up-issues-and-prs) - * [Review Pull Requests](#review-pull-requests) - * [Merge Pull Requests](#merge-pull-requests) - * [Tag a Release](#tag-a-release) - * [Join the Project Team](#join-the-project-team) -* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻 - -## Introduction - -Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝 - -Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚 - -The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨ - -## Request Support - -If you have a question about this project, how to use it, or just need clarification about something: - -* Open an Issue at https://github.com/npm/libnpmsearch/issues -* Provide as much context as you can about what you're running into. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* Someone will try to have a response soon. -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. - -## Report an Error or Bug - -If you run into an error or bug with the project: - -* Open an Issue at https://github.com/npm/libnpmsearch/issues -* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. -* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code). -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. -* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline. - -## Request a Feature - -If the project doesn't do something you need or want it to do: - -* Open an Issue at https://github.com/npm/libnpmsearch/issues -* Provide as much context as you can about what you're running into. -* Please try and be clear about why existing features and alternatives would not work for you. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. -* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code). - -Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no. - -## Project Setup - -So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before. - -If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code). - -If you want to go the usual route and run the project locally, though: - -* [Install Node.js](https://nodejs.org/en/download/) -* [Fork the project](https://guides.github.com/activities/forking/#fork) - -Then in your terminal: -* `cd path/to/your/clone` -* `npm install` -* `npm test` - -And you should be ready to go! - -## Contribute Documentation - -Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance. - -Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake! - -To contribute documentation: - -* [Set up the project](#project-setup). -* Edit or add any relevant documentation. -* Make sure your changes are formatted correctly and consistently with the rest of the documentation. -* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything. -* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `. -* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Contribute Code - -We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others. - -Code contributions of just about any size are acceptable! - -The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution. - -To contribute code: - -* [Set up the project](#project-setup). -* Make any necessary changes to the source code. -* Include any [additional documentation](#contribute-documentation) the changes might need. -* Write tests that verify that your contribution works as expected. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). -* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion. -* Go to https://github.com/npm/libnpmsearch/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc). -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Provide Support on Issues - -[Needs Collaborator](#join-the-project-team): none - -Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug. - -Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it. - -In order to help other folks out with their questions: - -* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+label%3Asupport). -* Read through the list until you find something that you're familiar enough with to give an answer to. -* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on. -* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you. - -Some notes on picking up support issues: - -* Avoid responding to issues you don't know you can answer accurately. -* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format. -* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict). - -## Label Issues - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily. - -In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmsearch/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself! - -Label | Apply When | Notes ---- | --- | --- -`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label. -`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. | -`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`. -`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`) -`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. | -`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling. -`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete. -`performance` | This issue or PR is directly related to improving performance. | -`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. | -`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority. -`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes. -`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests) -`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not. - -## Clean Up Issues and PRs - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon. - -In these cases, they should be closed until they're brought up again or the interaction starts over. - -To clean up issues and PRs: - -* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today. -* Go through each issue *from oldest to newest*, and close them if **all of the following are true**: - * not opened by a maintainer - * not marked as `critical` - * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available) - * no explicit messages in the comments asking for it to be left open - * does not belong to a milestone -* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmsearch/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details." - -## Review Pull Requests - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions. - -PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration. - -Some notes: - -* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments". -* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers. -* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own. -* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it? - -## Merge Pull Requests - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. - -## Tag A Release - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org). - -## Join the Project Team - -### Ways to Join - -There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do. - -All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like. - -You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names. - -Permission | Description ---- | --- -Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. -Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. -Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. - -## Attribution - -This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)! diff --git a/node_modules/libnpm/node_modules/libnpmsearch/LICENSE b/node_modules/libnpm/node_modules/libnpmsearch/LICENSE deleted file mode 100644 index 209e4477f39c1..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE b/node_modules/libnpm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 9471c6d325f7e..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/node_modules/libnpm/node_modules/libnpmsearch/README.md b/node_modules/libnpm/node_modules/libnpmsearch/README.md deleted file mode 100644 index a83988cc2867d..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/README.md +++ /dev/null @@ -1,169 +0,0 @@ -# libnpmsearch [![npm version](https://img.shields.io/npm/v/libnpmsearch.svg)](https://npm.im/libnpmsearch) [![license](https://img.shields.io/npm/l/libnpmsearch.svg)](https://npm.im/libnpmsearch) [![Travis](https://img.shields.io/travis/npm/libnpmsearch.svg)](https://travis-ci.org/npm/libnpmsearch) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmsearch?svg=true)](https://ci.appveyor.com/project/zkat/libnpmsearch) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmsearch/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmsearch?branch=latest) - -[`libnpmsearch`](https://github.com/npm/libnpmsearch) is a Node.js library for -programmatically accessing the npm search endpoint. It does **not** support -legacy search through `/-/all`. - -## Example - -```js -const search = require('libnpmsearch') - -console.log(await search('libnpm')) -=> -[ - { - name: 'libnpm', - description: 'programmatic npm API', - ...etc - }, - { - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc - }, - ...more -] -``` - -## Install - -`$ npm install libnpmsearch` - -## Table of Contents - -* [Example](#example) -* [Install](#install) -* [API](#api) - * [search opts](#opts) - * [`search()`](#search) - * [`search.stream()`](#search-stream) - -### API - -#### `opts` for `libnpmsearch` commands - -The following opts are used directly by `libnpmsearch` itself: - -* `opts.limit` - Number of results to limit the query to. Default: 20 -* `opts.from` - Offset number for results. Used with `opts.limit` for pagination. Default: 0 -* `opts.detailed` - If true, returns an object with `package`, `score`, and `searchScore` fields, with `package` being what would usually be returned, and the other two containing details about how that package scored. Useful for UIs. Default: false -* `opts.sortBy` - Used as a shorthand to set `opts.quality`, `opts.maintenance`, and `opts.popularity` with values that prioritize each one. Should be one of `'optimal'`, `'quality'`, `'maintenance'`, or `'popularity'`. Default: `'optimal'` -* `opts.maintenance` - Decimal number between `0` and `1` that defines the weight of `maintenance` metrics when scoring and sorting packages. Default: `0.65` (same as `opts.sortBy: 'optimal'`) -* `opts.popularity` - Decimal number between `0` and `1` that defines the weight of `popularity` metrics when scoring and sorting packages. Default: `0.98` (same as `opts.sortBy: 'optimal'`) -* `opts.quality` - Decimal number between `0` and `1` that defines the weight of `quality` metrics when scoring and sorting packages. Default: `0.5` (same as `opts.sortBy: 'optimal'`) - -`libnpmsearch` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -Most options are passed through directly to that library, so please refer to -[its own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `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. -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmsearch` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> search(query, [opts]) -> Promise` - -`query` must be either a String or an Array of search terms. - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -The returned Promise resolved to an Array of search results with the following -format: - -```js -{ - name: String, - version: SemverString, - description: String || null, - maintainers: [ - { - username: String, - email: String - }, - ...etc - ] || null, - keywords: [String] || null, - date: Date || null -} -``` - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -For streamed results, see [`search.stream`](#search-stream). - -##### Example - -```javascript -await search('libnpm') -=> -[ - { - name: 'libnpm', - description: 'programmatic npm API', - ...etc - }, - { - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc - }, - ...more -] -``` - -#### `> search.stream(query, [opts]) -> Stream` - -`query` must be either a String or an Array of search terms. - -If `opts.limit` is provided, it will be sent to the API to constrain the number -of returned results. You may receive more, or fewer results, at the endpoint's -discretion. - -The returned Stream emits one entry per search result, with each entry having -the following format: - -```js -{ - name: String, - version: SemverString, - description: String || null, - maintainers: [ - { - username: String, - email: String - }, - ...etc - ] || null, - keywords: [String] || null, - date: Date || null -} -``` - -For getting results in one chunk, see [`search`](#search-stream). - -##### Example - -```javascript -search.stream('libnpm').on('data', console.log) -=> -// entry 1 -{ - name: 'libnpm', - description: 'programmatic npm API', - ...etc -} -// entry 2 -{ - name: 'libnpmsearch', - description: 'Programmatic API for searching in npm and compatible registries', - ...etc -} -// etc -``` diff --git a/node_modules/libnpm/node_modules/libnpmsearch/appveyor.yml b/node_modules/libnpm/node_modules/libnpmsearch/appveyor.yml deleted file mode 100644 index 9cc64c58e02f9..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "6" - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm config set spin false - - npm install - -test_script: - - npm test - -matrix: - fast_finish: true - -build: off diff --git a/node_modules/libnpm/node_modules/libnpmsearch/index.js b/node_modules/libnpm/node_modules/libnpmsearch/index.js deleted file mode 100644 index 995549aeee03d..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/index.js +++ /dev/null @@ -1,80 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const npmFetch = require('npm-registry-fetch') - -const SearchOpts = figgyPudding({ - detailed: { default: false }, - limit: { default: 20 }, - from: { default: 0 }, - quality: { default: 0.65 }, - popularity: { default: 0.98 }, - maintenance: { default: 0.5 }, - sortBy: {} -}) - -module.exports = search -function search (query, opts) { - return getStream.array(search.stream(query, opts)) -} -search.stream = searchStream -function searchStream (query, opts) { - opts = SearchOpts(opts) - switch (opts.sortBy) { - case 'optimal': { - opts = opts.concat({ - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - break - } - case 'quality': { - opts = opts.concat({ - quality: 1, - popularity: 0, - maintenance: 0 - }) - break - } - case 'popularity': { - opts = opts.concat({ - quality: 0, - popularity: 1, - maintenance: 0 - }) - break - } - case 'maintenance': { - opts = opts.concat({ - quality: 0, - popularity: 0, - maintenance: 1 - }) - break - } - } - return npmFetch.json.stream('/-/v1/search', 'objects.*', - opts.concat({ - query: { - text: Array.isArray(query) ? query.join(' ') : query, - size: opts.limit, - from: opts.from, - quality: opts.quality, - popularity: opts.popularity, - maintenance: opts.maintenance - }, - mapJson (obj) { - if (obj.package.date) { - obj.package.date = new Date(obj.package.date) - } - if (opts.detailed) { - return obj - } else { - return obj.package - } - } - }) - ) -} diff --git a/node_modules/libnpm/node_modules/libnpmsearch/package.json b/node_modules/libnpm/node_modules/libnpmsearch/package.json deleted file mode 100644 index 9572fbfa2d733..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "libnpmsearch@^2.0.2", - "_id": "libnpmsearch@2.0.2", - "_inBundle": false, - "_integrity": "sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg==", - "_location": "/libnpm/libnpmsearch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "libnpmsearch@^2.0.2", - "name": "libnpmsearch", - "escapedName": "libnpmsearch", - "rawSpec": "^2.0.2", - "saveSpec": null, - "fetchSpec": "^2.0.2" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.2.tgz", - "_shasum": "9a4f059102d38e3dd44085bdbfe5095f2a5044cf", - "_spec": "libnpmsearch@^2.0.2", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech" - }, - "bugs": { - "url": "https://github.com/npm/libnpmsearch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "figgy-pudding": "^3.5.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "Programmatic API for searching in npm and compatible registries.", - "devDependencies": { - "nock": "^9.6.1", - "standard": "^12.0.0", - "standard-version": "*", - "tap": "^12.0.1", - "weallbehave": "*", - "weallcontribute": "*" - }, - "homepage": "https://npmjs.com/package/libnpmsearch", - "keywords": [ - "npm", - "search", - "api", - "libnpm" - ], - "license": "ISC", - "name": "libnpmsearch", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmsearch.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "2.0.2" -} diff --git a/node_modules/libnpm/node_modules/libnpmsearch/test/index.js b/node_modules/libnpm/node_modules/libnpmsearch/test/index.js deleted file mode 100644 index bec5c70e46424..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/test/index.js +++ /dev/null @@ -1,300 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const qs = require('querystring') -const test = require('tap').test -const tnock = require('./util/tnock.js') - -const OPTS = figgyPudding({ registry: {} })({ - registry: 'https://mock.reg/' -}) - -const REG = OPTS.registry -const search = require('../index.js') - -test('basic test', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'foo', version: '2.0.0' } } - ] - }) - return search('oo', OPTS).then(results => { - t.similar(results, [{ - name: 'cool', - version: '1.0.0' - }, { - name: 'foo', - version: '2.0.0' - }], 'got back an array of search results') - }) -}) - -test('search.stream', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0', date: new Date().toISOString() } }, - { package: { name: 'foo', version: '2.0.0' } } - ] - }) - return getStream.array( - search.stream('oo', OPTS) - ).then(results => { - t.similar(results, [{ - name: 'cool', - version: '1.0.0' - }, { - name: 'foo', - version: '2.0.0' - }], 'has a stream-based API function with identical results') - }) -}) - -test('accepts a limit option', t => { - const query = qs.stringify({ - text: 'oo', - size: 3, - from: 0, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ limit: 3 })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('accepts a from option', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 1, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.1.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ from: 1 })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('accepts quality/mainenance/popularity options', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 1, - popularity: 2, - maintenance: 3 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ - quality: 1, - popularity: 2, - maintenance: 3 - })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('sortBy: quality', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 1, - popularity: 0, - maintenance: 0 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ - sortBy: 'quality' - })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('sortBy: popularity', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0, - popularity: 1, - maintenance: 0 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ - sortBy: 'popularity' - })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('sortBy: maintenance', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0, - popularity: 0, - maintenance: 1 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ - sortBy: 'maintenance' - })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('sortBy: optimal', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0.65, - popularity: 0.98, - maintenance: 0.5 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: [ - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } }, - { package: { name: 'cool', version: '1.0.0' } } - ] - }) - return search('oo', OPTS.concat({ - sortBy: 'optimal' - })).then(results => { - t.equal(results.length, 4, 'returns more results if endpoint does so') - }) -}) - -test('detailed format', t => { - const query = qs.stringify({ - text: 'oo', - size: 20, - from: 0, - quality: 0, - popularity: 0, - maintenance: 1 - }) - const results = [ - { - package: { name: 'cool', version: '1.0.0' }, - score: { - final: 0.9237841281241451, - detail: { - quality: 0.9270640902288084, - popularity: 0.8484861649808381, - maintenance: 0.9962706951777409 - } - }, - searchScore: 100000.914 - }, - { - package: { name: 'ok', version: '2.0.0' }, - score: { - final: 0.9237841281451, - detail: { - quality: 0.9270602288084, - popularity: 0.8461649808381, - maintenance: 0.9706951777409 - } - }, - searchScore: 1000.91 - } - ] - tnock(t, REG).get(`/-/v1/search?${query}`).once().reply(200, { - objects: results - }) - return search('oo', OPTS.concat({ - sortBy: 'maintenance', - detailed: true - })).then(res => { - t.deepEqual(res, results, 'return full-format results with opts.detailed') - }) -}) - -test('space-separates and URI-encodes multiple search params', t => { - const query = qs.stringify({ - text: 'foo bar:baz quux?=', - size: 1, - from: 0, - quality: 1, - popularity: 2, - maintenance: 3 - }) - tnock(t, REG).get(`/-/v1/search?${query}`).reply(200, { objects: [] }) - return search(['foo', 'bar:baz', 'quux?='], OPTS.concat({ - limit: 1, - quality: 1, - popularity: 2, - maintenance: 3 - })).then( - () => t.ok(true, 'sent parameters correctly urlencoded') - ) -}) diff --git a/node_modules/libnpm/node_modules/libnpmsearch/test/util/tnock.js b/node_modules/libnpm/node_modules/libnpmsearch/test/util/tnock.js deleted file mode 100644 index 00b6e160e1019..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmsearch/test/util/tnock.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.tearDown(function () { - server.done() - }) - return server -} diff --git a/node_modules/libnpm/node_modules/libnpmteam/.travis.yml b/node_modules/libnpm/node_modules/libnpmteam/.travis.yml deleted file mode 100644 index db5ea8b018640..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -sudo: false -node_js: - - "10" - - "9" - - "8" - - "6" diff --git a/node_modules/libnpm/node_modules/libnpmteam/CHANGELOG.md b/node_modules/libnpm/node_modules/libnpmteam/CHANGELOG.md deleted file mode 100644 index c5a8630a91164..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# Change Log - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - - -## [1.0.2](https://github.com/npm/libnpmteam/compare/v1.0.1...v1.0.2) (2019-07-16) - - -### Bug Fixes - -* **standard:** standard --fix ([3dc9144](https://github.com/npm/libnpmteam/commit/3dc9144)) - - - - -## [1.0.1](https://github.com/npm/libnpmteam/compare/v1.0.0...v1.0.1) (2018-08-24) - - - - -# 1.0.0 (2018-08-22) - - -### Features - -* **api:** implement team api ([50dd0e1](https://github.com/npm/libnpmteam/commit/50dd0e1)) -* **docs:** add fully-documented readme ([b1370f3](https://github.com/npm/libnpmteam/commit/b1370f3)) -* **test:** test --100 ftw ([9d3bdc3](https://github.com/npm/libnpmteam/commit/9d3bdc3)) diff --git a/node_modules/libnpm/node_modules/libnpmteam/CODE_OF_CONDUCT.md b/node_modules/libnpm/node_modules/libnpmteam/CODE_OF_CONDUCT.md deleted file mode 100644 index aeb72f598dcb4..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,151 +0,0 @@ -# Code of Conduct - -## When Something Happens - -If you see a Code of Conduct violation, follow these steps: - -1. Let the person know that what they did is not appropriate and ask them to stop and/or edit their message(s) or commits. -2. That person should immediately stop the behavior and correct the issue. -3. If this doesn’t happen, or if you're uncomfortable speaking up, [contact the maintainers](#contacting-maintainers). -4. As soon as available, a maintainer will look into the issue, and take [further action (see below)](#further-enforcement), starting with a warning, then temporary block, then long-term repo or organization ban. - -When reporting, please include any relevant details, links, screenshots, context, or other information that may be used to better understand and resolve the situation. - -**The maintainer team will prioritize the well-being and comfort of the recipients of the violation over the comfort of the violator.** See [some examples below](#enforcement-examples). - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers of this project pledge to making participation in our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, technical preferences, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - - * Using welcoming and inclusive language. - * Being respectful of differing viewpoints and experiences. - * Gracefully accepting constructive feedback. - * Focusing on what is best for the community. - * Showing empathy and kindness towards other community members. - * Encouraging and raising up your peers in the project so you can all bask in hacks and glory. - -Examples of unacceptable behavior by participants include: - - * The use of sexualized language or imagery and unwelcome sexual attention or advances, including when simulated online. The only exception to sexual topics is channels/spaces specifically for topics of sexual identity. - * Casual mention of slavery or indentured servitude and/or false comparisons of one's occupation or situation to slavery. Please consider using or asking about alternate terminology when referring to such metaphors in technology. - * Making light of/making mocking comments about trigger warnings and content warnings. - * Trolling, insulting/derogatory comments, and personal or political attacks. - * Public or private harassment, deliberate intimidation, or threats. - * Publishing others' private information, such as a physical or electronic address, without explicit permission. This includes any sort of "outing" of any aspect of someone's identity without their consent. - * Publishing private screenshots or quotes of interactions in the context of this project without all quoted users' *explicit* consent. - * Publishing of private communication that doesn't have to do with reporting harrassment. - * Any of the above even when [presented as "ironic" or "joking"](https://en.wikipedia.org/wiki/Hipster_racism). - * Any attempt to present "reverse-ism" versions of the above as violations. Examples of reverse-isms are "reverse racism", "reverse sexism", "heterophobia", and "cisphobia". - * Unsolicited explanations under the assumption that someone doesn't already know it. Ask before you teach! Don't assume what people's knowledge gaps are. - * [Feigning or exaggerating surprise](https://www.recurse.com/manual#no-feigned-surprise) when someone admits to not knowing something. - * "[Well-actuallies](https://www.recurse.com/manual#no-well-actuallys)" - * Other conduct which could reasonably be considered inappropriate in a professional or community setting. - -## Scope - -This Code of Conduct applies both within spaces involving this project and in other spaces involving community members. This includes the repository, its Pull Requests and Issue tracker, its Twitter community, private email communications in the context of the project, and any events where members of the project are participating, as well as adjacent communities and venues affecting the project's members. - -Depending on the violation, the maintainers may decide that violations of this code of conduct that have happened outside of the scope of the community may deem an individual unwelcome, and take appropriate action to maintain the comfort and safety of its members. - -### Other Community Standards - -As a project on GitHub, this project is additionally covered by the [GitHub Community Guidelines](https://help.github.com/articles/github-community-guidelines/). - -Additionally, as a project hosted on npm, is is covered by [npm, Inc's Code of Conduct](https://www.npmjs.com/policies/conduct). - -Enforcement of those guidelines after violations overlapping with the above are the responsibility of the entities, and enforcement may happen in any or all of the services/communities. - -## Maintainer Enforcement Process - -Once the maintainers get involved, they will follow a documented series of steps and do their best to preserve the well-being of project members. This section covers actual concrete steps. - -### Contacting Maintainers - -You may get in touch with the maintainer team through any of the following methods: - - * Through email: - * [kzm@zkat.tech](mailto:kzm@zkat.tech) (Kat Marchán) - - * Through Twitter: - * [@maybekatz](https://twitter.com/maybekatz) (Kat Marchán) - -### Further Enforcement - -If you've already followed the [initial enforcement steps](#enforcement), these are the steps maintainers will take for further enforcement, as needed: - - 1. Repeat the request to stop. - 2. If the person doubles down, they will have offending messages removed or edited by a maintainers given an official warning. The PR or Issue may be locked. - 3. If the behavior continues or is repeated later, the person will be blocked from participating for 24 hours. - 4. If the behavior continues or is repeated after the temporary block, a long-term (6-12mo) ban will be used. - -On top of this, maintainers may remove any offending messages, images, contributions, etc, as they deem necessary. - -Maintainers reserve full rights to skip any of these steps, at their discretion, if the violation is considered to be a serious and/or immediate threat to the health and well-being of members of the community. These include any threats, serious physical or verbal attacks, and other such behavior that would be completely unacceptable in any social setting that puts our members at risk. - -Members expelled from events or venues with any sort of paid attendance will not be refunded. - -### Who Watches the Watchers? - -Maintainers and other leaders who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. These may include anything from removal from the maintainer team to a permanent ban from the community. - -Additionally, as a project hosted on both GitHub and npm, [their own Codes of Conducts may be applied against maintainers of this project](#other-community-standards), externally of this project's procedures. - -### Enforcement Examples - -#### The Best Case - -The vast majority of situations work out like this. This interaction is common, and generally positive. - -> Alex: "Yeah I used X and it was really crazy!" - -> Patt (not a maintainer): "Hey, could you not use that word? What about 'ridiculous' instead?" - -> Alex: "oh sorry, sure." -> edits old comment to say "it was really confusing!" - -#### The Maintainer Case - -Sometimes, though, you need to get maintainers involved. Maintainers will do their best to resolve conflicts, but people who were harmed by something **will take priority**. - -> Patt: "Honestly, sometimes I just really hate using $library and anyone who uses it probably sucks at their job." - -> Alex: "Whoa there, could you dial it back a bit? There's a CoC thing about attacking folks' tech use like that." - -> Patt: "I'm not attacking anyone, what's your problem?" - -> Alex: "@maintainers hey uh. Can someone look at this issue? Patt is getting a bit aggro. I tried to nudge them about it, but nope." - -> KeeperOfCommitBits: (on issue) "Hey Patt, maintainer here. Could you tone it down? This sort of attack is really not okay in this space." - -> Patt: "Leave me alone I haven't said anything bad wtf is wrong with you." - -> KeeperOfCommitBits: (deletes user's comment), "@patt I mean it. Please refer to the CoC over at (URL to this CoC) if you have questions, but you can consider this an actual warning. I'd appreciate it if you reworded your messages in this thread, since they made folks there uncomfortable. Let's try and be kind, yeah?" - -> Patt: "@keeperofbits Okay sorry. I'm just frustrated and I'm kinda burnt out and I guess I got carried away. I'll DM Alex a note apologizing and edit my messages. Sorry for the trouble." - -> KeeperOfCommitBits: "@patt Thanks for that. I hear you on the stress. Burnout sucks :/. Have a good one!" - -#### The Nope Case - -> PepeTheFrog🐸: "Hi, I am a literal actual nazi and I think white supremacists are quite fashionable." - -> Patt: "NOOOOPE. OH NOPE NOPE." - -> Alex: "JFC NO. NOPE. @keeperofbits NOPE NOPE LOOK HERE" - -> KeeperOfCommitBits: "👀 Nope. NOPE NOPE NOPE. 🔥" - -> PepeTheFrog🐸 has been banned from all organization or user repositories belonging to KeeperOfCommitBits. - -## Attribution - -This Code of Conduct was generated using [WeAllJS Code of Conduct Generator](https://npm.im/weallbehave), which is based on the [WeAllJS Code of -Conduct](https://wealljs.org/code-of-conduct), which is itself based on -[Contributor Covenant](http://contributor-covenant.org), version 1.4, available -at -[http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4), -and the LGBTQ in Technology Slack [Code of -Conduct](http://lgbtq.technology/coc.html). diff --git a/node_modules/libnpm/node_modules/libnpmteam/CONTRIBUTING.md b/node_modules/libnpm/node_modules/libnpmteam/CONTRIBUTING.md deleted file mode 100644 index 3fd40076caae8..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/CONTRIBUTING.md +++ /dev/null @@ -1,256 +0,0 @@ -# Contributing - -## How do I... - -* [Use This Guide](#introduction)? -* Ask or Say Something? 🤔🐛😱 - * [Request Support](#request-support) - * [Report an Error or Bug](#report-an-error-or-bug) - * [Request a Feature](#request-a-feature) -* Make Something? 🤓👩🏽‍💻📜🍳 - * [Project Setup](#project-setup) - * [Contribute Documentation](#contribute-documentation) - * [Contribute Code](#contribute-code) -* Manage Something ✅🙆🏼💃👔 - * [Provide Support on Issues](#provide-support-on-issues) - * [Label Issues](#label-issues) - * [Clean Up Issues and PRs](#clean-up-issues-and-prs) - * [Review Pull Requests](#review-pull-requests) - * [Merge Pull Requests](#merge-pull-requests) - * [Tag a Release](#tag-a-release) - * [Join the Project Team](#join-the-project-team) -* Add a Guide Like This One [To My Project](#attribution)? 🤖😻👻 - -## Introduction - -Thank you so much for your interest in contributing!. All types of contributions are encouraged and valued. See the [table of contents](#toc) for different ways to help and details about how this project handles them!📝 - -Please make sure to read the relevant section before making your contribution! It will make it a lot easier for us maintainers to make the most of it and smooth out the experience for all involved. 💚 - -The [Project Team](#join-the-project-team) looks forward to your contributions. 🙌🏾✨ - -## Request Support - -If you have a question about this project, how to use it, or just need clarification about something: - -* Open an Issue at https://github.com/npm/libnpmteam/issues -* Provide as much context as you can about what you're running into. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* Someone will try to have a response soon. -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. - -## Report an Error or Bug - -If you run into an error or bug with the project: - -* Open an Issue at https://github.com/npm/libnpmteam/issues -* Include *reproduction steps* that someone else can follow to recreate the bug or error on their own. -* Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. If not, please be ready to provide that information if maintainers ask for it. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* A team member will try to reproduce the issue with your provided steps. If there are no repro steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. -* If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#contribute-code). -* If you or the maintainers don't respond to an issue for 30 days, the [issue will be closed](#clean-up-issues-and-prs). If you want to come back to it, reply (once, please), and we'll reopen the existing issue. Please avoid filing new issues as extensions of one you already made. -* `critical` issues may be left open, depending on perceived immediacy and severity, even past the 30 day deadline. - -## Request a Feature - -If the project doesn't do something you need or want it to do: - -* Open an Issue at https://github.com/npm/libnpmteam/issues -* Provide as much context as you can about what you're running into. -* Please try and be clear about why existing features and alternatives would not work for you. - -Once it's filed: - -* The project team will [label the issue](#label-issues). -* The project team will evaluate the feature request, possibly asking you more questions to understand its purpose and any relevant requirements. If the issue is closed, the team will convey their reasoning and suggest an alternative path forward. -* If the feature request is accepted, it will be marked for implementation with `feature-accepted`, which can then be done by either by a core team member or by anyone in the community who wants to [contribute code](#contribute-code). - -Note: The team is unlikely to be able to accept every single feature request that is filed. Please understand if they need to say no. - -## Project Setup - -So you wanna contribute some code! That's great! This project uses GitHub Pull Requests to manage contributions, so [read up on how to fork a GitHub project and file a PR](https://guides.github.com/activities/forking) if you've never done it before. - -If this seems like a lot or you aren't able to do all this setup, you might also be able to [edit the files directly](https://help.github.com/articles/editing-files-in-another-user-s-repository/) without having to do any of this setup. Yes, [even code](#contribute-code). - -If you want to go the usual route and run the project locally, though: - -* [Install Node.js](https://nodejs.org/en/download/) -* [Fork the project](https://guides.github.com/activities/forking/#fork) - -Then in your terminal: -* `cd path/to/your/clone` -* `npm install` -* `npm test` - -And you should be ready to go! - -## Contribute Documentation - -Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies. And it's how we tell others everything they need in order to be able to use this project -- or contribute to it. So thank you in advance. - -Documentation contributions of any size are welcome! Feel free to file a PR even if you're just rewording a sentence to be more clear, or fixing a spelling mistake! - -To contribute documentation: - -* [Set up the project](#project-setup). -* Edit or add any relevant documentation. -* Make sure your changes are formatted correctly and consistently with the rest of the documentation. -* Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything. -* In your commit message(s), begin the first line with `docs: `. For example: `docs: Adding a doc contrib section to CONTRIBUTING.md`. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). Documentation commits should use `docs(): `. -* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Contribute Code - -We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others. - -Code contributions of just about any size are acceptable! - -The main difference between code contributions and documentation contributions is that contributing code requires inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added, unless the maintainers consider the specific tests to be either impossible, or way too much of a burden for such a contribution. - -To contribute code: - -* [Set up the project](#project-setup). -* Make any necessary changes to the source code. -* Include any [additional documentation](#contribute-documentation) the changes might need. -* Write tests that verify that your contribution works as expected. -* Write clear, concise commit message(s) using [conventional-changelog format](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md). -* Dependency updates, additions, or removals must be in individual commits, and the message must use the format: `(deps): PKG@VERSION`, where `` is any of the usual `conventional-changelog` prefixes, at your discretion. -* Go to https://github.com/npm/libnpmteam/pulls and open a new pull request with your changes. -* If your PR is connected to an open issue, add a line in your PR's description that says `Fixes: #123`, where `#123` is the number of the issue you're fixing. - -Once you've filed the PR: - -* Barring special circumstances, maintainers will not review PRs until all checks pass (Travis, AppVeyor, etc). -* One or more maintainers will use GitHub's review feature to review your PR. -* If the maintainer asks for any changes, edit your changes, push, and ask for another review. Additional tags (such as `needs-tests`) will be added depending on the review. -* If the maintainer decides to pass on your PR, they will thank you for the contribution and explain why they won't be accepting the changes. That's ok! We still really appreciate you taking the time to do it, and we don't take that lightly. 💚 -* If your PR gets accepted, it will be marked as such, and merged into the `latest` branch soon after. Your contribution will be distributed to the masses next time the maintainers [tag a release](#tag-a-release) - -## Provide Support on Issues - -[Needs Collaborator](#join-the-project-team): none - -Helping out other users with their questions is a really awesome way of contributing to any community. It's not uncommon for most of the issues on an open source projects being support-related questions by users trying to understand something they ran into, or find their way around a known bug. - -Sometimes, the `support` label will be added to things that turn out to actually be other things, like bugs or feature requests. In that case, suss out the details with the person who filed the original issue, add a comment explaining what the bug is, and change the label from `support` to `bug` or `feature`. If you can't do this yourself, @mention a maintainer so they can do it. - -In order to help other folks out with their questions: - -* Go to the issue tracker and [filter open issues by the `support` label](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+label%3Asupport). -* Read through the list until you find something that you're familiar enough with to give an answer to. -* Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on. -* Once the discussion wraps up and things are clarified, either close the issue, or ask the original issue filer (or a maintainer) to close it for you. - -Some notes on picking up support issues: - -* Avoid responding to issues you don't know you can answer accurately. -* As much as possible, try to refer to past issues with accepted answers. Link to them from your replies with the `#123` format. -* Be kind and patient with users -- often, folks who have run into confusing things might be upset or impatient. This is ok. Try to understand where they're coming from, and if you're too uncomfortable with the tone, feel free to stay away or withdraw from the issue. (note: if the user is outright hostile or is violating the CoC, [refer to the Code of Conduct](CODE_OF_CONDUCT.md) to resolve the conflict). - -## Label Issues - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -One of the most important tasks in handling issues is labeling them usefully and accurately. All other tasks involving issues ultimately rely on the issue being classified in such a way that relevant parties looking to do their own tasks can find them quickly and easily. - -In order to label issues, [open up the list of unlabeled issues](https://github.com/npm/libnpmteam/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and, **from newest to oldest**, read through each one and apply issue labels according to the table below. If you're unsure about what label to apply, skip the issue and try the next one: don't feel obligated to label each and every issue yourself! - -Label | Apply When | Notes ---- | --- | --- -`bug` | Cases where the code (or documentation) is behaving in a way it wasn't intended to. | If something is happening that surprises the *user* but does not go against the way the code is designed, it should use the `enhancement` label. -`critical` | Added to `bug` issues if the problem described makes the code completely unusable in a common situation. | -`documentation` | Added to issues or pull requests that affect any of the documentation for the project. | Can be combined with other labels, such as `bug` or `enhancement`. -`duplicate` | Added to issues or PRs that refer to the exact same issue as another one that's been previously labeled. | Duplicate issues should be marked and closed right away, with a message referencing the issue it's a duplicate of (with `#123`) -`enhancement` | Added to [feature requests](#request-a-feature), PRs, or documentation issues that are purely additive: the code or docs currently work as expected, but a change is being requested or suggested. | -`help wanted` | Applied by [Committers](#join-the-project-team) to issues and PRs that they would like to get outside help for. Generally, this means it's lower priority for the maintainer team to itself implement, but that the community is encouraged to pick up if they so desire | Never applied on first-pass labeling. -`in-progress` | Applied by [Committers](#join-the-project-team) to PRs that are pending some work before they're ready for review. | The original PR submitter should @mention the team member that applied the label once the PR is complete. -`performance` | This issue or PR is directly related to improving performance. | -`refactor` | Added to issues or PRs that deal with cleaning up or modifying the project for the betterment of it. | -`starter` | Applied by [Committers](#join-the-project-team) to issues that they consider good introductions to the project for people who have not contributed before. These are not necessarily "easy", but rather focused around how much context is necessary in order to understand what needs to be done for this project in particular. | Existing project members are expected to stay away from these unless they increase in priority. -`support` | This issue is either asking a question about how to use the project, clarifying the reason for unexpected behavior, or possibly reporting a `bug` but does not have enough detail yet to determine whether it would count as such. | The label should be switched to `bug` if reliable reproduction steps are provided. Issues primarily with unintended configurations of a user's environment are not considered bugs, even if they cause crashes. -`tests` | This issue or PR either requests or adds primarily tests to the project. | If a PR is pending tests, that will be handled through the [PR review process](#review-pull-requests) -`wontfix` | Labelers may apply this label to issues that clearly have nothing at all to do with the project or are otherwise entirely outside of its scope/sphere of influence. [Committers](#join-the-project-team) may apply this label and close an issue or PR if they decide to pass on an otherwise relevant issue. | The issue or PR should be closed as soon as the label is applied, and a clear explanation provided of why the label was used. Contributors are free to contest the labeling, but the decision ultimately falls on committers as to whether to accept something or not. - -## Clean Up Issues and PRs - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -Issues and PRs can go stale after a while. Maybe they're abandoned. Maybe the team will just plain not have time to address them any time soon. - -In these cases, they should be closed until they're brought up again or the interaction starts over. - -To clean up issues and PRs: - -* Search the issue tracker for issues or PRs, and add the term `updated:<=YYYY-MM-DD`, where the date is 30 days before today. -* Go through each issue *from oldest to newest*, and close them if **all of the following are true**: - * not opened by a maintainer - * not marked as `critical` - * not marked as `starter` or `help wanted` (these might stick around for a while, in general, as they're intended to be available) - * no explicit messages in the comments asking for it to be left open - * does not belong to a milestone -* Leave a message when closing saying "Cleaning up stale issue. Please reopen or ping us if and when you're ready to resume this. See https://github.com/npm/libnpmteam/blob/latest/CONTRIBUTING.md#clean-up-issues-and-prs for more details." - -## Review Pull Requests - -[Needs Collaborator](#join-the-project-team): Issue Tracker - -While anyone can comment on a PR, add feedback, etc, PRs are only *approved* by team members with Issue Tracker or higher permissions. - -PR reviews use [GitHub's own review feature](https://help.github.com/articles/about-pull-request-reviews/), which manages comments, approval, and review iteration. - -Some notes: - -* You may ask for minor changes ("nitpicks"), but consider whether they are really blockers to merging: try to err on the side of "approve, with comments". -* *ALL PULL REQUESTS* should be covered by a test: either by a previously-failing test, an existing test that covers the entire functionality of the submitted code, or new tests to verify any new/changed behavior. All tests must also pass and follow established conventions. Test coverage should not drop, unless the specific case is considered reasonable by maintainers. -* Please make sure you're familiar with the code or documentation being updated, unless it's a minor change (spellchecking, minor formatting, etc). You may @mention another project member who you think is better suited for the review, but still provide a non-approving review of your own. -* Be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) -- always respond with respect, be understanding, but don't feel like you need to sacrifice your standards for their sake, either. Just don't be a jerk about it? - -## Merge Pull Requests - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. - -## Tag A Release - -[Needs Collaborator](#join-the-project-team): Committer - -TBD - need to hash out a bit more of this process. The most important bit here is probably that all tests must pass, and tags must use [semver](https://semver.org). - -## Join the Project Team - -### Ways to Join - -There are many ways to contribute! Most of them don't require any official status unless otherwise noted. That said, there's a couple of positions that grant special repository abilities, and this section describes how they're granted and what they do. - -All of the below positions are granted based on the project team's needs, as well as their consensus opinion about whether they would like to work with the person and think that they would fit well into that position. The process is relatively informal, and it's likely that people who express interest in participating can just be granted the permissions they'd like. - -You can spot a collaborator on the repo by looking for the `[Collaborator]` or `[Owner]` tags next to their names. - -Permission | Description ---- | --- -Issue Tracker | Granted to contributors who express a strong interest in spending time on the project's issue tracker. These tasks are mainly [labeling issues](#label-issues), [cleaning up old ones](#clean-up-issues-and-prs), and [reviewing pull requests](#review-pull-requests), as well as all the usual things non-team-member contributors can do. Issue handlers should not merge pull requests, tag releases, or directly commit code themselves: that should still be done through the usual pull request process. Becoming an Issue Handler means the project team trusts you to understand enough of the team's process and context to implement it on the issue tracker. -Committer | Granted to contributors who want to handle the actual pull request merges, tagging new versions, etc. Committers should have a good level of familiarity with the codebase, and enough context to understand the implications of various changes, as well as a good sense of the will and expectations of the project team. -Admin/Owner | Granted to people ultimately responsible for the project, its community, etc. - -## Attribution - -This guide was generated using the WeAllJS `CONTRIBUTING.md` generator. [Make your own](https://npm.im/weallcontribute)! diff --git a/node_modules/libnpm/node_modules/libnpmteam/LICENSE b/node_modules/libnpm/node_modules/libnpmteam/LICENSE deleted file mode 100644 index 209e4477f39c1..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE b/node_modules/libnpm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE deleted file mode 100644 index 9471c6d325f7e..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/PULL_REQUEST_TEMPLATE +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/node_modules/libnpm/node_modules/libnpmteam/README.md b/node_modules/libnpm/node_modules/libnpmteam/README.md deleted file mode 100644 index e0e771c7fac86..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/README.md +++ /dev/null @@ -1,185 +0,0 @@ -# libnpmteam [![npm version](https://img.shields.io/npm/v/libnpmteam.svg)](https://npm.im/libnpmteam) [![license](https://img.shields.io/npm/l/libnpmteam.svg)](https://npm.im/libnpmteam) [![Travis](https://img.shields.io/travis/npm/libnpmteam/latest.svg)](https://travis-ci.org/npm/libnpmteam) [![AppVeyor](https://img.shields.io/appveyor/ci/zkat/libnpmteam/latest.svg)](https://ci.appveyor.com/project/zkat/libnpmteam) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmteam/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmteam?branch=latest) - -[`libnpmteam`](https://github.com/npm/libnpmteam) is a Node.js -library that provides programmatic access to the guts of the npm CLI's `npm -team` command and its various subcommands. - -## Example - -```javascript -const access = require('libnpmteam') - -// List all teams for the @npm org. -console.log(await team.lsTeams('npm')) -``` - -## Table of Contents - -* [Installing](#install) -* [Example](#example) -* [Contributing](#contributing) -* [API](#api) - * [team opts](#opts) - * [`create()`](#create) - * [`destroy()`](#destroy) - * [`add()`](#add) - * [`rm()`](#rm) - * [`lsTeams()`](#ls-teams) - * [`lsTeams.stream()`](#ls-teams-stream) - * [`lsUsers()`](#ls-users) - * [`lsUsers.stream()`](#ls-users-stream) - -### Install - -`$ npm install libnpmteam` - -### Contributing - -The npm team enthusiastically welcomes contributions and project participation! -There's a bunch of things you can do if you want to contribute! The [Contributor -Guide](CONTRIBUTING.md) has all the information you need for everything from -reporting bugs to contributing entire new features. Please don't hesitate to -jump in if you'd like to, or even ask us questions if something isn't clear. - -All participants and maintainers in this project are expected to follow [Code of -Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other. - -Please refer to the [Changelog](CHANGELOG.md) for project history details, too. - -Happy hacking! - -### API - -#### `opts` for `libnpmteam` commands - -`libnpmteam` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch). -All options are passed through directly to that library, so please refer to [its -own `opts` -documentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options) -for options that can be passed in. - -A couple of options of note for those in a hurry: - -* `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. -* `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>}` -* `opts.Promise` - If you pass this in, the Promises returned by `libnpmteam` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}` - -#### `> team.create(team, [opts]) -> Promise` - -Creates a team named `team`. Team names use the format `@:`, with -the `@` being optional. - -Additionally, `opts.description` may be passed in to include a description. - -##### Example - -```javascript -await team.create('@npm:cli', {token: 'myregistrytoken'}) -// The @npm:cli team now exists. -``` - -#### `> team.destroy(team, [opts]) -> Promise` - -Destroys a team named `team`. Team names use the format `@:`, with -the `@` being optional. - -##### Example - -```javascript -await team.destroy('@npm:cli', {token: 'myregistrytoken'}) -// The @npm:cli team has been destroyed. -``` - -#### `> team.add(user, team, [opts]) -> Promise` - -Adds `user` to `team`. - -##### Example - -```javascript -await team.add('zkat', '@npm:cli', {token: 'myregistrytoken'}) -// @zkat now belongs to the @npm:cli team. -``` - -#### `> team.rm(user, team, [opts]) -> Promise` - -Removes `user` from `team`. - -##### Example - -```javascript -await team.rm('zkat', '@npm:cli', {token: 'myregistrytoken'}) -// @zkat is no longer part of the @npm:cli team. -``` - -#### `> team.lsTeams(scope, [opts]) -> Promise` - -Resolves to an array of team names belonging to `scope`. - -##### Example - -```javascript -await team.lsTeams('@npm', {token: 'myregistrytoken'}) -=> -[ - 'npm:cli', - 'npm:web', - 'npm:registry', - 'npm:developers' -] -``` - -#### `> team.lsTeams.stream(scope, [opts]) -> Stream` - -Returns a stream of teams belonging to `scope`. - -For a Promise-based version of these results, see [`team.lsTeams()`](#ls-teams). - -##### Example - -```javascript -for await (let team of team.lsTeams.stream('@npm', {token: 'myregistrytoken'})) { - console.log(team) -} - -// outputs -// npm:cli -// npm:web -// npm:registry -// npm:developers -``` - -#### `> team.lsUsers(team, [opts]) -> Promise` - -Resolves to an array of usernames belonging to `team`. - -For a streamed version of these results, see [`team.lsUsers.stream()`](#ls-users-stream). - -##### Example - -```javascript -await team.lsUsers('@npm:cli', {token: 'myregistrytoken'}) -=> -[ - 'iarna', - 'zkat' -] -``` - -#### `> team.lsUsers.stream(team, [opts]) -> Stream` - -Returns a stream of usernames belonging to `team`. - -For a Promise-based version of these results, see [`team.lsUsers()`](#ls-users). - -##### Example - -```javascript -for await (let user of team.lsUsers.stream('@npm:cli', {token: 'myregistrytoken'})) { - console.log(user) -} - -// outputs -// iarna -// zkat -``` diff --git a/node_modules/libnpm/node_modules/libnpmteam/appveyor.yml b/node_modules/libnpm/node_modules/libnpmteam/appveyor.yml deleted file mode 100644 index 9cc64c58e02f9..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/appveyor.yml +++ /dev/null @@ -1,22 +0,0 @@ -environment: - matrix: - - nodejs_version: "10" - - nodejs_version: "9" - - nodejs_version: "8" - - nodejs_version: "6" - -platform: - - x64 - -install: - - ps: Install-Product node $env:nodejs_version $env:platform - - npm config set spin false - - npm install - -test_script: - - npm test - -matrix: - fast_finish: true - -build: off diff --git a/node_modules/libnpm/node_modules/libnpmteam/index.js b/node_modules/libnpm/node_modules/libnpmteam/index.js deleted file mode 100644 index 3d9c906791c87..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/index.js +++ /dev/null @@ -1,106 +0,0 @@ -'use strict' - -const eu = encodeURIComponent -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const npmFetch = require('npm-registry-fetch') -const validate = require('aproba') - -const TeamConfig = figgyPudding({ - description: {}, - Promise: { default: () => Promise } -}) - -const cmd = module.exports = {} - -cmd.create = (entity, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - return npmFetch.json(`/-/org/${eu(scope)}/team`, opts.concat({ - method: 'PUT', - scope, - body: { name: team, description: opts.description } - })) - }) -} - -cmd.destroy = (entity, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}`, opts.concat({ - method: 'DELETE', - scope - })) - }) -} - -cmd.add = (user, entity, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({ - method: 'PUT', - scope, - body: { user } - })) - }) -} - -cmd.rm = (user, entity, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => { - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - return npmFetch.json(`/-/team/${eu(scope)}/${eu(team)}/user`, opts.concat({ - method: 'DELETE', - scope, - body: { user } - })) - }) -} - -cmd.lsTeams = (scope, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => getStream.array(cmd.lsTeams.stream(scope, opts))) -} -cmd.lsTeams.stream = (scope, opts) => { - opts = TeamConfig(opts) - validate('SO', [scope, opts]) - return npmFetch.json.stream(`/-/org/${eu(scope)}/team`, '.*', opts.concat({ - query: { format: 'cli' } - })) -} - -cmd.lsUsers = (entity, opts) => { - opts = TeamConfig(opts) - return pwrap(opts, () => getStream.array(cmd.lsUsers.stream(entity, opts))) -} -cmd.lsUsers.stream = (entity, opts) => { - opts = TeamConfig(opts) - const { scope, team } = splitEntity(entity) - validate('SSO', [scope, team, opts]) - const uri = `/-/team/${eu(scope)}/${eu(team)}/user` - return npmFetch.json.stream(uri, '.*', opts.concat({ - query: { format: 'cli' } - })) -} - -cmd.edit = () => { - throw new Error('edit is not implemented yet') -} - -function splitEntity (entity = '') { - let [, scope, team] = entity.match(/^@?([^:]+):(.*)$/) || [] - return { scope, team } -} - -function pwrap (opts, fn) { - return new opts.Promise((resolve, reject) => { - fn().then(resolve, reject) - }) -} diff --git a/node_modules/libnpm/node_modules/libnpmteam/package.json b/node_modules/libnpm/node_modules/libnpmteam/package.json deleted file mode 100644 index 75e9570624722..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "libnpmteam@^1.0.2", - "_id": "libnpmteam@1.0.2", - "_inBundle": false, - "_integrity": "sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA==", - "_location": "/libnpm/libnpmteam", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "libnpmteam@^1.0.2", - "name": "libnpmteam", - "escapedName": "libnpmteam", - "rawSpec": "^1.0.2", - "saveSpec": null, - "fetchSpec": "^1.0.2" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.2.tgz", - "_shasum": "8b48bcbb6ce70dd8150c950fcbdbf3feb6eec820", - "_spec": "libnpmteam@^1.0.2", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Kat Marchán", - "email": "kzm@zkat.tech" - }, - "bugs": { - "url": "https://github.com/npm/libnpmteam/issues" - }, - "bundleDependencies": false, - "dependencies": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "npm Team management APIs", - "devDependencies": { - "nock": "^9.6.1", - "standard": "^12.0.0", - "standard-version": "*", - "tap": "*", - "weallbehave": "*", - "weallcontribute": "*" - }, - "homepage": "https://npmjs.com/package/libnpmteam", - "license": "ISC", - "name": "libnpmteam", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/libnpmteam.git" - }, - "scripts": { - "postrelease": "npm publish && git push --follow-tags", - "prerelease": "npm t", - "pretest": "standard", - "release": "standard-version -s", - "test": "tap -J --100 test/*.js", - "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'", - "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'" - }, - "version": "1.0.2" -} diff --git a/node_modules/libnpm/node_modules/libnpmteam/test/index.js b/node_modules/libnpm/node_modules/libnpmteam/test/index.js deleted file mode 100644 index 7bc79d5181223..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/test/index.js +++ /dev/null @@ -1,138 +0,0 @@ -'use strict' - -const figgyPudding = require('figgy-pudding') -const getStream = require('get-stream') -const { test } = require('tap') -const tnock = require('./util/tnock.js') - -const team = require('../index.js') - -const REG = 'http://localhost:1337' -const OPTS = figgyPudding({})({ - registry: REG -}) - -test('create', t => { - tnock(t, REG).put( - '/-/org/foo/team', { name: 'cli' } - ).reply(201, { name: 'cli' }) - return team.create('@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, { name: 'cli' }, 'request succeeded') - }) -}) - -test('create bad entity name', t => { - return team.create('go away', OPTS).then( - () => { throw new Error('should not succeed') }, - err => { t.ok(err, 'error on bad entity name') } - ) -}) - -test('create empty entity', t => { - return team.create(undefined, OPTS).then( - () => { throw new Error('should not succeed') }, - err => { t.ok(err, 'error on bad entity name') } - ) -}) - -test('create w/ description', t => { - tnock(t, REG).put('/-/org/foo/team', { - name: 'cli', - description: 'just some cool folx' - }).reply(201, { name: 'cli' }) - return team.create('@foo:cli', OPTS.concat({ - description: 'just some cool folx' - })).then(ret => { - t.deepEqual(ret, { name: 'cli' }, 'no desc in return') - }) -}) - -test('destroy', t => { - tnock(t, REG).delete( - '/-/team/foo/cli' - ).reply(204, {}) - return team.destroy('@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, {}, 'request succeeded') - }) -}) - -test('add', t => { - tnock(t, REG).put( - '/-/team/foo/cli/user', { user: 'zkat' } - ).reply(201, {}) - return team.add('zkat', '@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, {}, 'request succeeded') - }) -}) - -test('rm', t => { - tnock(t, REG).delete( - '/-/team/foo/cli/user', { user: 'zkat' } - ).reply(204, {}) - return team.rm('zkat', '@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, {}, 'request succeeded') - }) -}) - -test('lsTeams', t => { - tnock(t, REG).get( - '/-/org/foo/team?format=cli' - ).reply(200, ['foo:bar', 'foo:cli']) - return team.lsTeams('foo', OPTS).then(ret => { - t.deepEqual(ret, ['foo:bar', 'foo:cli'], 'got teams') - }) -}) - -test('lsTeams error', t => { - tnock(t, REG).get( - '/-/org/foo/team?format=cli' - ).reply(500) - return team.lsTeams('foo', OPTS).then( - () => { throw new Error('should not succeed') }, - err => { t.equal(err.code, 'E500', 'got error code') } - ) -}) - -test('lsTeams.stream', t => { - tnock(t, REG).get( - '/-/org/foo/team?format=cli' - ).reply(200, ['foo:bar', 'foo:cli']) - return getStream.array(team.lsTeams.stream('foo', OPTS)).then(ret => { - t.deepEqual(ret, ['foo:bar', 'foo:cli'], 'got teams') - }) -}) - -test('lsUsers', t => { - tnock(t, REG).get( - '/-/team/foo/cli/user?format=cli' - ).reply(500) - return team.lsUsers('@foo:cli', OPTS).then( - () => { throw new Error('should not succeed') }, - err => { t.equal(err.code, 'E500', 'got error code') } - ) -}) - -test('lsUsers error', t => { - tnock(t, REG).get( - '/-/team/foo/cli/user?format=cli' - ).reply(200, ['iarna', 'zkat']) - return team.lsUsers('@foo:cli', OPTS).then(ret => { - t.deepEqual(ret, ['iarna', 'zkat'], 'got team members') - }) -}) - -test('lsUsers.stream', t => { - tnock(t, REG).get( - '/-/team/foo/cli/user?format=cli' - ).reply(200, ['iarna', 'zkat']) - return getStream.array(team.lsUsers.stream('@foo:cli', OPTS)).then(ret => { - t.deepEqual(ret, ['iarna', 'zkat'], 'got team members') - }) -}) - -test('edit', t => { - t.throws(() => { - team.edit() - }, /not implemented/) - t.done() -}) diff --git a/node_modules/libnpm/node_modules/libnpmteam/test/util/tnock.js b/node_modules/libnpm/node_modules/libnpmteam/test/util/tnock.js deleted file mode 100644 index 00b6e160e1019..0000000000000 --- a/node_modules/libnpm/node_modules/libnpmteam/test/util/tnock.js +++ /dev/null @@ -1,12 +0,0 @@ -'use strict' - -const nock = require('nock') - -module.exports = tnock -function tnock (t, host) { - const server = nock(host) - t.tearDown(function () { - server.done() - }) - return server -} diff --git a/node_modules/libnpm/node_modules/npm-profile/CHANGELOG.md b/node_modules/libnpm/node_modules/npm-profile/CHANGELOG.md deleted file mode 100644 index 6d937580c307b..0000000000000 --- a/node_modules/libnpm/node_modules/npm-profile/CHANGELOG.md +++ /dev/null @@ -1,45 +0,0 @@ -# v4.0.1 (2018-08-29) - -- `opts.password` needs to be base64-encoded when passed in for login -- Bump `npm-registry-fetch` dep because we depend on `opts.forceAuth` - -# v4.0.0 (2018-08-28) - -## BREAKING CHANGES: - -- Networking and auth-related options now use the latest [`npm-registry-fetch` config format](https://www.npmjs.com/package/npm-registry-fetch#fetch-opts). - -# v3.0.2 (2018-06-07) - -- Allow newer make-fetch-happen. -- Report 500s from weblogin end point as unsupported. -- EAUTHUNKNOWN errors were incorrectly reported as EAUTHIP. - -# v3.0.1 (2018-02-18) - -- Log `npm-notice` headers - -# v3.0.0 (2018-02-18) - -## BREAKING CHANGES: - -- profile.login() and profile.adduser() take 2 functions: opener() and - prompter(). opener is used when we get the url couplet from the - registry. prompter is used if web-based login fails. -- Non-200 status codes now always throw. Previously if the `content.error` - property was set, `content` would be returned. Content is available on the - thrown error object in the `body` property. - -## FEATURES: - -- The previous adduser is available as adduserCouch -- The previous login is available as loginCouch -- New loginWeb and adduserWeb commands added, which take an opener - function to open up the web browser. -- General errors have better error message reporting - -## FIXES: - -- General errors now correctly include the URL. -- Missing user errors from Couch are now thrown. (As was always intended.) -- Many errors have better stacktrace filtering. diff --git a/node_modules/libnpm/node_modules/npm-profile/LICENSE b/node_modules/libnpm/node_modules/npm-profile/LICENSE deleted file mode 100644 index 7953647e7760b..0000000000000 --- a/node_modules/libnpm/node_modules/npm-profile/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright npm, Inc - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/libnpm/node_modules/npm-profile/README.md b/node_modules/libnpm/node_modules/npm-profile/README.md deleted file mode 100644 index 7a80a729e8996..0000000000000 --- a/node_modules/libnpm/node_modules/npm-profile/README.md +++ /dev/null @@ -1,556 +0,0 @@ -# npm-profile - -Provides functions for fetching and updating an npmjs.com profile. - -```js -const profile = require('npm-profile') -const result = await profile.get(registry, {token}) -//... -``` - -The API that this implements is documented here: - -* [authentication](https://github.com/npm/registry/blob/master/docs/user/authentication.md) -* [profile editing](https://github.com/npm/registry/blob/master/docs/user/profile.md) (and two-factor authentication) - -## Table of Contents - -* [API](#api) - * Login and Account Creation - * [`adduser()`](#adduser) - * [`login()`](#login) - * [`adduserWeb()`](#adduser-web) - * [`loginWeb()`](#login-web) - * [`adduserCouch()`](#adduser-couch) - * [`loginCouch()`](#login-couch) - * Profile Data Management - * [`get()`](#get) - * [`set()`](#set) - * Token Management - * [`listTokens()`](#list-tokens) - * [`removeToken()`](#remove-token) - * [`createToken()`](#create-token) - -## API - -### `> profile.adduser(opener, prompter, [opts]) → Promise` - -Tries to create a user new web based login, if that fails it falls back to -using the legacy CouchDB APIs. - -* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`. -* `prompter` Function (creds) → Promise, returns a promise that resolves to an object with `username`, `email` and `password` properties. -* [`opts`](#opts) Object (optional) plus extra keys: - * `creds` Object, passed through to prompter, common values are: - * `username` String, default value for username - * `email` String, default value for email - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be `'E'` followed by the HTTP response code, for -example a Forbidden response would be `E403`. - -### `> profile.login(opener, prompter, [opts]) → Promise` - -Tries to login using new web based login, if that fails it falls back to -using the legacy CouchDB APIs. - -* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`. -* `prompter` Function (creds) → Promise, returns a promise that resolves to an object with `username`, and `password` properties. -* [`opts`](#opts) Object (optional) plus extra keys: - * `creds` Object, passed through to prompter, common values are: - * `name` String, default value for username - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. This error code can only come from a legacy CouchDB login and so -this should be retried with loginCouch. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be `'E'` followed by the HTTP response code, for -example a Forbidden response would be `E403`. - -### `> profile.adduserWeb(opener, [opts]) → Promise` - -Tries to create a user new web based login, if that fails it falls back to -using the legacy CouchDB APIs. - -* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`. -* [`opts`](#opts) Object - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the registry does not support web-login then an error will be thrown with -its `code` property set to `ENYI` . You should retry with `adduserCouch`. -If you use `adduser` then this fallback will be done automatically. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be `'E'` followed by the HTTP response code, for -example a Forbidden response would be `E403`. - -### `> profile.loginWeb(opener, [opts]) → Promise` - -Tries to login using new web based login, if that fails it falls back to -using the legacy CouchDB APIs. - -* `opener` Function (url) → Promise, returns a promise that resolves after a browser has been opened for the user at `url`. -* [`opts`](#opts) Object (optional) - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the registry does not support web-login then an error will be thrown with -its `code` property set to `ENYI` . You should retry with `loginCouch`. -If you use `login` then this fallback will be done automatically. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be `'E'` followed by the HTTP response code, for -example a Forbidden response would be `E403`. - -### `> profile.adduserCouch(username, email, password, [opts]) → Promise` - -```js -const {token} = await profile.adduser(username, email, password, {registry}) -// `token` can be passed in through `opts` for authentication. -``` - -Creates a new user on the server along with a fresh bearer token for future -authentication as this user. This is what you see as an `authToken` in an -`.npmrc`. - -If the user already exists then the npm registry will return an error, but -this is registry specific and not guaranteed. - -* `username` String -* `email` String -* `password` String -* [`opts`](#opts) Object (optional) - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be `'E'` followed by the HTTP response code, for -example a Forbidden response would be `E403`. - -### `> profile.loginCouch(username, password, [opts]) → Promise` - -```js -let token -try { - {token} = await profile.login(username, password, {registry}) -} catch (err) { - if (err.code === 'otp') { - const otp = await getOTPFromSomewhere() - {token} = await profile.login(username, password, {otp}) - } -} -// `token` can now be passed in through `opts` for authentication. -``` - -Logs you into an existing user. Does not create the user if they do not -already exist. Logging in means generating a new bearer token for use in -future authentication. This is what you use as an `authToken` in an `.npmrc`. - -* `username` String -* `email` String -* `password` String -* [`opts`](#opts) Object (optional) - -#### **Promise Value** - -An object with the following properties: - -* `token` String, to be used to authenticate further API calls -* `username` String, the username the user authenticated as - -#### **Promise Rejection** - -An error object indicating what went wrong. - -If the object has a `code` property set to `EOTP` then that indicates that -this account must use two-factor authentication to login. Try again with a -one-time password. - -If the object has a `code` property set to `EAUTHIP` then that indicates that -this account is only allowed to login from certain networks and this ip is -not on one of those networks. - -If the error was neither of these then the error object will have a -`code` property set to the HTTP response code and a `headers` property with -the HTTP headers in the response. - -### `> profile.get([opts]) → Promise` - -```js -const {name, email} = await profile.get({token}) -console.log(`${token} belongs to https://npm.im/~${name}, (mailto:${email})`) -``` - -Fetch profile information for the authenticated user. - -* [`opts`](#opts) Object - -#### **Promise Value** - -An object that looks like this: - -```js -// "*" indicates a field that may not always appear -{ - tfa: null | - false | - {"mode": "auth-only", pending: Boolean} | - ["recovery", "codes"] | - "otpauth://...", - name: String, - email: String, - email_verified: Boolean, - created: Date, - updated: Date, - cidr_whitelist: null | ["192.168.1.1/32", ...], - fullname: String, // * - homepage: String, // * - freenode: String, // * - twitter: String, // * - github: String // * -} -``` - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be the HTTP response code. - -### `> profile.set(profileData, [opts]) → Promise` - -```js -await profile.set({github: 'great-github-account-name'}, {token}) -``` - -Update profile information for the authenticated user. - -* `profileData` An object, like that returned from `profile.get`, but see - below for caveats relating to `password`, `tfa` and `cidr_whitelist`. -* [`opts`](#opts) Object (optional) - -#### **SETTING `password`** - -This is used to change your password and is not visible (for obvious -reasons) through the `get()` API. The value should be an object with `old` -and `new` properties, where the former has the user's current password and -the latter has the desired new password. For example - -```js -await profile.set({ - password: { - old: 'abc123', - new: 'my new (more secure) password' - } -}, {token}) -``` - -#### **SETTING `cidr_whitelist`** - -The value for this is an Array. Only valid CIDR ranges are allowed in it. -Be very careful as it's possible to lock yourself out of your account with -this. This is not currently exposed in `npm` itself. - -```js -await profile.set({ - cidr_whitelist: [ '8.8.8.8/32' ] -}, {token}) -// ↑ only one of google's dns servers can now access this account. -``` - -#### **SETTING `tfa`** - -Enabling two-factor authentication is a multi-step process. - -1. Call `profile.get` and check the status of `tfa`. If `pending` is true then - you'll need to disable it with `profile.set({tfa: {password, mode: 'disable'}, …)`. -2. `profile.set({tfa: {password, mode}}, {registry, token})` - * Note that the user's `password` is required here in the `tfa` object, - regardless of how you're authenticating. - * `mode` is either `auth-only` which requires an `otp` when calling `login` - or `createToken`, or `mode` is `auth-and-writes` and an `otp` will be - required on login, publishing or when granting others access to your - modules. - * Be aware that this set call may require otp as part of the auth object. - If otp is needed it will be indicated through a rejection in the usual - way. -3. If tfa was already enabled then you're just switch modes and a - successful response means that you're done. If the tfa property is empty - and tfa _wasn't_ enabled then it means they were in a pending state. -3. The response will have a `tfa` property set to an `otpauth` URL, as - [used by Google Authenticator](https://github.com/google/google-authenticator/wiki/Key-Uri-Format). - You will need to show this to the user for them to add to their - authenticator application. This is typically done as a QRCODE, but you - can also show the value of the `secret` key in the `otpauth` query string - and they can type or copy paste that in. -4. To complete setting up two factor auth you need to make a second call to - `profile.set` with `tfa` set to an array of TWO codes from the user's - authenticator, eg: `profile.set(tfa: [otp1, otp2]}, {registry, token})` -5. On success you'll get a result object with a `tfa` property that has an - array of one-time-use recovery codes. These are used to authenticate - later if the second factor is lost and generally should be printed and - put somewhere safe. - -Disabling two-factor authentication is more straightforward, set the `tfa` -attribute to an object with a `password` property and a `mode` of `disable`. - -```js -await profile.set({tfa: {password, mode: 'disable'}}, {token}) -``` - -#### **Promise Value** - -An object reflecting the changes you made, see description for `profile.get`. - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be the HTTP response code. - -### `> profile.listTokens([opts]) → Promise` - -```js -const tokens = await profile.listTokens({registry, token}) -console.log(`Number of tokens in your accounts: ${tokens.length}`) -``` - -Fetch a list of all of the authentication tokens the authenticated user has. - -* [`opts`](#opts) Object (optional) - -#### **Promise Value** - -An array of token objects. Each token object has the following properties: - -* key — A sha512 that can be used to remove this token. -* token — The first six characters of the token UUID. This should be used - by the user to identify which token this is. -* created — The date and time the token was created -* readonly — If true, this token can only be used to download private modules. Critically, it CAN NOT be used to publish. -* cidr_whitelist — An array of CIDR ranges that this token is allowed to be used from. - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be the HTTP response code. - -### `> profile.removeToken(token|key, opts) → Promise` - -```js -await profile.removeToken(key, {token}) -// token is gone! -``` - -Remove a specific authentication token. - -* `token|key` String, either a complete authentication token or the key returned by `profile.listTokens`. -* [`opts`](#opts) Object (optional) - -#### **Promise Value** - -No value. - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be the HTTP response code. - -### `> profile.createToken(password, readonly, cidr_whitelist, [opts]) → Promise` - -```js -const newToken = await profile.createToken( - password, readonly, cidr_whitelist, {token, otp} -) -// do something with the newToken -``` - -Create a new authentication token, possibly with restrictions. - -* `password` String -* `readonly` Boolean -* `cidr_whitelist` Array -* [`opts`](#opts) Object Optional - -#### **Promise Value** - -The promise will resolve with an object very much like the one's returned by -`profile.listTokens`. The only difference is that `token` is not truncated. - -```js -{ - token: String, - key: String, // sha512 hash of the token UUID - cidr_whitelist: [String], - created: Date, - readonly: Boolean -} -``` - -#### **Promise Rejection** - -An error object indicating what went wrong. - -The `headers` property will contain the HTTP headers of the response. - -If the action was denied because an OTP is required then `code` will be set -to `EOTP`. - -If the action was denied because it came from an IP address that this action -on this account isn't allowed from then the `code` will be set to `EAUTHIP`. - -Otherwise the code will be the HTTP response code. - -### options objects - -The various API functions accept an optional `opts` object as a final -argument. This opts object can either be a regular Object, or a -[`figgy-pudding`](https://npm.im/figgy-pudding) options object instance. - -Unless otherwise noted, the options accepted are the same as the -[`npm-registry-fetch` -options](https://www.npmjs.com/package/npm-registry-fetch#fetch-opts). - -Of particular note are `opts.registry`, and the auth-related options: - -* `opts.token` - used for Bearer auth -* `opts.username` and `opts.password` - used for Basic auth -* `opts.otp` - the 2fa OTP token - -## Logging - -This modules logs by emitting `log` events on the global `process` object. -These events look like this: - -```js -process.emit('log', 'loglevel', 'feature', 'message part 1', 'part 2', 'part 3', 'etc') -``` - -`loglevel` can be one of: `error`, `warn`, `notice`, `http`, `timing`, `info`, `verbose`, and `silly`. - -`feature` is any brief string that describes the component doing the logging. - -The remaining arguments are evaluated like `console.log` and joined together with spaces. - -A real world example of this is: - -```js - process.emit('log', 'http', 'request', '→', conf.method || 'GET', conf.target) -``` - -To handle the log events, you would do something like this: - -```js -const log = require('npmlog') -process.on('log', function (level) { - return log[level].apply(log, [].slice.call(arguments, 1)) -}) -``` diff --git a/node_modules/libnpm/node_modules/npm-profile/index.js b/node_modules/libnpm/node_modules/npm-profile/index.js deleted file mode 100644 index b7f753fb4d41d..0000000000000 --- a/node_modules/libnpm/node_modules/npm-profile/index.js +++ /dev/null @@ -1,284 +0,0 @@ -'use strict' - -const fetch = require('npm-registry-fetch') -const {HttpErrorBase} = require('npm-registry-fetch/errors.js') -const os = require('os') -const pudding = require('figgy-pudding') -const validate = require('aproba') - -exports.adduserCouch = adduserCouch -exports.loginCouch = loginCouch -exports.adduserWeb = adduserWeb -exports.loginWeb = loginWeb -exports.login = login -exports.adduser = adduser -exports.get = get -exports.set = set -exports.listTokens = listTokens -exports.removeToken = removeToken -exports.createToken = createToken - -const ProfileConfig = pudding({ - creds: {}, - hostname: {}, - otp: {} -}) - -// try loginWeb, catch the "not supported" message and fall back to couch -function login (opener, prompter, opts) { - validate('FFO', arguments) - opts = ProfileConfig(opts) - return loginWeb(opener, opts).catch(er => { - if (er instanceof WebLoginNotSupported) { - process.emit('log', 'verbose', 'web login not supported, trying couch') - return prompter(opts.creds) - .then(data => loginCouch(data.username, data.password, opts)) - } else { - throw er - } - }) -} - -function adduser (opener, prompter, opts) { - validate('FFO', arguments) - opts = ProfileConfig(opts) - return adduserWeb(opener, opts).catch(er => { - if (er instanceof WebLoginNotSupported) { - process.emit('log', 'verbose', 'web adduser not supported, trying couch') - return prompter(opts.creds) - .then(data => adduserCouch(data.username, data.email, data.password, opts)) - } else { - throw er - } - }) -} - -function adduserWeb (opener, opts) { - validate('FO', arguments) - const body = { create: true } - process.emit('log', 'verbose', 'web adduser', 'before first POST') - return webAuth(opener, opts, body) -} - -function loginWeb (opener, opts) { - validate('FO', arguments) - process.emit('log', 'verbose', 'web login', 'before first POST') - return webAuth(opener, opts, {}) -} - -function webAuth (opener, opts, body) { - opts = ProfileConfig(opts) - body.hostname = opts.hostname || os.hostname() - const target = '/-/v1/login' - return fetch(target, opts.concat({ - method: 'POST', - body - })).then(res => { - return Promise.all([res, res.json()]) - }).then(([res, content]) => { - const {doneUrl, loginUrl} = content - process.emit('log', 'verbose', 'web auth', 'got response', content) - if ( - typeof doneUrl !== 'string' || - typeof loginUrl !== 'string' || - !doneUrl || - !loginUrl - ) { - throw new WebLoginInvalidResponse('POST', res, content) - } - return content - }).then(({doneUrl, loginUrl}) => { - process.emit('log', 'verbose', 'web auth', 'opening url pair') - return opener(loginUrl).then( - () => webAuthCheckLogin(doneUrl, opts.concat({cache: false})) - ) - }).catch(er => { - if ((er.statusCode >= 400 && er.statusCode <= 499) || er.statusCode === 500) { - throw new WebLoginNotSupported('POST', { - status: er.statusCode, - headers: { raw: () => er.headers } - }, er.body) - } else { - throw er - } - }) -} - -function webAuthCheckLogin (doneUrl, opts) { - return fetch(doneUrl, opts).then(res => { - return Promise.all([res, res.json()]) - }).then(([res, content]) => { - if (res.status === 200) { - if (!content.token) { - throw new WebLoginInvalidResponse('GET', res, content) - } else { - return content - } - } else if (res.status === 202) { - const retry = +res.headers.get('retry-after') * 1000 - if (retry > 0) { - return sleep(retry).then(() => webAuthCheckLogin(doneUrl, opts)) - } else { - return webAuthCheckLogin(doneUrl, opts) - } - } else { - throw new WebLoginInvalidResponse('GET', res, content) - } - }) -} - -function adduserCouch (username, email, password, opts) { - validate('SSSO', arguments) - opts = ProfileConfig(opts) - const body = { - _id: 'org.couchdb.user:' + username, - name: username, - password: password, - email: email, - type: 'user', - roles: [], - date: new Date().toISOString() - } - const logObj = {} - Object.keys(body).forEach(k => { - logObj[k] = k === 'password' ? 'XXXXX' : body[k] - }) - process.emit('log', 'verbose', 'adduser', 'before first PUT', logObj) - - const target = '/-/user/org.couchdb.user:' + encodeURIComponent(username) - return fetch.json(target, opts.concat({ - method: 'PUT', - body - })).then(result => { - result.username = username - return result - }) -} - -function loginCouch (username, password, opts) { - validate('SSO', arguments) - opts = ProfileConfig(opts) - const body = { - _id: 'org.couchdb.user:' + username, - name: username, - password: password, - type: 'user', - roles: [], - date: new Date().toISOString() - } - const logObj = {} - Object.keys(body).forEach(k => { - logObj[k] = k === 'password' ? 'XXXXX' : body[k] - }) - process.emit('log', 'verbose', 'login', 'before first PUT', logObj) - - const target = '-/user/org.couchdb.user:' + encodeURIComponent(username) - return fetch.json(target, opts.concat({ - method: 'PUT', - body - })).catch(err => { - if (err.code === 'E400') { - err.message = `There is no user with the username "${username}".` - throw err - } - if (err.code !== 'E409') throw err - return fetch.json(target, opts.concat({ - query: {write: true} - })).then(result => { - Object.keys(result).forEach(function (k) { - if (!body[k] || k === 'roles') { - body[k] = result[k] - } - }) - return fetch.json(`${target}/-rev/${body._rev}`, opts.concat({ - method: 'PUT', - body, - forceAuth: { - username, - password: Buffer.from(password, 'utf8').toString('base64'), - otp: opts.otp - } - })) - }) - }).then(result => { - result.username = username - return result - }) -} - -function get (opts) { - validate('O', arguments) - return fetch.json('/-/npm/v1/user', opts) -} - -function set (profile, opts) { - validate('OO', arguments) - Object.keys(profile).forEach(key => { - // profile keys can't be empty strings, but they CAN be null - if (profile[key] === '') profile[key] = null - }) - return fetch.json('/-/npm/v1/user', ProfileConfig(opts, { - method: 'POST', - body: profile - })) -} - -function listTokens (opts) { - validate('O', arguments) - opts = ProfileConfig(opts) - - return untilLastPage('/-/npm/v1/tokens') - - function untilLastPage (href, objects) { - return fetch.json(href, opts).then(result => { - objects = objects ? objects.concat(result.objects) : result.objects - if (result.urls.next) { - return untilLastPage(result.urls.next, objects) - } else { - return objects - } - }) - } -} - -function removeToken (tokenKey, opts) { - validate('SO', arguments) - const target = `/-/npm/v1/tokens/token/${tokenKey}` - return fetch(target, ProfileConfig(opts, { - method: 'DELETE', - ignoreBody: true - })).then(() => null) -} - -function createToken (password, readonly, cidrs, opts) { - validate('SBAO', arguments) - return fetch.json('/-/npm/v1/tokens', ProfileConfig(opts, { - method: 'POST', - body: { - password: password, - readonly: readonly, - cidr_whitelist: cidrs - } - })) -} - -class WebLoginInvalidResponse extends HttpErrorBase { - constructor (method, res, body) { - super(method, res, body) - this.message = 'Invalid response from web login endpoint' - Error.captureStackTrace(this, WebLoginInvalidResponse) - } -} - -class WebLoginNotSupported extends HttpErrorBase { - constructor (method, res, body) { - super(method, res, body) - this.message = 'Web login not supported' - this.code = 'ENYI' - Error.captureStackTrace(this, WebLoginNotSupported) - } -} - -function sleep (ms) { - return new Promise((resolve, reject) => setTimeout(resolve, ms)) -} diff --git a/node_modules/libnpm/node_modules/npm-profile/package.json b/node_modules/libnpm/node_modules/npm-profile/package.json deleted file mode 100644 index 99834026c7e56..0000000000000 --- a/node_modules/libnpm/node_modules/npm-profile/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "npm-profile@^4.0.2", - "_id": "npm-profile@4.0.2", - "_inBundle": false, - "_integrity": "sha512-VRsC04pvRH+9cF+PoVh2nTmJjiG21yu59IHpsBpkxk+jaGAV8lxx96G4SDc0jOHAkfWLXbc6kIph3dGAuRnotQ==", - "_location": "/libnpm/npm-profile", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "npm-profile@^4.0.2", - "name": "npm-profile", - "escapedName": "npm-profile", - "rawSpec": "^4.0.2", - "saveSpec": null, - "fetchSpec": "^4.0.2" - }, - "_requiredBy": [ - "/libnpm" - ], - "_resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.2.tgz", - "_shasum": "8272a71c19634d0dce9c35a5daf8ee589cbb0f52", - "_spec": "npm-profile@^4.0.2", - "_where": "/Users/isaacs/dev/npm/cli/node_modules/libnpm", - "author": { - "name": "Rebecca Turner", - "email": "me@re-becca.org", - "url": "http://re-becca.org/" - }, - "bugs": { - "url": "https://github.com/npm/npm-profile/issues" - }, - "bundleDependencies": false, - "dependencies": { - "aproba": "^1.1.2 || 2", - "figgy-pudding": "^3.4.1", - "npm-registry-fetch": "^4.0.0" - }, - "deprecated": false, - "description": "Library for updating an npmjs.com profile", - "files": [ - "CHANGELOG.md", - "index.js" - ], - "homepage": "https://github.com/npm/npm-profile/tree/latest/lib#readme", - "keywords": [], - "license": "ISC", - "main": "index.js", - "name": "npm-profile", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/npm-profile.git" - }, - "version": "4.0.2" -} diff --git a/node_modules/libnpm/package.json b/node_modules/libnpm/package.json index c8caa27aa569f..9fb5641b2d9a1 100644 --- a/node_modules/libnpm/package.json +++ b/node_modules/libnpm/package.json @@ -4,13 +4,7 @@ "_inBundle": false, "_integrity": "sha512-d7jU5ZcMiTfBqTUJVZ3xid44fE5ERBm9vBnmhp2ECD2Ls+FNXWxHSkO7gtvrnbLO78gwPdNPz1HpsF3W4rjkBQ==", "_location": "/libnpm", - "_phantomChildren": { - "aproba": "2.0.0", - "figgy-pudding": "3.5.1", - "get-stream": "4.1.0", - "npm-package-arg": "6.1.0", - "npm-registry-fetch": "4.0.0" - }, + "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, diff --git a/package-lock.json b/package-lock.json index 5c8b439c0777c..f70c665225af5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -552,9 +552,9 @@ "integrity": "sha512-/XuKeqWocKsYa/cBY1YbSJSWWqTi4cFgr9S6OyM7PBaPbr9zvNGwWP33vt0uqGhwDdN+y3yhbXVILEUpnwEWGw==" }, "cacache": { - "version": "11.3.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", - "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.0.tgz", + "integrity": "sha512-0baf1FhCp16LhN+xDJsOrSiaPDCTD3JegZptVmLDoEbFcT5aT+BeFGt3wcDU3olCP5tpTCXU5sv0+TsKWT9WGQ==", "requires": { "bluebird": "^3.5.5", "chownr": "^1.1.1", @@ -570,21 +570,6 @@ "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" - }, - "dependencies": { - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "caching-transform": { @@ -3106,72 +3091,6 @@ "pacote": "^9.5.3", "read-package-json": "^2.0.13", "stringify-package": "^1.0.0" - }, - "dependencies": { - "libnpmaccess": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/libnpmaccess/-/libnpmaccess-3.0.2.tgz", - "integrity": "sha512-01512AK7MqByrI2mfC7h5j8N9V4I7MHJuk9buo8Gv+5QgThpOgpjB7sQBDDkeZqRteFb1QM/6YNdHfG7cDvfAQ==", - "requires": { - "aproba": "^2.0.0", - "get-stream": "^4.0.0", - "npm-package-arg": "^6.1.0", - "npm-registry-fetch": "^4.0.0" - } - }, - "libnpmhook": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.3.tgz", - "integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==", - "requires": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - } - }, - "libnpmorg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/libnpmorg/-/libnpmorg-1.0.1.tgz", - "integrity": "sha512-0sRUXLh+PLBgZmARvthhYXQAWn0fOsa6T5l3JSe2n9vKG/lCVK4nuG7pDsa7uMq+uTt2epdPK+a2g6btcY11Ww==", - "requires": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - } - }, - "libnpmsearch": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/libnpmsearch/-/libnpmsearch-2.0.2.tgz", - "integrity": "sha512-VTBbV55Q6fRzTdzziYCr64+f8AopQ1YZ+BdPOv16UegIEaE8C0Kch01wo4s3kRTFV64P121WZJwgmBwrq68zYg==", - "requires": { - "figgy-pudding": "^3.5.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - } - }, - "libnpmteam": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/libnpmteam/-/libnpmteam-1.0.2.tgz", - "integrity": "sha512-p420vM28Us04NAcg1rzgGW63LMM6rwe+6rtZpfDxCcXxM0zUTLl7nPFEnRF3JfFBF5skF/yuZDUthTsHgde8QA==", - "requires": { - "aproba": "^2.0.0", - "figgy-pudding": "^3.4.1", - "get-stream": "^4.0.0", - "npm-registry-fetch": "^4.0.0" - } - }, - "npm-profile": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/npm-profile/-/npm-profile-4.0.2.tgz", - "integrity": "sha512-VRsC04pvRH+9cF+PoVh2nTmJjiG21yu59IHpsBpkxk+jaGAV8lxx96G4SDc0jOHAkfWLXbc6kIph3dGAuRnotQ==", - "requires": { - "aproba": "^1.1.2 || 2", - "figgy-pudding": "^3.4.1", - "npm-registry-fetch": "^4.0.0" - } - } } }, "libnpmaccess": {