1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 17:24:45 +00:00
Commit Graph

1266 Commits

Author SHA1 Message Date
Bhadra
34affd75c4 fix(windows): fix install script directory copy to prevent nesting
- Remove existing directories before copying to prevent nested folder structures (e.g., bin/bin)
- This fixes 'Unknown command' errors after installation
2026-01-08 19:59:51 +05:30
Bhadra
7b03fceaf8 perf(windows): speed up analyze scanning with shallow depth
- Reduce timeout from 5s to 500ms per directory
- Limit scan depth to 3 levels for quick size estimation
- Reduce max files scanned from 50k to 10k
- Results now appear in 1-2 seconds instead of minutes
2026-01-08 19:40:38 +05:30
Bhadra
3653900e2d fix(windows): fix property access errors and scanning performance
- Fix analyze: Add timeout and depth limits to calculateDirSize() to prevent
  indefinite scanning on large directories like user profile
- Fix purge: Add null checks for .Count property access under StrictMode
- Fix uninstall: Wrap registry property access in try/catch for items without
  DisplayName, and add null checks throughout
- Fix mole.ps1: Add null check for Arguments.Count
- Add try/catch around CursorVisible calls for non-interactive terminals

All 73 Pester tests and all Go tests pass.
2026-01-08 19:33:26 +05:30
Bhadra
3ebaeefa18 fix(windows): fix CLI argument passing for switches like -DryRun
- Fix mole.cmd batch launcher to properly pass switch arguments
- Store %~dp0 before parse loop to avoid expansion issues
- Use PowerShell splatting in Invoke-MoleCommand for proper switch handling
- Rename $script:DryRun to $script:MoleDryRunMode in file_ops.ps1 to avoid
  variable shadowing when dot-sourcing
- Handle switches passed as strings (e.g., '-ShowHelp') in mole.ps1 Main()

Fixes issue where 'mole clean -DryRun' would run cleanup instead of preview.
2026-01-08 18:08:59 +05:30
Bhadra
230ca07c7f feat(windows): add Windows support Phase 4 - testing and CI
- Pester test suite for PowerShell scripts (Core, Clean, Commands)
- Go tests for TUI tools (analyze, status)
- GitHub Actions workflow for Windows CI
- Build and test automation scripts (test.ps1, build.ps1)
2026-01-08 16:41:03 +05:30
Bhadra
8a37f63bc7 feat(windows): add Windows support Phase 3 - TUI tools
Add Go-based TUI tools for Windows:
- cmd/analyze: Interactive disk space analyzer with Bubble Tea
- cmd/status: Real-time system health monitor using gopsutil/WMI
- bin/analyze.ps1: Wrapper script for analyze tool
- bin/status.ps1: Wrapper script for status tool
- Makefile: Build automation for Go tools
- Updated README.md with Phase 3 documentation
2026-01-08 16:18:26 +05:30
Bhadra
6e0d850d6a feat(windows): add Windows support Phase 2 - cleanup features
Add cleanup modules and command scripts for Windows:
- lib/clean: user, caches, dev, apps, system cleanup modules
- bin/clean: deep cleanup orchestrator with dry-run and whitelist
- bin/uninstall: interactive app uninstaller
- bin/optimize: system optimization and health checks
- bin/purge: project artifact cleanup

All scripts support dry-run mode and follow safe deletion practices.
2026-01-08 15:46:45 +05:30
github-actions[bot]
137d9eaec4 chore: update contributors [skip ci] 2026-01-08 09:23:04 +00:00
Bhadra
a53b48ef3b fix(windows): fix encoding issues in PowerShell scripts
- Simplified banner in install.ps1 and ui.ps1 to avoid Unicode box-drawing
  characters that caused parsing errors on some Windows systems
- Fixed PowerShell 5.1 compatibility for ANSI color codes using [char]27
- Renamed Show-Help to Show-InstallerHelp to avoid potential conflicts
- Changed -Help parameter to -ShowHelp for consistency with mole.ps1
2026-01-08 14:46:05 +05:30
Tw93
7a9a8c7124 Merge pull request #274 from alexandear-org/fix/golangci-lint-config
fix: golangci-lint config
2026-01-08 17:00:33 +08:00
Bhadra
a4b5fe77cf feat(windows): add Windows support Phase 1 - core infrastructure
Add isolated Windows support in windows/ directory with zero changes to existing macOS code.

Phase 1 includes:
- install.ps1: Windows installer with PATH and shortcut support
- mole.ps1: Main CLI entry point with menu system
- lib/core/base.ps1: Core definitions, colors, icons, constants
- lib/core/common.ps1: Common functions loader
- lib/core/file_ops.ps1: Safe file operations with protection checks
- lib/core/log.ps1: Logging functions with colors
- lib/core/ui.ps1: Interactive UI components (menus, confirmations)
- go.mod/go.sum: Go module for future TUI tools
- README.md: Windows-specific documentation

Closes #273
2026-01-08 14:24:11 +05:30
Tw93
6be1915db2 1.20.0 V1.20.0 2026-01-08 16:25:32 +08:00
Oleksandr Redko
f1de7ffd18 fix: golangci-lint config 2026-01-08 10:20:42 +02:00
Tw93
5eb2edf1cd fix: resolve spinner display and Ctrl+C handling issues
- fix(clean): stop spinner before safe_clean outputs results
- fix(uninstall): handle Ctrl+C during application scanning
2026-01-08 16:17:39 +08:00
Tw93
9e7f2a87cf Repair output 2026-01-08 16:12:39 +08:00
Tw93
180037c22b feat(status): persist cat visibility preference
- Add loadCatHidden/saveCatHidden functions
- Save preference to ~/.config/mole/status_prefs
- Load preference on startup
2026-01-08 15:58:50 +08:00
Tw93
b1bb91be1f Fix the wrong test 2026-01-08 15:36:09 +08:00
Tw93
79a19ffbfe Go code formatting optimization 2026-01-08 15:26:35 +08:00
Tw93
3e4674f1e6 Merge branch 'main' of github.com:tw93/Mole 2026-01-08 14:58:41 +08:00
Tw93
f301c671ae Improve the document 2026-01-08 14:58:36 +08:00
github-actions[bot]
697ad4b0e0 chore: update contributors [skip ci] 2026-01-08 06:54:58 +00:00
Tw93
b889737e70 Merge branch 'main' of github.com:tw93/Mole 2026-01-08 14:54:37 +08:00
Tw93
ceed508841 docs: simplify script installation instructions 2026-01-08 14:53:57 +08:00
github-actions[bot]
e8eb29f55f chore: update contributors [skip ci] 2026-01-08 06:52:52 +00:00
Tw93
952f9c44ac docs: add goimports installation to setup instructions 2026-01-08 14:52:30 +08:00
Tw93
d13ca66187 ci: install goimports for enhanced auto-formatting 2026-01-08 14:49:59 +08:00
Tw93
5de9724c38 Merge branch 'main' of github.com:tw93/Mole 2026-01-08 14:49:11 +08:00
Tw93
68c84e3bfc chore: optimize check.sh to use goimports for formatting if available 2026-01-08 14:34:26 +08:00
github-actions[bot]
29320ef19c chore: update contributors [skip ci] 2026-01-08 06:32:33 +00:00
Matt Kneale
0cc205209c feat: add golangci-lint for Go code quality
- Add .golangci.yml configuration enabling govet, staticcheck, errcheck, gosimple, ineffassign, unused, gofmt, and goimports linters
- Update scripts/check.sh to run golangci-lint with go vet fallback
- Update CI workflow to install golangci-lint in both format and quality jobs
- Add golangci-lint to CONTRIBUTING.md setup instructions

Closes #266
2026-01-08 14:30:54 +08:00
Tw93
9a3ecb7377 Merge branch 'dev' 2026-01-08 11:37:36 +08:00
Tw93
64a580b3a7 feat: cat hide toggle and critical fixes (#272)
- Add 'k' key to hide/show cat in mo status
- Hand-crafted mirror frames for better left-walking animation
- Fix extra blank lines bug (strings.Lines → strings.Split)
- Fix battery power overflow (ParseInt for negative values)
- Optimize README Tips section (8 → 5 items)
2026-01-08 11:27:47 +08:00
Tw93
7d6d5eb8b0 Fix the issue with the IDE GoLang cache #269 2026-01-08 10:20:04 +08:00
Tw93
1fccf6bcf8 Repair brew update prompts 2026-01-08 10:16:58 +08:00
Tw93
0d15177735 refactor: remove trimName and renderGPUCard functions 2026-01-06 21:07:51 +08:00
Tw93
c2c589ac81 Merge pull request #264 from alexandear-org/refactor/do-not-use-deprecated-funcs
refactor: replace deprecated `Start` with `Run`
2026-01-06 21:05:10 +08:00
Tw93
f69f53a607 refactor: complete Go modernization with strings.Lines() 2026-01-06 21:03:46 +08:00
Tw93
6ac19a9488 Merge pull request #265 from alexandear-org/refactor/modernize
refactor: modernize Go code
2026-01-06 20:49:27 +08:00
Oleksandr Redko
158af1e1ba refactor: modernize Go code 2026-01-06 12:04:27 +02:00
Oleksandr Redko
80757ec074 refactor: replace deprecated Start with Run 2026-01-06 11:46:59 +02:00
Tw93
9343e1a9f3 Merge branch 'main' of github.com:tw93/Mole 2026-01-06 09:51:51 +08:00
Tw93
d3f1cdd834 fix(security): allow Firefox ..files directories in path validation
Fixes #263

- Change regex from \.\. to (^|/)\.\.(/|$) to only match path components
- Firefox uses ..files suffix in IndexedDB dirs (e.g., name..files)
- Still blocks actual traversal: /tmp/../etc
- Added test cases for Firefox compatibility
- All 16 tests passing
2026-01-06 09:51:34 +08:00
Tw93
6bbe4ea67a Merge pull request #262 from tw93/dependabot/github_actions/stefanzweifel/git-auto-commit-action-7 2026-01-06 08:33:44 +08:00
dependabot[bot]
62dc849751 chore(deps): bump stefanzweifel/git-auto-commit-action from 5 to 7
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 5 to 7.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v5...v7)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 19:05:06 +00:00
Tw93
3ef44efcf9 feat: Add debug logging for installer collection and improve Homebrew installer display names by stripping hash prefixes. 2026-01-05 18:55:04 +08:00
Tw93
3da97c57c6 test: mock clean_ds_store_tree and UI functions in clean_misc.bats 2026-01-05 17:43:25 +08:00
Tw93
d968cc0ab7 docs: update security audit report to v1.19.0 and add installer cleanup feature 2026-01-05 15:30:23 +08:00
Tw93
d3bbb72a41 docs: refine README wording for improved clarity and conciseness, and add a contributors section. 2026-01-05 15:17:41 +08:00
Tw93
f2f7e802b6 Merge pull request #257 from JackPhallen/fix/use-single-quotes-in-trap
fix: Use single quotes in trap
2026-01-05 14:55:11 +08:00
github-actions[bot]
7dcb13dbaf chore: update contributors [skip ci] 2026-01-05 06:54:45 +00:00