diff --git a/.gitignore b/.gitignore index 71db848..f29a173 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.log +*.nupkg .chocolatey/ _build/ temp/ diff --git a/CLAUDE.md b/CLAUDE.md index 178a123..84892fd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,13 +4,14 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Repository Overview -This is a Chocolatey package that provides a Windows CLI wrapper for the Wheels MVC framework CommandBox tools. The package creates a `wheels` command that simplifies CommandBox usage by eliminating the need to prefix commands with `box wheels`. +This is a Chocolatey package that provides a Windows CLI wrapper for the Wheels MVC framework, powered by LuCLI. The package creates a `wheels` command that delegates to `lucli wheels`. ## Package Structure -- **wheels.nuspec**: Package specification with metadata, dependencies (CommandBox), and version info -- **tools/chocolateyinstall.ps1**: Installation script that creates wrapper scripts dynamically -- **tools/wheels.cmd**: Windows batch wrapper that handles argument conversion and CommandBox integration +- **wheels.nuspec**: Package specification with metadata, dependencies (LuCLI), and version info +- **tools/chocolateyinstall.ps1**: Installation script — installs Wheels LuCLI module, creates wrapper scripts +- **tools/chocolateyuninstall.ps1**: Uninstall script — removes module and wrapper scripts +- **tools/wheels.cmd**: Windows batch wrapper that passes arguments to `lucli wheels` - **build.ps1**: Build script for packaging with version management - **test-local.ps1**: Local testing script for package installation - **test-wrapper.ps1**: Logic verification script for wrapper functionality @@ -23,10 +24,10 @@ This is a Chocolatey package that provides a Windows CLI wrapper for the Wheels choco pack # Build with specific version -.\build.ps1 -Version "1.0.6" +.\build.ps1 -Version "2.0.0" # Build and push to Chocolatey (requires API key) -.\build.ps1 -Version "1.0.6" -Push -ApiKey YOUR_API_KEY +.\build.ps1 -Version "2.0.0" -Push -ApiKey YOUR_API_KEY ``` ### Local Testing @@ -44,26 +45,23 @@ choco pack ## Architecture Details ### Wrapper Logic (tools/wheels.cmd) -- Checks for CommandBox availability at runtime -- Auto-installs Wheels CLI tools if not present (`box install wheels-cli`) -- Converts standard CLI arguments to CommandBox parameter format: - - `--parameter=value` → `parameter=value` - - `--flag` → `flag=true` - - `--noFlag` → `flag=false` -- Handles special cases for `--help`, `--version` +- Checks for LuCLI availability at runtime +- Passes all arguments directly to `lucli wheels` (no conversion needed) +- LuCLI handles standard CLI conventions natively ### Installation Process -1. Creates `wheels.bat` and `wheels.ps1` wrapper scripts in tools directory -2. Chocolatey automatically adds tools directory to PATH -3. Wrapper scripts check CommandBox dependency and install Wheels CLI on first use +1. Verifies LuCLI dependency is available +2. Installs Wheels module via `lucli modules install wheels` +3. Creates `wheels.bat` and `wheels.ps1` wrapper scripts in tools directory +4. Chocolatey automatically adds tools directory to PATH ### Version Management The build script automatically updates the version in `wheels.nuspec` when using the `-Version` parameter. ## Dependencies -- **CommandBox**: Required dependency (version 5.0.0+) specified in nuspec -- **Wheels CLI**: Auto-installed by wrapper on first use via `box install wheels-cli` +- **LuCLI**: Required dependency specified in nuspec +- **Wheels module**: Installed from wheels-dev/wheels monorepo archive during package install ## Testing Approach @@ -71,20 +69,9 @@ The build script automatically updates the version in `wheels.nuspec` when using - `test-wrapper.ps1`: Logic verification without system changes - Manual testing: Install package and verify `wheels` command works -## Recent Fixes (v1.0.6) - -**Chocolatey Automated Validation Issues Resolved:** -- ✅ **Choco commands in scripts**: Confirmed package scripts (chocolateyinstall.ps1, chocolateyuninstall.ps1) contain no choco commands (requirement satisfied) -- ✅ **IconUrl**: Added iconUrl element pointing to Wheels project logo -- ✅ **ProjectSourceUrl**: Already correctly points to software source code (wheels-dev/wheels) - -**Package Quality Notes:** -- Package maintainer (wheels-dev) matches software author (Wheels Team) - standard for official packages -- ProjectUrl points to this package repository, ProjectSourceUrl points to main software repository (correct) - ## Permissions Configuration The repository includes Claude Code permissions in `.claude/settings.local.json` allowing: - Directory operations -- Git operations (add/commit) -- Chocolatey pack operations \ No newline at end of file +- Git operations (add/commit) +- Chocolatey pack operations diff --git a/build.ps1 b/build.ps1 index 1777987..35d52c7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ # Build script for Wheels Chocolatey package param( - [string]$Version = "1.0.6", + [string]$Version = "2.0.0", [switch]$Push, [string]$ApiKey = $env:CHOCOLATEY_API_KEY, [string]$Source = "https://push.chocolatey.org/" @@ -24,25 +24,23 @@ Remove-Item *.nupkg -ErrorAction SilentlyContinue # Pack the package Write-Host "Packing the Chocolatey package..." -ForegroundColor Cyan -# Build package using chocolatey pack command -Write-Host "Package build would run here" -ForegroundColor Green +choco pack "$PSScriptRoot\wheels.nuspec" # Find the generated package $packageFile = Get-ChildItem -Filter "*.nupkg" | Select-Object -First 1 if ($packageFile) { Write-Host "Package created: $($packageFile.Name)" -ForegroundColor Green - + if ($Push) { if (-not $ApiKey) { Write-Error "API key is required to push the package. Set CHOCOLATEY_API_KEY environment variable or use -ApiKey parameter." exit 1 } - + Write-Host "Pushing package to Chocolatey..." -ForegroundColor Cyan - # Push package using chocolatey push command - Write-Host "Package push would run here" -ForegroundColor Green - + choco push $packageFile.FullName --source $Source --api-key $ApiKey + if ($LASTEXITCODE -eq 0) { Write-Host "Package pushed successfully!" -ForegroundColor Green } else { @@ -52,7 +50,7 @@ if ($packageFile) { } else { Write-Host "" Write-Host "To test the package locally, run:" -ForegroundColor Yellow - Write-Host " Install-Package wheels -Provider Chocolatey -Source ." -ForegroundColor Cyan + Write-Host " .\test-local.ps1" -ForegroundColor Cyan Write-Host "" Write-Host "To push the package to Chocolatey, run:" -ForegroundColor Yellow Write-Host " .\build.ps1 -Push -ApiKey YOUR_API_KEY" -ForegroundColor Cyan @@ -60,4 +58,4 @@ if ($packageFile) { } else { Write-Error "Failed to create package" exit 1 -} \ No newline at end of file +} diff --git a/test-local.ps1 b/test-local.ps1 index d942433..2417e0a 100644 --- a/test-local.ps1 +++ b/test-local.ps1 @@ -7,14 +7,20 @@ $ErrorActionPreference = 'Stop' if ($Uninstall) { Write-Host "Uninstalling wheels package..." -ForegroundColor Yellow - # Uninstall using chocolatey command - Write-Host "Would uninstall wheels package" + choco uninstall wheels -y 2>$null + Write-Host "Done." exit } -Write-Host "Testing local installation of Wheels package" -ForegroundColor Green +Write-Host "Testing local installation of Wheels package (LuCLI)" -ForegroundColor Green Write-Host "" +# Pre-check: LuCLI must be available +if (-not (Get-Command "lucli" -ErrorAction SilentlyContinue)) { + Write-Warning "LuCLI is not installed. Install it first: choco install lucli" + Write-Host "Continuing with package build only..." -ForegroundColor Yellow +} + # Build the package first Write-Host "Building the package..." -ForegroundColor Cyan & "$PSScriptRoot\build.ps1" @@ -28,36 +34,33 @@ Write-Host "" Write-Host "Installing the package locally..." -ForegroundColor Cyan # Uninstall if already installed -# Check if package is installed -$installed = $false # Placeholder for installation check -if ($installed) { - Write-Host "Removing existing installation..." -ForegroundColor Yellow - # Uninstall existing package - Write-Host "Would uninstall existing wheels package" -} +choco uninstall wheels -y 2>$null # Install from current directory -# Install package locally -Write-Host "Would install wheels package from local source" +$nupkg = Get-ChildItem -Filter "*.nupkg" | Select-Object -First 1 +if ($nupkg) { + choco install wheels --source "." -y +} else { + Write-Error "No .nupkg file found. Run build.ps1 first." + exit 1 +} if ($LASTEXITCODE -eq 0) { Write-Host "" Write-Host "Installation successful!" -ForegroundColor Green Write-Host "" - + # Test the installation Write-Host "Testing the wheels command..." -ForegroundColor Cyan - - # Check if wheels command exists + $wheelsPath = Get-Command wheels -ErrorAction SilentlyContinue if ($wheelsPath) { Write-Host "Wheels command found at: $($wheelsPath.Source)" -ForegroundColor Green - - # Try to run wheels version + Write-Host "" Write-Host "Running 'wheels --version':" -ForegroundColor Yellow wheels --version - + Write-Host "" Write-Host "Test completed successfully!" -ForegroundColor Green Write-Host "" @@ -69,11 +72,11 @@ if ($LASTEXITCODE -eq 0) { } else { Write-Warning "Wheels command not found in PATH. You may need to restart your terminal." } - + Write-Host "" Write-Host "To uninstall the test installation, run:" -ForegroundColor Yellow Write-Host " .\test-local.ps1 -Uninstall" -ForegroundColor Cyan } else { Write-Error "Installation failed" exit 1 -} \ No newline at end of file +} diff --git a/test-wrapper.ps1 b/test-wrapper.ps1 index 5851b63..0b0c75c 100644 --- a/test-wrapper.ps1 +++ b/test-wrapper.ps1 @@ -1,29 +1,25 @@ # Test script to verify the wheels wrapper logic without actually installing -Write-Host "Testing Wheels CLI Wrapper Logic" -ForegroundColor Green -Write-Host "=================================" -ForegroundColor Green +Write-Host "Testing Wheels CLI Wrapper Logic (LuCLI)" -ForegroundColor Green +Write-Host "==========================================" -ForegroundColor Green Write-Host "" -# Test 1: Check if script handles missing CommandBox -Write-Host "Test 1: Without CommandBox installed" -ForegroundColor Yellow -Write-Host "-------------------------------------" -ForegroundColor Yellow +# Test 1: Check LuCLI availability +Write-Host "Test 1: LuCLI availability" -ForegroundColor Yellow +Write-Host "--------------------------" -ForegroundColor Yellow -# Simulate the check for CommandBox -$commandboxInstalled = $false +$lucliInstalled = $false try { - $commandboxPath = Get-Command box -ErrorAction SilentlyContinue - if ($commandboxPath) { - $commandboxInstalled = $true + $lucliPath = Get-Command lucli -ErrorAction SilentlyContinue + if ($lucliPath) { + $lucliInstalled = $true } -} catch { - # CommandBox not found -} +} catch {} -if (-not $commandboxInstalled) { - Write-Host "[PASS] CommandBox not found (as expected)" -ForegroundColor Green - Write-Host " Script would check CommandBox dependency" -ForegroundColor Cyan +if ($lucliInstalled) { + Write-Host "[PASS] LuCLI found at: $($lucliPath.Source)" -ForegroundColor Green } else { - Write-Host "[FAIL] CommandBox found (unexpected for this test)" -ForegroundColor Red + Write-Host "[INFO] LuCLI not found (install via: choco install lucli)" -ForegroundColor Yellow } Write-Host "" @@ -34,19 +30,15 @@ Write-Host "------------------------------" -ForegroundColor Yellow $wrapperPath = Join-Path $PSScriptRoot "tools\wheels.cmd" if (Test-Path $wrapperPath) { Write-Host "[PASS] wheels.cmd exists" -ForegroundColor Green - - # Check key components of the script + $content = Get-Content $wrapperPath -Raw - + $checks = @( - @{Name="CommandBox check"; Pattern="where box"}, - @{Name="Wheels CLI auto-install"; Pattern="box install wheels-cli"}, - @{Name="Help handler"; Pattern=":show_help"}, - @{Name="Version handler"; Pattern=":show_version"}, - @{Name="Argument conversion"; Pattern="converted_args"}, - @{Name="Execute command"; Pattern="box wheels"} + @{Name="LuCLI check"; Pattern="where lucli"}, + @{Name="LuCLI wheels passthrough"; Pattern="lucli wheels %*"}, + @{Name="Error exit code"; Pattern="exit /b %ERRORLEVEL%"} ) - + foreach ($check in $checks) { if ($content -like "*$($check.Pattern)*") { Write-Host " [PASS] $($check.Name)" -ForegroundColor Green @@ -54,48 +46,60 @@ if (Test-Path $wrapperPath) { Write-Host " [FAIL] $($check.Name)" -ForegroundColor Red } } + + # Verify old CommandBox patterns are gone + $oldPatterns = @( + @{Name="No CommandBox reference"; Pattern="box wheels"; ShouldExist=$false}, + @{Name="No argument conversion"; Pattern="converted_args"; ShouldExist=$false}, + @{Name="No delayed expansion"; Pattern="enabledelayedexpansion"; ShouldExist=$false} + ) + + foreach ($check in $oldPatterns) { + $found = $content -like "*$($check.Pattern)*" + if ($found -eq $check.ShouldExist) { + Write-Host " [PASS] $($check.Name)" -ForegroundColor Green + } else { + Write-Host " [FAIL] $($check.Name)" -ForegroundColor Red + } + } } else { Write-Host "[FAIL] wheels.cmd not found" -ForegroundColor Red } Write-Host "" -# Test 3: Test argument conversion logic -Write-Host "Test 3: Argument conversion examples" -ForegroundColor Yellow -Write-Host "------------------------------------" -ForegroundColor Yellow +# Test 3: Verify simplification +Write-Host "Test 3: Wrapper simplification" -ForegroundColor Yellow +Write-Host "-------------------------------" -ForegroundColor Yellow -$testCases = @( - @{Input="--help"; Expected="Would show help"}, - @{Input="--version"; Expected="Would show version"}, - @{Input="generate model User"; Expected="generate model User"}, - @{Input="--template=default"; Expected="template=default"}, - @{Input="--force"; Expected="force=true"}, - @{Input="--noBackup"; Expected="backup=false"} -) - -Write-Host "Input arguments -> Expected conversion:" -ForegroundColor Cyan -foreach ($test in $testCases) { - Write-Host " '$($test.Input)' -> '$($test.Expected)'" -ForegroundColor Gray +if (Test-Path $wrapperPath) { + $lineCount = (Get-Content $wrapperPath).Count + Write-Host " wheels.cmd is $lineCount lines (was 142 with CommandBox)" -ForegroundColor Cyan + if ($lineCount -lt 20) { + Write-Host "[PASS] Wrapper is properly simplified" -ForegroundColor Green + } else { + Write-Host "[WARN] Wrapper may still have unnecessary complexity" -ForegroundColor Yellow + } } Write-Host "" -# Test 4: Installation script logic +# Test 4: Installation script features Write-Host "Test 4: Installation script features" -ForegroundColor Yellow Write-Host "------------------------------------" -ForegroundColor Yellow $installScript = Join-Path $PSScriptRoot "tools\chocolateyinstall.ps1" if (Test-Path $installScript) { $installContent = Get-Content $installScript -Raw - + $features = @( - @{Name="CommandBox detection"; Pattern="Get-Command box"}, - @{Name="CommandBox dependency check"; Pattern="CommandBox dependency"}, - @{Name="Environment refresh"; Pattern="Update-SessionEnvironment"}, - @{Name="Create wrapper script"; Pattern="wheels.cmd"}, - @{Name="Install bin shim"; Pattern="Install-BinFile"} + @{Name="LuCLI detection"; Pattern="Get-Command.*lucli"}, + @{Name="Module installation"; Pattern="lucli modules install wheels"}, + @{Name="Module URL"; Pattern="wheels-dev/wheels"}, + @{Name="Create bat wrapper"; Pattern="wheels.bat"}, + @{Name="Create ps1 wrapper"; Pattern="wheels.ps1"} ) - + foreach ($feature in $features) { - if ($installContent -like "*$($feature.Pattern)*") { + if ($installContent -match $feature.Pattern) { Write-Host "[PASS] $($feature.Name)" -ForegroundColor Green } else { Write-Host "[FAIL] $($feature.Name)" -ForegroundColor Red @@ -106,16 +110,41 @@ if (Test-Path $installScript) { } Write-Host "" +# Test 5: Uninstall script features +Write-Host "Test 5: Uninstall script features" -ForegroundColor Yellow +Write-Host "----------------------------------" -ForegroundColor Yellow + +$uninstallScript = Join-Path $PSScriptRoot "tools\chocolateyuninstall.ps1" +if (Test-Path $uninstallScript) { + $uninstallContent = Get-Content $uninstallScript -Raw + + $features = @( + @{Name="Remove bat wrapper"; Pattern="wheels.bat"}, + @{Name="Remove ps1 wrapper"; Pattern="wheels.ps1"}, + @{Name="Module uninstall"; Pattern="lucli modules uninstall wheels"} + ) + + foreach ($feature in $features) { + if ($uninstallContent -match $feature.Pattern) { + Write-Host "[PASS] $($feature.Name)" -ForegroundColor Green + } else { + Write-Host "[FAIL] $($feature.Name)" -ForegroundColor Red + } + } +} else { + Write-Host "[FAIL] chocolateyuninstall.ps1 not found" -ForegroundColor Red +} +Write-Host "" + # Summary Write-Host "Test Summary" -ForegroundColor Green Write-Host "============" -ForegroundColor Green -Write-Host "The wheels wrapper package structure is correct." -ForegroundColor Green +Write-Host "The wheels package has been updated to use LuCLI." -ForegroundColor Green Write-Host "" -Write-Host "Key features:" -ForegroundColor Yellow -Write-Host "- Automatically installs CommandBox if not present" -ForegroundColor Cyan -Write-Host "- Creates wheels.cmd wrapper for Windows" -ForegroundColor Cyan -Write-Host "- Converts CLI arguments to CommandBox format" -ForegroundColor Cyan -Write-Host "- Auto-installs Wheels CLI on first use" -ForegroundColor Cyan -Write-Host "- Provides --help and --version support" -ForegroundColor Cyan +Write-Host "Key changes from v1.x (CommandBox):" -ForegroundColor Yellow +Write-Host "- Dependency: commandbox -> lucli" -ForegroundColor Cyan +Write-Host "- Wrapper: 142-line batch with arg conversion -> simple passthrough" -ForegroundColor Cyan +Write-Host "- Module: auto-installed via 'lucli modules install wheels'" -ForegroundColor Cyan +Write-Host "- Native CLI conventions (--flag, --param=value) handled by LuCLI" -ForegroundColor Cyan Write-Host "" -Write-Host "Note: Full installation requires admin privileges for Chocolatey." -ForegroundColor Yellow \ No newline at end of file +Write-Host "Note: Full installation requires LuCLI to be available on Chocolatey." -ForegroundColor Yellow diff --git a/tools/chocolateyinstall.ps1 b/tools/chocolateyinstall.ps1 index cc4b44a..ac706c8 100644 --- a/tools/chocolateyinstall.ps1 +++ b/tools/chocolateyinstall.ps1 @@ -2,58 +2,47 @@ $ErrorActionPreference = 'Stop' $packageName = 'wheels' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" +$moduleUrl = 'https://github.com/wheels-dev/wheels/archive/refs/heads/develop.tar.gz' -# Create the wheels.bat wrapper script -$batchContent = @' -@echo off -REM Wheels CLI wrapper for CommandBox -REM Passes all arguments to 'box wheels' +# Verify LuCLI is available (installed as a dependency) +if (-not (Get-Command "lucli" -ErrorAction SilentlyContinue)) { + Write-Error "LuCLI is required but not found in PATH. The lucli dependency should have been installed automatically." + exit 1 +} -REM Check if CommandBox is available -where box >nul 2>nul -if %ERRORLEVEL% neq 0 ( - echo Error: CommandBox is required but not found in PATH - echo Please install CommandBox from https://www.ortussolutions.com/products/commandbox - exit /b 1 -) +# Install the Wheels module for LuCLI +Write-Host "Installing Wheels CLI module for LuCLI..." -ForegroundColor Cyan +lucli modules install wheels --url $moduleUrl +if ($LASTEXITCODE -ne 0) { + Write-Warning "Failed to install Wheels module via LuCLI. The 'wheels' command will attempt module installation on first use." +} -REM Pass all arguments to box wheels -box wheels %* +# Create wheels.bat wrapper for cmd.exe users +$batchContent = @' +@echo off +lucli wheels %* '@ - $batchFile = Join-Path $toolsDir "wheels.bat" $batchContent | Out-File -FilePath $batchFile -Encoding ASCII +Write-Host "Created wheels.bat wrapper at: $batchFile" -Write-Host "Created wheels.bat wrapper script at: $batchFile" - -# Create the wheels.ps1 PowerShell script as well for PowerShell users +# Create wheels.ps1 wrapper for PowerShell users $psContent = @' -# Wheels CLI wrapper for CommandBox -# Passes all arguments to 'box wheels' - -# Check if CommandBox is available -if (-not (Get-Command "box" -ErrorAction SilentlyContinue)) { - Write-Error "CommandBox is required but not found in PATH. Please install CommandBox from https://www.ortussolutions.com/products/commandbox" +if (-not (Get-Command "lucli" -ErrorAction SilentlyContinue)) { + Write-Error "LuCLI is required but not found in PATH. Install via: choco install lucli" exit 1 } - -# Pass all arguments to box wheels -& box wheels @args +& lucli wheels @args '@ - $psFile = Join-Path $toolsDir "wheels.ps1" $psContent | Out-File -FilePath $psFile -Encoding UTF8 +Write-Host "Created wheels.ps1 wrapper at: $psFile" -Write-Host "Created wheels.ps1 PowerShell script at: $psFile" - -# Install the batch file to make it available in PATH -# The tools directory is automatically added to PATH by Chocolatey - -Write-Host "Wheels CLI wrapper installed successfully!" -Write-Host "You can now use 'wheels' command from any command prompt or PowerShell session." +Write-Host "" +Write-Host "Wheels CLI installed successfully! (powered by LuCLI)" -ForegroundColor Green Write-Host "" Write-Host "Example usage:" Write-Host " wheels generate model User" Write-Host " wheels migrate up" Write-Host " wheels server start" -Write-Host " wheels --help" \ No newline at end of file +Write-Host " wheels --help" diff --git a/tools/chocolateyuninstall.ps1 b/tools/chocolateyuninstall.ps1 index faee348..7c49487 100644 --- a/tools/chocolateyuninstall.ps1 +++ b/tools/chocolateyuninstall.ps1 @@ -3,7 +3,7 @@ $ErrorActionPreference = 'Stop' $packageName = 'wheels' $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" -# Remove the wrapper scripts +# Remove wrapper scripts $batchFile = Join-Path $toolsDir "wheels.bat" $psFile = Join-Path $toolsDir "wheels.ps1" @@ -17,4 +17,15 @@ if (Test-Path $psFile) { Write-Host "Removed wheels.ps1" } -Write-Host "Wheels CLI wrapper has been uninstalled." \ No newline at end of file +# Uninstall the Wheels module from LuCLI +if (Get-Command "lucli" -ErrorAction SilentlyContinue) { + Write-Host "Removing Wheels CLI module from LuCLI..." -ForegroundColor Cyan + lucli modules uninstall wheels 2>$null + if ($LASTEXITCODE -eq 0) { + Write-Host "Wheels module removed from LuCLI" + } else { + Write-Warning "Could not remove Wheels module from LuCLI (may already be removed)" + } +} + +Write-Host "Wheels CLI wrapper has been uninstalled." diff --git a/tools/wheels.cmd b/tools/wheels.cmd index db999b4..e3e76df 100644 --- a/tools/wheels.cmd +++ b/tools/wheels.cmd @@ -1,142 +1,13 @@ @echo off -setlocal enabledelayedexpansion +:: Wheels CLI wrapper — passes all arguments to LuCLI +:: LuCLI handles CLI conventions natively (no argument conversion needed) -:: Wheels CLI wrapper for CommandBox on Windows -:: Passes all arguments to 'box wheels' - -:: Check if CommandBox is available -where box >nul 2>&1 +where lucli >nul 2>&1 if %ERRORLEVEL% NEQ 0 ( - echo Error: CommandBox is required but not found in PATH - echo Please install CommandBox manually if this dependency was not installed + echo Error: LuCLI is required but not found in PATH + echo Install via: choco install lucli exit /b 1 ) -:: Check if Wheels CLI tools are installed -box help wheels 2>&1 | findstr /C:"Command.*not found" >nul -if %ERRORLEVEL% EQU 0 ( - echo Installing Wheels CLI tools for CommandBox... - box install wheels-cli - if %ERRORLEVEL% NEQ 0 ( - echo Error: Failed to install Wheels CLI tools - echo Please try manually: box install wheels-cli - exit /b 1 - ) - echo Wheels CLI tools installed successfully -) - -:: Handle special cases for help and version -if "%~1"=="--help" goto :show_help -if "%~1"=="-h" goto :show_help -if "%~1"=="--version" goto :show_version -if "%~1"=="-v" goto :show_version -goto :run_command - -:show_help -box help wheels -exit /b 0 - -:show_version -echo wheels wrapper version 1.0.6 -echo Powered by: -box version -exit /b 0 - -:run_command -:: Convert command line arguments from standard --parameter=value format -:: to CommandBox parameter=value format -set "converted_args=" -set "first=1" - -:parse_loop -if "%~1"=="" goto :execute - -set "arg=%~1" -set "converted_arg=" - -:: Check for --parameter=value format -echo !arg! | findstr /r "^--[^=]*=.*" >nul -if %ERRORLEVEL% EQU 0 ( - :: Remove the -- prefix - set "converted_arg=!arg:~2!" - goto :add_arg -) - -:: Check for --noFlag format (convert to flag=false) -echo !arg! | findstr /r "^--no[A-Z].*" >nul -if %ERRORLEVEL% EQU 0 ( - :: Extract flag name and convert to lowercase first letter - set "flag=!arg:~4!" - :: Convert first letter to lowercase manually - set "firstChar=!flag:~0,1!" - set "restChars=!flag:~1!" - - :: Lowercase conversion for common letters - if "!firstChar!"=="A" set "firstChar=a" - if "!firstChar!"=="B" set "firstChar=b" - if "!firstChar!"=="C" set "firstChar=c" - if "!firstChar!"=="D" set "firstChar=d" - if "!firstChar!"=="E" set "firstChar=e" - if "!firstChar!"=="F" set "firstChar=f" - if "!firstChar!"=="G" set "firstChar=g" - if "!firstChar!"=="H" set "firstChar=h" - if "!firstChar!"=="I" set "firstChar=i" - if "!firstChar!"=="J" set "firstChar=j" - if "!firstChar!"=="K" set "firstChar=k" - if "!firstChar!"=="L" set "firstChar=l" - if "!firstChar!"=="M" set "firstChar=m" - if "!firstChar!"=="N" set "firstChar=n" - if "!firstChar!"=="O" set "firstChar=o" - if "!firstChar!"=="P" set "firstChar=p" - if "!firstChar!"=="Q" set "firstChar=q" - if "!firstChar!"=="R" set "firstChar=r" - if "!firstChar!"=="S" set "firstChar=s" - if "!firstChar!"=="T" set "firstChar=t" - if "!firstChar!"=="U" set "firstChar=u" - if "!firstChar!"=="V" set "firstChar=v" - if "!firstChar!"=="W" set "firstChar=w" - if "!firstChar!"=="X" set "firstChar=x" - if "!firstChar!"=="Y" set "firstChar=y" - if "!firstChar!"=="Z" set "firstChar=z" - - set "converted_arg=!firstChar!!restChars!=false" - goto :add_arg -) - -:: Check for --flag format (convert to flag=true) -echo !arg! | findstr /r "^--[a-zA-Z].*" >nul -if %ERRORLEVEL% EQU 0 ( - set "converted_arg=!arg:~2!=true" - goto :add_arg -) - -:: Pass through other arguments unchanged -set "converted_arg=!arg!" - -:add_arg -if "!first!"=="1" ( - set "converted_args=!converted_arg!" - set "first=0" -) else ( - set "converted_args=!converted_args! !converted_arg!" -) - -shift -goto :parse_loop - -:execute -:: Check if first argument is "server" and handle it specially -set "firstArg=" -for /f "tokens=1" %%a in ("!converted_args!") do set "firstArg=%%a" - -if /i "!firstArg!"=="server" ( - :: Remove "server" from the converted_args and pass directly to box server - set "serverArgs=!converted_args:server=!" - :: Trim leading space if any - for /f "tokens=* delims= " %%a in ("!serverArgs!") do set "serverArgs=%%a" - box server !serverArgs! -) else ( - :: Pass all arguments to box wheels as before - box wheels !converted_args! -) -exit /b %ERRORLEVEL% \ No newline at end of file +lucli wheels %* +exit /b %ERRORLEVEL% diff --git a/wheels.1.0.6.nupkg b/wheels.1.0.6.nupkg deleted file mode 100644 index 2985909..0000000 Binary files a/wheels.1.0.6.nupkg and /dev/null differ diff --git a/wheels.nuspec b/wheels.nuspec index c6142cf..4700706 100644 --- a/wheels.nuspec +++ b/wheels.nuspec @@ -2,47 +2,49 @@ wheels - 1.0.6 + 2.0.0 https://github.com/wheels-dev/chocolatey-wheels wheels-dev Wheels CLI Wheels Team https://github.com/wheels-dev/chocolatey-wheels - Copyright 2025 Wheels Team + Copyright 2026 Wheels Team false https://github.com/wheels-dev/chocolatey-wheels/blob/master/LICENSE https://github.com/wheels-dev/wheels https://github.com/wheels-dev/chocolatey-wheels/logo_mark.png https://wheels.dev/guides https://github.com/wheels-dev/chocolatey-wheels/issues - wheels mvc framework cli commandbox coldfusion lucee - CLI wrapper for Wheels MVC framework - A convenient wrapper for the Wheels CommandBox CLI + wheels mvc framework cli lucli coldfusion lucee + CLI wrapper for Wheels MVC framework powered by LuCLI - Fixed automated validation issues: added icon URL, confirmed package scripts contain no choco commands + Major: switched backend from CommandBox to LuCLI. Simplified wrapper scripts. Added MCP support. - + - \ No newline at end of file +