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

[ jhipster.github.io] Get module information from npmjs #2633

Closed
cbornet opened this issue Jan 14, 2016 · 20 comments
Closed

[ jhipster.github.io] Get module information from npmjs #2633

cbornet opened this issue Jan 14, 2016 · 20 comments

Comments

@cbornet
Copy link
Member

cbornet commented Jan 14, 2016

By using the info from the package.json that we can get on registry.npmjs.org, we could reduce the information in modules.json to just a short name and a npm package name for jhipster.github.io
See http://registry.npmjs.org/generator-jhipster-basic-auth/latest
We could also output the latest module version available on jhipster.github.io

@deepu105
Copy link
Member

@cbornet may be you should try it out in the new revamped site first https://github.com/jhipster-redesign/jhipster-redesign.github.io

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

OK. I will PR on your project if you're OK

@deepu105
Copy link
Member

100 % ok
On 14 Jan 2016 18:14, "Christophe Bornet" [email protected] wrote:

OK. I will PR on your project if you're OK


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

Arf ! The registry doesn't set the CORS headers : npm/npm-registry-couchapp#108. Is it ok to use an online-proxy ?

@deepu105
Copy link
Member

Not sure man, is it worth if it is that complicated?

Thanks & Regards,
Deepu

On Thu, Jan 14, 2016 at 6:50 PM, Christophe Bornet <[email protected]

wrote:

Arf ! The registry doesn't set the CORS headers :
npm/npm-registry-couchapp#108
npm/npm-registry-couchapp#108. Is it ok to
use an online-proxy ?


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

It's not complicated : https://cors-anywhere.herokuapp.com/registry.npmjs.org/generator-jhipster-basic-auth/latest (will not work from a browser address bar)

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

If you want to have a look : http://cbornet.github.io/modules/marketplace.html (not finished)

@deepu105
Copy link
Member

But im able to hit the original nom registry itl and see the json content,
why do you want CORS here? Am i missing something
On 14 Jan 2016 22:12, "Christophe Bornet" [email protected] wrote:

It's not complicated :
https://cors-anywhere.herokuapp.com/registry.npmjs.org/generator-jhipster-basic-auth/latest
(will not work from a browser address bar)


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@deepu105
Copy link
Member

Ok im just being stupid i guess, got it :)
On 14 Jan 2016 22:35, [email protected] wrote:

But im able to hit the original nom registry itl and see the json content,
why do you want CORS here? Am i missing something
On 14 Jan 2016 22:12, "Christophe Bornet" [email protected]
wrote:

It's not complicated :
https://cors-anywhere.herokuapp.com/registry.npmjs.org/generator-jhipster-basic-auth/latest
(will not work from a browser address bar)


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@deepu105
Copy link
Member

+1
On 14 Jan 2016 22:36, "Deepu K Sasidharan" [email protected] wrote:

Ok im just being stupid i guess, got it :)
On 14 Jan 2016 22:35, [email protected] wrote:

But im able to hit the original nom registry itl and see the json
content, why do you want CORS here? Am i missing something
On 14 Jan 2016 22:12, "Christophe Bornet" [email protected]
wrote:

It's not complicated :
https://cors-anywhere.herokuapp.com/registry.npmjs.org/generator-jhipster-basic-auth/latest
(will not work from a browser address bar)


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

This is now done.
@jdubois can you check if it's ok for you ? http://cbornet.github.io/modules/marketplace.html

@deepu105
Copy link
Member

Can you update the tiles on home page as well?
On 14 Jan 2016 22:49, "Christophe Bornet" [email protected] wrote:

This is now done.
@jdubois https://github.com/jdubois can you check if it's ok for you ?
http://cbornet.github.io/modules/marketplace.html


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

Yes I just saw that 😄 . Working on it

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

@deepu105 @jdubois can you review the PR ?

@jdubois
Copy link
Member

jdubois commented Jan 14, 2016

OK that's not complicated to use, but this "proxy" is really asking for trouble: I'm pretty sure this is going to fail at some point in time.
I'd rather stay with our current system, it's very simple and doesn't need any maintenance from our part.

I know that I'm not being fun here, but I really don't want to have any maintenance to do, as (like all of you) I'm just doing this in my spare time.

@cbornet
Copy link
Member Author

cbornet commented Jan 14, 2016

Yes, I understand. So, we need to wait that they add CORS headers to npm-registry but since the issue is 2 years old I don't have much hope...
The other possibility is to get the package.json from github. We could have a field for the path to fetch.

@deepu105
Copy link
Member

Oops I might have jumped the gun and merged it, any way can revert if
needed.

As Julien says im also worried that it might fail at some point.

Does they allow JsonP for this, if so we can do that instead of doing proxy
On 15 Jan 2016 05:44, "Christophe Bornet" [email protected] wrote:

Yes, I understand. So, we need to wait that they add CORS headers to
npm-registry but since the issue is 2 years old I don't have much hope...
The other possibility is to get the package.json from github. We could
have a field for the path to fetch.


Reply to this email directly or view it on GitHub
#2633 (comment)
.

@cbornet
Copy link
Member Author

cbornet commented Jan 15, 2016

At least GH correctly sets the CORS so it can be used.
As for JSONP, it doesn't seem possible : npm/npm-registry-couchapp#157

@cbornet
Copy link
Member Author

cbornet commented Jan 15, 2016

I made a PR to use a package.json file path. Can you review ?

@deepu105
Copy link
Member

Im closing it here as we will track it in https://github.com/jhipster-redesign/jhipster-redesign.github.io/issues/4 and we are having a discussion there

@jdubois jdubois modified the milestone: 2.27.0 Jan 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants