重写插件为V2格式:使用define+id+setup(ctx)+ctx.tool.transform注册工具

This commit is contained in:
ypshidifu
2026-09-21 17:04:34 +08:00
parent 5d43b5ed76
commit 0d19143065
3808 changed files with 1573549 additions and 76 deletions
Generated Vendored
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/node$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args
} else {
& "$basedir/node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args
} else {
& "node$exe" "$basedir/../uuid/dist-node/bin/uuid" $args
}
$ret=$LASTEXITCODE
}
exit $ret