1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 12:41:46 +00:00

1282 Commits

Author SHA1 Message Date
github-actions[bot]
287ac8b23d chore: update contributors [skip ci] 2026-02-02 09:47:25 +00:00
tw93
f91cf05bc8 feat: add default icons and colors fallback in logging module 2026-02-02 17:47:03 +08:00
Bhadra
3bd2869e8d feat: Add Windows package manager publishing infrastructure (#343) (#356)
* feat: Add Windows package manager publishing infrastructure (#343)

- Add comprehensive release build scripts:
  - build-release.ps1: Creates portable ZIP + SHA256 checksums
  - build-exe.ps1: Standalone executable builder (PS2EXE)
  - build-msi.ps1: MSI installer builder (WiX Toolset)

- Add GitHub Actions workflow:
  - Automated builds on version tags
  - Runs tests before building
  - Auto-creates GitHub releases with artifacts

- Add package manager manifests:
  - WinGet: Complete manifests ready for microsoft/winget-pkgs
  - Chocolatey: Full package with install/uninstall scripts
  - Scoop: JSON manifest ready for submission

- Add comprehensive documentation:
  - RELEASE.md: Complete guide for building and publishing
  - Package-specific READMEs with submission instructions
  - ISSUE-343-SUMMARY.md: Quick reference and next steps

Successfully tested: Built mole-1.0.0-x64.zip (5 MB) with SHA256 checksums

Addresses #343

* chore: update contributors [skip ci]

* fix: Support uppercase V and -windows suffix in release workflow

* fix: Remove duplicate parameter definitions in clean, optimize, and purge commands

- bin/clean.ps1: Remove duplicate System, GameMedia, DebugMode, Whitelist params
- bin/optimize.ps1: Remove duplicate DebugMode param
- bin/purge.ps1: Remove duplicate DebugMode and Paths params

These duplicates were causing parser errors in tests.

* fix: Update test regex to match --dry-run format in help text

The help output shows --dry-run (kebab-case) but test was checking for DryRun (PascalCase).
Updated regex to accept both formats.

* fix: Handle Pester 5.x result object properties correctly

Pester 5.x uses different property names (Passed.Count, Failed.Count)
instead of PassedCount, FailedCount. Added fallback logic to support both formats.

* fix: Simplify Pester result parsing with better fallback logic

Since Pester already prints test results, just check for failures
and assume success if we can't parse the result object. This handles
different Pester versions more gracefully.

* feat: Add MSI and EXE builds to release workflow

- Install WiX Toolset for MSI creation
- Install PS2EXE module for standalone EXE
- Build all three formats: ZIP, MSI, EXE
- MSI and EXE builds marked optional (continue-on-error)
- Upload all artifacts to GitHub release
- Update release notes with installation instructions for all formats
- Add SHA256 verification instructions for each format

* fix: Resolve MSI and EXE build failures

MSI build fix:
- Use UTF8 without BOM for temp WXS file to avoid XML parsing errors
- WiX compiler requires clean UTF8 encoding without byte order mark

EXE build fix:
- Remove hashtable iteration that modified collection during enumeration
- Exclude null iconFile parameter from ps2exe params instead of removing it
- Prevents 'Collection was modified' exception

* fix: Properly handle encoding and version format for MSI and EXE builds

MSI fix:
- Use System.IO.File.ReadAllText/WriteAllText for consistent UTF8 without BOM
- Prevents XML parsing errors in WiX compiler

EXE fix:
- Extract numeric version only (strip '-windows' suffix) for ps2exe
- ps2exe requires version in format n.n.n.n (numeric only)
- Fallback to 1.0.0.0 if version parsing fails

* fix: Use WriteAllBytes to ensure no BOM in MSI WXS file

- Convert string to UTF8 bytes manually
- Write bytes directly to file
- This guarantees no byte order mark is added
- Prevents WiX XML parsing error at position 7

* fix: Read WXS source as bytes to completely avoid BOM issues

- Read source file as raw bytes
- Convert bytes to string using UTF8Encoding without BOM
- Replace version in string
- Convert back to bytes and write
- This completely avoids PowerShell's Get-Content BOM handling

* chore: Simplify release workflow - remove MSI build, minimal release notes

- Remove MSI build steps (has persistent BOM/encoding issues)
- Remove WiX Toolset installation
- Simplify release notes to bare minimum
- Focus on ZIP and EXE artifacts only

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-24 00:08:24 +08:00
github-actions[bot]
ff8a0a4e9d chore: update contributors [skip ci] 2026-01-16 07:32:37 +00:00
Tw93
0e9e9008c3 Merge pull request #324 from bhadraagada/windows
hotfix for issue #316
2026-01-16 15:32:18 +08:00
github-actions[bot]
ccf987e9f5 chore: update contributors [skip ci] 2026-01-16 07:25:00 +00:00
Bhadra
5c493d3308 Merge branch 'windows' into windows 2026-01-16 12:54:40 +05:30
Bhadra
8a22b202b2 fix: include go.sum in installation to fix analyze/status build
Fixes #316 - The go.sum file was missing from the install file list,
causing 'missing go.sum entry' errors when trying to build the Go
tools (analyze, status) on systems without pre-built binaries.
2026-01-16 12:48:37 +05:30
Tw93
85d8e55359 docs: add experimental status warning to README 2026-01-16 15:16:19 +08:00
Bhadra
8e661a7b22 refactor: standardize CLI with 'mo' alias and lowercase flags
Addresses tw93's PR #305 feedback:
- Add 'mo' short alias (mo.cmd) alongside mole.cmd
- Use 'mo' in all help text and documentation
- Document lowercase flag style (--dry-run, --help, etc.)
- Simplify optimize: repairs run automatically, no extra flags
- Fix RepairsApplied counter bug in optimize.ps1
- Update README with standardized examples
2026-01-16 12:45:36 +05:30
Tw93
ceb1822320 Merge branch 'windows' of github.com:tw93/Mole into windows 2026-01-16 15:14:27 +08:00
Tw93
115aa7c93a Fix #316: Include go.sum in installation to resolve dependency errors 2026-01-16 15:13:04 +08:00
github-actions[bot]
cd798dba53 chore: update contributors [skip ci] 2026-01-16 07:10:36 +00:00
Tw93
e9cddbf4af Optimize CLI: consolidate repairs and standardize flags 2026-01-16 15:08:42 +08:00
Tw93
3240cc7a69 Merge pull request #305 from tw93/pr-305 2026-01-16 15:02:54 +08:00
github-actions[bot]
1d3a7e392a chore: update contributors [skip ci] 2026-01-14 07:31:37 +00:00
github-actions[bot]
381a5f064c chore: update contributors [skip ci] 2026-01-14 03:53:52 +00:00
Bhadra
56434486fa refactor: merge repair command into optimize
Per tw93's feedback on PR #305, consolidate repair utilities into
the optimize command to keep the CLI simple and unified.

Changes:
- Add repair flags to optimize: -Repair, -Font, -Icon, -Search, -Store
- Remove standalone repair.ps1 command
- Update mole.ps1 menu and help to reflect changes
- optimize now handles both optimization and repair tasks

Usage:
  mole optimize              # Standard optimizations
  mole optimize -Repair      # Optimizations + all repairs
  mole optimize -Icon -Font  # Optimizations + specific repairs
2026-01-14 09:23:25 +05:30
Tw93
e37a0ec090 feat: add one-liner install and fix installation docs
- Add quick-install.ps1 for one-command installation
- Fix installation docs to include 'git checkout windows' step
- Add .gitignore rules for main branch specific files
- Users can now install with: iwr -useb https://...quick-install.ps1 | iex

Addresses installation confusion from Issue #309
2026-01-14 10:42:10 +08:00
Bhadra
ba8ec9ef34 feat: add Windows screenshots and screen recordings cleanup
- Add Pictures\Screenshots path (Snipping Tool/Snip & Sketch)
- Add Videos\Screen Recordings path (Windows 11 screen recorder)
- Both use age-based cleanup (>90d by default)
2026-01-12 20:48:33 +05:30
Bhadra
3dccf3592f feat: add game media cleanup (replays, screenshots, recordings)
- Add Clear-GameMediaFiles function to clean old game media (>90d by default)
- Supports NVIDIA ShadowPlay/Highlights, AMD ReLive, Xbox Game Bar
- Supports Steam screenshots, OBS recordings, Medal.tv, Overwolf/Outplayed
- Includes game-specific replays (Fortnite, LoL, Valorant, Rocket League, etc.)
- New -GameMedia flag for mole clean command
- Uses age-based cleanup to protect recent recordings
2026-01-12 20:24:11 +05:30
github-actions[bot]
8b3def7ffe chore: update contributors [skip ci] 2026-01-12 14:29:15 +00:00
Bhadra
419f3afd71 Merge branch 'windows' into windows 2026-01-12 19:58:55 +05:30
Bhadra
f019ea3d94 chore: docs update 2026-01-12 12:19:29 +05:30
Bhadra
a2f0ae6078 fix: repair command icon and null input handling
- Replace non-existent Icons.Mole with Icons.Admin
- Add null check for empty menu input
2026-01-12 12:14:45 +05:30
github-actions[bot]
1e75d916df chore: update contributors [skip ci] 2026-01-12 06:32:27 +00:00
Bhadra
afe8d09c7c feat: add repair command with cache rebuilds and system fixes
Add new 'mole repair' command with the following utilities:
- DNS cache flush (Repair-DnsCache)
- Font cache rebuild (Repair-FontCache) - requires admin
- Icon cache rebuild (Repair-IconCache) - restarts Explorer
- Windows Search index reset (Repair-SearchIndex) - requires admin
- Windows Store cache reset (Repair-StoreCache) - runs wsreset.exe

Features:
- Interactive menu when run without arguments
- Command-line flags: -DNS, -Font, -Icon, -Search, -Store, -All
- Dry-run mode support
- Proper service stop/start for font and search repairs

Usage:
  mole repair           # Interactive menu
  mole repair -DNS      # Flush DNS only
  mole repair -All      # Run all repairs
2026-01-12 12:01:48 +05:30
Bhadra
661105670c feat: add GPU shader cache cleanup (NVIDIA, AMD, Intel, DirectX)
Add Clear-GPUShaderCaches function to clean GPU shader caches:
- NVIDIA: DXCache, GLCache, NV_Cache
- AMD: DXCache, GLCache, VkCache
- Intel: ShaderCache
- DirectX: D3DSCache, DirectX Shader Cache
- Vulkan: VulkanCache (pipeline cache)

These caches can grow to 10GB+ and are safe to delete.
They will be rebuilt automatically when needed.

Integrated into main clean.ps1 workflow.
2026-01-12 11:58:20 +05:30
github-actions[bot]
66cb7e7229 chore: update contributors [skip ci] 2026-01-12 06:04:32 +00:00
Tw93
9a354d3ebe Merge pull request #302 from bhadraagada/windows
feat: add cleanup support for Elixir, Haskell, OCaml, and Editors
2026-01-12 14:04:13 +08:00
Bhadra
b8d8771878 fix: update go.mod and go.sum with all dependencies
Run go mod tidy to add missing indirect dependencies required for CI build.
This fixes the 'missing go.sum entry' errors in the test workflow.
2026-01-12 11:03:37 +05:30
Bhadra
017a1311b8 fix: address Copilot review feedback for dev cleanup
- Use age-based cleanup (90 days) for Cabal packages instead of clearing all
- Skip Mix archives cleanup to preserve globally installed tools
- Use age-based cleanup for Hex packages instead of clearing all
- Use age-based cleanup for Stack programs (GHC installations)
- Remove workspaceStorage from VS Code cleanup to preserve workspace settings
- Add missing cache paths for VS Code Insiders (CachedExtensions, etc.)

These changes make cleanup less aggressive and prevent accidental removal
of user-installed tools and workspace preferences.
2026-01-12 10:59:29 +05:30
github-actions[bot]
7ea1ecdea2 chore: update contributors [skip ci] 2026-01-12 05:23:48 +00:00
Bhadra
81c3b97878 fix(ci): update workflows for Windows branch
- Rewrite check.yml for Windows (PowerShell syntax check, Go linting)
- Rewrite test.yml for Windows (Pester tests, Go tests, security checks)
- Rewrite release.yml for Windows releases (W* tags, zip package)
- Update update-contributors.yml to trigger on windows branch
2026-01-12 10:53:29 +05:30
Bhadra
e648ceceb0 feat: add cleanup support for Elixir, Haskell, OCaml, and Editors
Windows port of biplavbarua's extended dev cleanup feature:
- Elixir: Mix archives and Hex cache cleanup
- Haskell: Cabal packages/store and Stack programs cache
- OCaml: Opam download and repo cache
- Editors: VS Code, VS Code Insiders, Zed, Sublime Text, Atom caches

Mirrors the macOS implementation from PR #287
2026-01-10 12:30:15 +05:30
Tw93
edf5ed09a9 chore: restructure windows branch (move windows/ content to root, remove macos files) 2026-01-10 13:23:29 +08:00
Tw93
e84a457c2f Merge branch 'main' into dev 2026-01-10 13:05:53 +08:00
Tw93
ef713afda7 update test 2026-01-10 09:41:17 +08:00
Tw93
8a3443be4d update readme 2026-01-10 08:58:16 +08:00
Tw93
8118cab604 Merge branch 'main' of github.com:tw93/Mole 2026-01-10 08:52:12 +08:00
Tw93
7d43e669a8 fix(analyze): improve deletion safety and UI clarity
- Update UI status to 'Moving to Trash...' for clarity
- Use os.Lstat instead of os.Stat to correctly handle broken symlinks during deletion checks
2026-01-10 08:51:14 +08:00
Tw93
273a6b5cf0 fix(clean): enhance orphan detection accuracy and safety
- Expand app scan to include Homebrew Cask and Setapp locations
- Add lsappinfo fallback for more reliable running app detection
- Add sensitive data protection patterns (1Password, Keychain, etc.)
- Add mdfind fallback with file-based caching (Bash 3.2 compatible)
2026-01-10 08:51:14 +08:00
Tw93
9c39eef7fe chore: auto format code 2026-01-10 00:23:16 +00:00
Tw93
0a654f365b fix(clean): enhance orphan detection accuracy and safety
- Expand app scan to include Homebrew Cask and Setapp locations
- Add lsappinfo fallback for more reliable running app detection
- Add sensitive data protection patterns (1Password, Keychain, etc.)
- Add mdfind fallback with file-based caching (Bash 3.2 compatible)
2026-01-10 08:22:17 +08:00
github-actions[bot]
b952752a7d chore: update contributors [skip ci] 2026-01-09 23:25:33 +00:00
Tw93
ebb4f7a1e9 feat(analyze): safer deletion with Trash and two-key confirm
- Change delete confirmation from double-delete to Delete→Enter
- Move files to macOS Trash instead of permanent deletion
- Allow file recovery from Trash if accidentally deleted
- Update UI prompts to show 'Press Enter to confirm'
- Skip Finder-dependent tests in CI environments
- Update SECURITY_AUDIT.md with new safety mechanisms

Closes #288
2026-01-10 07:24:58 +08:00
Biplav Barua
3507870275 feat: add Angular, SvelteKit, Astro, and coverage to purge targets (#286) 2026-01-10 00:05:38 +08:00
Tw93
cbd777bf14 Update documents and instructions 2026-01-09 17:13:34 +08:00
Tw93
cce0afecc5 Merge branch 'dev' of github.com:tw93/Mole into dev 2026-01-09 15:10:36 +08:00
Tw93
124e498f15 refactor(windows): fix cmdlet shadowing and enforce dependency isolation 2026-01-09 15:10:26 +08:00