1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 19:40:07 +00:00
Commit Graph

1725 Commits

Author SHA1 Message Date
github-actions[bot]
b9c067fec9 chore: update contributors [skip ci] 2026-02-24 06:18:09 +00:00
Sky Slinger
98089eeba8 Fix(raycast) : Made mole script commands discoverable (#489) 2026-02-24 14:17:51 +08:00
github-actions[bot]
4f4a1942ad chore: update contributors [skip ci] 2026-02-24 06:17:41 +00:00
Angelk90
ae5e81722b Fix (#486) 2026-02-24 14:17:20 +08:00
tw93
b864b61891 test(update): cover nightly update flows 2026-02-23 13:39:31 +08:00
tw93
3e3594dc58 fix(clean): avoid false success for third-party log cleanup 2026-02-23 13:39:27 +08:00
tw93
ff00e9ba9c refactor(clean): extract shared purge hint helpers 2026-02-23 13:39:22 +08:00
tw93
4c9a71315f refactor(ui): unify action and list hints across commands 2026-02-23 11:34:22 +08:00
tw93
3112673ed3 feat(clean): add storage clues after large files 2026-02-23 11:34:04 +08:00
tw93
1169cbf198 fix(purge): avoid command find in fallback scan (#478) 2026-02-23 08:15:47 +08:00
tw93
8f5b70457e fix(purge): normalize search roots for scan filtering (#478) 2026-02-22 22:06:19 +08:00
tw93
082cc1d09b feat(update): add --nightly channel for script installs
Refs #482
2026-02-22 21:25:42 +08:00
tw93
7561eec84f docs: simplify README tips 2026-02-22 21:03:17 +08:00
tw93
979180d479 docs: add Kaku link in README tips 2026-02-22 20:59:26 +08:00
github-actions[bot]
ccbf7550c7 chore: update contributors [skip ci] 2026-02-22 12:57:05 +00:00
tw93
1c2796377d docs: refine README copy 2026-02-22 20:46:34 +08:00
tw93
fd5ceea743 feat(clean): expand conservative cache cleanup coverage
- add conservative support/app/system cache targets\n- fix dry-run + success logging behavior for memory exception cleanup\n- add regression tests for new cleanup paths and safeguards\n\nRefs #477
2026-02-22 11:06:48 +08:00
tw93
894c81bb9a fix(purge): detect artifacts when search path is project root 2026-02-22 10:08:20 +08:00
tw93
ec3affe882 chore(clean): reduce noisy clean output messages
- remove redundant project cache scanning line

- align xcode runtime empty result message to already clean
V1.27.0
2026-02-21 23:48:07 +08:00
tw93
37f4a82efa Merge branch 'main' of https://github.com/tw93/Mole 2026-02-21 23:41:48 +08:00
tw93
831aebfc3e docs(security): refresh audit for v1.27.0 cleanup hardening
- document safe deletion flow changes in system/user cleanup

- update timeout reference and latest local security test results
2026-02-21 23:38:41 +08:00
tw93
82366d8c5a test(perf): reduce get_file_size loop count in benchmark
- lower iterations from 100 to 50 to reduce flaky timing noise
2026-02-21 23:36:15 +08:00
tw93
16a8bcafde chore(dev-clean): streamline runtime volume reporting
- reduce noisy scan output outside debug mode

- consolidate final result messaging

- run xcode/code editor stages explicitly in developer flow

- update dev cache tests for new stage calls
2026-02-21 23:36:05 +08:00
tw93
c95a4ec5a8 fix(system): enforce safe sudo cleanup paths
- replace direct delete patterns with safe_sudo_find_delete/safe_sudo_remove

- keep log/temp/diagnostic cleanup behavior with guarded scans

- align system maintenance tests with safe deletion flow
2026-02-21 23:35:58 +08:00
tw93
dc8d1bd948 refactor(clean): merge app cache/user essentials flow
- reorganize perform_cleanup sections and naming

- merge macOS + sandbox caches into clean_app_caches

- move recent items and mail downloads into user essentials

- update core/user tests for renamed internal helpers
2026-02-21 23:35:53 +08:00
github-actions[bot]
6f54103b88 chore: update contributors [skip ci] 2026-02-21 12:23:07 +00:00
tw93
30fe312c22 Merge branch 'main' of https://github.com/tw93/Mole 2026-02-21 20:22:46 +08:00
tw93
e581da1d65 chore(release): bump version to 1.27.0 2026-02-21 20:22:16 +08:00
tw93
ef0e34a214 refactor(clean): optimize Group Containers directory check
- Replace ls with find -maxdepth 1 to reduce IO and permission noise
- Keep same behavior: silently skip if directory is empty or inaccessible

Addresses: user.sh (line 484)
2026-02-21 20:22:06 +08:00
tw93
9440d9e52a fix(dev): normalize npm cache paths and add maven function guard
- Normalize npm cache paths with pwd -P to handle symlinks and
  trailing slashes, preventing duplicate scans of same directory
- Add declare -f check before calling clean_maven_repository for
  robustness when dynamic source fails
- Add test for trailing slash handling

Addresses: dev.sh (line 27, 48, 602)
2026-02-21 20:22:01 +08:00
tw93
0597021fd4 fix(purge): save and restore caller traps to prevent state leak
- Save caller's INT/TERM traps before installing local cleanup trap
- Restore original traps after clean_project_artifacts completes
- Add test to verify trap restoration behavior

Fixes P3 issue: project.sh (line 825, 870)
2026-02-21 20:21:54 +08:00
tw93
7648bd9d12 fix(status): prevent duplicate mole rendering in error state
- renderHeader now returns empty string as second return value when
  error message is present, avoiding duplicate mole in main.go View
- Add unit tests to prevent regression

Fixes P2 issue: view.go (line 184) + main.go (line 160)
2026-02-21 20:21:45 +08:00
Bachrul uluum
0b5066831d Update README with 'fd' installation instructions (#476)
Added recommendation for installing 'fd' on macOS and included cautionary note about artifact deletion.
2026-02-21 18:18:45 +08:00
tw93
68b0b601a4 feat(clean): add Group Containers logs/caches cleanup
Add clean_group_container_caches() to safely clean Group Containers:
- Skip Apple-owned containers (com.apple.*, group.com.apple.*, systemgroup.com.apple.*)
- For protected apps: only clean Logs directories
- For non-protected apps: clean Logs, tmp, and Caches
- Add symlink checks to prevent path traversal
- Respect whitelist and should_protect_path checks
- Integrate with clean_sandboxed_app_caches flow

Also add symlink checks in process_container_cache() for consistency.

Includes 4 BATS tests covering protected apps, whitelist,
system containers, and empty results handling.
2026-02-20 10:44:09 +08:00
tw93
7c974bf351 fix(purge): prevent hangs during size calculation 2026-02-19 22:52:27 +08:00
tw93
9de661b5df fix(status): prefer internal disks over external in disk listing
When multiple disks are connected, the status command was sorting
only by size, causing external disks to appear first when they are
larger than the internal disk. This resulted in showing incorrect
free space (external disk size) instead of the internal disk.

The sort now prioritizes internal disks before sorting by size,
ensuring the internal disk always appears first.

Fixes #466
2026-02-16 19:08:25 +08:00
tw93
8e8059b0aa fix(status): resolve layout issue when stretching terminal window (#467)
When the terminal is stretched wide, the header info line may wrap to
multiple lines but the mole position was calculated independently based
on terminal width, causing vertical misalignment.

Separate header and mole rendering so mole always appears on dedicated
lines below the header regardless of terminal width.
2026-02-16 19:07:42 +08:00
tw93
abd9791cd7 feat(clean): add Maven local repository cleanup support 2026-02-16 18:54:19 +08:00
tw93
573f55e79e feat(clean): add Google Chrome/Updater cache cleanup support
Add cleanup for:
- Chrome component_crx_cache
- GoogleUpdater crx_cache
- GoogleUpdater *.old files

Closes #460
2026-02-16 16:09:24 +08:00
tw93
f21794d3d9 fix(clean): fix find -maxdepth position for BSD/macOS compatibility
On macOS (BSD find), -maxdepth must be placed before -name to work
correctly. When placed after, it was ignored causing find to scan
the entire home directory indefinitely on large directories.

Fixes #463
2026-02-16 16:05:22 +08:00
tw93
a29cadbfd0 fix(purge): resolve trap conflict between purge.sh and project.sh
- Add guard flag in cleanup_monitor to prevent duplicate execution
- Check for existing trap in project.sh before setting new one
- Prevents crash when user presses Ctrl-C or scan process fails
2026-02-16 15:54:16 +08:00
tw93
1a63b992c6 refactor(clean): simplify npm residual directories cleanup
Use loops instead of duplicated safe_clean calls for npm cache
directories (_cacache, _npx, _logs, _prebuilds). Add comments
explaining these are not removed by npm cache clean --force.
2026-02-16 15:53:32 +08:00
tw93
a61a427f88 feat(clean): add Expo cache cleanup support
Clean Expo/React Native caches in ~/.expo while preserving state.json
which contains authentication tokens.

Caches cleaned:
- expo-go/
- android-apk-cache/
- ios-simulator-app-cache/
- native-modules-cache/
- schema-cache/
- template-cache/
- versions-cache/

Closes #462
2026-02-16 15:45:21 +08:00
tw93
679ca2f30c Merge branch 'main' of https://github.com/tw93/Mole 2026-02-16 15:40:38 +08:00
github-actions[bot]
43d9bb237a chore: update contributors [skip ci] 2026-02-16 07:40:31 +00:00
Michael Aristarco
ab83bd1ed9 fix: deep clean npm residual caches (#457)
Fixes #454
2026-02-16 15:40:13 +08:00
tw93
685aa8b970 refactor(purge): improve React Native targets safety and clarity
- Clarify .cxx comment to indicate React Native NDK build cache
- Add protection for Xcode global DerivedData in ~/Library/Developer/Xcode/
  to prevent accidental deletion of shared build artifacts

Refs: #461
2026-02-16 15:39:00 +08:00
github-actions[bot]
db0b3a967a chore: update contributors [skip ci] 2026-02-16 07:37:25 +00:00
Dimitar Nestorov
a7c9b8d6ec feat(purge): add common React Native targets (#461) 2026-02-16 15:37:07 +08:00
tw93
88a4c83a2b fix: update version to 1.26.0 V1.26.0 2026-02-15 08:52:06 +08:00