private-bower icon indicating copy to clipboard operation
private-bower copied to clipboard

Added compatibility with repository TFS

Open froufe opened this issue 9 years ago • 6 comments

Added compatibility with repository TFS that resolve the issue https://github.com/Hacklone/private-bower/issues/230

Added new parameter in Config file "repositoryTFS" and functionality to do private bower compatible with TFS when the parameter have the value "true"

froufe avatar May 30 '16 13:05 froufe

Hey,

Thanks for contributing.

Isn't simply registering the package without git+http:// enough?

Thanks, Barna

Hacklone avatar May 30 '16 18:05 Hacklone

Hi Barna,

Without git+http:// you get a Error 401 Unauthorized, and this is the way that I found to force the authentication for git repositories in TFS.

Best, Cristobal

froufe avatar May 30 '16 22:05 froufe

I'm sure I'm missing something here :)

What I see now is that you register the package with git+http://package then in every case you're using it you convert the url back to http://package, so why don't you register your package with http://package url so that you won't have to convert it every time?

Hacklone avatar May 31 '16 05:05 Hacklone

Apologies, I missed the last change. Now It's fixed.

If repositoryTFS is true the register package add "git+" for the action "clone", and when you see the url in the frontEnd or get the bower.json for the details works without "git+".

This functionality is not visible for the user. Then in this way for the user is only put the parameter "true".

Without this implementation you can register your package adding "git+" (the people must to know or investigate like me) and you can clone but you can´t see the details.

Let me know If you need more details

Best, Cristobal

froufe avatar May 31 '16 07:05 froufe

Hey,

Now I get it :)

The problem is that if you enable this option you won't be able to use github etc just your TFS server. how about this solution:

  • when you register your TFS baseg package register it like this: tfs+git+http://package
  • detect this custom protocol and only replace these :)

This way no option flag is needed + you can use the private-bower with non TFS packages as well.

Thanks, Barna

Hacklone avatar May 31 '16 07:05 Hacklone

Hi,

Thanks for your replies, I think that is a good idea :)

I want to left my solution if you flag the option, because people like me only works with tfs and add your solution too. if the option is not flagged and you put the prefix tfs+git+http://package this will be replaced and you can works with TFS and Github together.

What do you think? I can do the changes.

We can decide for tfs+git+http://package or tfs+http://package. I think that the second make the prefix easier.

Please, let me know your opinion.

Best, Cristobal

froufe avatar May 31 '16 08:05 froufe