diff --git a/src/TALXIS.CLI.Core/Contracts/Dataverse/ISolutionPackagerService.cs b/src/TALXIS.CLI.Core/Contracts/Dataverse/ISolutionPackagerService.cs deleted file mode 100644 index 61e03d1..0000000 --- a/src/TALXIS.CLI.Core/Contracts/Dataverse/ISolutionPackagerService.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace TALXIS.CLI.Core.Contracts.Dataverse; - -/// -/// Packs and unpacks Dataverse solution ZIPs using SolutionPackager. -/// No Dataverse connection required — operates on local files only. -/// -public interface ISolutionPackagerService -{ - void Pack(string folder, string zipPath, bool managed); - void Unpack(string zipPath, string outputFolder, bool managed); -} diff --git a/src/TALXIS.CLI.Features.Environment/Solution/SolutionImportCliCommand.cs b/src/TALXIS.CLI.Features.Environment/Solution/SolutionImportCliCommand.cs index e35d334..105bb2c 100644 --- a/src/TALXIS.CLI.Features.Environment/Solution/SolutionImportCliCommand.cs +++ b/src/TALXIS.CLI.Features.Environment/Solution/SolutionImportCliCommand.cs @@ -5,6 +5,7 @@ using TALXIS.CLI.Core.Contracts.Dataverse; using TALXIS.CLI.Core.DependencyInjection; using TALXIS.CLI.Logging; +using TALXIS.Platform.Metadata.Packaging; namespace TALXIS.CLI.Features.Environment.Solution; diff --git a/src/TALXIS.CLI.Features.Environment/Solution/SolutionPackCliCommand.cs b/src/TALXIS.CLI.Features.Environment/Solution/SolutionPackCliCommand.cs index 1614dcf..7e49f12 100644 --- a/src/TALXIS.CLI.Features.Environment/Solution/SolutionPackCliCommand.cs +++ b/src/TALXIS.CLI.Features.Environment/Solution/SolutionPackCliCommand.cs @@ -1,9 +1,9 @@ using DotMake.CommandLine; using Microsoft.Extensions.Logging; using TALXIS.CLI.Core; -using TALXIS.CLI.Core.Contracts.Dataverse; using TALXIS.CLI.Core.DependencyInjection; using TALXIS.CLI.Logging; +using TALXIS.Platform.Metadata.Packaging; namespace TALXIS.CLI.Features.Environment.Solution; diff --git a/src/TALXIS.CLI.Features.Environment/Solution/SolutionUnpackCliCommand.cs b/src/TALXIS.CLI.Features.Environment/Solution/SolutionUnpackCliCommand.cs index 603a3ff..42eac26 100644 --- a/src/TALXIS.CLI.Features.Environment/Solution/SolutionUnpackCliCommand.cs +++ b/src/TALXIS.CLI.Features.Environment/Solution/SolutionUnpackCliCommand.cs @@ -1,9 +1,9 @@ using DotMake.CommandLine; using Microsoft.Extensions.Logging; using TALXIS.CLI.Core; -using TALXIS.CLI.Core.Contracts.Dataverse; using TALXIS.CLI.Core.DependencyInjection; using TALXIS.CLI.Logging; +using TALXIS.Platform.Metadata.Packaging; namespace TALXIS.CLI.Features.Environment.Solution; diff --git a/src/TALXIS.CLI.Features.Environment/TALXIS.CLI.Features.Environment.csproj b/src/TALXIS.CLI.Features.Environment/TALXIS.CLI.Features.Environment.csproj index 17073cb..c7df960 100644 --- a/src/TALXIS.CLI.Features.Environment/TALXIS.CLI.Features.Environment.csproj +++ b/src/TALXIS.CLI.Features.Environment/TALXIS.CLI.Features.Environment.csproj @@ -8,6 +8,7 @@ + diff --git a/src/TALXIS.CLI.Platform.Dataverse.Application/DependencyInjection/DataverseApplicationServiceCollectionExtensions.cs b/src/TALXIS.CLI.Platform.Dataverse.Application/DependencyInjection/DataverseApplicationServiceCollectionExtensions.cs index 5731793..ed0a3ce 100644 --- a/src/TALXIS.CLI.Platform.Dataverse.Application/DependencyInjection/DataverseApplicationServiceCollectionExtensions.cs +++ b/src/TALXIS.CLI.Platform.Dataverse.Application/DependencyInjection/DataverseApplicationServiceCollectionExtensions.cs @@ -1,6 +1,7 @@ using Microsoft.Extensions.DependencyInjection; using TALXIS.CLI.Core.Contracts.Dataverse; using TALXIS.CLI.Platform.Dataverse.Application.Services; +using TALXIS.Platform.Metadata.Packaging; namespace TALXIS.CLI.Platform.Dataverse.Application.DependencyInjection; @@ -34,7 +35,7 @@ public static IServiceCollection AddTxcDataverseApplication(this IServiceCollect services.AddSingleton(); services.AddSingleton(); services.AddSingleton(); - services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); return services; } diff --git a/src/TALXIS.CLI.Platform.Dataverse.Application/Sdk/SolutionPackagerService.cs b/src/TALXIS.CLI.Platform.Dataverse.Application/Sdk/SolutionPackagerService.cs deleted file mode 100644 index 601557c..0000000 --- a/src/TALXIS.CLI.Platform.Dataverse.Application/Sdk/SolutionPackagerService.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Diagnostics; -using Microsoft.Crm.Tools.SolutionPackager; -using TALXIS.CLI.Core.Contracts.Dataverse; - -namespace TALXIS.CLI.Platform.Dataverse.Application.Sdk; - -/// -/// Wraps SolutionPackagerLib for packing and unpacking Dataverse solution ZIPs. -/// -internal sealed class SolutionPackagerServiceImpl : ISolutionPackagerService -{ - /// - /// Unpacks a solution ZIP file into a folder structure. - /// - public void Unpack(string zipPath, string outputFolder, bool managed) - { - var arguments = new PackagerArguments - { - Action = CommandAction.Extract, - PathToZipFile = zipPath, - Folder = outputFolder, - PackageType = managed ? SolutionPackageType.Managed : SolutionPackageType.Unmanaged, - AllowDeletes = AllowDelete.Yes, - AllowWrites = AllowWrite.Yes, - ErrorLevel = TraceLevel.Info, - }; - - var packager = new SolutionPackager(arguments); - packager.Run(); - } - - /// - /// Packs a folder structure into a solution ZIP file. - /// - public void Pack(string folder, string zipPath, bool managed) - { - var arguments = new PackagerArguments - { - Action = CommandAction.Pack, - PathToZipFile = zipPath, - Folder = folder, - PackageType = managed ? SolutionPackageType.Managed : SolutionPackageType.Unmanaged, - ErrorLevel = TraceLevel.Info, - }; - - var packager = new SolutionPackager(arguments); - packager.Run(); - } -} diff --git a/src/TALXIS.CLI.Platform.Dataverse.Application/Services/DataverseSolutionExportService.cs b/src/TALXIS.CLI.Platform.Dataverse.Application/Services/DataverseSolutionExportService.cs index d4c966f..119c80b 100644 --- a/src/TALXIS.CLI.Platform.Dataverse.Application/Services/DataverseSolutionExportService.cs +++ b/src/TALXIS.CLI.Platform.Dataverse.Application/Services/DataverseSolutionExportService.cs @@ -1,6 +1,7 @@ using TALXIS.CLI.Core.Contracts.Dataverse; using TALXIS.CLI.Platform.Dataverse.Application.Sdk; using TALXIS.CLI.Platform.Dataverse.Runtime; +using TALXIS.Platform.Metadata.Packaging; namespace TALXIS.CLI.Platform.Dataverse.Application.Services; diff --git a/src/TALXIS.CLI.Platform.Dataverse.Application/TALXIS.CLI.Platform.Dataverse.Application.csproj b/src/TALXIS.CLI.Platform.Dataverse.Application/TALXIS.CLI.Platform.Dataverse.Application.csproj index cc49bfe..ebaaf1e 100644 --- a/src/TALXIS.CLI.Platform.Dataverse.Application/TALXIS.CLI.Platform.Dataverse.Application.csproj +++ b/src/TALXIS.CLI.Platform.Dataverse.Application/TALXIS.CLI.Platform.Dataverse.Application.csproj @@ -9,15 +9,7 @@ - - - - - - - $(PkgMicrosoft_PowerApps_CLI_Core_linux-x64)\tools\SolutionPackagerLib.dll - true - +