feat(image): integrate PoloX image editing workflows
Add WaveSpeed image editing and image tools plugins, canvas image editing workflows, layer selection, and Cloud Agent image tools with approval-safe transient references.
This commit is contained in:
34
plugin-packages/package-selected.ps1
Normal file
34
plugin-packages/package-selected.ps1
Normal file
@@ -0,0 +1,34 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
$root = Split-Path -Parent $PSCommandPath
|
||||
$ids = if ($args.Count -gt 0) { $args } else { throw 'Pass one or more plugin directory names.' }
|
||||
|
||||
foreach ($id in $ids) {
|
||||
$source = Join-Path $root $id
|
||||
$output = Join-Path $root ($id + '.yingce-plugin')
|
||||
$temporary = Join-Path $root ('.' + $id + '.yingce-plugin.tmp')
|
||||
if (-not (Test-Path -LiteralPath (Join-Path $source 'manifest.json'))) {
|
||||
throw "Missing manifest.json for $id"
|
||||
}
|
||||
if (Test-Path -LiteralPath $temporary) { Remove-Item -LiteralPath $temporary -Force }
|
||||
|
||||
$archive = [System.IO.Compression.ZipFile]::Open($temporary, [System.IO.Compression.ZipArchiveMode]::Create)
|
||||
try {
|
||||
Get-ChildItem -LiteralPath $source -Recurse -File | Where-Object {
|
||||
$_.Name -in @('manifest.json', 'README.md', 'LICENSE') -or
|
||||
$_.FullName -match '\\(docs|assets|web|backend)\\'
|
||||
} | ForEach-Object {
|
||||
$entryName = $_.FullName.Substring($source.Length + 1).Replace('\', '/')
|
||||
[System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile(
|
||||
$archive, $_.FullName, $entryName, [System.IO.Compression.CompressionLevel]::Optimal
|
||||
) | Out-Null
|
||||
}
|
||||
} finally {
|
||||
$archive.Dispose()
|
||||
}
|
||||
Move-Item -LiteralPath $temporary -Destination $output -Force
|
||||
Write-Output "$id -> $output"
|
||||
}
|
||||
Reference in New Issue
Block a user