Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unregister and login commands #1201

Closed
wants to merge 3 commits into from
Closed

Conversation

wibblymat
Copy link
Member

@satazor @svnlto @sindresorhus

Please test this thoroughly, and check that everything makes sense. Probably best to only unregister things that you registered for testing!

The UX may not be right, comments welcome.

@satazor
Copy link
Member

satazor commented Apr 1, 2014

oaaa, will test asap.

@paulirish
Copy link
Member

Super exciting. Nice one, Mat!

process.nextTick(function () {
// Verify name
if (!name) {
return logger.emit('error', createError('Please type a name', 'EINVNAME'));
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's not necessary to introduce new error type. Command will show help if name is empty, so the only way this code can be run is something like bower register ' '. You don't need to verify name.

Copy link
Member

Choose a reason for hiding this comment

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

+1

@sheerun
Copy link
Contributor

sheerun commented Apr 7, 2014

  • Unregister without name like bower unregister --token xxx doesn't stop the process.
  • I think unregister should forward to login command if interactive=true and user is not logged in
  • For some reason unregister and login doesn't show in bower help. Maybe some cache?
  • I get stacktrace when I leave username and password blank (that's registry-client)
  • Github's unauthorized http code is 401, not 403 (that's registry-client)

Otherwise OK :)


EDIT: Nevermind 401/403. It's different kind of issue

return Q.ninvoke(github.authorization, 'create', {
scopes: ['user', 'repo'],
note: 'Bower command line client (' + (new Date()).toISOString() + ')'
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually .fail() that extracts github's json error message here.

For now if login fails I get:

bower 401           {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}

Copy link
Member

Choose a reason for hiding this comment

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

+1

@sheerun
Copy link
Contributor

sheerun commented Apr 9, 2014

Maybe we should disable removing package if other packages are depending on it?

I guess it would require fetching dependency information for each package, so it's not ASAP.

}

var questions = [

Copy link
Member

Choose a reason for hiding this comment

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

Remove this new line

@satazor
Copy link
Member

satazor commented Apr 12, 2014

@wibblymat you need to add these new entries to the general bower help json file in the templates.

@wibblymat
Copy link
Member Author

@satazor @sheerun All fixed.

@sheerun bower unregister --token xxx is actually setting token to '' and unregistering xxx. To set token you need token=xxx.

@sheerun sheerun added this to the 1.4.x milestone Jun 19, 2014
@jayphelps
Copy link

What's the latest on this?

@blainsmith
Copy link
Contributor

Nice. I can't wait for this to get released.

@bcherny
Copy link

bcherny commented Dec 27, 2014

+1 this is awesome - what's blocking merging this?

@sheerun
Copy link
Contributor

sheerun commented Mar 5, 2015

Rebased in #1719

@sheerun sheerun closed this Mar 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

7 participants