Class NpmPackagesUpdater
Inheritance
NpmPackagesUpdater
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
Properties
CancellationTokenProvider
Declaration
protected ICancellationTokenProvider CancellationTokenProvider { get; }
Property Value
CmdHelper
Declaration
public ICmdHelper CmdHelper { get; }
Property Value
InstallLibsService
Declaration
public IInstallLibsService InstallLibsService { get; }
Property Value
Logger
Declaration
public ILogger<NpmPackagesUpdater> Logger { get; set; }
Property Value
Methods
Declaration
protected virtual string ExtractVersions(string output)
Parameters
Type |
Name |
Description |
string |
output |
|
Returns
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
GetPackageVersionList(JProperty, string)
Declaration
protected virtual List<string> GetPackageVersionList(JProperty package, string workingDirectory = null)
Parameters
Type |
Name |
Description |
JProperty |
package |
|
string |
workingDirectory |
|
Returns
IsPrerelease(string)
Declaration
protected virtual bool IsPrerelease(string version)
Parameters
Type |
Name |
Description |
string |
version |
|
Returns
RunInstallLibsAsync(string)
Declaration
protected virtual Task RunInstallLibsAsync(string fileDirectory)
Parameters
Type |
Name |
Description |
string |
fileDirectory |
|
Returns
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
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
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
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
Implements
Extension Methods