nushell-plugins/scripts/create_distribution_manifest.nu
Jesús Pérez d9ef2f0d5b
Some checks failed
Build and Test / Validate Setup (push) Has been cancelled
Build and Test / Build (darwin-amd64) (push) Has been cancelled
Build and Test / Build (darwin-arm64) (push) Has been cancelled
Build and Test / Build (linux-amd64) (push) Has been cancelled
Build and Test / Build (windows-amd64) (push) Has been cancelled
Build and Test / Build (linux-arm64) (push) Has been cancelled
Build and Test / Security Audit (push) Has been cancelled
Build and Test / Package Results (push) Has been cancelled
Build and Test / Quality Gate (push) Has been cancelled
Nightly Build / Check for Changes (push) Has been cancelled
Nightly Build / Validate Setup (push) Has been cancelled
Nightly Build / Nightly Build (darwin-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (darwin-arm64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (windows-amd64) (push) Has been cancelled
Nightly Build / Nightly Build (linux-arm64) (push) Has been cancelled
Nightly Build / Create Nightly Pre-release (push) Has been cancelled
Nightly Build / Notify Build Status (push) Has been cancelled
Nightly Build / Nightly Maintenance (push) Has been cancelled
chore: update all plugins to Nushell 0.111.0
- Bump all 18 plugins from 0.110.0 to 0.111.0
  - Update rust-toolchain.toml channel to 1.93.1 (nu 0.111.0 requires ≥1.91.1)

  Fixes:
  - interprocess pin =2.2.x → ^2.3.1 in nu_plugin_mcp, nu_plugin_nats, nu_plugin_typedialog
    (required by nu-plugin-core 0.111.0)
  - nu_plugin_typedialog: BackendType::Web initializer — add open_browser: false field
  - nu_plugin_auth: implement missing user_info_to_value helper referenced in tests

  Scripts:
  - update_all_plugins.nu: fix [package].version update on minor bumps; add [dev-dependencies]
    pass; add nu-plugin-test-support to managed crates
  - download_nushell.nu: rustup override unset before rm -rf on nushell dir replace;
    fix unclosed ) in string interpolation
2026-03-11 03:22:42 +00:00

146 lines
4.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env nu
# Create Distribution Manifest - Scan & List Available Plugins
#
# Scans the distribution directory for available plugin binaries
# and creates a manifest file for the installer to use.
#
# Usage:
# create_distribution_manifest.nu # Scan current directory
# create_distribution_manifest.nu ./dist # Scan specific directory
# create_distribution_manifest.nu --output manifest.json
def main [
source_dir: string = "." # Directory to scan for plugins
--output: string = "DISTRIBUTION_MANIFEST.json" # Output manifest file
] {
log_info "📋 Distribution Manifest Generator"
log_info "=================================================================="
log_info $"\n🔍 Step 1: Scanning directory: ($source_dir)"
# Find all plugin binaries
let plugins = scan_for_plugins $source_dir
if ($plugins | length) == 0 {
log_error "No plugin binaries found!"
log_error $"Expected: ($source_dir)/nu_plugin_*"
return
}
log_success $"Found ($plugins | length) plugin\(s\)"
print ""
# Display found plugins
for plugin in $plugins {
log_info $" ✓ ($plugin.name)"
}
# Create manifest
log_info $"\n📝 Step 2: Creating manifest..."
let manifest = {
version: "1.0.0"
created: (date now | format date "%Y-%m-%dT%H:%M:%SZ")
source_directory: $source_dir
total_plugins: ($plugins | length)
plugins: $plugins
}
# Save manifest
log_info $"\n💾 Step 3: Saving to ($output)..."
try {
$manifest | to json | save -f $output
log_success $"Manifest saved: ($output)"
} catch {|err|
log_error $"Failed to save manifest: ($err.msg)"
return
}
# Summary
log_info "\n=================================================================="
log_success "✅ Manifest created!"
log_info ""
log_info "Next steps:"
log_info $" 1. Include ($output) in distribution"
log_info " 2. Run installer with: install_from_manifest.nu --manifest $output"
}
# Scan directory for plugins
def scan_for_plugins [source_dir: string]: nothing -> list<record> {
mut found = []
try {
let all_files = ls $source_dir
let plugin_files = $all_files
| where type == "file"
| where {|row|
let basename = $row.name | path basename
$basename =~ "^nu_plugin_"
}
let plugins = $plugin_files | each {|row|
let basename = $row.name | path basename
let purpose = get_plugin_purpose $basename
let file_size = $row.size
{
name: $basename
purpose: $purpose
path: $row.name
size_bytes: $file_size
}
}
$found = $plugins
} catch {|err|
log_error $"Error scanning directory: ($err.msg)"
}
$found
}
# Get plugin purpose/description
def get_plugin_purpose [name: string]: nothing -> string {
let purposes = {
"nu_plugin_auth": "Authentication (JWT, MFA)"
"nu_plugin_kms": "Encryption & KMS"
"nu_plugin_orchestrator": "Orchestration operations"
"nu_plugin_kcl": "KCL configuration"
"nu_plugin_tera": "Template rendering"
"nu_plugin_highlight": "Syntax highlighting"
"nu_plugin_clipboard": "Clipboard operations"
"nu_plugin_image": "Image processing"
"nu_plugin_hashes": "Hash functions"
"nu_plugin_qr_maker": "QR code generation"
"nu_plugin_fluent": "Localization"
"nu_plugin_desktop_notifications": "Desktop notifications"
"nu_plugin_port_extension": "Port extensions"
"nu_plugin_polars": "Data analysis"
"nu_plugin_formats": "Format conversion"
"nu_plugin_inc": "Increment operations"
"nu_plugin_gstat": "Git status"
"nu_plugin_query": "Advanced querying"
"nu_plugin_custom_values": "Custom values"
"nu_plugin_example": "Example template"
"nu_plugin_stress_internals": "Stress testing"
}
$purposes | get --optional $name | default "Nushell plugin"
}
# Logging
def log_info [msg: string] {
print $" ($msg)"
}
def log_success [msg: string] {
print $"✅ ($msg)"
}
def log_error [msg: string] {
print $"❌ ($msg)"
}
main