From 82db53158962a45b510a033f6b2eb87dc7606c08 Mon Sep 17 00:00:00 2001 From: Dima Date: Thu, 12 Nov 2026 15:13:00 +0100 Subject: [PATCH] Prepare canonical Shell-Functions module manifest and package metadata --- Shell-Functions/.gitattributes | 5 + Shell-Functions/LICENSE | 25 +++++ Shell-Functions/README.md | 9 ++ Shell-Functions/Shell-Function.Tests.ps1 | 13 ++- Shell-Functions/Shell-Function.psd1 | 8 +- Shell-Functions/Shell-Functions.psd1 | 122 +++++++++++++++++++++++ 6 files changed, 174 insertions(+), 8 deletions(-) create mode 100644 Shell-Functions/.gitattributes create mode 100644 Shell-Functions/LICENSE create mode 100644 Shell-Functions/Shell-Functions.psd1 diff --git a/Shell-Functions/.gitattributes b/Shell-Functions/.gitattributes new file mode 100644 index 0000000..1d99392 --- /dev/null +++ b/Shell-Functions/.gitattributes @@ -0,0 +1,5 @@ +*.ps1 text eol=lf +*.psm1 text eol=lf +*.psd1 text eol=lf +*.md text eol=lf +LICENSE text eol=lf diff --git a/Shell-Functions/LICENSE b/Shell-Functions/LICENSE new file mode 100644 index 0000000..714075e --- /dev/null +++ b/Shell-Functions/LICENSE @@ -0,0 +1,25 @@ +BSD 2-Clause License + +Copyright (c) 2019, Dima Stadub +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Shell-Functions/README.md b/Shell-Functions/README.md index 87e8e26..9abb156 100644 --- a/Shell-Functions/README.md +++ b/Shell-Functions/README.md @@ -15,3 +15,12 @@ Run Shell-Function.Tests.ps1 with Pester 4.10.1. CI tests imports/exports, real filters and mocked link-provider arguments; it never runs cmd, changes Visual Studio state, creates links or invokes the interactive prompt. This module has no configured Gallery publication or release package. + +## Package identity + +The canonical module manifest is Shell-Functions.psd1 (version 0.0.1), matching +the proposed Gallery module name. Shell-Function.psd1 remains a source-compatible +manifest with the same metadata and exports. Commands and aliases are unchanged. +The module inherits the repository BSD-2-Clause license; the package carries the +same license text. Windows batch helpers and real link creation are not covered by +the import/filter/provider-argument tests. Gallery ownership is pending selection. diff --git a/Shell-Functions/Shell-Function.Tests.ps1 b/Shell-Functions/Shell-Function.Tests.ps1 index 3069177..c841e76 100644 --- a/Shell-Functions/Shell-Function.Tests.ps1 +++ b/Shell-Functions/Shell-Function.Tests.ps1 @@ -1,8 +1,13 @@ -$manifest = Join-Path $PSScriptRoot 'Shell-Function.psd1' +$manifest = Join-Path $PSScriptRoot 'Shell-Functions.psd1' +$moduleName = 'Shell-Functions' +if (-not (Test-Path $manifest)) { + $manifest = Join-Path $PSScriptRoot 'Shell-Function.psd1' + $moduleName = 'Shell-Function' +} Import-Module $manifest -Force -ErrorAction Stop Describe 'Shell source imports and filters' { It 'exports callable functions and resolvable aliases from its manifest' { - $module = Get-Module 'Shell-Function' + $module = Get-Module $moduleName $module.ExportedFunctions.Count | Should -Be 7 $module.ExportedAliases.Count | Should -Be 7 $module.ExportedAliases.ContainsKey('pb') | Should -BeFalse @@ -22,7 +27,7 @@ Describe 'Shell source imports and filters' { ('a b' | Split-String) -join '|' | Should -BeExactly 'a|b' } } -InModuleScope 'Shell-Function' { +InModuleScope $moduleName { Describe 'Link provider argument contracts' { It 'maps without creating a link' -TestCases @( @{ Type='Symbolic'; Expected='SymbolicLink' } @@ -39,4 +44,4 @@ InModuleScope 'Shell-Function' { } } } -Remove-Module 'Shell-Function' -Force +Remove-Module $moduleName -Force diff --git a/Shell-Functions/Shell-Function.psd1 b/Shell-Functions/Shell-Function.psd1 index 715b786..fdebc6f 100644 --- a/Shell-Functions/Shell-Function.psd1 +++ b/Shell-Functions/Shell-Function.psd1 @@ -30,7 +30,7 @@ CompanyName = 'Unknown' Copyright = '(c) Dmitry.Stadub. All rights reserved.' # Description of the functionality provided by this module -# Description = '' +Description = 'Text filters and Windows shell helper functions with module-scoped aliases.' # Minimum version of the PowerShell engine required by this module # PowerShellVersion = '' @@ -95,13 +95,13 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - # Tags = @() + Tags = @('Shell', 'Text', 'Windows') # A URL to the license for this module. - # LicenseUri = '' + LicenseUri = 'https://github.com/stadub/PowershellScripts/blob/master/LICENSE' # A URL to the main website for this project. - # ProjectUri = '' + ProjectUri = 'https://github.com/stadub/PowershellScripts/tree/Shell-Functions/develop/Shell-Functions' # A URL to an icon representing this module. # IconUri = '' diff --git a/Shell-Functions/Shell-Functions.psd1 b/Shell-Functions/Shell-Functions.psd1 new file mode 100644 index 0000000..0849699 --- /dev/null +++ b/Shell-Functions/Shell-Functions.psd1 @@ -0,0 +1,122 @@ +# +# Module manifest for module 'Shell-Functions' +# +# Generated by: Dmitry.Stadub +# +# Generated on: 19.02.2019 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'Shell-Function.psm1' + +# Version number of this module. +ModuleVersion = '0.0.1' + +# Supported PSEditions +# CompatiblePSEditions = @() + +# ID used to uniquely identify this module +GUID = 'b9a21ead-a6a2-45b2-bd44-068fa40d0283' + +# Author of this module +Author = 'Dmitry.Stadub' + +# Company or vendor of this module +CompanyName = 'Unknown' + +# Copyright statement for this module +Copyright = '(c) Dmitry.Stadub. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Text filters and Windows shell helper functions with module-scoped aliases.' + +# Minimum version of the PowerShell engine required by this module +# PowerShellVersion = '' + +# 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 = '' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# CLRVersion = '' + +# 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 = @() + +# 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 = @() + +# Format files (.ps1xml) to be loaded when importing this module +# FormatsToProcess = @() + +# 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 = @('Get-SearchAndPrint', 'Split-String', 'Get-Batchfile', 'Initialize-VisualStudioEnvieronment', 'Get-CmdletAlias', 'New-FileSystemLink', 'Propmpt') + +# 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 = @('grep', 'cut', 'VsVars32', 'ga', 'ln', 'mklink', 'which') + +# 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 = @() + +# 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 = @('Shell', 'Text', 'Windows') + + # A URL to the license for this module. + LicenseUri = 'https://github.com/stadub/PowershellScripts/blob/master/LICENSE' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/stadub/PowershellScripts/tree/Shell-Functions/develop/Shell-Functions' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + # ReleaseNotes = '' + + } # End of PSData hashtable + +} # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +}