From 2466eb5a92993ec62b3fb945b3dba0640c9cc075 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi Date: Fri, 27 Sep 2024 01:48:37 +0200 Subject: [PATCH 1/2] (#2) update extensions --- src/Nuar/src/Nuar/Extensions.cs | 333 ++++++++++++++++++ src/Nuar/src/Nuar/Nuar.csproj | 1 + .../obj/Debug/net9.0/Nuar.AssemblyInfo.cs | 2 +- .../net9.0/Nuar.AssemblyInfoInputs.cache | 2 +- ....GeneratedMSBuildEditorConfig.editorconfig | 2 +- .../Nuar/obj/Debug/net9.0/Nuar.assets.cache | Bin 43343 -> 45335 bytes .../Nuar.csproj.AssemblyReference.cache | Bin 4444 -> 4654 bytes .../Nuar.csproj.CoreCompileInputs.cache | 2 +- .../net9.0/Nuar.csproj.FileListAbsolute.txt | 9 + .../obj/Debug/net9.0/Nuar.sourcelink.json | 2 +- .../Nuar/obj/Nuar.csproj.nuget.dgspec.json | 14 +- .../src/Nuar/obj/Nuar.csproj.nuget.g.targets | 1 + src/Nuar/src/Nuar/obj/project.assets.json | 227 +++++++++++- src/Nuar/src/Nuar/obj/project.nuget.cache | 6 +- 14 files changed, 582 insertions(+), 19 deletions(-) create mode 100644 src/Nuar/src/Nuar/Extensions.cs diff --git a/src/Nuar/src/Nuar/Extensions.cs b/src/Nuar/src/Nuar/Extensions.cs new file mode 100644 index 0000000..bdbc077 --- /dev/null +++ b/src/Nuar/src/Nuar/Extensions.cs @@ -0,0 +1,333 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.HttpOverrides; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; +using NetJSON; +using Nuar.Auth; +using Nuar.Configuration; +using Nuar.Extensions; +using Nuar.Handlers; +using Nuar.Options; +using Nuar.Requests; +using Nuar.Routing; +using Nuar.WebApi; +using Polly; +using Microsoft.AspNetCore.Mvc.Formatters; +using Microsoft.Extensions.Options; +using Microsoft.AspNetCore.Mvc; +using System.Text; +using Microsoft.AspNetCore.Http; + +[assembly: InternalsVisibleTo("Nuar.Tests.Unit")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] + +namespace Nuar +{ + public static class NuarExtensions + { + private const string Logo = @" + + .-----------------. .----------------. .----------------. .----------------. +| .--------------. || .--------------. || .--------------. || .--------------. | +| | ____ _____ | || | _____ _____ | || | __ | || | _______ | | +| ||_ \|_ _| | || ||_ _||_ _|| || | / \ | || | |_ __ \ | | +| | | \ | | | || | | | | | | || | / /\ \ | || | | |__) | | | +| | | |\ \| | | || | | ' ' | | || | / ____ \ | || | | __ / | | +| | _| |_\ |_ | || | \ `--' / | || | _/ / \ \_ | || | _| | \ \_ | | +| ||_____|\____| | || | `.__.' | || ||____| |____|| || | |____| |___| | | +| | | || | | || | | || | | | +| '--------------' || '--------------' || '--------------' || '--------------' | + '----------------' '----------------' '----------------' '----------------' + + _ _____ _ + /\ (_)/ ____| | | + / \ _ __ _| | __ __ _| |_ _____ ____ _ _ _ + / /\ \ | '_ \| | | |_ |/ _` | __/ _ \ \ /\ / / _` | | | | + / ____ \| |_) | | |__| | (_| | || __/\ V V / (_| | |_| | + /_/ \_\ .__/|_|\_____|\__,_|\__\___| \_/\_/ \__,_|\__, | + | | __/ | + |_| |___/ + + + + /#### Nuar API Gateway ####\ + @#~ *Innovative & Fast* ~#@ + +"; + + + public static IServiceCollection AddNuar(this IServiceCollection services) + { + var (configuration, optionsProvider) = BuildConfiguration(services); + + return services.AddCoreServices() + .ConfigureLogging(configuration) + .ConfigureHttpClient(configuration) + .AddNuarServices() + .AddExtensions(optionsProvider); + } + + private static (NuarOptions, OptionsProvider) BuildConfiguration(IServiceCollection services) + { + IConfiguration config; + using (var scope = services.BuildServiceProvider().CreateScope()) + { + config = scope.ServiceProvider.GetService(); + } + + var optionsProvider = new OptionsProvider(config); + services.AddSingleton(optionsProvider); + var options = optionsProvider.Get(); + services.AddSingleton(options); + + return (options, optionsProvider); + } + + // Step 2: Add custom JSON formatter using NetJSON + private static IServiceCollection AddCoreServices(this IServiceCollection services) + { + services.AddMvcCore(options => + { + options.InputFormatters.Clear(); + options.OutputFormatters.Clear(); + options.InputFormatters.Add(new NetJsonInputFormatter()); + options.OutputFormatters.Add(new NetJsonOutputFormatter()); + }) + .AddApiExplorer(); + + return services; + } + + private static IServiceCollection ConfigureLogging(this IServiceCollection services, NuarOptions options) + { + services.AddLogging(builder => + { + builder.AddFilter("Microsoft", LogLevel.Warning) + .AddFilter("System", LogLevel.Warning) + .AddConsole(); + }); + + return services; + } + + private static IServiceCollection ConfigureHttpClient(this IServiceCollection services, NuarOptions options) + { + var http = options.Http ?? new Http(); + var httpClientBuilder = services.AddHttpClient("nuar"); + + httpClientBuilder.AddTransientHttpErrorPolicy(p => + p.WaitAndRetryAsync(http.Retries, retryAttempt => + { + var interval = http.Exponential + ? Math.Pow(http.Interval, retryAttempt) + : http.Interval; + + return TimeSpan.FromSeconds(interval); + })); + + return services; + } + + private static IServiceCollection AddNuarServices(this IServiceCollection services) + { + // Register core Nuar services + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + + return services; + } + + private static IServiceCollection AddExtensions(this IServiceCollection services, IOptionsProvider optionsProvider) + { + var options = optionsProvider.Get(); + var extensionProvider = new ExtensionProvider(options); + services.AddSingleton(extensionProvider); + + foreach (var extension in extensionProvider.GetAll()) + { + if (extension.Options.Enabled == false) + { + continue; + } + + extension.Extension.Add(services, optionsProvider); + } + + return services; + } + + public static IApplicationBuilder UseNuar(this IApplicationBuilder app) + { + var newLine = Environment.NewLine; + var logger = app.ApplicationServices.GetRequiredService>(); + logger.LogInformation($"{newLine}{Logo}{newLine}"); + var options = app.ApplicationServices.GetRequiredService(); + + if (options.Auth?.Enabled == true) + { + logger.LogInformation("Authentication is enabled."); + app.UseAuthentication(); + } + else + { + logger.LogInformation("Authentication is disabled."); + } + + if (options.UseForwardedHeaders) + { + logger.LogInformation("Headers forwarding is enabled."); + app.UseForwardedHeaders(new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.All + }); + } + + app.UseExtensions(); + app.RegisterRequestHandlers(); + app.AddRoutes(); + + return app; + } + + private static void RegisterRequestHandlers(this IApplicationBuilder app) + { + var logger = app.ApplicationServices.GetRequiredService>(); + var options = app.ApplicationServices.GetRequiredService(); + var requestHandlerManager = app.ApplicationServices.GetRequiredService(); + + requestHandlerManager.AddHandler("downstream", + app.ApplicationServices.GetRequiredService()); + requestHandlerManager.AddHandler("return_value", + app.ApplicationServices.GetRequiredService()); + + if (options.Modules == null) + { + return; + } + + var handlers = options.Modules + .SelectMany(m => m.Value.Routes) + .Select(r => r.Use) + .Distinct() + .ToArray(); + + foreach (var handler in handlers) + { + if (requestHandlerManager.GetHandler(handler) == null) + { + throw new Exception($"Handler: '{handler}' was not defined."); + } + + logger.LogInformation($"Added handler: '{handler}'"); + } + } + + private class Nuar + { + } + + private static void AddRoutes(this IApplicationBuilder app) + { + var routeProvider = app.ApplicationServices.GetRequiredService(); + app.UseRouting(); + app.UseEndpoints(routeProvider.Build()); + } + + private static void UseExtensions(this IApplicationBuilder app) + { + var logger = app.ApplicationServices.GetRequiredService>(); + var optionsProvider = app.ApplicationServices.GetRequiredService(); + var extensionProvider = app.ApplicationServices.GetRequiredService(); + + foreach (var extension in extensionProvider.GetAll()) + { + if (extension.Options.Enabled == false) + { + continue; + } + + extension.Extension.Use(app, optionsProvider); + logger.LogInformation($"Enabled extension: '{extension.Extension.Name}'"); + } + } + + public static IApplicationBuilder UseRequestHandler(this IApplicationBuilder app, string name) + where T : IHandler + { + var requestHandlerManager = app.ApplicationServices.GetRequiredService(); + var handler = app.ApplicationServices.GetRequiredService(); + requestHandlerManager.AddHandler(name, handler); + + return app; + } + } + + // Step 3: Define custom NetJSON input and output formatters + public class NetJsonInputFormatter : TextInputFormatter + { + public NetJsonInputFormatter() + { + SupportedMediaTypes.Add("application/json"); + SupportedEncodings.Add(Encoding.UTF8); + } + + protected override bool CanReadType(Type type) + { + return type != null; + } + + public override async Task ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) + { + var request = context.HttpContext.Request; + using (var reader = new StreamReader(request.Body, encoding)) + { + var body = await reader.ReadToEndAsync(); + var result = NetJSON.NetJSON.Deserialize(context.ModelType, body); + return await InputFormatterResult.SuccessAsync(result); + } + } + } + + public class NetJsonOutputFormatter : TextOutputFormatter + { + public NetJsonOutputFormatter() + { + SupportedMediaTypes.Add("application/json"); + SupportedEncodings.Add(Encoding.UTF8); + } + + protected override bool CanWriteType(Type type) + { + return type != null; + } + + public override Task WriteResponseBodyAsync(OutputFormatterWriteContext context, Encoding selectedEncoding) + { + var response = context.HttpContext.Response; + var json = NetJSON.NetJSON.Serialize(context.Object); + return response.WriteAsync(json); + } + } +} diff --git a/src/Nuar/src/Nuar/Nuar.csproj b/src/Nuar/src/Nuar/Nuar.csproj index bfe1c20..d17a251 100644 --- a/src/Nuar/src/Nuar/Nuar.csproj +++ b/src/Nuar/src/Nuar/Nuar.csproj @@ -12,6 +12,7 @@ + diff --git a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfo.cs b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfo.cs index a47ab86..a711a19 100644 --- a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfo.cs +++ b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfo.cs @@ -13,7 +13,7 @@ [assembly: System.Reflection.AssemblyCompanyAttribute("Nuar")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+e76dfca658910f3e2e5da1f22f3d2c0d79b63cf8")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bc199865745675ed80a20d35ace3ea7bbf0c147e")] [assembly: System.Reflection.AssemblyProductAttribute("Nuar")] [assembly: System.Reflection.AssemblyTitleAttribute("Nuar")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfoInputs.cache b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfoInputs.cache index 0893fcb..e1df11a 100644 --- a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfoInputs.cache +++ b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.AssemblyInfoInputs.cache @@ -1 +1 @@ -0699f35eb30bcc75f1b7c42f15054c46358d062513981ff92a515d52ab637ac6 +cc57279673fc1b89c73b578fb3711056f666df951e27b30316d27382dbcf31be diff --git a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.GeneratedMSBuildEditorConfig.editorconfig b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.GeneratedMSBuildEditorConfig.editorconfig index c55c3f0..0c34fc0 100644 --- a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.GeneratedMSBuildEditorConfig.editorconfig +++ b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.GeneratedMSBuildEditorConfig.editorconfig @@ -8,7 +8,7 @@ build_property.PlatformNeutralAssembly = build_property.EnforceExtendedAnalyzerRules = build_property._SupportedPlatformList = Linux,macOS,Windows build_property.RootNamespace = Nuar -build_property.ProjectDir = /home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/Nuar/ +build_property.ProjectDir = /home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/src/Nuar/ build_property.EnableComHosting = build_property.EnableGeneratedComInterfaceComImportInterop = build_property.EffectiveAnalysisLevelStyle = 9.0 diff --git a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.assets.cache b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.assets.cache index 78115f30126056e0c50dfa3fa47314e8bffc3808..fed64b7df809ab5e05a34ddd02a42068b6e710ff 100644 GIT binary patch delta 5282 zcmai24OA4@6=qOy*9CNhiFzdbBd7!c0a*lH{uc!iWi`h57s1b- zq|pY!q$X+n>)M*MO^Z#_m}sk}Kc_a;V%oG#n;31Av}t1OedFwAoV-cqoO@>8z4yEC zzW46jci+4CruXA-dnXm=Ey?!t^787P7(23|>`Kt-n-a21* zF#SqN^XofLB?Ws6*{*Ew*breMuG?ed9BVsUTavAoIhHxe_NKbz7MtUKOGJL zRA{NU+s9!rC(y@0_LpN-SPc@xgYa}tE~3Is<_h9^6Rjj-8kIzLvKxb{@G^51wbasT zYF8^#6V9~E4jV@t_N*dOYt|q$q7*@q)Kf$oUWhapZKT0^XuxPt9L6FID2}WY*C;q< zhe;ce)tLnU_F&wOOf@$t(nLkNmfl4;8+jj^qpadOjns}4Q5($78g2`69OHfOdtLQ zK`3^ZJ%}z1Vm$_p@o4Lsf(woi6~YJpU6VYh4H{H8tkJ1Hwr+>51A{dhTMo9I-yMf7G%x)mj{JH>4p?!$O$aUA-4rXgiohPYiLeFT?^`tj*B zlX-_m@+h@!sO_DOeZ}+87iSW8DjM!#?t-(NEcY5n!w;9@7KytxHulItRurEn?$ux) z!&pgPqH2iy6omnLv%w4!v4;&?{{NN;vWdR(Vxl#Q2vYYC#kjG=@8q@+v~ z_mjRa5r`%b9l+(~A*f4Q;xLcOh?qyqh?qx#!ncucjh204$%DyQ61ppU3IoQzmkvr9u4w`@G&yWTNtqXCdx|ut7FT%O%S+3+Inz&s!R};xK z{6jK4G-yr5vH6Yi@;_6{ANP-Fi;u%-uo>@VnPAVFjYW0*Is7rrp#=kz8{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?b#g|S-CPN;mJ6r2yJwt{Is`(bT$I{Q$?`ABe1Q3-HP5i%@t z&U{Rl7>d(XdR(hXW1pz3J{4AGMD>aCiyRfUkO(TzY(fMC2`*Q#x&_F=dr6K z=e%nK&ih?lI{)XVbLAYTqyK~3c>kf;{Ash{jdH!yUHm1;e<|d@?c|Q84eT7PcsASa zXHaklowzvB^tjUjUl-)-3Ykw=`3pOmqR>}A96vQDc&jf(l29LI@Ro?oKi462bIZn? zH6*@?Fod8*aO--;C9XCJ{kmBPS~VWlOB+7ZSdC8=46$zS9_eQNeDh98GT`7=gA|6I g>QL<68UXLk(eyqEhTagEI)jCLU9YFr(%a?w4-|I;r2qf` diff --git a/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.csproj.AssemblyReference.cache b/src/Nuar/src/Nuar/obj/Debug/net9.0/Nuar.csproj.AssemblyReference.cache index 2dc65ddbc6b2c4301f02504c9ef537374b101179..8017be8d9bfad4d8c5375f7bd9041722eaf592a4 100644 GIT binary patch delta 165 zcmcbkv`&SCjggyyfq}7l@&qpVjp|dF8J$5azr56vtm6DUeM3DHJrn($%p`rFh`FAD zzF%sISFpdIUP?|5BO_2J!#o?i`KEU`7#SJap>hy$kQ@w5{?8>U#Q;{$Xa`lLqY#!_ fRGgWgXKOfFMo@z + diff --git a/src/Nuar/src/Nuar/obj/project.assets.json b/src/Nuar/src/Nuar/obj/project.assets.json index 598e3bc..c86c468 100644 --- a/src/Nuar/src/Nuar/obj/project.assets.json +++ b/src/Nuar/src/Nuar/obj/project.assets.json @@ -717,6 +717,42 @@ } } }, + "NetJSON/1.4.4": { + "type": "package", + "dependencies": { + "NETStandard.Library": "2.0.3", + "System.Reflection": "4.3.0", + "System.Reflection.Emit": "4.3.0", + "System.Reflection.Emit.ILGeneration": "4.3.0", + "System.Reflection.Emit.Lightweight": "4.3.0", + "System.Reflection.Extensions": "4.3.0" + }, + "compile": { + "lib/net7.0/NetJSON.dll": { + "related": ".deps.json;.pdb;.xml" + } + }, + "runtime": { + "lib/net7.0/NetJSON.dll": { + "related": ".deps.json;.pdb;.xml" + } + } + }, + "NETStandard.Library/2.0.3": { + "type": "package", + "dependencies": { + "Microsoft.NETCore.Platforms": "1.1.0" + }, + "compile": { + "lib/netstandard1.0/_._": {} + }, + "runtime": { + "lib/netstandard1.0/_._": {} + }, + "build": { + "build/netstandard2.0/NETStandard.Library.targets": {} + } + }, "Newtonsoft.Json/13.0.3": { "type": "package", "compile": { @@ -996,7 +1032,7 @@ "System.Runtime": "4.3.0" }, "compile": { - "ref/netstandard1.1/_._": { + "ref/netstandard1.1/System.Reflection.Emit.dll": { "related": ".xml" } }, @@ -1012,7 +1048,7 @@ "System.Runtime": "4.3.0" }, "compile": { - "ref/netstandard1.0/_._": { + "ref/netstandard1.0/System.Reflection.Emit.ILGeneration.dll": { "related": ".xml" } }, @@ -1029,7 +1065,7 @@ "System.Runtime": "4.3.0" }, "compile": { - "ref/netstandard1.0/_._": { + "ref/netstandard1.0/System.Reflection.Emit.Lightweight.dll": { "related": ".xml" } }, @@ -1046,7 +1082,7 @@ "System.Runtime": "4.3.0" }, "compile": { - "ref/netstandard1.0/_._": { + "ref/netstandard1.0/System.Reflection.Extensions.dll": { "related": ".xml" } } @@ -2231,6 +2267,178 @@ "namotion.reflection.nuspec" ] }, + "NetJSON/1.4.4": { + "sha512": "+/JdZXrPVRj+WMa4CBQ6c2aww2iMUhITh8GQLMbVI52+7rYDyLr3BSgR+tcyh9VEj4tXxvBm9lAVXGVFk+W63A==", + "type": "package", + "path": "netjson/1.4.4", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "lib/net35/NetJSON.dll", + "lib/net35/NetJSON.pdb", + "lib/net35/NetJSON.xml", + "lib/net40/NetJSON.XML", + "lib/net40/NetJSON.dll", + "lib/net40/NetJSON.pdb", + "lib/net462/NetJSON.dll", + "lib/net462/NetJSON.pdb", + "lib/net462/NetJSON.xml", + "lib/net472/NetJSON.dll", + "lib/net472/NetJSON.pdb", + "lib/net472/NetJSON.xml", + "lib/net5.0/NetJSON.deps.json", + "lib/net5.0/NetJSON.dll", + "lib/net5.0/NetJSON.pdb", + "lib/net5.0/NetJSON.xml", + "lib/net6.0/NetJSON.deps.json", + "lib/net6.0/NetJSON.dll", + "lib/net6.0/NetJSON.pdb", + "lib/net6.0/NetJSON.xml", + "lib/net7.0/NetJSON.deps.json", + "lib/net7.0/NetJSON.dll", + "lib/net7.0/NetJSON.pdb", + "lib/net7.0/NetJSON.xml", + "lib/netstandard1.6/NetJSON.Core.deps.json", + "lib/netstandard1.6/NetJSON.Core.dll", + "lib/netstandard1.6/NetJSON.Core.pdb", + "lib/netstandard1.6/NetJSON.Core.xml", + "lib/netstandard2.0/NetJSON.deps.json", + "lib/netstandard2.0/NetJSON.dll", + "lib/netstandard2.0/NetJSON.pdb", + "lib/netstandard2.0/NetJSON.xml", + "netjson.1.4.4.nupkg.sha512", + "netjson.nuspec" + ] + }, + "NETStandard.Library/2.0.3": { + "sha512": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", + "type": "package", + "path": "netstandard.library/2.0.3", + "files": [ + ".nupkg.metadata", + ".signature.p7s", + "LICENSE.TXT", + "THIRD-PARTY-NOTICES.TXT", + "build/netstandard2.0/NETStandard.Library.targets", + "build/netstandard2.0/ref/Microsoft.Win32.Primitives.dll", + "build/netstandard2.0/ref/System.AppContext.dll", + "build/netstandard2.0/ref/System.Collections.Concurrent.dll", + "build/netstandard2.0/ref/System.Collections.NonGeneric.dll", + "build/netstandard2.0/ref/System.Collections.Specialized.dll", + "build/netstandard2.0/ref/System.Collections.dll", + "build/netstandard2.0/ref/System.ComponentModel.Composition.dll", + "build/netstandard2.0/ref/System.ComponentModel.EventBasedAsync.dll", + "build/netstandard2.0/ref/System.ComponentModel.Primitives.dll", + "build/netstandard2.0/ref/System.ComponentModel.TypeConverter.dll", + "build/netstandard2.0/ref/System.ComponentModel.dll", + "build/netstandard2.0/ref/System.Console.dll", + "build/netstandard2.0/ref/System.Core.dll", + "build/netstandard2.0/ref/System.Data.Common.dll", + "build/netstandard2.0/ref/System.Data.dll", + "build/netstandard2.0/ref/System.Diagnostics.Contracts.dll", + "build/netstandard2.0/ref/System.Diagnostics.Debug.dll", + "build/netstandard2.0/ref/System.Diagnostics.FileVersionInfo.dll", + "build/netstandard2.0/ref/System.Diagnostics.Process.dll", + "build/netstandard2.0/ref/System.Diagnostics.StackTrace.dll", + "build/netstandard2.0/ref/System.Diagnostics.TextWriterTraceListener.dll", + "build/netstandard2.0/ref/System.Diagnostics.Tools.dll", + "build/netstandard2.0/ref/System.Diagnostics.TraceSource.dll", + "build/netstandard2.0/ref/System.Diagnostics.Tracing.dll", + "build/netstandard2.0/ref/System.Drawing.Primitives.dll", + "build/netstandard2.0/ref/System.Drawing.dll", + "build/netstandard2.0/ref/System.Dynamic.Runtime.dll", + "build/netstandard2.0/ref/System.Globalization.Calendars.dll", + "build/netstandard2.0/ref/System.Globalization.Extensions.dll", + "build/netstandard2.0/ref/System.Globalization.dll", + "build/netstandard2.0/ref/System.IO.Compression.FileSystem.dll", + "build/netstandard2.0/ref/System.IO.Compression.ZipFile.dll", + "build/netstandard2.0/ref/System.IO.Compression.dll", + "build/netstandard2.0/ref/System.IO.FileSystem.DriveInfo.dll", + "build/netstandard2.0/ref/System.IO.FileSystem.Primitives.dll", + "build/netstandard2.0/ref/System.IO.FileSystem.Watcher.dll", + "build/netstandard2.0/ref/System.IO.FileSystem.dll", + "build/netstandard2.0/ref/System.IO.IsolatedStorage.dll", + "build/netstandard2.0/ref/System.IO.MemoryMappedFiles.dll", + "build/netstandard2.0/ref/System.IO.Pipes.dll", + "build/netstandard2.0/ref/System.IO.UnmanagedMemoryStream.dll", + "build/netstandard2.0/ref/System.IO.dll", + "build/netstandard2.0/ref/System.Linq.Expressions.dll", + "build/netstandard2.0/ref/System.Linq.Parallel.dll", + "build/netstandard2.0/ref/System.Linq.Queryable.dll", + "build/netstandard2.0/ref/System.Linq.dll", + "build/netstandard2.0/ref/System.Net.Http.dll", + "build/netstandard2.0/ref/System.Net.NameResolution.dll", + "build/netstandard2.0/ref/System.Net.NetworkInformation.dll", + "build/netstandard2.0/ref/System.Net.Ping.dll", + "build/netstandard2.0/ref/System.Net.Primitives.dll", + "build/netstandard2.0/ref/System.Net.Requests.dll", + "build/netstandard2.0/ref/System.Net.Security.dll", + "build/netstandard2.0/ref/System.Net.Sockets.dll", + "build/netstandard2.0/ref/System.Net.WebHeaderCollection.dll", + "build/netstandard2.0/ref/System.Net.WebSockets.Client.dll", + "build/netstandard2.0/ref/System.Net.WebSockets.dll", + "build/netstandard2.0/ref/System.Net.dll", + "build/netstandard2.0/ref/System.Numerics.dll", + "build/netstandard2.0/ref/System.ObjectModel.dll", + "build/netstandard2.0/ref/System.Reflection.Extensions.dll", + "build/netstandard2.0/ref/System.Reflection.Primitives.dll", + "build/netstandard2.0/ref/System.Reflection.dll", + "build/netstandard2.0/ref/System.Resources.Reader.dll", + "build/netstandard2.0/ref/System.Resources.ResourceManager.dll", + "build/netstandard2.0/ref/System.Resources.Writer.dll", + "build/netstandard2.0/ref/System.Runtime.CompilerServices.VisualC.dll", + "build/netstandard2.0/ref/System.Runtime.Extensions.dll", + "build/netstandard2.0/ref/System.Runtime.Handles.dll", + "build/netstandard2.0/ref/System.Runtime.InteropServices.RuntimeInformation.dll", + "build/netstandard2.0/ref/System.Runtime.InteropServices.dll", + "build/netstandard2.0/ref/System.Runtime.Numerics.dll", + "build/netstandard2.0/ref/System.Runtime.Serialization.Formatters.dll", + "build/netstandard2.0/ref/System.Runtime.Serialization.Json.dll", + "build/netstandard2.0/ref/System.Runtime.Serialization.Primitives.dll", + "build/netstandard2.0/ref/System.Runtime.Serialization.Xml.dll", + "build/netstandard2.0/ref/System.Runtime.Serialization.dll", + "build/netstandard2.0/ref/System.Runtime.dll", + "build/netstandard2.0/ref/System.Security.Claims.dll", + "build/netstandard2.0/ref/System.Security.Cryptography.Algorithms.dll", + "build/netstandard2.0/ref/System.Security.Cryptography.Csp.dll", + "build/netstandard2.0/ref/System.Security.Cryptography.Encoding.dll", + "build/netstandard2.0/ref/System.Security.Cryptography.Primitives.dll", + "build/netstandard2.0/ref/System.Security.Cryptography.X509Certificates.dll", + "build/netstandard2.0/ref/System.Security.Principal.dll", + "build/netstandard2.0/ref/System.Security.SecureString.dll", + "build/netstandard2.0/ref/System.ServiceModel.Web.dll", + "build/netstandard2.0/ref/System.Text.Encoding.Extensions.dll", + "build/netstandard2.0/ref/System.Text.Encoding.dll", + "build/netstandard2.0/ref/System.Text.RegularExpressions.dll", + "build/netstandard2.0/ref/System.Threading.Overlapped.dll", + "build/netstandard2.0/ref/System.Threading.Tasks.Parallel.dll", + "build/netstandard2.0/ref/System.Threading.Tasks.dll", + "build/netstandard2.0/ref/System.Threading.Thread.dll", + "build/netstandard2.0/ref/System.Threading.ThreadPool.dll", + "build/netstandard2.0/ref/System.Threading.Timer.dll", + "build/netstandard2.0/ref/System.Threading.dll", + "build/netstandard2.0/ref/System.Transactions.dll", + "build/netstandard2.0/ref/System.ValueTuple.dll", + "build/netstandard2.0/ref/System.Web.dll", + "build/netstandard2.0/ref/System.Windows.dll", + "build/netstandard2.0/ref/System.Xml.Linq.dll", + "build/netstandard2.0/ref/System.Xml.ReaderWriter.dll", + "build/netstandard2.0/ref/System.Xml.Serialization.dll", + "build/netstandard2.0/ref/System.Xml.XDocument.dll", + "build/netstandard2.0/ref/System.Xml.XPath.XDocument.dll", + "build/netstandard2.0/ref/System.Xml.XPath.dll", + "build/netstandard2.0/ref/System.Xml.XmlDocument.dll", + "build/netstandard2.0/ref/System.Xml.XmlSerializer.dll", + "build/netstandard2.0/ref/System.Xml.dll", + "build/netstandard2.0/ref/System.dll", + "build/netstandard2.0/ref/mscorlib.dll", + "build/netstandard2.0/ref/netstandard.dll", + "build/netstandard2.0/ref/netstandard.xml", + "lib/netstandard1.0/_._", + "netstandard.library.2.0.3.nupkg.sha512", + "netstandard.library.nuspec" + ] + }, "Newtonsoft.Json/13.0.3": { "sha512": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ==", "type": "package", @@ -4235,6 +4443,7 @@ "Microsoft.AspNetCore.Routing >= 2.2.2", "Microsoft.Extensions.Http.Polly >= 8.0.8", "NJsonSchema.Yaml >= 11.0.2", + "NetJSON >= 1.4.4", "System.Runtime.Loader >= 4.3.0", "YamlDotNet >= 16.1.2" ] @@ -4245,11 +4454,11 @@ "project": { "version": "1.0.0", "restore": { - "projectUniqueName": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/Nuar/Nuar.csproj", + "projectUniqueName": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/src/Nuar/Nuar.csproj", "projectName": "Nuar", - "projectPath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/Nuar/Nuar.csproj", + "projectPath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/src/Nuar/Nuar.csproj", "packagesPath": "/home/kaliuser/.nuget/packages/", - "outputPath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/Nuar/obj/", + "outputPath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/src/Nuar/obj/", "projectStyle": "PackageReference", "configFilePaths": [ "/home/kaliuser/.nuget/NuGet/NuGet.Config" @@ -4303,6 +4512,10 @@ "target": "Package", "version": "[11.0.2, )" }, + "NetJSON": { + "target": "Package", + "version": "[1.4.4, )" + }, "System.Runtime.Loader": { "target": "Package", "version": "[4.3.0, )" diff --git a/src/Nuar/src/Nuar/obj/project.nuget.cache b/src/Nuar/src/Nuar/obj/project.nuget.cache index ac7e525..fcb169b 100644 --- a/src/Nuar/src/Nuar/obj/project.nuget.cache +++ b/src/Nuar/src/Nuar/obj/project.nuget.cache @@ -1,8 +1,8 @@ { "version": 2, - "dgSpecHash": "yJbYLSlDX0I=", + "dgSpecHash": "bIl2muL+XuA=", "success": true, - "projectFilePath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/Nuar/Nuar.csproj", + "projectFilePath": "/home/kaliuser/Documents/portfolio/commercial_apps/crmlxrms/nuar_framework/src/Nuar/src/Nuar/Nuar.csproj", "expectedPackageFiles": [ "/home/kaliuser/.nuget/packages/microsoft.aspnetcore.authentication/2.2.0/microsoft.aspnetcore.authentication.2.2.0.nupkg.sha512", "/home/kaliuser/.nuget/packages/microsoft.aspnetcore.authentication.abstractions/2.2.0/microsoft.aspnetcore.authentication.abstractions.2.2.0.nupkg.sha512", @@ -43,6 +43,8 @@ "/home/kaliuser/.nuget/packages/microsoft.netcore.targets/1.1.0/microsoft.netcore.targets.1.1.0.nupkg.sha512", "/home/kaliuser/.nuget/packages/microsoft.win32.registry/4.5.0/microsoft.win32.registry.4.5.0.nupkg.sha512", "/home/kaliuser/.nuget/packages/namotion.reflection/3.1.1/namotion.reflection.3.1.1.nupkg.sha512", + "/home/kaliuser/.nuget/packages/netjson/1.4.4/netjson.1.4.4.nupkg.sha512", + "/home/kaliuser/.nuget/packages/netstandard.library/2.0.3/netstandard.library.2.0.3.nupkg.sha512", "/home/kaliuser/.nuget/packages/newtonsoft.json/13.0.3/newtonsoft.json.13.0.3.nupkg.sha512", "/home/kaliuser/.nuget/packages/njsonschema/11.0.2/njsonschema.11.0.2.nupkg.sha512", "/home/kaliuser/.nuget/packages/njsonschema.annotations/11.0.2/njsonschema.annotations.11.0.2.nupkg.sha512", From e374064aec4a3a3f10f3b30d04e3ec907f8ef621 Mon Sep 17 00:00:00 2001 From: Andrii Voznesenskyi Date: Fri, 27 Sep 2024 01:49:23 +0200 Subject: [PATCH 2/2] (#2) update scripts [pack-all-force] --- scripts/pack-all.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/pack-all.sh b/scripts/pack-all.sh index f5dd387..4531ab9 100644 --- a/scripts/pack-all.sh +++ b/scripts/pack-all.sh @@ -17,7 +17,6 @@ echo "$divider" echo "Starting packaging process" echo "$divider" -# Function to check if a directory has changes directory_contains_changes() { local dir="$1" [[ "$FORCE_PACK_ALL" == true ]] || [[ $(echo "$CHANGED_FILES" | grep -c "$dir") -gt 0 ]]