Package com.artipie.npm
Class Npm
- java.lang.Object
-
- com.artipie.npm.Npm
-
public class Npm extends Object
The NPM front. The main goal is to consume a json uploaded bynpm publish command
and to: 1. to generate source archives 2. meta.json file- Since:
- 0.1
-
-
Constructor Summary
Constructors Constructor Description Npm(com.artipie.asto.Storage storage)
Constructor.Npm(com.artipie.asto.Storage storage, Optional<String> pathref)
Deprecated.UseNpm(Storage)
instead
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>
publish(com.artipie.asto.Key prefix, com.artipie.asto.Key artifact)
Publish a new version of a npm package.io.reactivex.Completable
updateMetaFile(com.artipie.asto.Key prefix, com.artipie.npm.TgzArchive file)
Updates the meta.json file based on tgz package file.
-
-
-
Constructor Detail
-
Npm
public Npm(com.artipie.asto.Storage storage)
Constructor.- Parameters:
storage
- The storage.
-
Npm
@Deprecated public Npm(com.artipie.asto.Storage storage, Optional<String> pathref)
Deprecated.UseNpm(Storage)
insteadConstructor.- Parameters:
storage
- The storage.pathref
- The sources archive pathpref. Example: http://host:8080. Unused since 0.6
-
-
Method Detail
-
publish
public final CompletableFuture<Void> publish(com.artipie.asto.Key prefix, com.artipie.asto.Key artifact)
Publish a new version of a npm package.- Parameters:
prefix
- Path prefix for achieves and meta information storageartifact
- Where uploaded json file is stored- Returns:
- Completion or error signal.
-
updateMetaFile
public io.reactivex.Completable updateMetaFile(com.artipie.asto.Key prefix, com.artipie.npm.TgzArchive file)
Updates the meta.json file based on tgz package file.- Parameters:
prefix
- Package prefix.file
- Tgz archive file.- Returns:
- Completion or error signal.
-
-