Show / Hide Table of Contents

Class NpmPackagesUpdater

Inheritance
object
NpmPackagesUpdater
Implements
ITransientDependency
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.Cli.ProjectModification
Assembly: Volo.Abp.Cli.Core.dll
Syntax
public class NpmPackagesUpdater : ITransientDependency

Constructors

NpmPackagesUpdater(PackageJsonFileFinder, NpmGlobalPackagesChecker, ICancellationTokenProvider, CliHttpClientFactory, IInstallLibsService, ICmdHelper)

Declaration
public NpmPackagesUpdater(PackageJsonFileFinder packageJsonFileFinder, NpmGlobalPackagesChecker npmGlobalPackagesChecker, ICancellationTokenProvider cancellationTokenProvider, CliHttpClientFactory cliHttpClientFactory, IInstallLibsService installLibsService, ICmdHelper cmdHelper)
Parameters
Type Name Description
PackageJsonFileFinder packageJsonFileFinder
NpmGlobalPackagesChecker npmGlobalPackagesChecker
ICancellationTokenProvider cancellationTokenProvider
CliHttpClientFactory cliHttpClientFactory
IInstallLibsService installLibsService
ICmdHelper cmdHelper

Properties

CancellationTokenProvider

Declaration
protected ICancellationTokenProvider CancellationTokenProvider { get; }
Property Value
Type Description
ICancellationTokenProvider

CmdHelper

Declaration
public ICmdHelper CmdHelper { get; }
Property Value
Type Description
ICmdHelper

InstallLibsService

Declaration
public IInstallLibsService InstallLibsService { get; }
Property Value
Type Description
IInstallLibsService

Logger

Declaration
public ILogger<NpmPackagesUpdater> Logger { get; set; }
Property Value
Type Description
ILogger<NpmPackagesUpdater>

Methods

ExtractVersions(string)

Declaration
protected virtual string ExtractVersions(string output)
Parameters
Type Name Description
string output
Returns
Type Description
string

GetAbpPackagesFromPackageJson(JObject)

Declaration
protected virtual List<JProperty> GetAbpPackagesFromPackageJson(JObject fileObject)
Parameters
Type Name Description
JObject fileObject
Returns
Type Description
List<JProperty>

GetLatestVersion(JProperty, bool, bool, string, bool)

Declaration
protected virtual Task<string> GetLatestVersion(JProperty package, bool includeReleaseCandidates = false, bool includePreviews = false, string workingDirectory = null, bool includePreRc = false)
Parameters
Type Name Description
JProperty package
bool includeReleaseCandidates
bool includePreviews
string workingDirectory
bool includePreRc
Returns
Type Description
Task<string>

GetPackageVersionList(JProperty, string)

Declaration
protected virtual List<string> GetPackageVersionList(JProperty package, string workingDirectory = null)
Parameters
Type Name Description
JProperty package
string workingDirectory
Returns
Type Description
List<string>

IsPrerelease(string)

Declaration
protected virtual bool IsPrerelease(string version)
Parameters
Type Name Description
string version
Returns
Type Description
bool

RunInstallLibsAsync(string)

Declaration
protected virtual Task RunInstallLibsAsync(string fileDirectory)
Parameters
Type Name Description
string fileDirectory
Returns
Type Description
Task

RunNpmInstall(string)

Declaration
protected virtual void RunNpmInstall(string fileDirectory)
Parameters
Type Name Description
string fileDirectory

RunYarn(string)

Declaration
protected virtual void RunYarn(string fileDirectory)
Parameters
Type Name Description
string fileDirectory

SpecifiedVersionExists(string, JProperty)

Declaration
protected virtual bool SpecifiedVersionExists(string version, JProperty package)
Parameters
Type Name Description
string version
JProperty package
Returns
Type Description
bool

TryUpdatingPackage(string, JProperty, bool, bool, bool, string, bool)

Declaration
protected virtual Task<bool> TryUpdatingPackage(string filePath, JProperty package, bool includePreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, string specifiedVersion = null, bool includePreRc = false)
Parameters
Type Name Description
string filePath
JProperty package
bool includePreviews
bool includeReleaseCandidates
bool switchToStable
string specifiedVersion
bool includePreRc
Returns
Type Description
Task<bool>

Update(string, bool, bool, bool, string, bool)

Declaration
public Task Update(string rootDirectory, bool includePreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, string version = null, bool includePreRc = false)
Parameters
Type Name Description
string rootDirectory
bool includePreviews
bool includeReleaseCandidates
bool switchToStable
string version
bool includePreRc
Returns
Type Description
Task

UpdatePackagesInFile(string, bool, bool, bool, string, bool)

Declaration
protected virtual Task<bool> UpdatePackagesInFile(string filePath, bool includePreviews = false, bool includeReleaseCandidates = false, bool switchToStable = false, string specifiedVersion = null, bool includePreRc = false)
Parameters
Type Name Description
string filePath
bool includePreviews
bool includeReleaseCandidates
bool switchToStable
string specifiedVersion
bool includePreRc
Returns
Type Description
Task<bool>

Implements

ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform