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

Request for Mirror Synchronization Capability #110

Open
elrrrrrrr opened this issue Feb 29, 2024 · 3 comments
Open

Request for Mirror Synchronization Capability #110

elrrrrrrr opened this issue Feb 29, 2024 · 3 comments
Labels
feature New feature or request

Comments

@elrrrrrrr
Copy link

Dear jsr maintainers,

Greetings from the cnpm team, the provider of stable and free npm registry package mirror services in China, including the frontend at https://npmmirror.com/ and the registry at https://registry.npmmirror.com/.

After testing, we have found that we cannot directly access the npm.jsr.io content within mainland China. In order to provide better services in collaboration with jsr in the future, we would like to request mirror synchronization capabilities similar to those offered by npm registry.

We rely on the changesStream interface provided by npm registry to deliver streaming version change information at https://replicate.npmjs.com/_changes.

Additionally, for frontend display purposes, we also hope to provide manifest interfaces to showcase metadata information.

Looking forward to your response.

@lucacasonato lucacasonato transferred this issue from jsr-io/jsr-npm Mar 1, 2024
@lucacasonato
Copy link
Member

Hey @elrrrrrrr

Yes we'd love to support whatever is necessary to support mirroring. I am not sure if we can provide that exact replicate.npmjsr.com interface, just because I think it may be tied to NPM's usage of couchdb? Do you know if there are docs on this?

Would an alternative change stream also work? We could provide a way for you to query the registry API for new NPM tarballs + updates to NPM version manifests (in a change stream style format). Let me know what exact info you need in the change stream :)

@lucacasonato lucacasonato added the feature New feature or request label Mar 1, 2024
@elrrrrrrr
Copy link
Author

@lucacasonato

🤩

Here is the REPLICATE-API interface, which returns corresponding changes through a stream.

https://registry.npmmirror.com/_changes?since=1, we have also developed our own changesStream interface, which returns changes in JSON format, It also requires a since parameter for pagination.

Additionally, we noticed that the manifest does not contain data related to maintainers, which might introduce some differences. If there are already existing interfaces for updates, please inform us how to call them.

Lastly, we hope to find a way to return all npm tarball list for initialization purposes. such as ref .

@lucacasonato lucacasonato added this to JSR Mar 4, 2024
@github-project-automation github-project-automation bot moved this to Needs Plan in JSR Mar 4, 2024
@lucacasonato lucacasonato moved this from Needs Plan to Ready in JSR Mar 4, 2024
@elrrrrrrr
Copy link
Author

elrrrrrrr commented Mar 5, 2024

🎉 We've been attempting some synchronization and adaptation work locally and have successfully completed it for a single package, happ pass.
image

image

Here are some of the services or changes we urgently need:

  1. Maintainers in manifests, (all packages in the npm registry have maintainers information even security holder). Are there any plans to add a default value for this field, maybe like [email protected]?
  2. There is a need for a way to export the names of all existing packages for init the mirror.
  3. We need a changesStream service. Currently, it seems PACKAGE_VERSION_ADD event is enough ?

🚀 we are eagerly anticipating the launch of the jsr mirror service as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Ready
Development

No branches or pull requests

2 participants