Class NpmProxy


  • public class NpmProxy
    extends Object
    NPM Proxy.
    Since:
    0.1
    • Constructor Detail

      • NpmProxy

        public NpmProxy​(NpmProxyConfig config,
                        io.vertx.reactivex.core.Vertx vertx,
                        com.artipie.asto.Storage storage)
        Ctor.
        Parameters:
        config - NPM Proxy configuration
        vertx - Vertx instance
        storage - Adapter storage
    • Method Detail

      • getPackage

        public io.reactivex.Maybe<NpmPackage> getPackage​(String name)
        Retrieve package metadata.
        Parameters:
        name - Package name
        Returns:
        Package metadata (cached or downloaded from remote repository)
      • getAsset

        public io.reactivex.Maybe<NpmAsset> getAsset​(String path)
        Retrieve asset.
        Parameters:
        path - Asset path
        Returns:
        Asset data (cached or downloaded from remote repository)
      • close

        public void close()
                   throws IOException
        Close NPM Proxy adapter and underlying remote client.
        Throws:
        IOException - when underlying remote client fails to close