diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c20b10823..b579737b4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,11 @@ version: 2 updates: + - package-ecosystem: "nuget" + directory: "/src/Core" + schedule: + interval: "weekly" + day: "monday" + time: "08:00" - package-ecosystem: "nuget" directory: "/src/Application" schedule: @@ -27,6 +33,15 @@ updates: ignore: - dependency-name: "*" update-types: ["version-update:semver-major"] + - package-ecosystem: "nuget" + directory: "/tests/Infrastructure.UnitTests" + schedule: + interval: "weekly" + day: "monday" + time: "08:00" + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] - package-ecosystem: "nuget" directory: "/tests/Application.UnitTests" schedule: diff --git a/Hippo.sln b/Hippo.sln index 932ac1f86..f43103f6b 100644 --- a/Hippo.sln +++ b/Hippo.sln @@ -21,6 +21,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.UnitTests", "tests\Cor EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hippo.FunctionalTests", "tests\Hippo.FunctionalTests\Hippo.FunctionalTests.csproj", "{8C25A909-52B2-4326-BF00-23C053376EB5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure.UnitTests", "tests\Infrastructure.UnitTests\Infrastructure.UnitTests.csproj", "{4F25FBC8-3753-495C-8799-2DEE473D4764}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -58,6 +60,10 @@ Global {8C25A909-52B2-4326-BF00-23C053376EB5}.Debug|Any CPU.Build.0 = Debug|Any CPU {8C25A909-52B2-4326-BF00-23C053376EB5}.Release|Any CPU.ActiveCfg = Release|Any CPU {8C25A909-52B2-4326-BF00-23C053376EB5}.Release|Any CPU.Build.0 = Release|Any CPU + {4F25FBC8-3753-495C-8799-2DEE473D4764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4F25FBC8-3753-495C-8799-2DEE473D4764}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4F25FBC8-3753-495C-8799-2DEE473D4764}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4F25FBC8-3753-495C-8799-2DEE473D4764}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {96764F9E-66BB-4F64-A1BA-DE92537996E1} = {A432DA6D-ADCE-4EA1-9697-7A637F75605D} @@ -67,5 +73,6 @@ Global {AE958DF1-B480-4556-A68C-E042072DB7A6} = {3043D016-B9BF-4706-9773-3D58457A78AC} {0BFC9718-3107-4E48-B952-C0B345A55A20} = {3043D016-B9BF-4706-9773-3D58457A78AC} {8C25A909-52B2-4326-BF00-23C053376EB5} = {3043D016-B9BF-4706-9773-3D58457A78AC} + {4F25FBC8-3753-495C-8799-2DEE473D4764} = {3043D016-B9BF-4706-9773-3D58457A78AC} EndGlobalSection EndGlobal diff --git a/src/Application/Application.csproj b/src/Application/Application.csproj index 214eff7e9..eb0399e47 100644 --- a/src/Application/Application.csproj +++ b/src/Application/Application.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/Application/Channels/Commands/PatchChannelCommand.cs b/src/Application/Channels/Commands/PatchChannelCommand.cs index 7066b6b7c..62a2ed51e 100644 --- a/src/Application/Channels/Commands/PatchChannelCommand.cs +++ b/src/Application/Channels/Commands/PatchChannelCommand.cs @@ -64,7 +64,7 @@ private void UpdateEnvironmentVariables(PatchChannelCommand request, Channel cha { var existingVariables = GetExistingEnvironmentVariables(request.ChannelId); - var envVariablesToBeAdded = EnvironmentVariablesToBeAdded(request.EnvironmentVariables.Value, channel); + var envVariablesToBeAdded = EnvironmentVariablesToBeAdded(existingVariables, request.EnvironmentVariables.Value, channel); var envVariablesToBeUpdated = EnvironmentVariablesToBeUpdated(existingVariables, request.EnvironmentVariables.Value); var envVariablesToBeDeleted = EnvironmentVariablesToBeRemoved(existingVariables, request.EnvironmentVariables.Value); @@ -79,7 +79,7 @@ private void UpdateEnvironmentVariables(PatchChannelCommand request, Channel cha { foreach (var environmentVariable in request.EnvironmentVariables.Value) { - var updatedEnvVar = existingVariables.FirstOrDefault(v => v.Id == environmentVariable.Id); + var updatedEnvVar = existingVariables.FirstOrDefault(v => v.Key == environmentVariable.Key); if (updatedEnvVar is null) { @@ -107,29 +107,25 @@ private List GetExistingEnvironmentVariables(Guid channelId .ToList(); } - private static List EnvironmentVariablesToBeAdded(List? environmentVariables, Channel channel) + private static List EnvironmentVariablesToBeAdded(List existingVariables, + List? environmentVariables, Channel channel) { if (environmentVariables is null) { return new List(); } - var toBeAdded = new List(); - var newVariables = environmentVariables.Where(v => v.Id is null); + var existingVariablesKeys = existingVariables.Select(v => v.Key); - foreach (var environmentVariable in newVariables) - { - var entity = new EnvironmentVariable + return environmentVariables + .Where(v => !existingVariablesKeys.Contains(v.Key)) + .Select(entity => new EnvironmentVariable { - Key = environmentVariable.Key, - Value = environmentVariable.Value, + Key = entity.Key, + Value = entity.Value, Channel = channel - }; - - toBeAdded.Add(entity); - } - - return toBeAdded; + }) + .ToList(); } private static List EnvironmentVariablesToBeUpdated(List existingVariables, @@ -140,9 +136,9 @@ private static List EnvironmentVariablesToBeUpdated(List(); } - var environmentVariablesIds = environmentVariables.Select(v => v.Id); + var environmentVariablesKeys = environmentVariables.Select(v => v.Key); - return existingVariables.Where(v => environmentVariablesIds.Contains(v.Id)).ToList(); + return existingVariables.Where(v => environmentVariablesKeys.Contains(v.Key)).ToList(); } private static List EnvironmentVariablesToBeRemoved(List existingVariables, @@ -153,8 +149,8 @@ private static List EnvironmentVariablesToBeRemoved(List(); } - var environmentVariablesIds = environmentVariables.Select(v => v.Id); + var environmentVariablesKeys = environmentVariables.Select(v => v.Key); - return existingVariables.Where(v => !environmentVariablesIds.Contains(v.Id)).ToList(); + return existingVariables.Where(v => !environmentVariablesKeys.Contains(v.Key)).ToList(); } } diff --git a/src/Application/Channels/Queries/ChannelItem.cs b/src/Application/Channels/Queries/ChannelItem.cs index 4a42e982b..09a58a100 100644 --- a/src/Application/Channels/Queries/ChannelItem.cs +++ b/src/Application/Channels/Queries/ChannelItem.cs @@ -14,7 +14,7 @@ public class ChannelItem : IMapFrom { public ChannelItem() { - EnvironmentVariables = new List(); + EnvironmentVariables = new List(); } [Required] @@ -41,7 +41,7 @@ public ChannelItem() public CertificateItem? Certificate { get; set; } [Required] - public IList EnvironmentVariables { get; set; } + public IList EnvironmentVariables { get; set; } [NoMap] public AppSummaryDto? AppSummary { get; set; } diff --git a/src/Application/Common/Behaviours/AuthorizationBehaviour.cs b/src/Application/Common/Behaviours/AuthorizationBehaviour.cs index 265b736ca..4faf7489e 100644 --- a/src/Application/Common/Behaviours/AuthorizationBehaviour.cs +++ b/src/Application/Common/Behaviours/AuthorizationBehaviour.cs @@ -6,7 +6,7 @@ namespace Hippo.Application.Common.Behaviours; -public class AuthorizationBehaviour : IPipelineBehavior where TRequest : notnull +public class AuthorizationBehaviour : IPipelineBehavior where TRequest : IRequest { private readonly ICurrentUserService _currentUserService; private readonly IIdentityService _identityService; diff --git a/src/Application/Common/Behaviours/PerformanceBehaviour.cs b/src/Application/Common/Behaviours/PerformanceBehaviour.cs index 09e3e9581..9a364c3bb 100644 --- a/src/Application/Common/Behaviours/PerformanceBehaviour.cs +++ b/src/Application/Common/Behaviours/PerformanceBehaviour.cs @@ -5,7 +5,7 @@ namespace Hippo.Application.Common.Behaviours; -public class PerformanceBehaviour : IPipelineBehavior where TRequest : notnull +public class PerformanceBehaviour : IPipelineBehavior where TRequest : IRequest { private readonly Stopwatch _timer; private readonly ILogger _logger; diff --git a/src/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs b/src/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs index 0a422a6c5..6dd51272d 100644 --- a/src/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs +++ b/src/Application/Common/Behaviours/UnhandledExceptionBehaviour.cs @@ -3,7 +3,7 @@ namespace Hippo.Application.Common.Behaviours; -public class UnhandledExceptionBehaviour : IPipelineBehavior where TRequest : notnull +public class UnhandledExceptionBehaviour : IPipelineBehavior where TRequest : IRequest { private readonly ILogger _logger; diff --git a/src/Application/Common/Behaviours/ValidationBehaviour.cs b/src/Application/Common/Behaviours/ValidationBehaviour.cs index 418a1621b..8426083f4 100644 --- a/src/Application/Common/Behaviours/ValidationBehaviour.cs +++ b/src/Application/Common/Behaviours/ValidationBehaviour.cs @@ -4,8 +4,7 @@ namespace Hippo.Application.Common.Behaviours; -public class ValidationBehaviour : IPipelineBehavior - where TRequest : notnull +public class ValidationBehaviour : IPipelineBehavior where TRequest : IRequest { private readonly IEnumerable> _validators; diff --git a/src/Application/Common/Interfaces/BindleService/RevisionSpinToml.cs b/src/Application/Common/Interfaces/BindleService/RevisionSpinToml.cs index 4f7f02379..e666e491b 100644 --- a/src/Application/Common/Interfaces/BindleService/RevisionSpinToml.cs +++ b/src/Application/Common/Interfaces/BindleService/RevisionSpinToml.cs @@ -1,4 +1,5 @@ using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; namespace Hippo.Application.Common.Interfaces.StorageService; @@ -6,6 +7,9 @@ public class RevisionSpinToml { public RevisionTrigger? Trigger { get; set; } + public Dictionary> Config { get; set; } = new(); + [Required] - public List Component { get; set; } = new(); + [DataMember(Name = "component")] + public List Components { get; set; } = new(); } diff --git a/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommand.cs b/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommand.cs deleted file mode 100644 index afa032bc9..000000000 --- a/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommand.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using Hippo.Application.Common.Exceptions; -using Hippo.Application.Common.Interfaces; -using Hippo.Core.Entities; -using Hippo.Core.Events; -using MediatR; -using Microsoft.EntityFrameworkCore; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -public class CreateEnvironmentVariableCommand : IRequest -{ - [Required] - public string Key { get; set; } = ""; - - [Required] - public string Value { get; set; } = ""; - - [Required] - public Guid ChannelId { get; set; } -} - -public class CreateEnvironmentVariableCommandHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - public CreateEnvironmentVariableCommandHandler(IApplicationDbContext context) - { - _context = context; - } - - public async Task Handle(CreateEnvironmentVariableCommand request, CancellationToken cancellationToken) - { - var channel = await _context.Channels - .Where(a => a.Id == request.ChannelId) - .Include(c => c.App) - .SingleOrDefaultAsync(cancellationToken); - _ = channel ?? throw new NotFoundException(nameof(Channel), request.ChannelId); - - var entity = new EnvironmentVariable - { - Key = request.Key, - Value = request.Value, - ChannelId = request.ChannelId, - Channel = channel, - }; - - entity.AddDomainEvent(new CreatedEvent(entity)); - - _context.EnvironmentVariables.Add(entity); - - await _context.SaveChangesAsync(cancellationToken); - - return entity.Id; - } -} diff --git a/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommandValidator.cs b/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommandValidator.cs deleted file mode 100644 index 985c7a9b5..000000000 --- a/src/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableCommandValidator.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Text.RegularExpressions; -using FluentValidation; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -public class CreateEnvironmentVariableCommandValidator : AbstractValidator -{ - private readonly Regex validKey = new Regex("^[a-zA-Z0-9-_]*$"); - public CreateEnvironmentVariableCommandValidator() - { - RuleFor(v => v.Key) - .NotEmpty().WithMessage("Key is required.") - .MaximumLength(32) - .Matches(validKey); - - RuleFor(v => v.Value) - .NotNull(); // the empty string is a valid value - } -} diff --git a/src/Application/EnvironmentVariables/Commands/DeleteEnvironmentVariableCommand.cs b/src/Application/EnvironmentVariables/Commands/DeleteEnvironmentVariableCommand.cs deleted file mode 100644 index 280a3d7cc..000000000 --- a/src/Application/EnvironmentVariables/Commands/DeleteEnvironmentVariableCommand.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using Hippo.Application.Common.Exceptions; -using Hippo.Application.Common.Interfaces; -using Hippo.Core.Entities; -using Hippo.Core.Events; -using MediatR; -using Microsoft.EntityFrameworkCore; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -public class DeleteEnvironmentVariableCommand : IRequest -{ - [Required] - public Guid Id { get; set; } -} - -public class DeleteEnvironmentVariableCommandHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - public DeleteEnvironmentVariableCommandHandler(IApplicationDbContext context) - { - _context = context; - } - - public async Task Handle(DeleteEnvironmentVariableCommand request, CancellationToken cancellationToken) - { - var entity = await _context.EnvironmentVariables - .Where(l => l.Id == request.Id) - .SingleOrDefaultAsync(cancellationToken); - - if (entity is null) - { - throw new NotFoundException(nameof(EnvironmentVariable), request.Id); - } - - entity.AddDomainEvent(new DeletedEvent(entity)); - - _context.EnvironmentVariables.Remove(entity); - - await _context.SaveChangesAsync(cancellationToken); - - return Unit.Value; - } -} diff --git a/src/Application/EnvironmentVariables/Commands/PurgeEnvironmentVariablesCommand.cs b/src/Application/EnvironmentVariables/Commands/PurgeEnvironmentVariablesCommand.cs deleted file mode 100644 index d62b15fac..000000000 --- a/src/Application/EnvironmentVariables/Commands/PurgeEnvironmentVariablesCommand.cs +++ /dev/null @@ -1,35 +0,0 @@ -using Hippo.Application.Common.Interfaces; -using Hippo.Application.Common.Security; -using Hippo.Core.Entities; -using Hippo.Core.Events; -using MediatR; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -[Authorize(Roles = UserRole.Administrator)] -[Authorize(Policy = UserPolicy.CanPurge)] -public class PurgeEnvironmentVariablesCommand : IRequest { } - -public class PurgeEnvironmentVariablesCommandHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - public PurgeEnvironmentVariablesCommandHandler(IApplicationDbContext context) - { - _context = context; - } - - public async Task Handle(PurgeEnvironmentVariablesCommand request, CancellationToken cancellationToken) - { - foreach (var entity in _context.EnvironmentVariables) - { - entity.AddDomainEvent(new DeletedEvent(entity)); - } - - _context.EnvironmentVariables.RemoveRange(_context.EnvironmentVariables); - - await _context.SaveChangesAsync(cancellationToken); - - return Unit.Value; - } -} diff --git a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommand.cs b/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommand.cs deleted file mode 100644 index df9c185e1..000000000 --- a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommand.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using Hippo.Application.Common.Exceptions; -using Hippo.Application.Common.Interfaces; -using Hippo.Core.Entities; -using Hippo.Core.Events; -using MediatR; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -public class UpdateEnvironmentVariableCommand : IRequest -{ - [Required] - public Guid Id { get; set; } - - [Required] - public string Key { get; set; } = ""; - - [Required] - public string Value { get; set; } = ""; -} - -public class UpdateEnvironmentVariableCommandHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - public UpdateEnvironmentVariableCommandHandler(IApplicationDbContext context) - { - _context = context; - } - - public async Task Handle(UpdateEnvironmentVariableCommand request, CancellationToken cancellationToken) - { - var entity = await _context.EnvironmentVariables - .FindAsync(new object[] { request.Id }, cancellationToken); - - if (entity is null) - { - throw new NotFoundException(nameof(EnvironmentVariable), request.Id); - } - - entity.Key = request.Key; - entity.Value = request.Value; - - entity.AddDomainEvent(new ModifiedEvent(entity)); - - await _context.SaveChangesAsync(cancellationToken); - - return Unit.Value; - } -} diff --git a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommandValidator.cs b/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommandValidator.cs deleted file mode 100644 index 329d30b6b..000000000 --- a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableCommandValidator.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Text.RegularExpressions; -using FluentValidation; - -namespace Hippo.Application.EnvironmentVariables.Commands; - -public class UpdateEnvironmentVariableCommandValidator : AbstractValidator -{ - private readonly Regex validKey = new Regex("^[a-zA-Z0-9-_]*$"); - public UpdateEnvironmentVariableCommandValidator() - { - RuleFor(v => v.Key) - .NotEmpty().WithMessage("Key is required.") - .MaximumLength(32) - .Matches(validKey); - - RuleFor(v => v.Value) - .NotNull(); // the empty string is a valid value - } -} diff --git a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableDto.cs b/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableDto.cs index b5ad68b6a..916e794f5 100644 --- a/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableDto.cs +++ b/src/Application/EnvironmentVariables/Commands/UpdateEnvironmentVariableDto.cs @@ -3,9 +3,6 @@ namespace Hippo.Application.EnvironmentVariables.Commands; public class UpdateEnvironmentVariableDto { - [Required] - public Guid? Id { get; set; } - [Required] public string Key { get; set; } = ""; diff --git a/src/Application/EnvironmentVariables/Queries/EnvironmentVariableDto.cs b/src/Application/EnvironmentVariables/Queries/EnvironmentVariableItem.cs similarity index 74% rename from src/Application/EnvironmentVariables/Queries/EnvironmentVariableDto.cs rename to src/Application/EnvironmentVariables/Queries/EnvironmentVariableItem.cs index fe2bfcd18..6c7f6a93c 100644 --- a/src/Application/EnvironmentVariables/Queries/EnvironmentVariableDto.cs +++ b/src/Application/EnvironmentVariables/Queries/EnvironmentVariableItem.cs @@ -4,11 +4,8 @@ namespace Hippo.Application.EnvironmentVariables.Queries; -public class EnvironmentVariableDto : IMapFrom +public class EnvironmentVariableItem : IMapFrom { - [Required] - public Guid Id { get; set; } - [Required] public Guid ChannelId { get; set; } diff --git a/src/Application/EnvironmentVariables/Queries/EnvironmentVariablesVm.cs b/src/Application/EnvironmentVariables/Queries/EnvironmentVariablesVm.cs deleted file mode 100644 index 2247635ce..000000000 --- a/src/Application/EnvironmentVariables/Queries/EnvironmentVariablesVm.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace Hippo.Application.EnvironmentVariables.Queries; - -public class EnvironmentVariablesVm -{ - [Required] - public IList EnvironmentVariables { get; set; } = new List(); -} diff --git a/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesQuery.cs b/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesQuery.cs deleted file mode 100644 index abae788d1..000000000 --- a/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesQuery.cs +++ /dev/null @@ -1,39 +0,0 @@ -using AutoMapper; -using AutoMapper.QueryableExtensions; -using Hippo.Application.Common.Interfaces; -using MediatR; -using Microsoft.EntityFrameworkCore; - -namespace Hippo.Application.EnvironmentVariables.Queries; - -public class ExportEnvironmentVariablesQuery : IRequest -{ -} - -public class ExportEnvironmentVariablesQueryHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - private readonly IMapper _mapper; - private readonly IJsonFileBuilder _fileBuilder; - - public ExportEnvironmentVariablesQueryHandler(IApplicationDbContext context, IMapper mapper, IJsonFileBuilder fileBuilder) - { - _context = context; - _mapper = mapper; - _fileBuilder = fileBuilder; - } - - public async Task Handle(ExportEnvironmentVariablesQuery request, CancellationToken cancellationToken) - { - var records = await _context.EnvironmentVariables - .ProjectTo(_mapper.ConfigurationProvider) - .ToListAsync(cancellationToken); - - var vm = new ExportEnvironmentVariablesVm( - "environment-variables.json", - "application/json", - _fileBuilder.BuildEnvironmentVariablesFile(records)); - - return vm; - } -} diff --git a/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesVm.cs b/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesVm.cs deleted file mode 100644 index a785683e7..000000000 --- a/src/Application/EnvironmentVariables/Queries/ExportEnvironmentVariablesVm.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace Hippo.Application.EnvironmentVariables.Queries; - -public class ExportEnvironmentVariablesVm -{ - public ExportEnvironmentVariablesVm(string fileName, string contentType, byte[] content) - { - FileName = fileName; - ContentType = contentType; - Content = content; - } - - [Required] - public string FileName { get; set; } - - [Required] - public string ContentType { get; set; } - - [Required] - public byte[] Content { get; set; } -} diff --git a/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariableQuery.cs b/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariableQuery.cs deleted file mode 100644 index 5d010e06e..000000000 --- a/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariableQuery.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System.ComponentModel.DataAnnotations; -using AutoMapper; -using AutoMapper.QueryableExtensions; -using Hippo.Application.Common.Exceptions; -using Hippo.Application.Common.Interfaces; -using Hippo.Core.Entities; -using MediatR; -using Microsoft.EntityFrameworkCore; - -namespace Hippo.Application.EnvironmentVariables.Queries; - -public class GetEnvironmentVariableQuery : IRequest -{ - [Required] - public Guid Id { get; set; } -} - -public class GetEnvironmentVariableQueryHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - private readonly IMapper _mapper; - - public GetEnvironmentVariableQueryHandler(IApplicationDbContext context, IMapper mapper) - { - _context = context; - _mapper = mapper; - } - - public async Task Handle(GetEnvironmentVariableQuery request, CancellationToken cancellationToken) - { - var entity = await _context.EnvironmentVariables - .Where(a => a.Id == request.Id) - .ProjectTo(_mapper.ConfigurationProvider) - .FirstOrDefaultAsync(cancellationToken); - - if (entity is null) - { - throw new NotFoundException(nameof(EnvironmentVariable), request.Id); - } - - return entity; - } -} diff --git a/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariablesQuery.cs b/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariablesQuery.cs deleted file mode 100644 index 35c7c2332..000000000 --- a/src/Application/EnvironmentVariables/Queries/GetEnvironmentVariablesQuery.cs +++ /dev/null @@ -1,35 +0,0 @@ -using AutoMapper; -using AutoMapper.QueryableExtensions; -using Hippo.Application.Common.Interfaces; -using MediatR; -using Microsoft.EntityFrameworkCore; - -namespace Hippo.Application.EnvironmentVariables.Queries; - -public class GetEnvironmentVariablesQuery : IRequest -{ -} - -public class GetEnvironmentVariablesQueryHandler : IRequestHandler -{ - private readonly IApplicationDbContext _context; - - private readonly IMapper _mapper; - - public GetEnvironmentVariablesQueryHandler(IApplicationDbContext context, IMapper mapper) - { - _context = context; - _mapper = mapper; - } - - public async Task Handle(GetEnvironmentVariablesQuery request, CancellationToken cancellationToken) - { - return new EnvironmentVariablesVm - { - EnvironmentVariables = await _context.EnvironmentVariables - .ProjectTo(_mapper.ConfigurationProvider) - .OrderBy(e => e.Key) - .ToListAsync(cancellationToken) - }; - } -} diff --git a/src/Application/Revisions/Commands/UpdateRevisionDetailsCommand.cs b/src/Application/Revisions/Commands/UpdateRevisionDetailsCommand.cs index ce81e0549..47c6f7600 100644 --- a/src/Application/Revisions/Commands/UpdateRevisionDetailsCommand.cs +++ b/src/Application/Revisions/Commands/UpdateRevisionDetailsCommand.cs @@ -38,7 +38,7 @@ public async Task Handle(UpdateRevisionDetailsCommand request, Cancellatio } revision.Description = revisionDetails.Description; - var newComponents = revisionDetails.SpinToml.Component + var newComponents = revisionDetails.SpinToml.Components .Select(c => new Core.Entities.RevisionComponent { Source = c.Source, diff --git a/src/Application/Revisions/Queries/RevisionItem.cs b/src/Application/Revisions/Queries/RevisionItem.cs index 461ede173..48c26ee32 100644 --- a/src/Application/Revisions/Queries/RevisionItem.cs +++ b/src/Application/Revisions/Queries/RevisionItem.cs @@ -5,7 +5,7 @@ namespace Hippo.Application.Revisions.Queries; -public class RevisionItem : IMapFrom +public class RevisionItem : IMapFrom, IComparable { [Required] public Guid Id { get; set; } @@ -22,12 +22,13 @@ public class RevisionItem : IMapFrom [NoMap] public string? Type { get; set; } - public string OrderKey() + public int CompareTo(RevisionItem? other) { - if (SemVer.Version.TryParse(RevisionNumber, out var version)) - { - return $"{version.Major:D9}{version.Minor:D9}{version.Patch:D9}{RevisionNumber}"; - } - return RevisionNumber!; + if (other is null) + throw new ArgumentNullException(); + + Version a = new Version(RevisionNumber); + Version b = new Version(other.RevisionNumber); + return a.CompareTo(b); } } diff --git a/src/Core/Core.csproj b/src/Core/Core.csproj index 34842bcc5..8f066ccbf 100644 --- a/src/Core/Core.csproj +++ b/src/Core/Core.csproj @@ -14,8 +14,8 @@ - - + + diff --git a/src/Infrastructure/Infrastructure.csproj b/src/Infrastructure/Infrastructure.csproj index a3d4ca2f9..b7767f5ee 100644 --- a/src/Infrastructure/Infrastructure.csproj +++ b/src/Infrastructure/Infrastructure.csproj @@ -22,7 +22,7 @@ - + @@ -31,7 +31,7 @@ - + diff --git a/src/Infrastructure/Services/BindleService.cs b/src/Infrastructure/Services/BindleService.cs index 3f2707d83..6ec2bad35 100644 --- a/src/Infrastructure/Services/BindleService.cs +++ b/src/Infrastructure/Services/BindleService.cs @@ -47,13 +47,12 @@ public async Task GetRevisionDetails(string revisionId) } var parcelHttpResponse = await _client.GetParcel(revisionId, parcelId); - return await ParseSpinTomlParcel(parcelHttpResponse); + return ParseSpinToml(await parcelHttpResponse.ReadAsStringAsync()); } - private static async Task ParseSpinTomlParcel(HttpContent parcelResponse) + public static RevisionSpinToml ParseSpinToml(string spinToml) { - var content = await parcelResponse.ReadAsStringAsync(); - var parsedContent = Toml.Parse(content); + var parsedContent = Toml.Parse(spinToml); if (parsedContent.HasErrors) { throw new ArgumentException($"Error parsing Toml content"); diff --git a/src/Web/Api/EnvironmentVariableController.cs b/src/Web/Api/EnvironmentVariableController.cs deleted file mode 100644 index 64c3babe6..000000000 --- a/src/Web/Api/EnvironmentVariableController.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Hippo.Application.EnvironmentVariables.Commands; -using Hippo.Application.EnvironmentVariables.Queries; -using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Mvc; - -namespace Hippo.Web.Api; - -[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)] -public class EnvironmentVariableController : ApiControllerBase -{ - [HttpGet] - public async Task> Index() - { - return await Mediator.Send(new GetEnvironmentVariablesQuery()); - } - - [HttpGet("export")] - public async Task Export() - { - var vm = await Mediator.Send(new ExportEnvironmentVariablesQuery()); - - return File(vm.Content, vm.ContentType, vm.FileName); - } - - [HttpPost] - public async Task> Create([FromBody] CreateEnvironmentVariableCommand command) - { - return await Mediator.Send(command); - } - - [HttpPut("{id}")] - public async Task Update(Guid id, UpdateEnvironmentVariableCommand command) - { - if (id != command.Id) - { - return BadRequest(); - } - - await Mediator.Send(command); - - return NoContent(); - } - - [HttpDelete("{id}")] - public async Task Delete(Guid id) - { - await Mediator.Send(new DeleteEnvironmentVariableCommand { Id = id }); - - return NoContent(); - } -} diff --git a/src/Web/ClientApp/.eslintignore b/src/Web/ClientApp/.eslintignore index 93299ae10..ab4be098e 100644 --- a/src/Web/ClientApp/.eslintignore +++ b/src/Web/ClientApp/.eslintignore @@ -5,4 +5,4 @@ e2e/** karma.conf.js commitlint.config.js *.spec.ts -src/app/core/api/* +src/app/core/api/** diff --git a/src/Web/ClientApp/package-lock.json b/src/Web/ClientApp/package-lock.json index 535901fde..0ad80e77a 100644 --- a/src/Web/ClientApp/package-lock.json +++ b/src/Web/ClientApp/package-lock.json @@ -5,14 +5,14 @@ "packages": { "": { "dependencies": { - "@angular/animations": "~14.0.3", - "@angular/common": "~14.0.3", - "@angular/compiler": "~14.0.3", - "@angular/core": "~14.0.3", - "@angular/forms": "~14.0.3", - "@angular/platform-browser": "~14.0.3", - "@angular/platform-browser-dynamic": "~14.0.3", - "@angular/router": "~14.0.3", + "@angular/animations": "~14.0.4", + "@angular/common": "~14.0.4", + "@angular/compiler": "~14.0.4", + "@angular/core": "~14.0.4", + "@angular/forms": "~14.0.4", + "@angular/platform-browser": "~14.0.4", + "@angular/platform-browser-dynamic": "~14.0.4", + "@angular/router": "~14.0.4", "@fortawesome/angular-fontawesome": "^0.11.0", "@fortawesome/fontawesome-svg-core": "~6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", @@ -20,7 +20,7 @@ "@fortawesome/free-solid-svg-icons": "^6.1.1", "bulma": "^0.9.4", "bulma-tooltip": "^3.0.2", - "javascript-time-ago": "^2.5.5", + "javascript-time-ago": "^2.5.6", "jdenticon": "^3.1.1", "ngx-jdenticon": "^1.0.4", "rxjs": "~7.5.5", @@ -28,27 +28,27 @@ "zone.js": "^0.11.5" }, "devDependencies": { - "@angular-devkit/build-angular": "~14.0.3", + "@angular-devkit/build-angular": "~14.0.4", "@angular-eslint/builder": "14.0.0", "@angular-eslint/eslint-plugin": "14.0.0", "@angular-eslint/eslint-plugin-template": "14.0.0", "@angular-eslint/schematics": "14.0.0", "@angular-eslint/template-parser": "14.0.0", - "@angular/cli": "~14.0.3", - "@angular/compiler-cli": "~14.0.3", + "@angular/cli": "~14.0.4", + "@angular/compiler-cli": "~14.0.4", "@openapitools/openapi-generator-cli": "^2.5.1", "@types/jasmine": "~4.0.3", "@types/node": "^17.0.42", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "eslint": "^8.18.0", + "@typescript-eslint/eslint-plugin": "5.30.5", + "@typescript-eslint/parser": "5.30.5", + "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.1.0", + "eslint-plugin-prettier": "^4.2.1", "jasmine-core": "~4.2.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.1", "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.1", + "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", "prettier": "^2.7.1", "typescript": "~4.7.4" @@ -68,12 +68,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1400.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1400.3.tgz", - "integrity": "sha512-REh5fFtzuxYqacSAi1QUkrfQ3HufMzvAoiCllmRYwWtKTQjt18G6yadCjci1x7z8IOCVKb3auTcJmMeRKowhvg==", + "version": "0.1400.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1400.4.tgz", + "integrity": "sha512-9tjOIRpAPuhsJ5xMVZI/C9qQUaVTF9URFrK4r/b9RO7lRsvMvweReMcOH4/8+veVSTAzAa34B6WNYvvuBZFMOg==", "dev": true, "dependencies": { - "@angular-devkit/core": "14.0.3", + "@angular-devkit/core": "14.0.4", "rxjs": "6.6.7" }, "engines": { @@ -101,15 +101,15 @@ "dev": true }, "node_modules/@angular-devkit/build-angular": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-14.0.3.tgz", - "integrity": "sha512-XxS27EZyzPbZokepjrtY8joOkf/7e/gIyT4vBtUlBp8e7JZEHTYcQcaZKttec0RP7U8HAxdJ7fy9oXy2zH+BDQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-14.0.4.tgz", + "integrity": "sha512-VoiDfyKSTBU4LDRwtY8Ga5ZBKsDxTYWNx9aDCoswalMvYREwhEi9+wEcWjF5aMKl4usr6twCPaYqDrbkHYUHqw==", "dev": true, "dependencies": { "@ampproject/remapping": "2.2.0", - "@angular-devkit/architect": "0.1400.3", - "@angular-devkit/build-webpack": "0.1400.3", - "@angular-devkit/core": "14.0.3", + "@angular-devkit/architect": "0.1400.4", + "@angular-devkit/build-webpack": "0.1400.4", + "@angular-devkit/core": "14.0.4", "@babel/core": "7.17.10", "@babel/generator": "7.17.10", "@babel/helper-annotate-as-pure": "7.16.7", @@ -120,7 +120,7 @@ "@babel/runtime": "7.17.9", "@babel/template": "7.16.7", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "14.0.3", + "@ngtools/webpack": "14.0.4", "ansi-colors": "4.1.1", "babel-loader": "8.2.5", "babel-plugin-istanbul": "6.1.1", @@ -227,12 +227,12 @@ "dev": true }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1400.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1400.3.tgz", - "integrity": "sha512-EEas1/S3NOD81gW2wxHlMBjUdb5meaU2BUtCYGLf6zLg2c5zO6w3mmo3/btZSZNzI5nCIfyXMCcq7GRl0yjUqA==", + "version": "0.1400.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1400.4.tgz", + "integrity": "sha512-eknabzf8lWDidOzeoV7NG3Rrfme/O2REZtranhBGKRfoRNUOCWMYcCfAF1hUEHjgw7zd4pn+3EdMVjhwpG48hA==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1400.3", + "@angular-devkit/architect": "0.1400.4", "rxjs": "6.6.7" }, "engines": { @@ -264,9 +264,9 @@ "dev": true }, "node_modules/@angular-devkit/core": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.3.tgz", - "integrity": "sha512-DVACe8JEDyP/BMzCwtNm09FV35MsPMUcFXEspKVxh16jPErm2DPbfb7ND5U84S8Us2HMlvmmmxgUnodxdpGHQQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.4.tgz", + "integrity": "sha512-ySQnhu9KhU6vMcFE5jFD93Q2aQ/UJYRZXlvDCve11pp6Lb+llcA7H46lHlBwpxR3jKom+8U4W5vnviqU52zhcg==", "dev": true, "dependencies": { "ajv": "8.11.0", @@ -308,12 +308,12 @@ "dev": true }, "node_modules/@angular-devkit/schematics": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.3.tgz", - "integrity": "sha512-T4qIk/jX6gQeHA/RHBnDjesoQJko3drWqnBrkcuLk5WMoMDNpPkbwKwnj9nP8L3WPQqeUSOfesh8zPgg8bFWaQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.4.tgz", + "integrity": "sha512-dOi843eANcCL/tcSIAaotfLTHZTQLzRrpP2hz/le/vYMcuIfP90auvsWbQVrWbDIxWYl57Lu2UxvITT9gIarnA==", "dev": true, "dependencies": { - "@angular-devkit/core": "14.0.3", + "@angular-devkit/core": "14.0.4", "jsonc-parser": "3.0.0", "magic-string": "0.26.1", "ora": "5.4.1", @@ -449,9 +449,9 @@ } }, "node_modules/@angular/animations": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-14.0.3.tgz", - "integrity": "sha512-BQ9XnllnXhjE/hkPs6U3nPFPmOIT0wBvm+uIQFG+hgs+SKqW5NQB33HYMHKOgC0ENvqaScp+cMmI0Xuc6VAolQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-14.0.4.tgz", + "integrity": "sha512-+Qe+wLA0DOHlOdFRQSEJoenhFm5zcKwkDItqAFT5NVYOT04yxXq8NFRIHSbqn468qR70EkX514lKi6pr6nxGYQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -459,19 +459,19 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/core": "14.0.3" + "@angular/core": "14.0.4" } }, "node_modules/@angular/cli": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.0.3.tgz", - "integrity": "sha512-E2Gq01Us3GJHiPGcXeTJSmJtLqHJ7rE7bOUP02dUKY83xRJPaLy57VFYkszEryzEVQYtkpdPp6/Xh4iMxFuTcQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.0.4.tgz", + "integrity": "sha512-hb6mJk6/vJwHCuMaGResQh9aXgoSyfrJ/WuFgLcPspdFRkm4EQcTSx8DwrRo7YawuCa12UJdPoK0dASXYN6JHA==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1400.3", - "@angular-devkit/core": "14.0.3", - "@angular-devkit/schematics": "14.0.3", - "@schematics/angular": "14.0.3", + "@angular-devkit/architect": "0.1400.4", + "@angular-devkit/core": "14.0.4", + "@angular-devkit/schematics": "14.0.4", + "@schematics/angular": "14.0.4", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "4.3.4", @@ -499,9 +499,9 @@ } }, "node_modules/@angular/common": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.0.3.tgz", - "integrity": "sha512-JOM6gILQ3+9fOq4r2umdEP2T2t45k7+V19AqNYgV4HVAR392wCc+rYbdq9eqszMUNfUUBxA/ZfDcGYUu/C/gdA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.0.4.tgz", + "integrity": "sha512-CvlFa2lCxen0LB3N45IzZDdMIqpcasXfVUhiAkLxZgT+kSTunc/rg8hMoLHVfmFpkQKCQmPVyuzNXnSwIFhYkQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -509,14 +509,14 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/core": "14.0.3", + "@angular/core": "14.0.4", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-14.0.3.tgz", - "integrity": "sha512-KfQgr9uptguZOUTA1zOvGpSraU8MQ46Sl0uW1xEppEzLzUqmkDcDClQo3IFV61qBEDyvsWEig4BqhN9EDVu+iw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-14.0.4.tgz", + "integrity": "sha512-WdRpZFTX2vt71sSfQ89C1K5l2zhYtn8ON+ZlAVxyZ5uT0nA/Z/vuMLfNZB1WmcGVDOc7JmQduSiSaI0hhQqXqw==", "dependencies": { "tslib": "^2.3.0" }, @@ -524,7 +524,7 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/core": "14.0.3" + "@angular/core": "14.0.4" }, "peerDependenciesMeta": { "@angular/core": { @@ -533,9 +533,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-14.0.3.tgz", - "integrity": "sha512-+L6mp/NlY2t2CGK6Nr1z+TBA0gkQd2xa5NyEfVP32kc9LN5VtSNdTFEYcwwux3IdtiBnEgppCdO9cmnIIcyfMQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-14.0.4.tgz", + "integrity": "sha512-j3T0dOwNov6rKcaxLMSlPLRvrBT6MyBTum18x6XvZRqb75RUAJ/yV+PXgtA//XZ2hjuy87+CvZy3tBKktvY7bA==", "dev": true, "dependencies": { "@babel/core": "^7.17.2", @@ -558,14 +558,14 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/compiler": "14.0.3", + "@angular/compiler": "14.0.4", "typescript": ">=4.6.2 <4.8" } }, "node_modules/@angular/core": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.0.3.tgz", - "integrity": "sha512-Z71BrEIJuMGm/BdK9Lh8IJwADQqA8qPeUVppCs67CABZdwA3sK0kC+iobauWXcweXU30BdQYc7HyZe2x7rcdmQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.0.4.tgz", + "integrity": "sha512-uMS/X+/5RokF3uiiD1IAr6Ha9k7QPegHrAB3QW0x6WRUTMq0K+08F+AeF5COmbfYMMaxofD6x8XmM+BLeg/0hw==", "dependencies": { "tslib": "^2.3.0" }, @@ -578,9 +578,9 @@ } }, "node_modules/@angular/forms": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-14.0.3.tgz", - "integrity": "sha512-ubsOdG/ZocYf/WT7c07eeBbqImjY1R7x+lMPNguCoRFcTtc9VQk5ePL/e5UROW6FKl4+f4NzMLHBL2aUYXsMTw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-14.0.4.tgz", + "integrity": "sha512-u/9y09WQ00y6BQeNo69hMa/Fx+xKHGnmcjMtS3xkZtmoCP+A0ebumG0Y9DfXs2olJY2//O5di7Qu3fwlBg+3Cw==", "dependencies": { "tslib": "^2.3.0" }, @@ -588,16 +588,16 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/common": "14.0.3", - "@angular/core": "14.0.3", - "@angular/platform-browser": "14.0.3", + "@angular/common": "14.0.4", + "@angular/core": "14.0.4", + "@angular/platform-browser": "14.0.4", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/platform-browser": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.0.3.tgz", - "integrity": "sha512-d88g/yVbfUyHNHnf9GqFseThTRue78Dle9jrjskEESShxvmOt7DR3dqWd1FzbspALqAVr5Y/Yj9Gau1zD18Scg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.0.4.tgz", + "integrity": "sha512-VFeFpQ+248m8GiCqcsHwH4PET7tR1cyXnhsep1EeI4MDaO+aIbsUcESqXzMm5+ChOmNyiCtLQu8QvfHZK0uDVA==", "dependencies": { "tslib": "^2.3.0" }, @@ -605,9 +605,9 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/animations": "14.0.3", - "@angular/common": "14.0.3", - "@angular/core": "14.0.3" + "@angular/animations": "14.0.4", + "@angular/common": "14.0.4", + "@angular/core": "14.0.4" }, "peerDependenciesMeta": { "@angular/animations": { @@ -616,9 +616,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.3.tgz", - "integrity": "sha512-kO6uZ5r5CDWCePxEMpjhHPCt2aba4TCKT3l2HilWLW/9/lr2oFMwiFM/akoQdvLT6h9W8ZeHisD8V7DWP373JA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.4.tgz", + "integrity": "sha512-snVbAKfnBuCUMgop6ln111B/ouMnDR1ZzMzpiKefdJDGUvASCLbR8XAioY+zXUI82QbNg5masUPia1Fy+yTvGw==", "dependencies": { "tslib": "^2.3.0" }, @@ -626,16 +626,16 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/common": "14.0.3", - "@angular/compiler": "14.0.3", - "@angular/core": "14.0.3", - "@angular/platform-browser": "14.0.3" + "@angular/common": "14.0.4", + "@angular/compiler": "14.0.4", + "@angular/core": "14.0.4", + "@angular/platform-browser": "14.0.4" } }, "node_modules/@angular/router": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-14.0.3.tgz", - "integrity": "sha512-5UhtBhKNBxsjojMGeYOj/tu52AZqcSmNpJptT0A4WCTnOOLqN8IVgy3NgE6RiPPdfSfGJCMvaRVVbGbWPXhePA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-14.0.4.tgz", + "integrity": "sha512-aqtOjIjVNtWbpedDdni0yGfGR6sEb8S3jJB9jf43ththmHKxAlW7PKP2NgEmx0uJ2xY2iGET7Gkpl8RBwvoHgQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -643,9 +643,9 @@ "node": "^14.15.0 || >=16.10.0" }, "peerDependencies": { - "@angular/common": "14.0.3", - "@angular/core": "14.0.3", - "@angular/platform-browser": "14.0.3", + "@angular/common": "14.0.4", + "@angular/core": "14.0.4", + "@angular/platform-browser": "14.0.4", "rxjs": "^6.5.3 || ^7.4.0" } }, @@ -2890,9 +2890,9 @@ "dev": true }, "node_modules/@ngtools/webpack": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-14.0.3.tgz", - "integrity": "sha512-PwvgCeY7mbijazovpA0ggeo81A3yzwOb8AfVD3yfGT15Z2qnEVyL+05Tj6ttRTngceF3gsERamFcB6lRKdcjdw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-14.0.4.tgz", + "integrity": "sha512-83b/gB4Kna2FhIQj82RNZol+6gq+vLv6+4LUFOGSBb4Xha3RVQGJQpGwqEkXRFziwgTODrPWJAnOup5pzKv9wA==", "dev": true, "engines": { "node": "^14.15.0 || >=16.10.0", @@ -3849,13 +3849,13 @@ } }, "node_modules/@schematics/angular": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.0.3.tgz", - "integrity": "sha512-Ors4O4udW3O0yjEDCOhkvJE29NysKMnSnY5YvbOYp1R8+6CdP0ltxB91rX0ZRvy+ggdXCK77LnHm1p2ywPGKvQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.0.4.tgz", + "integrity": "sha512-2t7B8ZplJzLfrU7SjciaUquaOAWCi6SD954Q1Ej/SZfWlLjs8k1SvlKb+Syzo9TMByMuzdKTrdnmNRHekvMZEQ==", "dev": true, "dependencies": { - "@angular-devkit/core": "14.0.3", - "@angular-devkit/schematics": "14.0.3", + "@angular-devkit/core": "14.0.4", + "@angular-devkit/schematics": "14.0.4", "jsonc-parser": "3.0.0" }, "engines": { @@ -4078,14 +4078,14 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", - "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.5.tgz", + "integrity": "sha512-lftkqRoBvc28VFXEoRgyZuztyVUQ04JvUnATSPtIRFAccbXTWL6DEtXGYMcbg998kXw1NLUJm7rTQ9eUt+q6Ig==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/type-utils": "5.29.0", - "@typescript-eslint/utils": "5.29.0", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/type-utils": "5.30.5", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -4110,15 +4110,151 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", - "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.5.tgz", + "integrity": "sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "debug": "^4.3.4" }, "engines": { @@ -4137,6 +4273,118 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.29.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.29.0.tgz", @@ -4155,12 +4403,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", - "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.5.tgz", + "integrity": "sha512-k9+ejlv1GgwN1nN7XjVtyCgE0BTzhzT1YsQF0rv4Vfj2U9xnslBgMYYvcEYAFVdvhuEscELJsB7lDkN7WusErw==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.29.0", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -4180,6 +4428,142 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@typescript-eslint/types": { "version": "5.29.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.29.0.tgz", @@ -7056,9 +7440,9 @@ } }, "node_modules/eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", + "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", @@ -7120,9 +7504,9 @@ } }, "node_modules/eslint-plugin-prettier": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.1.0.tgz", - "integrity": "sha512-A3AXIEfTnq3D5qDFjWJdQ9c4BLhw/TqhSR+6+SVaoPJBAWciFEuJiNQh275OnjRrAi7yssZzuWBRw66VG2g6UA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", "dev": true, "dependencies": { "prettier-linter-helpers": "^1.0.0" @@ -9121,9 +9505,9 @@ "dev": true }, "node_modules/javascript-time-ago": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/javascript-time-ago/-/javascript-time-ago-2.5.5.tgz", - "integrity": "sha512-vZWIEKTPDcxH2B+ZVBK4AIuHkDcUoV80L9d+1WsRmp68hMXym0cQrf45WCP4mKgZjVGxTio7uYeDTkveX3DzlA==", + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/javascript-time-ago/-/javascript-time-ago-2.5.6.tgz", + "integrity": "sha512-uqnLU334Dtu6lC2pIOnPyH8GkG0UnSlDLD19sfEaAITIg5zR3x0O0MkFYJEVXtY4Q9JWOcxFJoXoxxT5/B5Okg==", "dependencies": { "relative-time-format": "^1.1.4" } @@ -9355,9 +9739,9 @@ } }, "node_modules/karma-jasmine": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.0.1.tgz", - "integrity": "sha512-FkL1Kk+JAKmim8VWU8RXKZBpl0lLI7J8LijM0/q7oP7emfB6QMZV1Az+JgqGKSLpF0tYaav+KUVFQroZUxQTHA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", "dev": true, "dependencies": { "jasmine-core": "^4.1.0" @@ -14638,12 +15022,12 @@ } }, "@angular-devkit/architect": { - "version": "0.1400.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1400.3.tgz", - "integrity": "sha512-REh5fFtzuxYqacSAi1QUkrfQ3HufMzvAoiCllmRYwWtKTQjt18G6yadCjci1x7z8IOCVKb3auTcJmMeRKowhvg==", + "version": "0.1400.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1400.4.tgz", + "integrity": "sha512-9tjOIRpAPuhsJ5xMVZI/C9qQUaVTF9URFrK4r/b9RO7lRsvMvweReMcOH4/8+veVSTAzAa34B6WNYvvuBZFMOg==", "dev": true, "requires": { - "@angular-devkit/core": "14.0.3", + "@angular-devkit/core": "14.0.4", "rxjs": "6.6.7" }, "dependencies": { @@ -14665,15 +15049,15 @@ } }, "@angular-devkit/build-angular": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-14.0.3.tgz", - "integrity": "sha512-XxS27EZyzPbZokepjrtY8joOkf/7e/gIyT4vBtUlBp8e7JZEHTYcQcaZKttec0RP7U8HAxdJ7fy9oXy2zH+BDQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-14.0.4.tgz", + "integrity": "sha512-VoiDfyKSTBU4LDRwtY8Ga5ZBKsDxTYWNx9aDCoswalMvYREwhEi9+wEcWjF5aMKl4usr6twCPaYqDrbkHYUHqw==", "dev": true, "requires": { "@ampproject/remapping": "2.2.0", - "@angular-devkit/architect": "0.1400.3", - "@angular-devkit/build-webpack": "0.1400.3", - "@angular-devkit/core": "14.0.3", + "@angular-devkit/architect": "0.1400.4", + "@angular-devkit/build-webpack": "0.1400.4", + "@angular-devkit/core": "14.0.4", "@babel/core": "7.17.10", "@babel/generator": "7.17.10", "@babel/helper-annotate-as-pure": "7.16.7", @@ -14684,7 +15068,7 @@ "@babel/runtime": "7.17.9", "@babel/template": "7.16.7", "@discoveryjs/json-ext": "0.5.7", - "@ngtools/webpack": "14.0.3", + "@ngtools/webpack": "14.0.4", "ansi-colors": "4.1.1", "babel-loader": "8.2.5", "babel-plugin-istanbul": "6.1.1", @@ -14755,12 +15139,12 @@ } }, "@angular-devkit/build-webpack": { - "version": "0.1400.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1400.3.tgz", - "integrity": "sha512-EEas1/S3NOD81gW2wxHlMBjUdb5meaU2BUtCYGLf6zLg2c5zO6w3mmo3/btZSZNzI5nCIfyXMCcq7GRl0yjUqA==", + "version": "0.1400.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1400.4.tgz", + "integrity": "sha512-eknabzf8lWDidOzeoV7NG3Rrfme/O2REZtranhBGKRfoRNUOCWMYcCfAF1hUEHjgw7zd4pn+3EdMVjhwpG48hA==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1400.3", + "@angular-devkit/architect": "0.1400.4", "rxjs": "6.6.7" }, "dependencies": { @@ -14782,9 +15166,9 @@ } }, "@angular-devkit/core": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.3.tgz", - "integrity": "sha512-DVACe8JEDyP/BMzCwtNm09FV35MsPMUcFXEspKVxh16jPErm2DPbfb7ND5U84S8Us2HMlvmmmxgUnodxdpGHQQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-14.0.4.tgz", + "integrity": "sha512-ySQnhu9KhU6vMcFE5jFD93Q2aQ/UJYRZXlvDCve11pp6Lb+llcA7H46lHlBwpxR3jKom+8U4W5vnviqU52zhcg==", "dev": true, "requires": { "ajv": "8.11.0", @@ -14812,12 +15196,12 @@ } }, "@angular-devkit/schematics": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.3.tgz", - "integrity": "sha512-T4qIk/jX6gQeHA/RHBnDjesoQJko3drWqnBrkcuLk5WMoMDNpPkbwKwnj9nP8L3WPQqeUSOfesh8zPgg8bFWaQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-14.0.4.tgz", + "integrity": "sha512-dOi843eANcCL/tcSIAaotfLTHZTQLzRrpP2hz/le/vYMcuIfP90auvsWbQVrWbDIxWYl57Lu2UxvITT9gIarnA==", "dev": true, "requires": { - "@angular-devkit/core": "14.0.3", + "@angular-devkit/core": "14.0.4", "jsonc-parser": "3.0.0", "magic-string": "0.26.1", "ora": "5.4.1", @@ -14923,23 +15307,23 @@ } }, "@angular/animations": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-14.0.3.tgz", - "integrity": "sha512-BQ9XnllnXhjE/hkPs6U3nPFPmOIT0wBvm+uIQFG+hgs+SKqW5NQB33HYMHKOgC0ENvqaScp+cMmI0Xuc6VAolQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-14.0.4.tgz", + "integrity": "sha512-+Qe+wLA0DOHlOdFRQSEJoenhFm5zcKwkDItqAFT5NVYOT04yxXq8NFRIHSbqn468qR70EkX514lKi6pr6nxGYQ==", "requires": { "tslib": "^2.3.0" } }, "@angular/cli": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.0.3.tgz", - "integrity": "sha512-E2Gq01Us3GJHiPGcXeTJSmJtLqHJ7rE7bOUP02dUKY83xRJPaLy57VFYkszEryzEVQYtkpdPp6/Xh4iMxFuTcQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.0.4.tgz", + "integrity": "sha512-hb6mJk6/vJwHCuMaGResQh9aXgoSyfrJ/WuFgLcPspdFRkm4EQcTSx8DwrRo7YawuCa12UJdPoK0dASXYN6JHA==", "dev": true, "requires": { - "@angular-devkit/architect": "0.1400.3", - "@angular-devkit/core": "14.0.3", - "@angular-devkit/schematics": "14.0.3", - "@schematics/angular": "14.0.3", + "@angular-devkit/architect": "0.1400.4", + "@angular-devkit/core": "14.0.4", + "@angular-devkit/schematics": "14.0.4", + "@schematics/angular": "14.0.4", "@yarnpkg/lockfile": "1.1.0", "ansi-colors": "4.1.1", "debug": "4.3.4", @@ -14959,25 +15343,25 @@ } }, "@angular/common": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.0.3.tgz", - "integrity": "sha512-JOM6gILQ3+9fOq4r2umdEP2T2t45k7+V19AqNYgV4HVAR392wCc+rYbdq9eqszMUNfUUBxA/ZfDcGYUu/C/gdA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-14.0.4.tgz", + "integrity": "sha512-CvlFa2lCxen0LB3N45IzZDdMIqpcasXfVUhiAkLxZgT+kSTunc/rg8hMoLHVfmFpkQKCQmPVyuzNXnSwIFhYkQ==", "requires": { "tslib": "^2.3.0" } }, "@angular/compiler": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-14.0.3.tgz", - "integrity": "sha512-KfQgr9uptguZOUTA1zOvGpSraU8MQ46Sl0uW1xEppEzLzUqmkDcDClQo3IFV61qBEDyvsWEig4BqhN9EDVu+iw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-14.0.4.tgz", + "integrity": "sha512-WdRpZFTX2vt71sSfQ89C1K5l2zhYtn8ON+ZlAVxyZ5uT0nA/Z/vuMLfNZB1WmcGVDOc7JmQduSiSaI0hhQqXqw==", "requires": { "tslib": "^2.3.0" } }, "@angular/compiler-cli": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-14.0.3.tgz", - "integrity": "sha512-+L6mp/NlY2t2CGK6Nr1z+TBA0gkQd2xa5NyEfVP32kc9LN5VtSNdTFEYcwwux3IdtiBnEgppCdO9cmnIIcyfMQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-14.0.4.tgz", + "integrity": "sha512-j3T0dOwNov6rKcaxLMSlPLRvrBT6MyBTum18x6XvZRqb75RUAJ/yV+PXgtA//XZ2hjuy87+CvZy3tBKktvY7bA==", "dev": true, "requires": { "@babel/core": "^7.17.2", @@ -14993,41 +15377,41 @@ } }, "@angular/core": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.0.3.tgz", - "integrity": "sha512-Z71BrEIJuMGm/BdK9Lh8IJwADQqA8qPeUVppCs67CABZdwA3sK0kC+iobauWXcweXU30BdQYc7HyZe2x7rcdmQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-14.0.4.tgz", + "integrity": "sha512-uMS/X+/5RokF3uiiD1IAr6Ha9k7QPegHrAB3QW0x6WRUTMq0K+08F+AeF5COmbfYMMaxofD6x8XmM+BLeg/0hw==", "requires": { "tslib": "^2.3.0" } }, "@angular/forms": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-14.0.3.tgz", - "integrity": "sha512-ubsOdG/ZocYf/WT7c07eeBbqImjY1R7x+lMPNguCoRFcTtc9VQk5ePL/e5UROW6FKl4+f4NzMLHBL2aUYXsMTw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-14.0.4.tgz", + "integrity": "sha512-u/9y09WQ00y6BQeNo69hMa/Fx+xKHGnmcjMtS3xkZtmoCP+A0ebumG0Y9DfXs2olJY2//O5di7Qu3fwlBg+3Cw==", "requires": { "tslib": "^2.3.0" } }, "@angular/platform-browser": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.0.3.tgz", - "integrity": "sha512-d88g/yVbfUyHNHnf9GqFseThTRue78Dle9jrjskEESShxvmOt7DR3dqWd1FzbspALqAVr5Y/Yj9Gau1zD18Scg==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.0.4.tgz", + "integrity": "sha512-VFeFpQ+248m8GiCqcsHwH4PET7tR1cyXnhsep1EeI4MDaO+aIbsUcESqXzMm5+ChOmNyiCtLQu8QvfHZK0uDVA==", "requires": { "tslib": "^2.3.0" } }, "@angular/platform-browser-dynamic": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.3.tgz", - "integrity": "sha512-kO6uZ5r5CDWCePxEMpjhHPCt2aba4TCKT3l2HilWLW/9/lr2oFMwiFM/akoQdvLT6h9W8ZeHisD8V7DWP373JA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.0.4.tgz", + "integrity": "sha512-snVbAKfnBuCUMgop6ln111B/ouMnDR1ZzMzpiKefdJDGUvASCLbR8XAioY+zXUI82QbNg5masUPia1Fy+yTvGw==", "requires": { "tslib": "^2.3.0" } }, "@angular/router": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-14.0.3.tgz", - "integrity": "sha512-5UhtBhKNBxsjojMGeYOj/tu52AZqcSmNpJptT0A4WCTnOOLqN8IVgy3NgE6RiPPdfSfGJCMvaRVVbGbWPXhePA==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-14.0.4.tgz", + "integrity": "sha512-aqtOjIjVNtWbpedDdni0yGfGR6sEb8S3jJB9jf43ththmHKxAlW7PKP2NgEmx0uJ2xY2iGET7Gkpl8RBwvoHgQ==", "requires": { "tslib": "^2.3.0" } @@ -16579,9 +16963,9 @@ } }, "@ngtools/webpack": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-14.0.3.tgz", - "integrity": "sha512-PwvgCeY7mbijazovpA0ggeo81A3yzwOb8AfVD3yfGT15Z2qnEVyL+05Tj6ttRTngceF3gsERamFcB6lRKdcjdw==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-14.0.4.tgz", + "integrity": "sha512-83b/gB4Kna2FhIQj82RNZol+6gq+vLv6+4LUFOGSBb4Xha3RVQGJQpGwqEkXRFziwgTODrPWJAnOup5pzKv9wA==", "dev": true, "requires": {} }, @@ -17300,13 +17684,13 @@ } }, "@schematics/angular": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.0.3.tgz", - "integrity": "sha512-Ors4O4udW3O0yjEDCOhkvJE29NysKMnSnY5YvbOYp1R8+6CdP0ltxB91rX0ZRvy+ggdXCK77LnHm1p2ywPGKvQ==", + "version": "14.0.4", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-14.0.4.tgz", + "integrity": "sha512-2t7B8ZplJzLfrU7SjciaUquaOAWCi6SD954Q1Ej/SZfWlLjs8k1SvlKb+Syzo9TMByMuzdKTrdnmNRHekvMZEQ==", "dev": true, "requires": { - "@angular-devkit/core": "14.0.3", - "@angular-devkit/schematics": "14.0.3", + "@angular-devkit/core": "14.0.4", + "@angular-devkit/schematics": "14.0.4", "jsonc-parser": "3.0.0" } }, @@ -17521,32 +17905,184 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.29.0.tgz", - "integrity": "sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.5.tgz", + "integrity": "sha512-lftkqRoBvc28VFXEoRgyZuztyVUQ04JvUnATSPtIRFAccbXTWL6DEtXGYMcbg998kXw1NLUJm7rTQ9eUt+q6Ig==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/type-utils": "5.29.0", - "@typescript-eslint/utils": "5.29.0", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/type-utils": "5.30.5", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + } + }, + "@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + } } }, "@typescript-eslint/parser": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.29.0.tgz", - "integrity": "sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.5.tgz", + "integrity": "sha512-zj251pcPXI8GO9NDKWWmygP6+UjwWmrdf9qMW/L/uQJBM/0XbU2inxe5io/234y/RCvwpKEYjZ6c1YrXERkK4Q==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.29.0", - "@typescript-eslint/types": "5.29.0", - "@typescript-eslint/typescript-estree": "5.29.0", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", "debug": "^4.3.4" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + } + }, + "@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + } } }, "@typescript-eslint/scope-manager": { @@ -17560,14 +18096,97 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.29.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.29.0.tgz", - "integrity": "sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==", + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.5.tgz", + "integrity": "sha512-k9+ejlv1GgwN1nN7XjVtyCgE0BTzhzT1YsQF0rv4Vfj2U9xnslBgMYYvcEYAFVdvhuEscELJsB7lDkN7WusErw==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.29.0", + "@typescript-eslint/utils": "5.30.5", "debug": "^4.3.4", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.5.tgz", + "integrity": "sha512-NJ6F+YHHFT/30isRe2UTmIGGAiXKckCyMnIV58cE3JkHmaD6e5zyEYm5hBDv0Wbin+IC0T1FWJpD3YqHUG/Ydg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5" + } + }, + "@typescript-eslint/types": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.5.tgz", + "integrity": "sha512-kZ80w/M2AvsbRvOr3PjaNh6qEW1LFqs2pLdo2s5R38B2HYXG8Z0PP48/4+j1QHJFL3ssHIbJ4odPRS8PlHrFfw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.5.tgz", + "integrity": "sha512-qGTc7QZC801kbYjAr4AgdOfnokpwStqyhSbiQvqGBLixniAKyH+ib2qXIVo4P9NgGzwyfD9I0nlJN7D91E1VpQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/visitor-keys": "5.30.5", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.5.tgz", + "integrity": "sha512-o4SSUH9IkuA7AYIfAvatldovurqTAHrfzPApOZvdUq01hHojZojCFXx06D/aFpKCgWbMPRdJBWAC3sWp3itwTA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.9", + "@typescript-eslint/scope-manager": "5.30.5", + "@typescript-eslint/types": "5.30.5", + "@typescript-eslint/typescript-estree": "5.30.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.30.5", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.5.tgz", + "integrity": "sha512-D+xtGo9HUMELzWIUqcQc0p2PO4NyvTrgIOK/VnSH083+8sq0tiLozNRKuLarwHYGRuA6TVBQSuuLwJUDWd3aaA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.30.5", + "eslint-visitor-keys": "^3.3.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + } } }, "@typescript-eslint/types": { @@ -19647,9 +20266,9 @@ "dev": true }, "eslint": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz", - "integrity": "sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA==", + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.19.0.tgz", + "integrity": "sha512-SXOPj3x9VKvPe81TjjUJCYlV4oJjQw68Uek+AM0X4p+33dj2HY5bpTZOgnQHcG2eAm1mtCU9uNMnJi7exU/kYw==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", @@ -19846,9 +20465,9 @@ "requires": {} }, "eslint-plugin-prettier": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.1.0.tgz", - "integrity": "sha512-A3AXIEfTnq3D5qDFjWJdQ9c4BLhw/TqhSR+6+SVaoPJBAWciFEuJiNQh275OnjRrAi7yssZzuWBRw66VG2g6UA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", + "integrity": "sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==", "dev": true, "requires": { "prettier-linter-helpers": "^1.0.0" @@ -21202,9 +21821,9 @@ "dev": true }, "javascript-time-ago": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/javascript-time-ago/-/javascript-time-ago-2.5.5.tgz", - "integrity": "sha512-vZWIEKTPDcxH2B+ZVBK4AIuHkDcUoV80L9d+1WsRmp68hMXym0cQrf45WCP4mKgZjVGxTio7uYeDTkveX3DzlA==", + "version": "2.5.6", + "resolved": "https://registry.npmjs.org/javascript-time-ago/-/javascript-time-ago-2.5.6.tgz", + "integrity": "sha512-uqnLU334Dtu6lC2pIOnPyH8GkG0UnSlDLD19sfEaAITIg5zR3x0O0MkFYJEVXtY4Q9JWOcxFJoXoxxT5/B5Okg==", "requires": { "relative-time-format": "^1.1.4" } @@ -21470,9 +22089,9 @@ } }, "karma-jasmine": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.0.1.tgz", - "integrity": "sha512-FkL1Kk+JAKmim8VWU8RXKZBpl0lLI7J8LijM0/q7oP7emfB6QMZV1Az+JgqGKSLpF0tYaav+KUVFQroZUxQTHA==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz", + "integrity": "sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ==", "dev": true, "requires": { "jasmine-core": "^4.1.0" diff --git a/src/Web/ClientApp/package.json b/src/Web/ClientApp/package.json index 227c63f7b..55fab47d4 100644 --- a/src/Web/ClientApp/package.json +++ b/src/Web/ClientApp/package.json @@ -11,14 +11,14 @@ }, "private": true, "dependencies": { - "@angular/animations": "~14.0.3", - "@angular/common": "~14.0.3", - "@angular/compiler": "~14.0.3", - "@angular/core": "~14.0.3", - "@angular/forms": "~14.0.3", - "@angular/platform-browser": "~14.0.3", - "@angular/platform-browser-dynamic": "~14.0.3", - "@angular/router": "~14.0.3", + "@angular/animations": "~14.0.4", + "@angular/common": "~14.0.4", + "@angular/compiler": "~14.0.4", + "@angular/core": "~14.0.4", + "@angular/forms": "~14.0.4", + "@angular/platform-browser": "~14.0.4", + "@angular/platform-browser-dynamic": "~14.0.4", + "@angular/router": "~14.0.4", "@fortawesome/angular-fontawesome": "^0.11.0", "@fortawesome/fontawesome-svg-core": "~6.1.1", "@fortawesome/free-brands-svg-icons": "^6.1.1", @@ -26,7 +26,7 @@ "@fortawesome/free-solid-svg-icons": "^6.1.1", "bulma": "^0.9.4", "bulma-tooltip": "^3.0.2", - "javascript-time-ago": "^2.5.5", + "javascript-time-ago": "^2.5.6", "jdenticon": "^3.1.1", "ngx-jdenticon": "^1.0.4", "rxjs": "~7.5.5", @@ -34,27 +34,27 @@ "zone.js": "^0.11.5" }, "devDependencies": { - "@angular-devkit/build-angular": "~14.0.3", + "@angular-devkit/build-angular": "~14.0.4", "@angular-eslint/builder": "14.0.0", "@angular-eslint/eslint-plugin": "14.0.0", "@angular-eslint/eslint-plugin-template": "14.0.0", "@angular-eslint/schematics": "14.0.0", "@angular-eslint/template-parser": "14.0.0", - "@angular/cli": "~14.0.3", - "@angular/compiler-cli": "~14.0.3", + "@angular/cli": "~14.0.4", + "@angular/compiler-cli": "~14.0.4", "@openapitools/openapi-generator-cli": "^2.5.1", "@types/jasmine": "~4.0.3", "@types/node": "^17.0.42", - "@typescript-eslint/eslint-plugin": "5.29.0", - "@typescript-eslint/parser": "5.29.0", - "eslint": "^8.18.0", + "@typescript-eslint/eslint-plugin": "5.30.5", + "@typescript-eslint/parser": "5.30.5", + "eslint": "^8.19.0", "eslint-config-prettier": "^8.5.0", - "eslint-plugin-prettier": "^4.1.0", + "eslint-plugin-prettier": "^4.2.1", "jasmine-core": "~4.2.0", "karma": "~6.4.0", "karma-chrome-launcher": "~3.1.1", "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.0.1", + "karma-jasmine": "~5.1.0", "karma-jasmine-html-reporter": "~2.0.0", "prettier": "^2.7.1", "typescript": "~4.7.4" diff --git a/src/Web/ClientApp/src/app/components/channel/channel.component.html b/src/Web/ClientApp/src/app/components/channel/channel.component.html index bcabf325a..53ae42cd9 100644 --- a/src/Web/ClientApp/src/app/components/channel/channel.component.html +++ b/src/Web/ClientApp/src/app/components/channel/channel.component.html @@ -75,6 +75,10 @@

{{channel.appSummary.name}}

- + + diff --git a/src/Web/ClientApp/src/app/components/channel/channel.component.ts b/src/Web/ClientApp/src/app/components/channel/channel.component.ts index 9d5edafaf..29cf25e28 100644 --- a/src/Web/ClientApp/src/app/components/channel/channel.component.ts +++ b/src/Web/ClientApp/src/app/components/channel/channel.component.ts @@ -65,4 +65,8 @@ export class ChannelComponent implements OnInit { ); }); } + + envvarsUpdated(envvars: any) { + this.channel.environmentVariables = envvars; + } } diff --git a/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.html b/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.html index 47295328b..6f8a769b1 100644 --- a/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.html +++ b/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.html @@ -1,6 +1,6 @@ -
+
Channel has no environment variables @@ -11,13 +11,13 @@ + [ngClass]="{ 'is-danger': envvar.errors && envvar.errors.keys && envvar.errors.keys.length > 0 }">
+ [ngClass]="{ 'is-danger': envvar.errors && envvar.errors.values && envvar.errors.values.length > 0 }">

@@ -54,8 +54,3 @@

-
-
- -
-
diff --git a/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.ts b/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.ts index 85be51968..5f6ab927b 100644 --- a/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.ts +++ b/src/Web/ClientApp/src/app/components/environment-variable/list/list.component.ts @@ -1,8 +1,13 @@ +import { ChannelService, EnvironmentVariableItem } from 'src/app/core/api/v1'; import { - ChannelService, - EnvironmentVariableService, -} from 'src/app/core/api/v1'; -import { Component, Input, OnChanges, ViewChild } from '@angular/core'; + Component, + EventEmitter, + Input, + OnChanges, + Output, + SimpleChange, + ViewChild, +} from '@angular/core'; import { faBackward, faSave, faTrash } from '@fortawesome/free-solid-svg-icons'; import { SuccessComponent } from '../../helpers/success/success.component'; @@ -14,26 +19,33 @@ import { SuccessComponent } from '../../helpers/success/success.component'; }) export class ListComponent implements OnChanges { @Input() channelId = ''; + @Input() originalEnvVars: Array = []; @ViewChild(SuccessComponent) success: SuccessComponent = new SuccessComponent(); + @Output() + updated: EventEmitter> = new EventEmitter< + Array + >(); + envvars: any = []; - originalEnvVars: any = []; error: any = null; - loading = false; faBackward = faBackward; faTrash = faTrash; faSave = faSave; - constructor( - private readonly channelService: ChannelService, - private readonly envVarService: EnvironmentVariableService - ) {} + constructor(private readonly channelService: ChannelService) {} - ngOnChanges(): void { + ngOnChanges(changes: { [propName: string]: SimpleChange }): void { + if ( + changes['channelId'] && + changes['channelId'].previousValue != + changes['channelId'].currentValue + ) { + this.success.hide(); + } this.refreshData(); - this.success.hide(); } addNewVariable() { @@ -73,74 +85,78 @@ export class ListComponent implements OnChanges { changedVar.isChanged = false; } - removeVariable(envvar: any) { - this.envvars = this.envvars.filter((v: any) => v !== envvar); - } - save() { if (!this.validateEnvVars()) { return; } - + console.log(this.envvars); this.channelService .apiChannelIdPatch(this.channelId, { environmentVariables: this.envvars, }) .subscribe({ next: () => { + this.emitUpdated(this.envvars); this.refreshData(); this.success.show(); this.error = null; }, error: (err) => { - console.log(err.error.errors); this.error = err; }, }); } - validateEnvVars() { + removeVariable(envvar: EnvironmentVariableItem) { + this.envvars = this.envvars.filter( + (v: EnvironmentVariableItem) => v !== envvar + ); + } + + emitUpdated(envvars: Array) { + this.updated.emit(envvars); + } + + validateEnvVars(): boolean { let isValid = true; this.envvars.forEach((envvar: any) => { - envvar.errors = []; + envvar.errors = { + keys: [], + values: [], + }; if (envvar.key === '') { - envvar.errors.push('Must specify key'); + envvar.errors.keys.push('Must specify key'); isValid = false; } if (envvar.value === '') { - envvar.errors.push('Must specify value'); + envvar.errors.values.push('Must specify value'); isValid = false; } - }); + if ( + this.envvars.filter( + (item: EnvironmentVariableItem) => item.key == envvar.key + ).length > 1 + ) { + envvar.errors.keys.push('Key must be unique'); + isValid = false; + } + }); return isValid; } refreshData() { - this.loading = true; - this.envVarService.apiEnvironmentvariableGet().subscribe({ - next: (vm) => { - this.error = null; - this.envvars = vm.environmentVariables.filter( - (element) => element.channelId == this.channelId - ); - this.originalEnvVars = this.envvars.map((v: any) => { - return { - id: v.id, - channelId: v.channelId, - key: v.key, - value: v.value, - }; - }); - this.loading = false; - }, - error: (err) => { - console.log(err.error.errors); - this.error = err; - this.loading = false; - }, + this.envvars = []; + this.originalEnvVars.forEach((originalEnvVar: any, index: number) => { + originalEnvVar.id = index.toString(); + this.envvars.push({ + id: index.toString(), + channelId: originalEnvVar.channelId, + key: originalEnvVar.key, + value: originalEnvVar.value, + }); }); } } diff --git a/src/Web/ClientApp/src/app/core/api/v1/.openapi-generator/FILES b/src/Web/ClientApp/src/app/core/api/v1/.openapi-generator/FILES index aba47182f..d922bb618 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/.openapi-generator/FILES +++ b/src/Web/ClientApp/src/app/core/api/v1/.openapi-generator/FILES @@ -6,7 +6,6 @@ api/api.ts api/app.service.ts api/certificate.service.ts api/channel.service.ts -api/environmentVariable.service.ts api/jobStatus.service.ts api/revision.service.ts api/storage.service.ts @@ -30,10 +29,8 @@ model/createAccountCommand.ts model/createAppCommand.ts model/createCertificateCommand.ts model/createChannelCommand.ts -model/createEnvironmentVariableCommand.ts model/createTokenCommand.ts -model/environmentVariableDto.ts -model/environmentVariablesVm.ts +model/environmentVariableItem.ts model/getChannelLogsVm.ts model/guidNullableField.ts model/jobStatus.ts @@ -49,7 +46,6 @@ model/tokenInfo.ts model/updateAppCommand.ts model/updateCertificateCommand.ts model/updateChannelCommand.ts -model/updateEnvironmentVariableCommand.ts model/updateEnvironmentVariableDto.ts model/updateEnvironmentVariableDtoListField.ts variables.ts diff --git a/src/Web/ClientApp/src/app/core/api/v1/api.module.ts b/src/Web/ClientApp/src/app/core/api/v1/api.module.ts index 7e136f84a..273035363 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api.module.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api.module.ts @@ -6,7 +6,6 @@ import { AccountService } from './api/account.service'; import { AppService } from './api/app.service'; import { CertificateService } from './api/certificate.service'; import { ChannelService } from './api/channel.service'; -import { EnvironmentVariableService } from './api/environmentVariable.service'; import { JobStatusService } from './api/jobStatus.service'; import { RevisionService } from './api/revision.service'; import { StorageService } from './api/storage.service'; diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/api.ts b/src/Web/ClientApp/src/app/core/api/v1/api/api.ts index 2f858ffee..2ae87bf4f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/api.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/api.ts @@ -6,12 +6,10 @@ export * from './certificate.service'; import { CertificateService } from './certificate.service'; export * from './channel.service'; import { ChannelService } from './channel.service'; -export * from './environmentVariable.service'; -import { EnvironmentVariableService } from './environmentVariable.service'; export * from './jobStatus.service'; import { JobStatusService } from './jobStatus.service'; export * from './revision.service'; import { RevisionService } from './revision.service'; export * from './storage.service'; import { StorageService } from './storage.service'; -export const APIS = [AccountService, AppService, CertificateService, ChannelService, EnvironmentVariableService, JobStatusService, RevisionService, StorageService]; +export const APIS = [AccountService, AppService, CertificateService, ChannelService, JobStatusService, RevisionService, StorageService]; diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts deleted file mode 100644 index 3ab8ea3fd..000000000 --- a/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts +++ /dev/null @@ -1,425 +0,0 @@ -/** - * Hippo.Web - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 1.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ -/* tslint:disable:no-unused-variable member-ordering */ - -import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, - HttpResponse, HttpEvent, HttpParameterCodec, HttpContext - } from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; - -// @ts-ignore -import { CreateEnvironmentVariableCommand } from '../model/createEnvironmentVariableCommand'; -// @ts-ignore -import { EnvironmentVariablesVm } from '../model/environmentVariablesVm'; -// @ts-ignore -import { UpdateEnvironmentVariableCommand } from '../model/updateEnvironmentVariableCommand'; - -// @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; - - - -@Injectable({ - providedIn: 'root' -}) -export class EnvironmentVariableService { - - protected basePath = 'http://localhost'; - public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); - public encoder: HttpParameterCodec; - - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { - if (configuration) { - this.configuration = configuration; - } - if (typeof this.configuration.basePath !== 'string') { - if (typeof basePath !== 'string') { - basePath = this.basePath; - } - this.configuration.basePath = basePath; - } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); - } - - - private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { - if (typeof value === "object" && value instanceof Date === false) { - httpParams = this.addToHttpParamsRecursive(httpParams, value); - } else { - httpParams = this.addToHttpParamsRecursive(httpParams, value, key); - } - return httpParams; - } - - private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { - if (value == null) { - return httpParams; - } - - if (typeof value === "object") { - if (Array.isArray(value)) { - (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); - } else if (value instanceof Date) { - if (key != null) { - httpParams = httpParams.append(key, (value as Date).toISOString().substr(0, 10)); - } else { - throw Error("key may not be null if value is Date"); - } - } else { - Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( - httpParams, value[k], key != null ? `${key}.${k}` : k)); - } - } else if (key != null) { - httpParams = httpParams.append(key, value); - } else { - throw Error("key may not be null if value is not object or array"); - } - return httpParams; - } - - /** - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public apiEnvironmentvariableExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public apiEnvironmentvariableExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (Bearer) required - localVarCredential = this.configuration.lookupCredential('Bearer'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - return this.httpClient.get(`${this.configuration.basePath}/api/environmentvariable/export`, - { - context: localVarHttpContext, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public apiEnvironmentvariableGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; - public apiEnvironmentvariableGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; - public apiEnvironmentvariableGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; - public apiEnvironmentvariableGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (Bearer) required - localVarCredential = this.configuration.lookupCredential('Bearer'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'text/plain', - 'application/json', - 'text/json' - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - return this.httpClient.get(`${this.configuration.basePath}/api/environmentvariable`, - { - context: localVarHttpContext, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * @param id - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public apiEnvironmentvariableIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public apiEnvironmentvariableIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEnvironmentvariableIdDelete.'); - } - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (Bearer) required - localVarCredential = this.configuration.lookupCredential('Bearer'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - return this.httpClient.delete(`${this.configuration.basePath}/api/environmentvariable/${encodeURIComponent(String(id))}`, - { - context: localVarHttpContext, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * @param id - * @param updateEnvironmentVariableCommand - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; - public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; - public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { - if (id === null || id === undefined) { - throw new Error('Required parameter id was null or undefined when calling apiEnvironmentvariableIdPut.'); - } - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (Bearer) required - localVarCredential = this.configuration.lookupCredential('Bearer'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json-patch+json', - 'application/json', - 'text/json', - 'application/_*+json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - return this.httpClient.put(`${this.configuration.basePath}/api/environmentvariable/${encodeURIComponent(String(id))}`, - updateEnvironmentVariableCommand, - { - context: localVarHttpContext, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * @param createEnvironmentVariableCommand - * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. - * @param reportProgress flag to report request and response progress. - */ - public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; - public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; - public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; - public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { - - let localVarHeaders = this.defaultHeaders; - - let localVarCredential: string | undefined; - // authentication (Bearer) required - localVarCredential = this.configuration.lookupCredential('Bearer'); - if (localVarCredential) { - localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); - } - - let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; - if (localVarHttpHeaderAcceptSelected === undefined) { - // to determine the Accept header - const httpHeaderAccepts: string[] = [ - 'text/plain', - 'application/json', - 'text/json' - ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); - } - if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); - } - - let localVarHttpContext: HttpContext | undefined = options && options.context; - if (localVarHttpContext === undefined) { - localVarHttpContext = new HttpContext(); - } - - - // to determine the Content-Type header - const consumes: string[] = [ - 'application/json-patch+json', - 'application/json', - 'text/json', - 'application/_*+json' - ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); - } - - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - return this.httpClient.post(`${this.configuration.basePath}/api/environmentvariable`, - createEnvironmentVariableCommand, - { - context: localVarHttpContext, - responseType: responseType_, - withCredentials: this.configuration.withCredentials, - headers: localVarHeaders, - observe: observe, - reportProgress: reportProgress - } - ); - } - -} diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts index 31ad38ec3..067114444 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts @@ -13,8 +13,8 @@ import { AppChannelListItem } from './appChannelListItem'; export interface AppItem { - name: string; id: string; + name: string; storageId: string; description?: string | null; channels: Array; diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts index fd995f4f4..b45e6fc72 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts @@ -13,7 +13,7 @@ import { RevisionItem } from './revisionItem'; import { ChannelRevisionSelectionStrategy } from './channelRevisionSelectionStrategy'; import { CertificateItem } from './certificateItem'; import { AppSummaryDto } from './appSummaryDto'; -import { EnvironmentVariableDto } from './environmentVariableDto'; +import { EnvironmentVariableItem } from './environmentVariableItem'; export interface ChannelItem { @@ -26,7 +26,7 @@ export interface ChannelItem { lastPublishAt?: string | null; rangeRule?: string | null; certificate?: CertificateItem; - environmentVariables: Array; + environmentVariables: Array; appSummary?: AppSummaryDto; } diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableItem.ts new file mode 100644 index 000000000..6bf6cb093 --- /dev/null +++ b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableItem.ts @@ -0,0 +1,19 @@ +/** + * Hippo.Web + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface EnvironmentVariableItem { + channelId: string; + key: string; + value: string; +} + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/models.ts b/src/Web/ClientApp/src/app/core/api/v1/model/models.ts index e5824eb7c..5ee26a45e 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/models.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/models.ts @@ -14,10 +14,8 @@ export * from './createAccountCommand'; export * from './createAppCommand'; export * from './createCertificateCommand'; export * from './createChannelCommand'; -export * from './createEnvironmentVariableCommand'; export * from './createTokenCommand'; -export * from './environmentVariableDto'; -export * from './environmentVariablesVm'; +export * from './environmentVariableItem'; export * from './getChannelLogsVm'; export * from './guidNullableField'; export * from './jobStatus'; @@ -32,6 +30,5 @@ export * from './tokenInfo'; export * from './updateAppCommand'; export * from './updateCertificateCommand'; export * from './updateChannelCommand'; -export * from './updateEnvironmentVariableCommand'; export * from './updateEnvironmentVariableDto'; export * from './updateEnvironmentVariableDtoListField'; diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts index 8ea50fd81..bc84cb3b4 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts @@ -12,7 +12,6 @@ export interface UpdateEnvironmentVariableDto { - id: string; key: string; value: string; } diff --git a/src/Web/Web.csproj b/src/Web/Web.csproj index 853fa4612..6cd3e3130 100644 --- a/src/Web/Web.csproj +++ b/src/Web/Web.csproj @@ -75,7 +75,7 @@ - + diff --git a/tests/Application.UnitTests/Common/Mappings/MappingTests.cs b/tests/Application.UnitTests/Common/Mappings/MappingTests.cs index 5d719f947..f6424937b 100644 --- a/tests/Application.UnitTests/Common/Mappings/MappingTests.cs +++ b/tests/Application.UnitTests/Common/Mappings/MappingTests.cs @@ -38,7 +38,7 @@ public void ShouldHaveValidConfiguration() [InlineData(typeof(Certificate), typeof(CertificateRecord))] [InlineData(typeof(Channel), typeof(ChannelItem))] [InlineData(typeof(Channel), typeof(ChannelRecord))] - [InlineData(typeof(EnvironmentVariable), typeof(EnvironmentVariableDto))] + [InlineData(typeof(EnvironmentVariable), typeof(EnvironmentVariableItem))] [InlineData(typeof(EnvironmentVariable), typeof(EnvironmentVariableRecord))] [InlineData(typeof(Revision), typeof(RevisionItem))] [InlineData(typeof(Revision), typeof(RevisionRecord))] diff --git a/tests/Application.UnitTests/Revisions/Queries/RevisionItemTests.cs b/tests/Application.UnitTests/Revisions/Queries/RevisionItemTests.cs new file mode 100644 index 000000000..bd1204caf --- /dev/null +++ b/tests/Application.UnitTests/Revisions/Queries/RevisionItemTests.cs @@ -0,0 +1,35 @@ +using Xunit; +using System.Collections.Generic; +using Hippo.Application.Revisions.Queries; + +namespace Hippo.Application.UnitTests.Revisions.Queries; + +public class RevisionItemTests +{ + + [Fact] + public void ShouldBeSortedByRevisionNumber() + { + var revisions = new List() + { + new RevisionItem + { + RevisionNumber = "1.0.0" + }, + new RevisionItem + { + RevisionNumber = "2.0.0" + }, + new RevisionItem + { + RevisionNumber = "1.0.1" + } + }; + + revisions.Sort(); + + Assert.Equal("1.0.0", revisions[0].RevisionNumber); + Assert.Equal("1.0.1", revisions[1].RevisionNumber); + Assert.Equal("2.0.0", revisions[2].RevisionNumber); + } +} diff --git a/tests/Core.UnitTests/Common/AuditableEntityTests.cs b/tests/Core.UnitTests/Common/AuditableEntityTests.cs index 1d55fe8b7..f4d7dc2a8 100644 --- a/tests/Core.UnitTests/Common/AuditableEntityTests.cs +++ b/tests/Core.UnitTests/Common/AuditableEntityTests.cs @@ -2,7 +2,7 @@ using Hippo.Core.Common; using Xunit; -namespace Core.UnitTests.Common; +namespace Hippo.Core.UnitTests.Common; public class AuditableEntityTests { diff --git a/tests/Core.UnitTests/Enums/ChannelRevisionSelectionStrategyTests.cs b/tests/Core.UnitTests/Enums/ChannelRevisionSelectionStrategyTests.cs index 7461c9a8b..fa60a1f92 100644 --- a/tests/Core.UnitTests/Enums/ChannelRevisionSelectionStrategyTests.cs +++ b/tests/Core.UnitTests/Enums/ChannelRevisionSelectionStrategyTests.cs @@ -2,7 +2,7 @@ using Hippo.Core.Enums; using Xunit; -namespace Core.UnitTests.Enums; +namespace Hippo.Core.UnitTests.Enums; public class ChannelRevisionSelectionStrategyTests { diff --git a/tests/Core.UnitTests/Enums/RegistrationModeTests.cs b/tests/Core.UnitTests/Enums/RegistrationModeTests.cs index 9bef778d6..9a365764f 100644 --- a/tests/Core.UnitTests/Enums/RegistrationModeTests.cs +++ b/tests/Core.UnitTests/Enums/RegistrationModeTests.cs @@ -2,7 +2,7 @@ using Hippo.Core.Enums; using Xunit; -namespace Core.UnitTests.Enums; +namespace Hippo.Core.UnitTests.Enums; public class RegistrationModeTests { diff --git a/tests/Core.UnitTests/Events/EventTests.cs b/tests/Core.UnitTests/Events/EventTests.cs index fe1339529..a2427fcda 100644 --- a/tests/Core.UnitTests/Events/EventTests.cs +++ b/tests/Core.UnitTests/Events/EventTests.cs @@ -4,7 +4,7 @@ using Hippo.Core.Events; using Xunit; -namespace Core.UnitTests.Events; +namespace Hippo.Core.UnitTests.Events; public class EventTests { diff --git a/tests/Core.UnitTests/Exceptions/ExceptionTests.cs b/tests/Core.UnitTests/Exceptions/ExceptionTests.cs index 92239a77b..ad5b21e68 100644 --- a/tests/Core.UnitTests/Exceptions/ExceptionTests.cs +++ b/tests/Core.UnitTests/Exceptions/ExceptionTests.cs @@ -2,7 +2,7 @@ using Hippo.Core.Exceptions; using Xunit; -namespace Core.UnitTests.Exceptions; +namespace Hippo.Core.UnitTests.Exceptions; public class ExceptionTests { diff --git a/tests/Hippo.FunctionalTests/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableTests.cs b/tests/Hippo.FunctionalTests/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableTests.cs deleted file mode 100644 index 13bef1397..000000000 --- a/tests/Hippo.FunctionalTests/Application/EnvironmentVariables/Commands/CreateEnvironmentVariableTests.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System.Threading.Tasks; -using Hippo.Application.EnvironmentVariables.Commands; -using Hippo.Application.Common.Exceptions; -using Xunit; -using System; -using Hippo.Core.Entities; -using Hippo.Core.Enums; - -namespace Hippo.FunctionalTests.Application.EnvironmentVariables.Commands; - -public class CreateEnvironmentVariableTests : TestBase -{ - private readonly Guid _appId; - - private readonly Guid _channelId; - - public CreateEnvironmentVariableTests() - { - _appId = Guid.NewGuid(); - _channelId = Guid.NewGuid(); - - var app = new App - { - Id = _appId, - Name = RandomString(10), - StorageId = RandomString(10), - }; - - AddAsync(new Channel - { - Id = _channelId, - AppId = _appId, - App = app, - Name = RandomString(10), - Domain = RandomString(10), - }).Wait(); - } - - [Fact] - public async Task ShouldRequireMinimumFields() - { - await Assert.ThrowsAsync(async () => await SendAsync(new CreateEnvironmentVariableCommand())); - } - - [Theory] - [InlineData("FOO", "bar")] - [InlineData("FOO", "")] - public async Task ShouldCreate(string key, string value) - { - var command = new CreateEnvironmentVariableCommand - { - Key = key, - Value = value, - ChannelId = _channelId - }; - - await SendAsync(command); - } - - [Theory] - [InlineData("", "bar")] - public async Task ShouldNotCreate(string key, string value) - { - var command = new CreateEnvironmentVariableCommand - { - Key = key, - Value = value, - ChannelId = _channelId - }; - - await Assert.ThrowsAsync(async () => await SendAsync(command)); - } -} diff --git a/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj b/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj new file mode 100644 index 000000000..03b8ce226 --- /dev/null +++ b/tests/Infrastructure.UnitTests/Infrastructure.UnitTests.csproj @@ -0,0 +1,28 @@ + + + + net6.0 + Hippo.Infrastructure.UnitTests + Hippo.Infrastructure.UnitTests + enable + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + + + + + + diff --git a/tests/Infrastructure.UnitTests/Services/BindleServiceTests.cs b/tests/Infrastructure.UnitTests/Services/BindleServiceTests.cs new file mode 100644 index 000000000..a7ee85b7c --- /dev/null +++ b/tests/Infrastructure.UnitTests/Services/BindleServiceTests.cs @@ -0,0 +1,34 @@ +using Xunit; +using Hippo.Infrastructure.Services; + +namespace Hippo.Infrastructure.UnitTests.Services; + +public class BindleServiceTests +{ + [Fact] + public void SpinTomlShouldBeParsable() + { + var parcel = @" +[trigger] +type = 'http' +base = '/' + +[config.object] +default = 'teapot' +required = false +secret = false + +[[component]] +source = 'c3b7bfec9f12cf0e9e763fcaaa8140ef099577cf7c84130c9c9d66e85cf6d416' +id = 'spin_config_tinygo' + +[component.trigger] +route = '/...' + +[component.config] +message = '''I'm a {{object}}''' +"; + + var spinToml = BindleService.ParseSpinToml(parcel); + } +}