pub struct Publisher { /* private fields */ }Expand description
Handles publishing packages to registries and creating tarballs.
Implementations§
Source§impl Publisher
impl Publisher
pub fn new(registry_url: String, auth_token: Option<String>) -> Self
Sourcepub fn publish(
&self,
package_dir: &Path,
tag: Option<&str>,
dry_run: bool,
access: Option<&str>,
) -> Result<()>
pub fn publish( &self, package_dir: &Path, tag: Option<&str>, dry_run: bool, access: Option<&str>, ) -> Result<()>
Publish a single package to the registry.
Shells out to npm publish with proper auth configuration.
Sourcepub fn publish_workspace(
&self,
workspace: &Workspace,
tag: Option<&str>,
dry_run: bool,
access: Option<&str>,
) -> Result<PublishStats>
pub fn publish_workspace( &self, workspace: &Workspace, tag: Option<&str>, dry_run: bool, access: Option<&str>, ) -> Result<PublishStats>
Publish all workspace packages that have unpublished versions.
Auto Trait Implementations§
impl Freeze for Publisher
impl RefUnwindSafe for Publisher
impl Send for Publisher
impl Sync for Publisher
impl Unpin for Publisher
impl UnsafeUnpin for Publisher
impl UnwindSafe for Publisher
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more