Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

adds a command for installing addons from npm #11

Merged
merged 9 commits into from
Apr 22, 2016
Merged

adds a command for installing addons from npm #11

merged 9 commits into from
Apr 22, 2016

Conversation

bcoe
Copy link
Contributor

@bcoe bcoe commented Apr 20, 2016

When you run oauth2-server-pg install <addon> it:

  • fetches the addon, which has been published to npm.
  • use the meta-information published with the addon to populate the clients table in the oauth database.

I'm a terrible person and should write more tests for this; my plan is to loop around and add more tests once we have some end-to-end integration testing done.

function exists (addon, argv) {
const deferred = Promise.defer()

request.get(resolve(argv.registry, addon), function (err, res) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In cases of read-thru-cache for npmE, couldn't this return a 404 even though npm install might work (by adding it to the whitelist)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking that we should default this URL to https://registry.npmjs.org, even if someone happens to have a different registry configured for npm Enterprise. I probably shouldn't have even made this URL configurable.

This brings up a good point though, we should definitely make it so a proxy can be configured for these requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opened a separate issue for adding proxy support:

#12

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.97% when pulling 151c6d4 on installer into dea8495 on master.

@bcoe bcoe merged commit 0c46e22 into master Apr 22, 2016
@bcoe
Copy link
Contributor Author

bcoe commented Apr 22, 2016

I went ahead and landed this so that I can test on replicated, I've created two follow up tickets that I will implement to address the code review.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants