Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Add field to json proxied, showing which its original registry was. #105

Open
aredridel opened this issue Mar 17, 2015 · 10 comments
Open

Add field to json proxied, showing which its original registry was. #105

aredridel opened this issue Mar 17, 2015 · 10 comments

Comments

@aredridel
Copy link
Contributor

I'd love to make sure we can tell internal and external registry information apart.

@alexindigo
Copy link

+1 :)

As workaround I'm checking package.repository.url for internal domain on frontend.

@aredridel
Copy link
Contributor Author

Yeah, though that comes from the package, not the registry -- one of the uses of this change would be to identify things published to the wrong registry.

@alexindigo
Copy link

Interesting, can you elaborate on use case?

@aredridel
Copy link
Contributor Author

We had a package that should have been published to registry.npmjs.com get published to our internal registry by mistake (shadowing the real package) -- diagnosing this was a little bit of guesswork since nothing outright said which registry the answer came from.

@alexindigo
Copy link

I see. We're trying to have only-local-per-package-npmrc rule to fight this kind of issues. But more visibility will definitely help.

@jasisk
Copy link
Contributor

jasisk commented Mar 17, 2015

Unfortunately, this is a tough thing to accomplish given we're operating within the confines of an application we don't own. That said, we do add an x-registry header to every response. I believe (without looking ... fingers crossed) you can see that information if you set verbose logging.

Any ideas how else we might be able to accomplish this?

@aredridel
Copy link
Contributor Author

Perhaps add "kappaRegistryInfo": { "origin": "registryname" } to the returned JSON?

@aredridel
Copy link
Contributor Author

(and no, it doesn't show with --verbose to npm)

@jasisk
Copy link
Contributor

jasisk commented Mar 17, 2015

Shows up with --loglevel=silly but, it is, after all, a silly amount of logging.

@aredridel
Copy link
Contributor Author

That is indeed silly.

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

No branches or pull requests

3 participants