Repository navigation
Expand file tree
/
Copy pathpsutils.psd1
More file actions
225 lines (182 loc) · 9.17 KB
/
Copy pathpsutils.psd1
File metadata and controls
225 lines (182 loc) · 9.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#
# psutils 模块清单文件
#
# 作者: mudssky
# 创建日期: 2024/1/19
# 更新日期: 2025/7/25
# 描述: PowerShell 实用工具函数集合模块
#
@{
# 聚合模块通过 NestedModules 加载,psutils.psd1 是唯一规范入口。
RootModule = ''
# 此模块的版本号
ModuleVersion = '1.0.0'
# 支持的 PowerShell 版本
CompatiblePSEditions = @('Core')
# 用于唯一标识此模块的 ID
GUID = 'd1108e87-11b1-42f6-899b-2f1bfbb1d399'
# 此模块的作者
Author = 'mudssky'
# 此模块的公司或供应商
CompanyName = 'mudssky'
# 此模块的版权声明
Copyright = '(c) 2024-2025 mudssky. All rights reserved.'
# 此模块提供的功能说明
Description = 'PowerShell 实用工具函数集合,包含环境管理、文件系统操作、网络工具、系统信息获取等功能模块'
# 此模块所需的 PowerShell 引擎最低版本
PowerShellVersion = '7.4'
# 此模块所需的 PowerShell 主机名称
# PowerShellHostName = ''
# 此模块所需的 PowerShell 主机最低版本
# PowerShellHostVersion = ''
# 此模块所需的 Microsoft .NET Framework 最低版本(仅适用于 PowerShell Desktop 版本)
# DotNetFrameworkVersion = ''
# 此模块所需的公共语言运行时 (CLR) 最低版本(仅适用于 PowerShell Desktop 版本)
# ClrVersion = ''
# 此模块所需的处理器架构 (None, X86, Amd64)
# ProcessorArchitecture = ''
# 在导入此模块之前必须导入到全局环境中的模块
# RequiredModules = @()
# 在导入此模块之前必须加载的程序集
# RequiredAssemblies = @()
# 在导入此模块之前在调用方环境中运行的脚本文件 (.ps1)
# ScriptsToProcess = @()
# 导入此模块时要加载的类型文件 (.ps1xml)
# TypesToProcess = @()
# 导入此模块时要加载的格式文件 (.ps1xml)
# FormatsToProcess = @()
# 要作为 RootModule/ModuleToProcess 中指定模块的嵌套模块导入的模块
NestedModules = @(
'modules\cache.psm1',
'modules\commandDiscovery.psm1',
'modules\config.psm1',
'modules\docker.psm1',
'modules\env.psm1',
'modules\filesystem.psm1',
'modules\font.psm1',
'modules\functions.psm1',
'modules\hardware.psm1',
'modules\help.psm1',
'modules\install.psm1',
'modules\json.psm1',
'modules\linux.psm1',
'modules\network.psm1',
'modules\oss.psm1',
'modules\os.psm1',
'modules\process.psm1',
'modules\proxy.psm1',
'modules\git.psm1',
'modules\selection.psm1',
'modules\string.psm1',
'modules\test.psm1',
'modules\win.psm1',
'modules\wrapper.psm1',
'modules\web.psm1'
)
# 要从此模块导出的函数,为获得最佳性能,请不要使用通配符,如果没有要导出的函数,请使用空数组
FunctionsToExport = @(
# 缓存管理模块 (cache.psm1)
'Invoke-WithCache', 'Clear-ExpiredCache', 'Get-CacheStats', 'Invoke-WithFileCache',
# 命令探测模块 (commandDiscovery.psm1)
'Find-ExecutableCommand',
# 配置管理模块 (config.psm1)
'Resolve-ConfigSources', 'Resolve-DefaultEnvFiles', 'Invoke-WithScopedEnvironment', 'ConvertTo-ConfigHashtable', 'Get-ConfigValue', 'Resolve-ConfigEnvPlaceholder', 'Resolve-ConfigPath', 'ConvertTo-ConfigKeyName', 'ConvertFrom-ConfigCliParameters',
'Resolve-ConfigPlatformValue', 'Read-ConfigEnvFile', 'Read-ConfigPowerShellDataFile', 'Read-ConfigMarkdownFrontMatter', 'Read-ConfigSshClientConfig',
# Docker 工具模块 (docker.psm1)
'Test-DockerComposeAvailable', 'Assert-DockerComposeReady', 'Get-DockerComposeBaseArgs', 'Invoke-DockerComposeCommand',
'ConvertTo-WslDockerPath', 'ConvertTo-WslDockerVolumeSpec', 'ConvertTo-WslDockerMountSpec',
'ConvertTo-WslDockerArgument', 'Invoke-WslDocker', 'Enable-WslDockerWrapper',
# 环境管理模块 (env.psm1)
'Get-Dotenv', 'Install-Dotenv', 'Import-EnvPath', 'Set-EnvPath', 'Add-EnvPath', 'Get-EnvParam', 'Remove-FromEnvPath', 'Sync-PathFromBash', 'Test-DirectoryInPath', 'Get-PathAddHint',
# 文件系统模块 (filesystem.psm1)
'Get-Tree', 'Get-TreeObject', 'ConvertTo-TreeJson', 'Copy-FileSystemItemSafe', 'New-BackupSnapshot', 'Get-ArchiveKind', 'Expand-ArchiveFile', 'Find-FileCandidate',
# 字体管理模块 (font.psm1)
'Test-Font', 'Install-Font', 'Uninstall-Font',
# 通用函数模块 (functions.psm1)
'Get-HistoryCommandRank', 'Get-ScriptFolder', 'Start-Ipython', 'Start-PSReadline', 'Invoke-FzfHistorySmart', 'Register-FzfHistorySmartKeyBinding', 'Set-Script', 'Update-Semver', 'Get-FormatLength', 'Get-NeedBinaryDigit', 'Get-ReversedMap',
# 硬件信息模块 (hardware.psm1)
'Get-GpuInfo', 'Get-SystemMemoryInfo',
# Git 工具模块 (git.psm1)
'Get-GitIgnorePatterns', 'New-7ZipExcludeArgs',
# 帮助搜索模块 (help.psm1)
'Search-ModuleHelp', 'Find-PSUtilsFunction', 'Get-FunctionHelp',
# 安装管理模块 (install.psm1)
'Test-ModuleInstalled', 'Install-RequiredModule', 'Select-PackageManagerApps', 'Test-PackageManagerAppCatalog',
'Install-PackageManagerApps', 'Install-ExecutableFile',
# JSON 工具模块 (json.psm1)
'Read-JsonHashtableFile', 'Write-JsonFileAtomic', 'Get-StableJsonKey',
# Linux 系统模块 (linux.psm1)
'Set-SSHKeyAuth',
# 网络工具模块 (network.psm1)
'Test-PortOccupation', 'Get-PortProcess', 'Wait-ForURL',
# OSS 工具模块 (oss.psm1)
'New-OssContext', 'Test-OssObject', 'Get-OssObjectInfo', 'Get-OssObjectList', 'Publish-OssObject', 'Publish-OssDirectory',
# 操作系统模块 (os.psm1)
'Get-OperatingSystem', 'Test-Administrator', 'New-PlatformDescriptor',
# 进程/命令执行模块 (process.psm1)
'Format-NativeCommandLine', 'Resolve-NativeExecutablePath', 'New-CommandLogFile', 'Write-CommandLogLine', 'Invoke-NativeCommand',
# 代理管理模块 (proxy.psm1)
'Close-Proxy', 'Start-Proxy', 'Set-Proxy',
# 交互选择模块 (selection.psm1)
'Select-InteractiveItem',
# 字符串处理模块 (string.psm1)
'Get-LineBreak', 'Convert-JsoncToJson',
# 测试工具模块 (test.psm1)
'Test-EXEProgram', 'Test-PathHasExe', 'Test-ApplicationInstalled',
# Windows 系统模块 (win.psm1)
'Add-Startup', 'New-Shortcut',
# 包装器模块 (wrapper.psm1)
'Set-CustomAlias', 'Get-CustomAlias',
# Web 工具模块 (web.psm1)
'New-WebShortcut'
)
# 要从此模块导出的 Cmdlet,为获得最佳性能,请不要使用通配符,如果没有要导出的 Cmdlet,请使用空数组
CmdletsToExport = @()
# 要从此模块导出的变量
VariablesToExport = @()
# 要从此模块导出的别名,为获得最佳性能,请不要使用通配符,如果没有要导出的别名,请使用空数组
AliasesToExport = @()
# 要从此模块导出的 DSC 资源
# DscResourcesToExport = @()
# 与此模块一起打包的所有模块的列表
# ModuleList = @()
# 与此模块一起打包的所有文件的列表
# FileList = @()
# 要传递给 RootModule/ModuleToProcess 中指定模块的私有数据。这还可能包含 PowerShell 使用的其他模块元数据的 PSData 哈希表
PrivateData = @{
PSData = @{
# 应用于此模块的标记。这些有助于在在线库中发现模块
Tags = @('PowerShell', 'Utility', 'Tools', 'Environment', 'FileSystem', 'Network', 'System', 'Helper')
# 此模块许可证的 URL
# LicenseUri = ''
# 此项目主网站的 URL
# ProjectUri = ''
# 表示此模块的图标的 URL
# IconUri = ''
# 此模块的发行说明
ReleaseNotes = @'
版本 1.0.0 (2025/7/25)
- 完善模块清单配置文件
- 采用中文注释提高可读性
- 统一子模块导出:所有子模块都明确指定导出函数名
- 以 psutils.psd1 作为规范入口,index.psm1 仅保留弃用兼容转发
- 添加模块元数据:完善 Tags、ProjectUri、LicenseUri 等信息
- 明确指定导出函数列表,移除通配符导出
- 移除重复的 NestedModules 配置
- 更新模块版本和元数据信息
- 添加模块标签和分类
- 支持 PowerShell 7.4+ Core
'@
# 此模块的预发布字符串
# Prerelease = ''
# 指示模块是否需要用户明确接受安装/更新/保存的标志
RequireLicenseAcceptance = $false
# 此模块的外部依赖模块
# ExternalModuleDependencies = @()
} # PSData 哈希表结束
} # PrivateData 哈希表结束
# 此模块的 HelpInfo URI
# HelpInfoURI = ''
# 从此模块导出的命令的默认前缀。使用 Import-Module -Prefix 覆盖默认前缀
# DefaultCommandPrefix = ''
}