robertzaufall / chocolatestorecore Goto Github PK
View Code? Open in Web Editor NEWDownload, modify and cache chocolatey packages locally
License: Apache License 2.0
Download, modify and cache chocolatey packages locally
License: Apache License 2.0
Would it be possible to specify a specific line in the download list to be of a specific version. Im trying to install a nodejs application offline and would need the LTS version of nodejs rather than the experimental. Similar to how you can install a dedicated version though the choco
command with choco install nodejs --version 20.15.0
Hi there,
Thanks very much for this tool (even though I did not manage to work with it but it seems to be exactly what I wanted to).
Well here are my problems :
{ "ChocolateyConfiguration": { "LocalRepoUrl": "http://localhost:8080", "ApiUrl": "https://community.chocolatey.org", "ApiUserAgent": "User-Agent: ChocolateStoreCore", "ApiPath": "/api/v2", "ApiPackageRequest": "/Packages()?$filter=(tolower(Id)%20eq%20'{0}')%20and%20IsLatestVersion", "ApiPackageRequestWithVersion": "/Packages()?$filter=(tolower(Id)%20eq%20'{0}')%20and%20version%20eq%20'{1}'", "ApiFindAllRequest": "/FindPackagesById()?id='{0}.app'", "ApiFindAllNextRequest": "/FindPackagesById?id='{0}'&$skiptoken='{0}','{1}'", "ApiGetRequest": "/package/{0}/{1}", "OptionalRemoteDownloadUrl": "https://packages.chocolatey.org/{0}.{1}.nupkg", "FolderPath": "c:\\temp\\Chocolatey\\Install", "DownloadListPath": "c:\\temp\\Chocolatey\\Install\\download.txt", "HttpTimeout": "5", "HttpTimeoutOverAll": "10", "HttpRetries": "3", "HttpHandlerLifetime": "10", "LogFile": "log.txt", "LogLevel": "Warning" } }
[16:24:58 ERR] Error parsing metadata for chrome System.ArgumentException: Value cannot be null or an empty string. (Parameter 'value') at NuGet.Versioning.NuGetVersion.Parse(String value) at NuGet.Versioning.NuGetVersion..ctor(String version) at ChocolateStoreCore.Helpers.ChocolateyHelper.ParseMetadata(String originalId, String content) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\Helpers\ChocolateyHelper.cs:line 307
[16:44:14 ERR] Failed to check url https://download.mozilla.org/?product=firefox-113.0.1-ssl&os=win&lang=${locale} System.AggregateException: One or more errors occurred. (The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout.) ---> Polly.Timeout.TimeoutRejectedException: The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates'1 shouldRetryResultPredicates, Func'5 onRetryAsync, Int32 permittedRetryCount, IEnumerable'1 sleepDurationsEnumerable, Func'4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) --- End of inner exception stack trace --- at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task'1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task'1.get_Result() at ChocolateStoreCore.Helpers.HttpHelper.CheckUrl(String url) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\Helpers\HttpHelper.cs:line 82 [16:44:20 ERR] Failed to check url https://download.mozilla.org/?product=firefox-113.0.1-ssl&os=win64&lang=${locale} System.AggregateException: One or more errors occurred. (The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout.) ---> Polly.Timeout.TimeoutRejectedException: The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates'1 shouldRetryResultPredicates, Func'5 onRetryAsync, Int32 permittedRetryCount, IEnumerable'1 sleepDurationsEnumerable, Func'4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) --- End of inner exception stack trace --- at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task'1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task'1.get_Result() at ChocolateStoreCore.Helpers.HttpHelper.CheckUrl(String url) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\Helpers\HttpHelper.cs:line 82 [16:44:20 WRN] Downloading https://download.mozilla.org/?product=firefox-113.0.1-ssl&os=win&lang=${locale} [16:44:25 ERR] Failed to download https://download.mozilla.org/?product=firefox-113.0.1-ssl&os=win&lang=${locale} System.AggregateException: One or more errors occurred. (The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout.) ---> Polly.Timeout.TimeoutRejectedException: The delegate executed asynchronously through TimeoutPolicy did not complete within the timeout. ---> System.Threading.Tasks.TaskCanceledException: A task was canceled. at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates'1 shouldRetryResultPredicates, Func'5 onRetryAsync, Int32 permittedRetryCount, IEnumerable'1 sleepDurationsEnumerable, Func'4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendCoreAsync(HttpRequestMessage request, Context context, CancellationToken cancellationToken) at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) --- End of inner exception stack trace --- at Polly.Timeout.AsyncTimeoutEngine.ImplementationAsync[TResult](Func'3 action, Context context, CancellationToken cancellationToken, Func'2 timeoutProvider, TimeoutStrategy timeoutStrategy, Func'5 onTimeoutAsync, Boolean continueOnCapturedContext) at Polly.AsyncPolicy'1.ExecuteAsync(Func'3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Extensions.Http.PolicyHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.<SendAsync>g__Core|5_0(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task'1.GetResultCore(Boolean waitCompletionNotification) at System.Threading.Tasks.Task'1.get_Result() at ChocolateStoreCore.Helpers.HttpHelper.DownloadFile(String url, String filePath) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\Helpers\HttpHelper.cs:line 108 [16:44:25 ERR] Error while caching package Firefox 113.0.1 ChocolateStoreCore.Exceptions.DownloadException: Download not successful: https://download.mozilla.org/?product=firefox-113.0.1-ssl&os=win&lang=${locale} at ChocolateStoreCore.PackageCacher.<>c__DisplayClass10_0.<CachePackage>b__0(Download x) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\PackageCacher.cs:line 180 at System.Collections.Generic.List'1.ForEach(Action'1 action) at ChocolateStoreCore.PackageCacher.CachePackage(ChocolateyPackage package, String sourcePath, String targetPath, Boolean whatif) in C:\Users\VirtualUser80\source\repos\ChocolateStoreCore-main\ChocolateStoreCore\PackageCacher.cs:line172
Is there something I did/got wrong ? Thank in advance for your help !
PS : sorry the huge logs...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.