squeaky-clean 0.4.18 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/cleaners/BaseCleaner.d.ts +1 -1
- package/dist/cleaners/BaseCleaner.d.ts.map +1 -1
- package/dist/cleaners/BaseCleaner.js +61 -16
- package/dist/cleaners/BaseCleaner.js.map +1 -1
- package/dist/cleaners/appCacheDiscovery.d.ts +35 -0
- package/dist/cleaners/appCacheDiscovery.d.ts.map +1 -0
- package/dist/cleaners/appCacheDiscovery.js +353 -0
- package/dist/cleaners/appCacheDiscovery.js.map +1 -0
- package/dist/cleaners/brew.d.ts.map +1 -1
- package/dist/cleaners/brew.js +9 -3
- package/dist/cleaners/brew.js.map +1 -1
- package/dist/cleaners/docker.d.ts.map +1 -1
- package/dist/cleaners/docker.js +8 -0
- package/dist/cleaners/docker.js.map +1 -1
- package/dist/cleaners/index.d.ts +2 -1
- package/dist/cleaners/index.d.ts.map +1 -1
- package/dist/cleaners/index.js +5 -3
- package/dist/cleaners/index.js.map +1 -1
- package/dist/cleaners/universalBinary.d.ts.map +1 -1
- package/dist/cleaners/universalBinary.js +7 -0
- package/dist/cleaners/universalBinary.js.map +1 -1
- package/dist/cleaners/vscode.d.ts.map +1 -1
- package/dist/cleaners/vscode.js +12 -3
- package/dist/cleaners/vscode.js.map +1 -1
- package/dist/cli.js +51 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/categories.d.ts.map +1 -1
- package/dist/commands/categories.js +9 -1
- package/dist/commands/categories.js.map +1 -1
- package/dist/commands/clean.d.ts +33 -1
- package/dist/commands/clean.d.ts.map +1 -1
- package/dist/commands/clean.js +264 -0
- package/dist/commands/clean.js.map +1 -1
- package/dist/commands/interactive.d.ts.map +1 -1
- package/dist/commands/interactive.js +24 -2
- package/dist/commands/interactive.js.map +1 -1
- package/dist/commands/profile.d.ts +7 -0
- package/dist/commands/profile.d.ts.map +1 -0
- package/dist/commands/profile.js +61 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +9 -1
- package/dist/config/index.js.map +1 -1
- package/dist/safety/index.d.ts +47 -0
- package/dist/safety/index.d.ts.map +1 -0
- package/dist/safety/index.js +115 -0
- package/dist/safety/index.js.map +1 -0
- package/dist/safety/rules.d.ts +27 -0
- package/dist/safety/rules.d.ts.map +1 -0
- package/dist/safety/rules.js +465 -0
- package/dist/safety/rules.js.map +1 -0
- package/dist/types/index.d.ts +10 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/fs.d.ts +2 -2
- package/dist/utils/fs.d.ts.map +1 -1
- package/dist/utils/fs.js +56 -22
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/which.d.ts.map +1 -1
- package/dist/utils/which.js +3 -0
- package/dist/utils/which.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -23,6 +23,8 @@ Essentially a *"universal cachectl"*—**smart** *(sort of)*, **safe** (at least
|
|
|
23
23
|
- **🔧 Highly Configurable**: Choose exactly which caches to clean and when
|
|
24
24
|
- **📊 Size Analytics**: See how much space each cache is using before cleaning
|
|
25
25
|
- **🛡️ Safe by Default**: Dry-run mode to preview what will be cleaned (v0.1.0+ defaults to dry-run)
|
|
26
|
+
- **🚦 Safety Tiers & Cleaning Profiles**: Every cache classified `safe` → `manual`; pick a `conservative`, `balanced`, or `aggressive` profile
|
|
27
|
+
- **🔎 System-Wide App Cache Discovery**: Finds non-developer app caches (Electron, GPU/shader, sandboxed/Flatpak/Snap apps, logs) guarded by a built-in safety database
|
|
26
28
|
- **⚡ Performance**: Parallel cleaning operations for maximum speed
|
|
27
29
|
- **🔄 Auto-clean Mode**: Schedule automatic cache cleaning based on your preferences
|
|
28
30
|
- **📱 Cross-platform**: Works on macOS, Linux, and Windows
|
|
@@ -177,6 +179,7 @@ squeaky clean --config my-config.json --dry-run
|
|
|
177
179
|
| `sizes` | Show cache sizes without clearing | - |
|
|
178
180
|
| `categories` | Show detailed cache categories with usage patterns | `cats` |
|
|
179
181
|
| `config` | Manage configuration | - |
|
|
182
|
+
| `profile` | Show or set the active cleaning profile (`conservative`, `balanced`, `aggressive`) | - |
|
|
180
183
|
| `doctor` | Check system and diagnose issues | - |
|
|
181
184
|
| `auto` | Configure automatic cleaning | - |
|
|
182
185
|
| `update` | Check for and install updates | - |
|
|
@@ -189,6 +192,7 @@ squeaky clean --config my-config.json --dry-run
|
|
|
189
192
|
- `-a, --all` - Clean all configured caches
|
|
190
193
|
- `-t, --types <types>` - Comma-separated list of cache types
|
|
191
194
|
- `-e, --exclude <tools>` - Comma-separated list of tools to exclude
|
|
195
|
+
- `--include <tools>` - Comma-separated list of tools to include (overrides `--all` and `--exclude`)
|
|
192
196
|
- `-d, --dry-run` - Show what would be cleaned without actually cleaning
|
|
193
197
|
- `-f, --force` - Skip confirmation prompts
|
|
194
198
|
- `-s, --sizes` - Show cache sizes before cleaning
|
|
@@ -201,6 +205,12 @@ squeaky clean --config my-config.json --dry-run
|
|
|
201
205
|
- `--use-case <case>` - Target specific use cases (`development`, `testing`, `production`, `experimental`, `archived`)
|
|
202
206
|
- `--priority <level>` - Clean only specified priority (`critical`, `important`, `normal`, `low`)
|
|
203
207
|
- `--categories <ids>` - Clean specific category IDs (comma-separated)
|
|
208
|
+
- `--sub-caches <cleaner:category,...>` - Clean specific sub-caches within a cleaner (e.g., `xcode:DerivedData,npm:logs`)
|
|
209
|
+
|
|
210
|
+
**🚦 Safety & Profile Options:**
|
|
211
|
+
- `--profile <name>` - Cleaning profile to apply (`conservative`, `balanced`, `aggressive`)
|
|
212
|
+
- `--safety <tiers>` - Comma-separated safety tiers to clean (`safe`, `probably-safe`, `caution`, `manual`); overrides `--profile`
|
|
213
|
+
- `--allow-manual <ids>` - Comma-separated category IDs consenting to manual-tier cleaning
|
|
204
214
|
|
|
205
215
|
#### `categories` Options
|
|
206
216
|
|
|
@@ -227,6 +237,66 @@ squeaky clean --config my-config.json --dry-run
|
|
|
227
237
|
- `--version` - Show version number
|
|
228
238
|
- `-h, --help` - Display help
|
|
229
239
|
|
|
240
|
+
## 🚦 Safety Tiers & Cleaning Profiles
|
|
241
|
+
|
|
242
|
+
Every cache category is classified into one of four safety tiers, and the active cleaning profile decides which tiers get cleaned:
|
|
243
|
+
|
|
244
|
+
| Tier | Meaning |
|
|
245
|
+
|------|---------|
|
|
246
|
+
| `safe` | Regenerated transparently; no observable downside to cleaning |
|
|
247
|
+
| `probably-safe` | Regenerable; apps may start slower or re-download data once |
|
|
248
|
+
| `caution` | May lose useful state (offline content, large re-downloads) or upset running apps |
|
|
249
|
+
| `manual` | User-data adjacent; requires explicit per-item confirmation, never cleaned implicitly |
|
|
250
|
+
|
|
251
|
+
| Profile | Tiers cleaned | Description |
|
|
252
|
+
|---------|---------------|-------------|
|
|
253
|
+
| `conservative` | safe | Only caches that are definitely safe to clean |
|
|
254
|
+
| `balanced` (default) | safe, probably-safe | Safe caches plus regenerable ones that may cost a slower next launch |
|
|
255
|
+
| `aggressive` | safe, probably-safe, caution | Everything except manual-confirmation items |
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# View the active profile (and all available profiles)
|
|
259
|
+
squeaky profile
|
|
260
|
+
|
|
261
|
+
# Persist a profile as the default for future runs
|
|
262
|
+
squeaky profile conservative
|
|
263
|
+
|
|
264
|
+
# Apply a profile for a single run
|
|
265
|
+
squeaky clean --all --profile aggressive
|
|
266
|
+
|
|
267
|
+
# Override with an explicit tier list (beats --profile)
|
|
268
|
+
squeaky clean --all --safety safe,caution
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Manual tier = explicit consent.** Manual-tier categories (e.g. 100GB+ ML model stores) are *never* cleaned implicitly—no profile includes them, and `--force` cannot bypass the consent gate. Consent per category interactively when prompted, or pass category IDs explicitly:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Find category IDs first, then consent explicitly
|
|
275
|
+
squeaky categories --tool app-caches
|
|
276
|
+
squeaky clean --include app-caches --allow-manual <category-id>
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### 🔎 System-Wide App Cache Discovery (`app-caches`)
|
|
280
|
+
|
|
281
|
+
The `app-caches` cleaner discovers *non-developer* application caches across the whole system:
|
|
282
|
+
|
|
283
|
+
- **macOS**: `~/Library/Caches`, Electron `Cache`/`GPUCache`/`Code Cache` dirs under `~/Library/Application Support`, sandboxed-app caches under `~/Library/Containers/*/Data/Library/Caches` and `~/Library/Group Containers/*/Library/Caches`, `~/Library/Logs`, and `~/.cache`
|
|
284
|
+
- **Linux**: `~/.cache` (XDG), Electron caches under `~/.config/*`, plus Flatpak (`~/.var/app/*/cache`) and Snap (`~/snap/*/{current,common}/.cache`) app caches
|
|
285
|
+
- **Windows**: `LOCALAPPDATA`/`APPDATA` (Electron `Cache`/`GPUCache`/`Code Cache`) and the user `Temp` directory
|
|
286
|
+
|
|
287
|
+
A built-in safety database:
|
|
288
|
+
|
|
289
|
+
- **Hard-excludes** dangerous lookalikes (iCloud/CloudKit sync state, Mail, Photos, device backups, Docker's VM disk, Signal, password managers)—never shown, never cleaned
|
|
290
|
+
- **Skips** paths already covered by the dedicated tool cleaners (no double counting)
|
|
291
|
+
- **Classifies** everything else by tier (GPU/shader caches = `safe`, chat app caches = `caution`, huge ML model stores = `manual`)
|
|
292
|
+
|
|
293
|
+
Heads-up: the full-system scan is heavier than the dev-only scan (tens of seconds on a large system, and more on Macs with many sandboxed apps). The largest caches are always surfaced even when the candidate list is capped. To keep the fast dev-only scan:
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
squeaky clean --all --exclude app-caches # skip for one run
|
|
297
|
+
squeaky config --disable app-caches # disable persistently
|
|
298
|
+
```
|
|
299
|
+
|
|
230
300
|
## 🛠️ Supported Tools
|
|
231
301
|
|
|
232
302
|
### Package Managers
|
|
@@ -273,6 +343,7 @@ squeaky clean --config my-config.json --dry-run
|
|
|
273
343
|
|------|----------------|
|
|
274
344
|
| **Docker** | Unused containers, images, volumes |
|
|
275
345
|
| **Gradle** | `~/.gradle/caches`, `.gradle/` |
|
|
346
|
+
| **App Caches** (`app-caches`) | System-wide discovered application caches, classified by [safety tier](#-safety-tiers--cleaning-profiles) |
|
|
276
347
|
|
|
277
348
|
## ⚙️ Configuration
|
|
278
349
|
|
|
@@ -24,7 +24,7 @@ export declare abstract class BaseCleaner implements CleanerModule {
|
|
|
24
24
|
/**
|
|
25
25
|
* Clear specific categories
|
|
26
26
|
*/
|
|
27
|
-
clearByCategory(categoryIds: string[], dryRun?: boolean, _cacheInfo?: CacheInfo, protectedPaths?: string[]): Promise<ClearResult>;
|
|
27
|
+
clearByCategory(categoryIds: string[], dryRun?: boolean, _cacheInfo?: CacheInfo, protectedPaths?: string[], allowManualIds?: string[]): Promise<ClearResult>;
|
|
28
28
|
/**
|
|
29
29
|
* Filter categories based on criteria
|
|
30
30
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCleaner.d.ts","sourceRoot":"","sources":["../../src/cleaners/BaseCleaner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,WAAW,EACX,SAAS,EACT,sBAAsB,EACvB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseCleaner.d.ts","sourceRoot":"","sources":["../../src/cleaners/BaseCleaner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,aAAa,EACb,WAAW,EACX,SAAS,EACT,sBAAsB,EACvB,MAAM,UAAU,CAAC;AASlB,8BAAsB,WAAY,YAAW,aAAa;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IACxC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gBAAgB,CACxB,IAAI,EAAE,MAAM,GACX,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK;IAc9C;;OAEG;IACH,SAAS,CAAC,aAAa,CACrB,IAAI,EAAE,MAAM,GACX,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,cAAc,GAAG,UAAU;CAO1E"}
|
|
@@ -7,6 +7,7 @@ const path_1 = require("path");
|
|
|
7
7
|
const minimatch_1 = require("minimatch");
|
|
8
8
|
const cli_1 = require("../utils/cli");
|
|
9
9
|
const fs_2 = require("../utils/fs");
|
|
10
|
+
const safety_1 = require("../safety");
|
|
10
11
|
class BaseCleaner {
|
|
11
12
|
/**
|
|
12
13
|
* Get detailed cache categories with metadata
|
|
@@ -41,21 +42,28 @@ class BaseCleaner {
|
|
|
41
42
|
isProtectedPath(path, protectedPaths = []) {
|
|
42
43
|
if (!protectedPaths.length)
|
|
43
44
|
return false;
|
|
44
|
-
|
|
45
|
+
// Normalize separators to forward slashes so matching is consistent on
|
|
46
|
+
// Windows, where resolve() yields backslash paths.
|
|
47
|
+
const normalizedPath = (0, path_1.resolve)(path).replace(/\\/g, "/");
|
|
45
48
|
for (const protectedPattern of protectedPaths) {
|
|
46
49
|
// Support both exact paths and glob patterns
|
|
47
50
|
if (protectedPattern.includes("*") || protectedPattern.includes("?")) {
|
|
48
51
|
// It's a glob pattern
|
|
49
|
-
if ((0, minimatch_1.minimatch)(normalizedPath, protectedPattern)) {
|
|
52
|
+
if ((0, minimatch_1.minimatch)(normalizedPath, protectedPattern.replace(/\\/g, "/"))) {
|
|
50
53
|
(0, cli_1.printVerbose)(`Path ${path} is protected by pattern: ${protectedPattern}`);
|
|
51
54
|
return true;
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
57
|
else {
|
|
55
|
-
// It's an exact path or directory
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
// It's an exact path or directory. Compare case-insensitively: on
|
|
59
|
+
// case-insensitive filesystems (default macOS/Windows) a case-
|
|
60
|
+
// mismatched pattern must still protect the path - a missed match
|
|
61
|
+
// here would let explicitly-protected data be deleted.
|
|
62
|
+
const normalizedProtected = (0, path_1.resolve)(protectedPattern).replace(/\\/g, "/");
|
|
63
|
+
const candidate = normalizedPath.toLowerCase();
|
|
64
|
+
const protectedLower = normalizedProtected.toLowerCase();
|
|
65
|
+
if (candidate === protectedLower ||
|
|
66
|
+
candidate.startsWith(protectedLower + "/")) {
|
|
59
67
|
(0, cli_1.printVerbose)(`Path ${path} is protected: ${protectedPattern}`);
|
|
60
68
|
return true;
|
|
61
69
|
}
|
|
@@ -115,9 +123,21 @@ class BaseCleaner {
|
|
|
115
123
|
/**
|
|
116
124
|
* Clear specific categories
|
|
117
125
|
*/
|
|
118
|
-
async clearByCategory(categoryIds, dryRun, _cacheInfo, protectedPaths) {
|
|
126
|
+
async clearByCategory(categoryIds, dryRun, _cacheInfo, protectedPaths, allowManualIds) {
|
|
119
127
|
const categories = await this.getCacheCategories();
|
|
120
|
-
const selectedCategories = categories.filter((c) =>
|
|
128
|
+
const selectedCategories = categories.filter((c) => {
|
|
129
|
+
if (!categoryIds.includes(c.id))
|
|
130
|
+
return false;
|
|
131
|
+
// Manual tier needs explicit consent beyond id selection - checkbox
|
|
132
|
+
// defaults or --categories alone are not confirmation.
|
|
133
|
+
if ((0, safety_1.effectiveSafety)(c) !== "manual")
|
|
134
|
+
return true;
|
|
135
|
+
const allowed = allowManualIds?.includes(c.id) ?? false;
|
|
136
|
+
if (!allowed) {
|
|
137
|
+
(0, cli_1.printVerbose)(`Skipping ${c.id}: manual tier requires explicit confirmation`);
|
|
138
|
+
}
|
|
139
|
+
return allowed;
|
|
140
|
+
});
|
|
121
141
|
let totalSizeBefore = 0;
|
|
122
142
|
let clearedPaths = [];
|
|
123
143
|
let clearedCategories = [];
|
|
@@ -151,9 +171,29 @@ class BaseCleaner {
|
|
|
151
171
|
* Filter categories based on criteria
|
|
152
172
|
*/
|
|
153
173
|
filterCategories(categories, criteria) {
|
|
174
|
+
// Manual-tier gate applies even without criteria: a manual category is
|
|
175
|
+
// only cleanable with explicit per-id consent via allowManualIds.
|
|
176
|
+
// Force/yes flags never populate that list, so they cannot bypass it.
|
|
177
|
+
const gated = categories.filter((category) => {
|
|
178
|
+
if ((0, safety_1.effectiveSafety)(category) !== "manual")
|
|
179
|
+
return true;
|
|
180
|
+
const allowed = criteria?.allowManualIds?.includes(category.id) ?? false;
|
|
181
|
+
if (!allowed) {
|
|
182
|
+
(0, cli_1.printVerbose)(`Skipping ${category.id}: manual tier requires explicit confirmation`);
|
|
183
|
+
}
|
|
184
|
+
return allowed;
|
|
185
|
+
});
|
|
154
186
|
if (!criteria)
|
|
155
|
-
return
|
|
156
|
-
return
|
|
187
|
+
return gated;
|
|
188
|
+
return gated.filter((category) => {
|
|
189
|
+
// Safety tier filtering. Manual categories that reached this point
|
|
190
|
+
// carry explicit consent, so the tier filter does not re-drop them.
|
|
191
|
+
if (criteria.safetyTiers && criteria.safetyTiers.length > 0) {
|
|
192
|
+
const tier = (0, safety_1.effectiveSafety)(category);
|
|
193
|
+
if (tier !== "manual" && !criteria.safetyTiers.includes(tier)) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
157
197
|
// Age filtering
|
|
158
198
|
if (criteria.olderThanDays !== undefined &&
|
|
159
199
|
category.ageInDays !== undefined) {
|
|
@@ -214,12 +254,17 @@ class BaseCleaner {
|
|
|
214
254
|
if (!(0, fs_1.existsSync)(path))
|
|
215
255
|
return;
|
|
216
256
|
try {
|
|
217
|
-
//
|
|
218
|
-
//
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
257
|
+
// Native Node.js fs operations: no shell, no injection surface.
|
|
258
|
+
// For directories, delete CONTENTS but keep the directory itself -
|
|
259
|
+
// apps expect their cache dir to still exist on next launch and can
|
|
260
|
+
// fail with ENOENT if it vanishes.
|
|
261
|
+
const stats = (0, fs_1.statSync)(path);
|
|
262
|
+
if (!stats.isDirectory()) {
|
|
263
|
+
await (0, promises_1.rm)(path, { force: true });
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
const entries = await (0, promises_1.readdir)(path);
|
|
267
|
+
await Promise.all(entries.map((entry) => (0, promises_1.rm)((0, path_1.join)(path, entry), { recursive: true, force: true })));
|
|
223
268
|
}
|
|
224
269
|
catch (error) {
|
|
225
270
|
console.error(`Failed to clear ${path}:`, error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseCleaner.js","sourceRoot":"","sources":["../../src/cleaners/BaseCleaner.ts"],"names":[],"mappings":";;;AAQA,2BAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"BaseCleaner.js","sourceRoot":"","sources":["../../src/cleaners/BaseCleaner.ts"],"names":[],"mappings":";;;AAQA,2BAA0C;AAC1C,0CAA0C;AAC1C,+BAA+C;AAC/C,yCAAsC;AACtC,sCAA4C;AAC5C,oCAAqD;AACrD,sCAA4C;AAE5C,MAAsB,WAAW;IAQ/B;;OAEG;IACH,KAAK,CAAC,kBAAkB;QACtB,yDAAyD;QACzD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QACvC,MAAM,UAAU,GAAoB,EAAE,CAAC;QAEvC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,IAAI,IAAA,eAAU,EAAC,IAAI,CAAC,EAAE,CAAC;gBACrB,MAAM,IAAI,GAAG,IAAA,aAAQ,EAAC,IAAI,CAAC,CAAC;gBAC5B,MAAM,QAAQ,GAAkB;oBAC9B,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI,IAAA,eAAQ,EAAC,IAAI,CAAC,EAAE;oBACpC,IAAI,EAAE,IAAA,eAAQ,EAAC,IAAI,CAAC;oBACpB,WAAW,EAAE,oBAAoB,IAAI,EAAE;oBACvC,KAAK,EAAE,CAAC,IAAI,CAAC;oBACb,IAAI,EAAE,MAAM,IAAI,C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B,CACxB,IAAY;QAEZ,4CAA4C;QAC5C,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;YAAE,OAAO,UAAU,CAAC;QAEpD,2CAA2C;QAC3C,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC,CAAC;YAAE,OAAO,WAAW,CAAC;QAErD,uBAAuB;QACvB,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC;YAAE,OAAO,KAAK,CAAC;QAEjD,0BAA0B;QAC1B,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED;;OAEG;IACO,aAAa,CACrB,IAAY;QAEZ,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,SAAS,CAAC;QACrE,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;YAAE,OAAO,YAAY,CAAC;QAC3E,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;YAAE,OAAO,cAAc,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,EAAE,CAAC;YAAE,OAAO,UAAU,CAAC;QACtD,OAAO,aAAa,CAAC;IACvB,CAAC;CACF;AAtZD,kCAsZC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseCleaner } from "./BaseCleaner";
|
|
2
|
+
import { CacheCategory, CacheInfo, CacheType } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* System-wide application cache discovery. Scans well-known platform cache
|
|
5
|
+
* roots, classifies every candidate through the safety rule engine
|
|
6
|
+
* (safe / probably-safe / caution / manual; "never" and "claimed" paths are
|
|
7
|
+
* excluded entirely), and exposes the survivors as cache categories.
|
|
8
|
+
*
|
|
9
|
+
* Inherits clear()/clearByCategory() from BaseCleaner so the manual-tier
|
|
10
|
+
* consent gate and safety-tier filtering always apply.
|
|
11
|
+
*/
|
|
12
|
+
export declare class AppCacheDiscoveryCleaner extends BaseCleaner {
|
|
13
|
+
name: string;
|
|
14
|
+
type: CacheType;
|
|
15
|
+
description: string;
|
|
16
|
+
private cachedCategories;
|
|
17
|
+
private discoveredAt;
|
|
18
|
+
private discoveryInFlight;
|
|
19
|
+
isAvailable(): Promise<boolean>;
|
|
20
|
+
getCacheInfo(): Promise<CacheInfo>;
|
|
21
|
+
getCacheCategories(): Promise<CacheCategory[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Run (or reuse) discovery: collect candidates, classify, size them
|
|
24
|
+
* concurrently, and build categories. Results are cached on the instance
|
|
25
|
+
* so getCacheInfo() + getCacheCategories() within one scan only walk the
|
|
26
|
+
* filesystem once.
|
|
27
|
+
*/
|
|
28
|
+
private discover;
|
|
29
|
+
private runDiscovery;
|
|
30
|
+
/** Enumerate candidate cache directories for the current platform. */
|
|
31
|
+
private collectCandidates;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: AppCacheDiscoveryCleaner;
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=appCacheDiscovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appCacheDiscovery.d.ts","sourceRoot":"","sources":["../../src/cleaners/appCacheDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA4F/D;;;;;;;;GAQG;AACH,qBAAa,wBAAyB,SAAQ,WAAW;IACvD,IAAI,SAAgB;IACpB,IAAI,EAAE,SAAS,CAAY;IAC3B,WAAW,SAC4E;IAEvF,OAAO,CAAC,gBAAgB,CAAgC;IACxD,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,iBAAiB,CAAyC;IAE5D,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;IAO/B,YAAY,IAAI,OAAO,CAAC,SAAS,CAAC;IAalC,kBAAkB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAIpD;;;;;OAKG;YACW,QAAQ;YAuBR,YAAY;IA+F1B,sEAAsE;YACxD,iBAAiB;CA0JhC;;AAED,wBAA8C"}
|