diff --git a/Module/PSMinIO/PSMinIO.psd1 b/Module/PSMinIO/PSMinIO.psd1 index 78a0b98..9782917 100644 --- a/Module/PSMinIO/PSMinIO.psd1 +++ b/Module/PSMinIO/PSMinIO.psd1 @@ -21,7 +21,7 @@ Copyright = '(c) 2025 Grace Solutions. All rights reserved.' # Description of the functionality provided by this module - Description = 'A comprehensive PowerShell module for MinIO object storage operations with enterprise-grade features including chunked transfers, advanced object listing, directory management, and performance monitoring. Built on the official Minio .NET SDK.' + Description = 'A comprehensive PowerShell module for MinIO object storage operations with enterprise-grade features including multipart uploads/downloads, presigned URLs, bucket policies, advanced metadata handling, and performance monitoring. Built with custom REST API implementation for optimal PowerShell compatibility.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' @@ -98,6 +98,9 @@ FileList = @( 'PSMinIO.psd1', 'bin\PSMinIO.dll', + 'bin\PSMinIO.pdb', + 'bin\System.Text.Json.dll', + 'bin\Newtonsoft.Json.dll', 'types\PSMinIO.Types.ps1xml', 'types\PSMinIO.Format.ps1xml' ) diff --git a/Module/PSMinIO/bin/Newtonsoft.Json.dll b/Module/PSMinIO/bin/Newtonsoft.Json.dll new file mode 100644 index 0000000..1ffeabe Binary files /dev/null and b/Module/PSMinIO/bin/Newtonsoft.Json.dll differ diff --git a/Module/PSMinIO/bin/PSMinIO.dll b/Module/PSMinIO/bin/PSMinIO.dll index da28480..f4fe4f4 100644 Binary files a/Module/PSMinIO/bin/PSMinIO.dll and b/Module/PSMinIO/bin/PSMinIO.dll differ diff --git a/Module/PSMinIO/bin/PSMinIO.pdb b/Module/PSMinIO/bin/PSMinIO.pdb index 4cb0aae..04b5665 100644 Binary files a/Module/PSMinIO/bin/PSMinIO.pdb and b/Module/PSMinIO/bin/PSMinIO.pdb differ diff --git a/Publish/PSMinIO/PSMinIO.psd1 b/Publish/PSMinIO/PSMinIO.psd1 deleted file mode 100644 index 6ef24a9..0000000 --- a/Publish/PSMinIO/PSMinIO.psd1 +++ /dev/null @@ -1,172 +0,0 @@ -@{ - # Script module or binary module file associated with this manifest. - RootModule = 'bin\PSMinIO.dll' - - # Version number of this module. - ModuleVersion = '2025.07.11.1151' - - # Supported PSEditions - CompatiblePSEditions = @('Desktop', 'Core') - - # ID used to uniquely identify this module - GUID = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' - - # Author of this module - Author = 'Grace Solutions' - - # Company or vendor of this module - CompanyName = 'Grace Solutions' - - # Copyright statement for this module - Copyright = '(c) 2025 Grace Solutions. All rights reserved.' - - # Description of the functionality provided by this module - Description = 'A comprehensive PowerShell module for MinIO object storage operations with enterprise-grade features including chunked transfers, advanced object listing, directory management, and performance monitoring. Built on the official Minio .NET SDK.' - - # Minimum version of the PowerShell engine required by this module - PowerShellVersion = '5.1' - - # Name of the PowerShell host required by this module - # PowerShellHostName = '' - - # Minimum version of the PowerShell host required by this module - # PowerShellHostVersion = '' - - # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. - DotNetFrameworkVersion = '4.7.2' - - # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. - CLRVersion = '4.0' - - # Processor architecture (None, X86, Amd64) required by this module - # ProcessorArchitecture = '' - - # Modules that must be imported into the global environment prior to importing this module - # RequiredModules = @() - - # Assemblies that must be loaded prior to importing this module - RequiredAssemblies = @('bin\PSMinIO.dll', 'bin\Minio.dll') - - # Script files (.ps1) that are run in the caller's environment prior to importing this module. - # ScriptsToProcess = @() - - # Type files (.ps1xml) to be loaded when importing this module - TypesToProcess = @('types\PSMinIO.Types.ps1xml') - - # Format files (.ps1xml) to be loaded when importing this module - FormatsToProcess = @('types\PSMinIO.Format.ps1xml') - - # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess - # NestedModules = @() - - # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. - FunctionsToExport = @() - - # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. - CmdletsToExport = @( - 'Connect-MinIO', - 'Get-MinIOBucket', - 'New-MinIOBucket', - 'Remove-MinIOBucket', - 'Test-MinIOBucketExists', - 'Get-MinIOObject', - 'New-MinIOObject', - 'New-MinIOObjectChunked', - 'New-MinIOFolder', - 'Get-MinIOObjectContent', - 'Get-MinIOObjectContentChunked', - 'Remove-MinIOObject', - 'Get-MinIOBucketPolicy', - 'Set-MinIOBucketPolicy', - 'Get-MinIOStats' - ) - - # Variables to export from this module - VariablesToExport = @() - - # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. - AliasesToExport = @() - - # DSC resources to export from this module - # DscResourcesToExport = @() - - # List of all modules packaged with this module - # ModuleList = @() - - # List of all files packaged with this module - FileList = @( - 'PSMinIO.psd1', - 'bin\PSMinIO.dll', - 'bin\Minio.dll', - 'types\PSMinIO.Types.ps1xml', - 'types\PSMinIO.Format.ps1xml' - ) - - # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. - PrivateData = @{ - PSData = @{ - # Tags applied to this module. These help with module discovery in online galleries. - Tags = @('MinIO', 'ObjectStorage', 'S3', 'Cloud', 'Storage', 'Bucket', 'Object', 'Enterprise', 'Chunked', 'Performance', 'Monitoring', 'Automation', 'Backup', 'AWS', 'Compatible') - - # A URL to the license for this module. - LicenseUri = 'https://github.com/Grace-Solutions/PSMinIO/blob/main/LICENSE' - - # A URL to the main website for this project. - ProjectUri = 'https://github.com/Grace-Solutions/PSMinIO' - - # A URL to an icon representing this module. - # IconUri = '' - - # ReleaseNotes of this module - ReleaseNotes = @' -## Version 2025.07.11.1151 - Enhanced Release - -### Major Features -- Complete Get-MinIOObject cmdlet with advanced filtering, sorting, and pagination -- Enhanced directory management with automatic nested structure creation -- Advanced chunked operations with configurable chunk sizes and multi-layer progress tracking -- Comprehensive timing and performance metrics for all operations -- Enterprise-grade automation examples and monitoring capabilities - -### Issues Fixed -- Fixed directory creation warnings (now clean verbose logging) -- Implemented missing Get-MinIOObject cmdlet with full functionality -- Resolved threading and progress reporting issues - -### Documentation and Examples -- Updated README.md and comprehensive USAGE.md documentation -- Created comprehensive example scripts in scripts/examples/ directory -- Added enterprise automation patterns and best practices -- Professional logging with no Write-Host usage - -### Technical Improvements -- Thread-safe operations for chunked transfers -- Enhanced error handling and resource management -- Performance optimization with intelligent defaults -- Centralized version management system - -This release provides enterprise-grade functionality with professional documentation and comprehensive examples. -'@ - - # Prerelease string of this module - # Prerelease = '' - - # Flag to indicate whether the module requires explicit user acceptance for install/update/save - # RequireLicenseAcceptance = $false - - # External dependent modules of this module - # ExternalModuleDependencies = @() - } - } - - # HelpInfo URI of this module - # HelpInfoURI = '' - - # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. - # DefaultCommandPrefix = '' -} - - - - - diff --git a/Publish/PSMinIO/types/PSMinIO.Format.ps1xml b/Publish/PSMinIO/types/PSMinIO.Format.ps1xml deleted file mode 100644 index fa301b6..0000000 --- a/Publish/PSMinIO/types/PSMinIO.Format.ps1xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - PSMinIO.Models.MinIOBucketInfo - - PSMinIO.Models.MinIOBucketInfo - - - - - - 25 - Left - - - - 20 - Left - - - - 15 - Left - - - - - - - Name - - - CreatedFormatted - - - Region - - - - - - - - - - PSMinIO.Models.MinIOObjectInfo - - PSMinIO.Models.MinIOObjectInfo - - - - - - 30 - Left - - - - 12 - Right - - - - 20 - Left - - - - 20 - Left - - - - - - - Name - - - SizeFormatted - - - LastModifiedFormatted - - - ETag - - - - - - - - - - PSMinIO.Models.MinIOConfiguration - - PSMinIO.Models.MinIOConfiguration - - - - - - 30 - Left - - - - 15 - Left - - - - 15 - Left - - - - 8 - Left - - - - - - - EndpointDisplay - - - AccessKeyMasked - - - SecretKeyMasked - - - UseSSL - - - - - - - - - - PSMinIO.Models.MinIOStats - - PSMinIO.Models.MinIOStats - - - - - - 15 - Right - - - - 15 - Right - - - - 15 - Right - - - - 20 - Left - - - - - - - TotalBuckets - - - TotalObjects - - - TotalSizeFormatted - - - LastUpdated - - - - - - - - - diff --git a/Publish/PSMinIO/types/PSMinIO.Types.ps1xml b/Publish/PSMinIO/types/PSMinIO.Types.ps1xml deleted file mode 100644 index d91736d..0000000 --- a/Publish/PSMinIO/types/PSMinIO.Types.ps1xml +++ /dev/null @@ -1,258 +0,0 @@ - - - - PSMinIO.Models.MinIOBucketInfo - - - CreatedFormatted - - $this.Created.ToString("yyyy-MM-dd HH:mm:ss") - - - - SizeFormatted - - if ($this.Size -eq $null) { return "N/A" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.Size - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - - - - PSMinIO.Models.MinIOObjectInfo - - - LastModifiedFormatted - - $this.LastModified.ToString("yyyy-MM-dd HH:mm:ss") - - - - SizeFormatted - - if ($this.Size -eq $null) { return "N/A" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.Size - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - GetFileName - - if ($this.Name -eq $null) { return "" } - $parts = $this.Name.Split('/') - return $parts[$parts.Length - 1] - - - - HasPresignedUrl - - return -not [string]::IsNullOrEmpty($this.PresignedUrl) - - - - PresignedUrlValid - - if ($this.PresignedUrlExpiration -eq $null) { return $false } - return $this.PresignedUrlExpiration -gt [DateTime]::UtcNow - - - - - - - PSMinIO.Models.MinIOConfiguration - - - EndpointDisplay - - if ($this.UseSSL) { - return "https://$($this.Endpoint)" - } else { - return "http://$($this.Endpoint)" - } - - - - AccessKeyMasked - - if ([string]::IsNullOrEmpty($this.AccessKey)) { return "Not Set" } - if ($this.AccessKey.Length -le 4) { return $this.AccessKey } - return $this.AccessKey.Substring(0, 4) + "*".PadRight($this.AccessKey.Length - 4, '*') - - - - SecretKeyMasked - - if ([string]::IsNullOrEmpty($this.SecretKey)) { return "Not Set" } - return "*".PadRight($this.SecretKey.Length, '*') - - - - SecurityStatus - - if ($this.SkipCertificateValidation) { - return "SSL (Certificate Validation Disabled)" - } elseif ($this.UseSSL) { - return "SSL (Secure)" - } else { - return "HTTP (Insecure)" - } - - - - - - - PSMinIO.Models.MinIOStats - - - TotalSizeFormatted - - if ($this.TotalSize -eq $null) { return "N/A" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.TotalSize - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - - - - - PSMinIO.Models.ChunkedTransferState - - - ProgressFormatted - - return "{0:F1}%" -f $this.ProgressPercentage - - - - BytesTransferredFormatted - - if ($this.BytesTransferred -eq $null) { return "0 B" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.BytesTransferred - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - TotalSizeFormatted - - if ($this.TotalSize -eq $null) { return "0 B" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.TotalSize - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - ChunkSizeFormatted - - if ($this.ChunkSize -eq $null) { return "0 B" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.ChunkSize - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - ElapsedTime - - if ($this.StartTime -eq $null) { return "Unknown" } - $elapsed = [DateTime]::UtcNow - $this.StartTime - return $elapsed.ToString("hh\:mm\:ss") - - - - TransferStatus - - if ($this.IsComplete) { - return "Complete" - } elseif ($this.CompletedChunkCount -gt 0) { - return "In Progress" - } else { - return "Not Started" - } - - - - RemainingChunks - - return $this.TotalChunks - $this.CompletedChunkCount - - - - - - - - PSMinIO.Models.ChunkInfo - - - SizeFormatted - - if ($this.Size -eq $null) { return "0 B" } - $sizes = @("B", "KB", "MB", "GB", "TB", "PB") - $index = 0 - $size = $this.Size - while ($size -ge 1024 -and $index -lt $sizes.Length - 1) { - $size = $size / 1024 - $index++ - } - return "{0:F2} {1}" -f $size, $sizes[$index] - - - - ChunkRange - - return "{0}-{1}" -f $this.StartByte, $this.EndByte - - - - Status - - if ($this.IsCompleted) { - return "Completed" - } elseif ($this.RetryCount -gt 0) { - return "Failed ({0} retries)" -f $this.RetryCount - } else { - return "Pending" - } - - - - -