kappa
kappa copied to clipboard
Add field to json proxied, showing which its original registry was.
I'd love to make sure we can tell internal and external registry information apart.
+1 :)
As workaround I'm checking package.repository.url
for internal domain on frontend.
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.
Interesting, can you elaborate on use case?
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.
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.
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?
Perhaps add "kappaRegistryInfo": { "origin": "registryname" }
to the returned JSON?
(and no, it doesn't show with --verbose
to npm)
Shows up with --loglevel=silly
but, it is, after all, a silly amount of logging.
That is indeed silly.