Viscalyx.Common.psd1
@{ # Script module or binary module file associated with this manifest. RootModule = 'Viscalyx.Common.psm1' # Version number of this module. ModuleVersion = '0.6.0' # ID used to uniquely identify this module GUID = 'aba638ad-a584-4234-8eaa-48691b21be2f' # Author of this module Author = 'Viscalyx' # cSpell: ignore Viscalyx # Company or vendor of this module CompanyName = 'Viscalyx' # Copyright statement for this module Copyright = 'Copyright the Viscalyx.Common contributors. All rights reserved.' # Description of the functionality provided by this module Description = 'Common commands that adds or improves functionality in various scenarios.' # Minimum version of the PowerShell engine required by this module PowerShellVersion = '5.1' # Modules that must be imported into the global environment prior to importing this module RequiredModules = @() # 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 = @('Assert-IPv4Address','Clear-AnsiSequence','ConvertTo-AnsiSequence','ConvertTo-AnsiString','ConvertTo-DifferenceString','ConvertTo-RelativePath','Get-ClassAst','Get-ClassResourceAst','Get-LinkLayerAddress','Get-ModuleByVersion','Get-ModuleFileSha','Get-ModuleVersion','Get-NumericalSequence','Get-PSReadLineHistory','Get-TextOffset','Install-ModulePatch','Invoke-PesterJob','New-SamplerGitHubReleaseTag','Out-Difference','Pop-VMLatestSnapshot','Remove-History','Remove-PSHistory','Remove-PSReadLineHistory','Resolve-DnsName','Send-WakeOnLan','Split-StringAtIndex','Test-FileHash','Test-IPv4Address') # 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 = @() # 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 = @('Get-MacAddress','ipj','Send-WOL') # DSC resources to export from this module DscResourcesToExport = @() # 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 = @('Common', 'Utility', 'Pester', 'PSReadLine', 'Sampler') # A URL to the license for this module. LicenseUri = 'https://github.com/viscalyx/Viscalyx.Common/blob/main/LICENSE' # A URL to the main website for this project. ProjectUri = 'https://github.com/viscalyx/Viscalyx.Common' # A URL to an icon representing this module. IconUri = 'https://avatars.githubusercontent.com/u/53994072' # ReleaseNotes of this module ReleaseNotes = '## [0.6.0-preview0004] - 2025-09-17 ### Added - `Assert-IPv4Address` that validates if a string is a valid IPv4 address, including format checking and value range validation (0-255 for each octet). Also validates that octets do not have leading zeros. - `Clear-AnsiSequence` that clears all ANSI escape sequences from a string, returning only the visible text content. Useful for calculating the actual visible length of strings that contain ANSI formatting codes or extracting plain text from formatted console output. - `ConvertTo-AnsiString` that converts strings containing ANSI sequences to properly escaped and terminated ANSI sequences. It adds the necessary escape character and ensures all sequences end with ''m''. Handles both escaped and unescaped sequences, as well as sequences that may be missing the ''m'' terminator. - `Get-ClassAst` that parses PowerShell script files and extracts class definitions using Abstract Syntax Tree (AST) parsing. Can return all classes in a file or filter for a specific class by name. - `Get-ClassResourceAst` that parses PowerShell script files and extracts DSC class resource definitions using Abstract Syntax Tree (AST) parsing. Filters for classes that have the [DscResource()] attribute. Can return all DSC class resources in a file or filter for a specific class by name. ### Fixed - `Out-Difference` now correctly aligns labels with column structure when using custom labels ([issue #7](https://github.com/viscalyx/Viscalyx.Common/issues/7)) - `Test-IPv4Address` that tests if a string is a valid IPv4 address and returns a boolean result. Performs the same validation as `Assert-IPv4Address` but returns `$true` for valid addresses and `$false` for invalid ones instead of throwing exceptions. Now supports pipeline input for processing multiple IP addresses. ### Changed - `New-SamplerGitHubReleaseTag` - The git push operation is now properly wrapped in a ShouldProcess check, allowing WhatIf to report what would be pushed without actually executing the push command. - `Get-LinkLayerAddress` (alias `Get-MacAddress`) that retrieves the MAC address for an IP address on the local subnet/VLAN. Works cross-platform across Windows, Linux, and macOS. - `Resolve-DnsName` that resolves a DNS host name to a single IPv4 address using the cross-platform .NET System.Net.Dns class, providing compatibility when the built-in Resolve-DnsName cmdlet is not available. - `Send-WakeOnLan` (alias `Send-WOL`) that sends a Wake-on-LAN magic packet to wake up a remote computer. Supports various MAC address formats and custom broadcast addresses and ports. - Aligned ShouldProcess localized string key naming with DSC community convention by renaming `*_ShouldProcessVerboseDescription` and `*_ShouldProcessVerboseWarning` keys to `*_ShouldProcessDescription` and `*_ShouldProcessConfirmation` respectively. This affects string keys in `New-SamplerGitHubReleaseTag`, `Install-ModulePatch`, and `Send-WakeOnLan` commands. - `Remove-PSHistory` and `Remove-PSReadLineHistory` now use localized strings for all user-facing messages following DSC community guidelines. - Removed unused localized strings for `Get-ClassResourceAst` command that were inherited from `Get-ClassAst` but not actually used in the implementation. - Added proper string IDs to all localized strings following the pattern `(XXXNNNNN)` where XXX is a 3-4 letter abbreviation and NNNNN is a 4-digit number. This provides consistent identification and tracking of all localized messages across the module. ' # Prerelease string of this module Prerelease = 'preview0004' } # End of PSData hashtable } # End of PrivateData hashtable } |