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','ConvertTo-AnsiSequence','ConvertTo-AnsiString','ConvertTo-DifferenceString','ConvertTo-RelativePath','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-preview0001] - 2025-09-15

### Added

- `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.
- `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.
- `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.
  of throwing exceptions.
- `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.

### Changed

- 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
  instead of hardcoded strings for ShouldProcess prompts and status messages.
- 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   = 'preview0001'
        } # End of PSData hashtable
    } # End of PrivateData hashtable
}