disk-space-saviour 0.0.0-stage → 0.12.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/CHANGELOG.md +587 -0
- package/LICENSE +24 -0
- package/README.md +538 -2
- package/bin/dss.js +5 -0
- package/package.json +96 -4
- package/src/audit.js +84 -0
- package/src/clean.js +716 -0
- package/src/cli.js +448 -0
- package/src/docker/cli.js +289 -0
- package/src/docker/containers.js +334 -0
- package/src/docker/images.js +122 -0
- package/src/docker/scan.js +531 -0
- package/src/emergency.js +169 -0
- package/src/env/local.js +715 -0
- package/src/env/resolve.js +36 -0
- package/src/env/shell.js +433 -0
- package/src/exec.js +185 -0
- package/src/git.js +338 -0
- package/src/health.js +174 -0
- package/src/index.d.ts +255 -0
- package/src/index.js +52 -0
- package/src/items.js +166 -0
- package/src/liveness.js +190 -0
- package/src/options.js +112 -0
- package/src/paths.js +182 -0
- package/src/report.js +376 -0
- package/src/rules/ecosystems.js +916 -0
- package/src/rules/other.js +375 -0
- package/src/rules/versions.js +256 -0
- package/src/scan.js +384 -0
- package/src/scanners/agents.js +166 -0
- package/src/scanners/common.js +38 -0
- package/src/scanners/global.js +217 -0
- package/src/scanners/projects.js +335 -0
- package/src/scanners/rust.js +404 -0
- package/src/scanners/system.js +171 -0
- package/src/scanners/versions.js +230 -0
- package/src/units.js +130 -0
|
@@ -0,0 +1,916 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reclaimable locations for the 20 most common language ecosystems.
|
|
3
|
+
*
|
|
4
|
+
* `caches` are global, per-user locations. Paths start with `~` (each home
|
|
5
|
+
* directory) or `{VAR}` (an environment variable such as LOCALAPPDATA on
|
|
6
|
+
* Windows) and may contain `*` segments. Default tier is `safe`: download and
|
|
7
|
+
* compilation caches that the tool re-creates on demand.
|
|
8
|
+
*
|
|
9
|
+
* `projects` are directories inside project trees, recognised by name plus a
|
|
10
|
+
* marker file next to them (`markers`), inside them (`selfMarkers`), or next
|
|
11
|
+
* to their parent (`parentMarkers`, with `parentName`). Kind `cache` is always
|
|
12
|
+
* `safe`; `build` and `dependencies` are `moderate` after the project has been
|
|
13
|
+
* inactive for the configured number of days and `aggressive` otherwise.
|
|
14
|
+
*
|
|
15
|
+
* `busy` lists process names that, when running (inside the project for
|
|
16
|
+
* project directories), mean the tool may be using the directory right now.
|
|
17
|
+
* `native` is the tool's own clean command, used when the tool is installed
|
|
18
|
+
* and the cache belongs to the current user.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const JS_BUSY = ['node', 'npm', 'npx', 'pnpm', 'yarn', 'bun', 'deno'];
|
|
22
|
+
const PY_BUSY = ['python', 'python3', 'pip', 'uv', 'poetry', 'pytest'];
|
|
23
|
+
const RUST_BUSY = ['cargo', 'rustc', 'rustdoc', 'rust-analyzer'];
|
|
24
|
+
const JVM_BUSY = ['java', 'gradle', 'gradlew', 'mvn', 'sbt', 'kotlin'];
|
|
25
|
+
const DOTNET_BUSY = ['dotnet', 'msbuild'];
|
|
26
|
+
|
|
27
|
+
export const ECOSYSTEMS = [
|
|
28
|
+
{
|
|
29
|
+
id: 'javascript',
|
|
30
|
+
name: 'JavaScript / TypeScript',
|
|
31
|
+
caches: [
|
|
32
|
+
{
|
|
33
|
+
id: 'npm-cache',
|
|
34
|
+
description: 'npm download cache',
|
|
35
|
+
paths: ['~/.npm/_cacache', '{LOCALAPPDATA}/npm-cache/_cacache'],
|
|
36
|
+
native: { tool: 'npm', argv: ['npm', 'cache', 'clean', '--force'] },
|
|
37
|
+
busy: ['npm'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: 'npx-cache',
|
|
41
|
+
description: 'npx package cache',
|
|
42
|
+
paths: ['~/.npm/_npx', '{LOCALAPPDATA}/npm-cache/_npx'],
|
|
43
|
+
busy: ['npm', 'npx'],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'yarn-cache',
|
|
47
|
+
description: 'Yarn download cache',
|
|
48
|
+
paths: [
|
|
49
|
+
'~/.cache/yarn',
|
|
50
|
+
'~/Library/Caches/Yarn',
|
|
51
|
+
'~/.yarn/berry/cache',
|
|
52
|
+
'{LOCALAPPDATA}/Yarn/Cache',
|
|
53
|
+
],
|
|
54
|
+
busy: ['yarn'],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 'pnpm-store',
|
|
58
|
+
description: 'pnpm content-addressable store',
|
|
59
|
+
paths: [
|
|
60
|
+
'~/.local/share/pnpm/store',
|
|
61
|
+
'~/Library/pnpm/store',
|
|
62
|
+
'~/.pnpm-store',
|
|
63
|
+
'{LOCALAPPDATA}/pnpm/store',
|
|
64
|
+
],
|
|
65
|
+
native: { tool: 'pnpm', argv: ['pnpm', 'store', 'prune'] },
|
|
66
|
+
busy: ['pnpm'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'bun-cache',
|
|
70
|
+
description: 'Bun install cache',
|
|
71
|
+
paths: ['~/.bun/install/cache'],
|
|
72
|
+
native: { tool: 'bun', argv: ['bun', 'pm', 'cache', 'rm'] },
|
|
73
|
+
busy: ['bun'],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'deno-cache',
|
|
77
|
+
description: 'Deno module cache',
|
|
78
|
+
paths: [
|
|
79
|
+
'~/.cache/deno',
|
|
80
|
+
'~/Library/Caches/deno',
|
|
81
|
+
'{LOCALAPPDATA}/deno',
|
|
82
|
+
],
|
|
83
|
+
busy: ['deno'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'node-gyp-cache',
|
|
87
|
+
description: 'node-gyp headers cache',
|
|
88
|
+
paths: ['~/.cache/node-gyp', '~/Library/Caches/node-gyp'],
|
|
89
|
+
busy: ['node-gyp', 'npm'],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'typescript-types-cache',
|
|
93
|
+
description:
|
|
94
|
+
'TypeScript automatic type acquisition cache (editor @types downloads)',
|
|
95
|
+
paths: [
|
|
96
|
+
'~/.cache/typescript',
|
|
97
|
+
'~/Library/Caches/typescript',
|
|
98
|
+
'{LOCALAPPDATA}/Microsoft/TypeScript',
|
|
99
|
+
],
|
|
100
|
+
busy: ['npm'],
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
projects: [
|
|
104
|
+
{
|
|
105
|
+
id: 'node-modules',
|
|
106
|
+
kind: 'dependencies',
|
|
107
|
+
description: 'installed npm dependencies',
|
|
108
|
+
names: ['node_modules'],
|
|
109
|
+
markers: ['package.json'],
|
|
110
|
+
lockfiles: [
|
|
111
|
+
'package-lock.json',
|
|
112
|
+
'npm-shrinkwrap.json',
|
|
113
|
+
'pnpm-lock.yaml',
|
|
114
|
+
'yarn.lock',
|
|
115
|
+
'bun.lock',
|
|
116
|
+
'bun.lockb',
|
|
117
|
+
],
|
|
118
|
+
busy: JS_BUSY,
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
id: 'js-framework-build',
|
|
122
|
+
kind: 'build',
|
|
123
|
+
description: 'framework build output',
|
|
124
|
+
names: ['.next', '.nuxt', '.svelte-kit', '.output'],
|
|
125
|
+
markers: ['package.json'],
|
|
126
|
+
busy: JS_BUSY,
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'js-tool-cache',
|
|
130
|
+
kind: 'cache',
|
|
131
|
+
description: 'bundler and task-runner cache',
|
|
132
|
+
names: ['.turbo', '.parcel-cache', '.angular', '.vite'],
|
|
133
|
+
markers: ['package.json'],
|
|
134
|
+
busy: JS_BUSY,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'python',
|
|
140
|
+
name: 'Python',
|
|
141
|
+
caches: [
|
|
142
|
+
{
|
|
143
|
+
id: 'pip-cache',
|
|
144
|
+
description: 'pip wheel and HTTP cache',
|
|
145
|
+
paths: [
|
|
146
|
+
'~/.cache/pip',
|
|
147
|
+
'~/Library/Caches/pip',
|
|
148
|
+
'{LOCALAPPDATA}/pip/Cache',
|
|
149
|
+
],
|
|
150
|
+
busy: ['pip', 'pip3'],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: 'uv-cache',
|
|
154
|
+
description: 'uv cache',
|
|
155
|
+
paths: ['~/.cache/uv', '{LOCALAPPDATA}/uv/cache'],
|
|
156
|
+
native: { tool: 'uv', argv: ['uv', 'cache', 'clean'] },
|
|
157
|
+
busy: ['uv'],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: 'poetry-cache',
|
|
161
|
+
description: 'Poetry package cache',
|
|
162
|
+
paths: [
|
|
163
|
+
'~/.cache/pypoetry/cache',
|
|
164
|
+
'~/.cache/pypoetry/artifacts',
|
|
165
|
+
'~/Library/Caches/pypoetry/cache',
|
|
166
|
+
'~/Library/Caches/pypoetry/artifacts',
|
|
167
|
+
],
|
|
168
|
+
busy: ['poetry'],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
id: 'poetry-virtualenvs',
|
|
172
|
+
description: 'Poetry-managed virtual environments',
|
|
173
|
+
tier: 'moderate',
|
|
174
|
+
paths: [
|
|
175
|
+
'~/.cache/pypoetry/virtualenvs',
|
|
176
|
+
'~/Library/Caches/pypoetry/virtualenvs',
|
|
177
|
+
],
|
|
178
|
+
busy: ['poetry', 'python', 'python3'],
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 'python-tool-caches',
|
|
182
|
+
description: 'pipenv, pdm, hatch and pre-commit caches',
|
|
183
|
+
paths: [
|
|
184
|
+
'~/.cache/pipenv',
|
|
185
|
+
'~/.cache/pdm',
|
|
186
|
+
'~/.cache/hatch',
|
|
187
|
+
'~/.cache/pre-commit',
|
|
188
|
+
],
|
|
189
|
+
busy: ['pipenv', 'pdm', 'hatch', 'pre-commit'],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 'conda-pkgs',
|
|
193
|
+
description: 'conda package cache',
|
|
194
|
+
paths: [
|
|
195
|
+
'~/.conda/pkgs',
|
|
196
|
+
'~/miniconda3/pkgs',
|
|
197
|
+
'~/anaconda3/pkgs',
|
|
198
|
+
'~/miniforge3/pkgs',
|
|
199
|
+
],
|
|
200
|
+
native: {
|
|
201
|
+
tool: 'conda',
|
|
202
|
+
argv: ['conda', 'clean', '--all', '--yes'],
|
|
203
|
+
required: true,
|
|
204
|
+
},
|
|
205
|
+
busy: ['conda', 'mamba'],
|
|
206
|
+
},
|
|
207
|
+
],
|
|
208
|
+
projects: [
|
|
209
|
+
{
|
|
210
|
+
id: 'python-venv',
|
|
211
|
+
kind: 'dependencies',
|
|
212
|
+
description: 'virtual environment',
|
|
213
|
+
names: ['.venv', 'venv', '.env', 'env'],
|
|
214
|
+
selfMarkers: ['pyvenv.cfg'],
|
|
215
|
+
lockfiles: ['poetry.lock', 'uv.lock', 'Pipfile.lock', 'pdm.lock'],
|
|
216
|
+
busy: PY_BUSY,
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: 'python-bytecode',
|
|
220
|
+
kind: 'cache',
|
|
221
|
+
description: 'bytecode and tool caches',
|
|
222
|
+
names: ['__pycache__', '.pytest_cache', '.mypy_cache', '.ruff_cache'],
|
|
223
|
+
busy: PY_BUSY,
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: 'python-test-envs',
|
|
227
|
+
kind: 'dependencies',
|
|
228
|
+
description: 'tox/nox environments',
|
|
229
|
+
names: ['.tox', '.nox'],
|
|
230
|
+
markers: ['tox.ini', 'noxfile.py', 'pyproject.toml', 'setup.cfg'],
|
|
231
|
+
busy: [...PY_BUSY, 'tox', 'nox'],
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 'rust',
|
|
237
|
+
name: 'Rust',
|
|
238
|
+
caches: [
|
|
239
|
+
{
|
|
240
|
+
id: 'cargo-registry',
|
|
241
|
+
description: 'cargo registry downloads and sources',
|
|
242
|
+
paths: ['~/.cargo/registry/cache', '~/.cargo/registry/src'],
|
|
243
|
+
busy: RUST_BUSY,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
id: 'cargo-git',
|
|
247
|
+
description: 'cargo git checkouts',
|
|
248
|
+
paths: ['~/.cargo/git/checkouts', '~/.cargo/git/db'],
|
|
249
|
+
busy: RUST_BUSY,
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
id: 'sccache',
|
|
253
|
+
description: 'sccache compilation cache',
|
|
254
|
+
paths: [
|
|
255
|
+
'~/.cache/sccache',
|
|
256
|
+
'~/Library/Caches/Mozilla.sccache',
|
|
257
|
+
'{LOCALAPPDATA}/Mozilla/sccache',
|
|
258
|
+
],
|
|
259
|
+
busy: ['sccache', ...RUST_BUSY],
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
id: 'rust-script-cache',
|
|
263
|
+
description: 'rust-script compiled scripts and generated projects',
|
|
264
|
+
paths: [
|
|
265
|
+
'~/.cache/rust-script',
|
|
266
|
+
'~/Library/Caches/rust-script',
|
|
267
|
+
'{LOCALAPPDATA}/rust-script',
|
|
268
|
+
],
|
|
269
|
+
busy: ['rust-script', ...RUST_BUSY],
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
projects: [
|
|
273
|
+
{
|
|
274
|
+
id: 'cargo-target',
|
|
275
|
+
kind: 'build',
|
|
276
|
+
description: 'cargo build output',
|
|
277
|
+
names: ['target'],
|
|
278
|
+
markers: ['Cargo.toml'],
|
|
279
|
+
selfMarkers: ['CACHEDIR.TAG', 'debug', 'release', '.rustc_info.json'],
|
|
280
|
+
busy: RUST_BUSY,
|
|
281
|
+
},
|
|
282
|
+
],
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
id: 'jvm',
|
|
286
|
+
name: 'Java / Kotlin',
|
|
287
|
+
caches: [
|
|
288
|
+
{
|
|
289
|
+
id: 'gradle-caches',
|
|
290
|
+
description: 'Gradle dependency and build caches',
|
|
291
|
+
paths: [
|
|
292
|
+
'~/.gradle/caches',
|
|
293
|
+
'~/.gradle/wrapper/dists',
|
|
294
|
+
'~/.gradle/daemon',
|
|
295
|
+
],
|
|
296
|
+
busy: JVM_BUSY,
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
id: 'kotlin-native',
|
|
300
|
+
description: 'Kotlin/Native toolchains and caches',
|
|
301
|
+
tier: 'moderate',
|
|
302
|
+
paths: ['~/.konan'],
|
|
303
|
+
busy: JVM_BUSY,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: 'android-build-cache',
|
|
307
|
+
description: 'Android build cache',
|
|
308
|
+
paths: ['~/.android/cache', '~/.android/build-cache'],
|
|
309
|
+
busy: JVM_BUSY,
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
projects: [
|
|
313
|
+
{
|
|
314
|
+
id: 'gradle-build',
|
|
315
|
+
kind: 'build',
|
|
316
|
+
description: 'Gradle build output',
|
|
317
|
+
names: ['build'],
|
|
318
|
+
markers: [
|
|
319
|
+
'build.gradle',
|
|
320
|
+
'build.gradle.kts',
|
|
321
|
+
'settings.gradle',
|
|
322
|
+
'settings.gradle.kts',
|
|
323
|
+
],
|
|
324
|
+
busy: JVM_BUSY,
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: 'gradle-project-cache',
|
|
328
|
+
kind: 'cache',
|
|
329
|
+
description: 'Gradle and Kotlin project caches',
|
|
330
|
+
names: ['.gradle', '.kotlin'],
|
|
331
|
+
markers: [
|
|
332
|
+
'build.gradle',
|
|
333
|
+
'build.gradle.kts',
|
|
334
|
+
'settings.gradle',
|
|
335
|
+
'settings.gradle.kts',
|
|
336
|
+
],
|
|
337
|
+
busy: JVM_BUSY,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
id: 'maven-target',
|
|
341
|
+
kind: 'build',
|
|
342
|
+
description: 'Maven build output',
|
|
343
|
+
names: ['target'],
|
|
344
|
+
markers: ['pom.xml'],
|
|
345
|
+
busy: JVM_BUSY,
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
id: 'go',
|
|
351
|
+
name: 'Go',
|
|
352
|
+
caches: [
|
|
353
|
+
{
|
|
354
|
+
id: 'go-build-cache',
|
|
355
|
+
description: 'Go build cache',
|
|
356
|
+
paths: [
|
|
357
|
+
'~/.cache/go-build',
|
|
358
|
+
'~/Library/Caches/go-build',
|
|
359
|
+
'{LOCALAPPDATA}/go-build',
|
|
360
|
+
],
|
|
361
|
+
native: { tool: 'go', argv: ['go', 'clean', '-cache'] },
|
|
362
|
+
busy: ['go', 'gopls'],
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
id: 'go-mod-cache',
|
|
366
|
+
description: 'Go module cache',
|
|
367
|
+
paths: ['~/go/pkg/mod'],
|
|
368
|
+
native: { tool: 'go', argv: ['go', 'clean', '-modcache'] },
|
|
369
|
+
busy: ['go', 'gopls'],
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
id: 'golangci-lint-cache',
|
|
373
|
+
description: 'golangci-lint cache',
|
|
374
|
+
paths: ['~/.cache/golangci-lint', '~/Library/Caches/golangci-lint'],
|
|
375
|
+
busy: ['golangci-lint'],
|
|
376
|
+
},
|
|
377
|
+
],
|
|
378
|
+
projects: [],
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
id: 'c-cpp',
|
|
382
|
+
name: 'C / C++',
|
|
383
|
+
caches: [
|
|
384
|
+
{
|
|
385
|
+
id: 'ccache',
|
|
386
|
+
description: 'ccache compilation cache',
|
|
387
|
+
paths: ['~/.cache/ccache', '~/.ccache', '~/Library/Caches/ccache'],
|
|
388
|
+
native: { tool: 'ccache', argv: ['ccache', '--clear'] },
|
|
389
|
+
busy: ['ccache', 'make', 'ninja', 'cmake'],
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
id: 'vcpkg-archives',
|
|
393
|
+
description: 'vcpkg binary cache',
|
|
394
|
+
paths: ['~/.cache/vcpkg/archives', '{LOCALAPPDATA}/vcpkg/archives'],
|
|
395
|
+
busy: ['vcpkg'],
|
|
396
|
+
},
|
|
397
|
+
],
|
|
398
|
+
projects: [
|
|
399
|
+
{
|
|
400
|
+
id: 'cmake-build',
|
|
401
|
+
kind: 'build',
|
|
402
|
+
description: 'CMake build tree',
|
|
403
|
+
names: ['cmake-build-*', 'build', 'out'],
|
|
404
|
+
markers: ['CMakeLists.txt'],
|
|
405
|
+
selfMarkers: ['CMakeCache.txt', 'build.ninja', 'Makefile'],
|
|
406
|
+
busy: ['make', 'ninja', 'cmake', 'cc1', 'cc1plus', 'clang', 'ld'],
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
id: 'cpp-index-cache',
|
|
410
|
+
kind: 'cache',
|
|
411
|
+
description: 'language server index cache',
|
|
412
|
+
names: ['.ccls-cache', '.clangd'],
|
|
413
|
+
busy: ['ccls', 'clangd'],
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
id: 'dotnet',
|
|
419
|
+
name: '.NET',
|
|
420
|
+
caches: [
|
|
421
|
+
{
|
|
422
|
+
id: 'nuget-packages',
|
|
423
|
+
description: 'NuGet global packages folder',
|
|
424
|
+
paths: ['~/.nuget/packages'],
|
|
425
|
+
native: {
|
|
426
|
+
tool: 'dotnet',
|
|
427
|
+
argv: ['dotnet', 'nuget', 'locals', 'global-packages', '--clear'],
|
|
428
|
+
},
|
|
429
|
+
busy: DOTNET_BUSY,
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
id: 'nuget-http-cache',
|
|
433
|
+
description: 'NuGet HTTP cache',
|
|
434
|
+
paths: [
|
|
435
|
+
'~/.local/share/NuGet/v3-cache',
|
|
436
|
+
'~/.local/share/NuGet/http-cache',
|
|
437
|
+
'{LOCALAPPDATA}/NuGet/v3-cache',
|
|
438
|
+
],
|
|
439
|
+
busy: DOTNET_BUSY,
|
|
440
|
+
},
|
|
441
|
+
],
|
|
442
|
+
projects: [
|
|
443
|
+
{
|
|
444
|
+
id: 'dotnet-obj',
|
|
445
|
+
kind: 'build',
|
|
446
|
+
description: 'MSBuild intermediate output',
|
|
447
|
+
names: ['obj'],
|
|
448
|
+
markers: ['*.csproj', '*.fsproj', '*.vbproj'],
|
|
449
|
+
selfMarkers: ['project.assets.json', 'Debug', 'Release'],
|
|
450
|
+
busy: DOTNET_BUSY,
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
id: 'dotnet-bin',
|
|
454
|
+
kind: 'build',
|
|
455
|
+
description: 'MSBuild output',
|
|
456
|
+
names: ['bin'],
|
|
457
|
+
markers: ['*.csproj', '*.fsproj', '*.vbproj'],
|
|
458
|
+
selfMarkers: ['Debug', 'Release'],
|
|
459
|
+
busy: DOTNET_BUSY,
|
|
460
|
+
},
|
|
461
|
+
],
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
id: 'php',
|
|
465
|
+
name: 'PHP',
|
|
466
|
+
caches: [
|
|
467
|
+
{
|
|
468
|
+
id: 'composer-cache',
|
|
469
|
+
description: 'Composer download cache',
|
|
470
|
+
paths: [
|
|
471
|
+
'~/.cache/composer',
|
|
472
|
+
'~/.composer/cache',
|
|
473
|
+
'~/Library/Caches/composer',
|
|
474
|
+
'{LOCALAPPDATA}/Composer',
|
|
475
|
+
],
|
|
476
|
+
native: { tool: 'composer', argv: ['composer', 'clear-cache'] },
|
|
477
|
+
busy: ['composer', 'php'],
|
|
478
|
+
},
|
|
479
|
+
],
|
|
480
|
+
projects: [
|
|
481
|
+
{
|
|
482
|
+
id: 'composer-vendor',
|
|
483
|
+
kind: 'dependencies',
|
|
484
|
+
description: 'Composer dependencies',
|
|
485
|
+
names: ['vendor'],
|
|
486
|
+
markers: ['composer.json'],
|
|
487
|
+
lockfiles: ['composer.lock'],
|
|
488
|
+
selfMarkers: ['autoload.php'],
|
|
489
|
+
busy: ['composer', 'php', 'php-fpm'],
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
id: 'ruby',
|
|
495
|
+
name: 'Ruby',
|
|
496
|
+
caches: [
|
|
497
|
+
{
|
|
498
|
+
id: 'gem-cache',
|
|
499
|
+
description: 'RubyGems spec and download cache',
|
|
500
|
+
paths: ['~/.gem/specs', '~/.local/share/gem/specs', '~/.bundle/cache'],
|
|
501
|
+
busy: ['gem', 'bundle', 'ruby'],
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
id: 'rubocop-cache',
|
|
505
|
+
description: 'RuboCop cache',
|
|
506
|
+
paths: ['~/.cache/rubocop_cache'],
|
|
507
|
+
busy: ['rubocop'],
|
|
508
|
+
},
|
|
509
|
+
],
|
|
510
|
+
projects: [
|
|
511
|
+
{
|
|
512
|
+
id: 'bundler-vendor',
|
|
513
|
+
kind: 'dependencies',
|
|
514
|
+
description: 'Bundler-installed gems',
|
|
515
|
+
names: ['bundle'],
|
|
516
|
+
parentName: 'vendor',
|
|
517
|
+
parentMarkers: ['Gemfile'],
|
|
518
|
+
lockfiles: ['Gemfile.lock'],
|
|
519
|
+
busy: ['ruby', 'bundle', 'rails', 'puma'],
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
id: 'rails-tmp-cache',
|
|
523
|
+
kind: 'cache',
|
|
524
|
+
description: 'Rails tmp cache',
|
|
525
|
+
names: ['cache'],
|
|
526
|
+
parentName: 'tmp',
|
|
527
|
+
parentMarkers: ['Gemfile'],
|
|
528
|
+
busy: ['ruby', 'rails', 'puma'],
|
|
529
|
+
},
|
|
530
|
+
],
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
id: 'swift',
|
|
534
|
+
name: 'Swift / Apple',
|
|
535
|
+
caches: [
|
|
536
|
+
{
|
|
537
|
+
id: 'xcode-derived-data',
|
|
538
|
+
description: 'Xcode DerivedData',
|
|
539
|
+
paths: ['~/Library/Developer/Xcode/DerivedData'],
|
|
540
|
+
busy: ['Xcode', 'xcodebuild', 'swift-frontend'],
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
id: 'swiftpm-cache',
|
|
544
|
+
description: 'SwiftPM repository cache',
|
|
545
|
+
paths: [
|
|
546
|
+
'~/Library/Caches/org.swift.swiftpm',
|
|
547
|
+
'~/.cache/org.swift.swiftpm',
|
|
548
|
+
],
|
|
549
|
+
busy: ['swift', 'swift-build', 'swift-frontend'],
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 'cocoapods-cache',
|
|
553
|
+
description: 'CocoaPods download cache',
|
|
554
|
+
paths: ['~/Library/Caches/CocoaPods'],
|
|
555
|
+
busy: ['pod'],
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
id: 'core-simulator-caches',
|
|
559
|
+
description: 'iOS simulator caches',
|
|
560
|
+
paths: ['~/Library/Developer/CoreSimulator/Caches'],
|
|
561
|
+
busy: ['Simulator', 'simctl'],
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
id: 'ios-device-support',
|
|
565
|
+
description: 'iOS DeviceSupport symbols (re-copied on device connect)',
|
|
566
|
+
tier: 'moderate',
|
|
567
|
+
paths: ['~/Library/Developer/Xcode/iOS DeviceSupport'],
|
|
568
|
+
busy: ['Xcode'],
|
|
569
|
+
},
|
|
570
|
+
],
|
|
571
|
+
projects: [
|
|
572
|
+
{
|
|
573
|
+
id: 'swiftpm-build',
|
|
574
|
+
kind: 'build',
|
|
575
|
+
description: 'SwiftPM build output',
|
|
576
|
+
names: ['.build'],
|
|
577
|
+
markers: ['Package.swift'],
|
|
578
|
+
busy: ['swift', 'swift-build', 'swift-frontend'],
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
id: 'cocoapods-pods',
|
|
582
|
+
kind: 'dependencies',
|
|
583
|
+
description: 'CocoaPods dependencies',
|
|
584
|
+
names: ['Pods'],
|
|
585
|
+
markers: ['Podfile'],
|
|
586
|
+
busy: ['pod', 'xcodebuild'],
|
|
587
|
+
},
|
|
588
|
+
],
|
|
589
|
+
},
|
|
590
|
+
{
|
|
591
|
+
id: 'dart',
|
|
592
|
+
name: 'Dart / Flutter',
|
|
593
|
+
caches: [
|
|
594
|
+
{
|
|
595
|
+
id: 'pub-cache',
|
|
596
|
+
description: 'pub package cache',
|
|
597
|
+
paths: [
|
|
598
|
+
'~/.pub-cache/hosted',
|
|
599
|
+
'~/.pub-cache/git',
|
|
600
|
+
'{LOCALAPPDATA}/Pub/Cache',
|
|
601
|
+
],
|
|
602
|
+
busy: ['dart', 'flutter'],
|
|
603
|
+
},
|
|
604
|
+
],
|
|
605
|
+
projects: [
|
|
606
|
+
{
|
|
607
|
+
id: 'dart-tool',
|
|
608
|
+
kind: 'build',
|
|
609
|
+
description: 'Dart tool and build output',
|
|
610
|
+
names: ['.dart_tool', 'build'],
|
|
611
|
+
markers: ['pubspec.yaml'],
|
|
612
|
+
busy: ['dart', 'flutter'],
|
|
613
|
+
},
|
|
614
|
+
],
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
id: 'haskell',
|
|
618
|
+
name: 'Haskell',
|
|
619
|
+
caches: [
|
|
620
|
+
{
|
|
621
|
+
id: 'cabal-packages',
|
|
622
|
+
description: 'cabal package downloads',
|
|
623
|
+
paths: ['~/.cabal/packages', '~/.cache/cabal/packages'],
|
|
624
|
+
busy: ['cabal', 'ghc'],
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
id: 'cabal-store',
|
|
628
|
+
description: 'cabal store (built libraries)',
|
|
629
|
+
tier: 'moderate',
|
|
630
|
+
paths: ['~/.cabal/store', '~/.local/state/cabal/store'],
|
|
631
|
+
busy: ['cabal', 'ghc'],
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
id: 'stack-cache',
|
|
635
|
+
description: 'Stack pantry and snapshot builds',
|
|
636
|
+
tier: 'moderate',
|
|
637
|
+
paths: ['~/.stack/pantry', '~/.stack/snapshots'],
|
|
638
|
+
busy: ['stack', 'ghc'],
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
id: 'ghcup-cache',
|
|
642
|
+
description: 'ghcup download cache',
|
|
643
|
+
paths: ['~/.ghcup/cache', '~/.ghcup/tmp', '~/.ghcup/logs'],
|
|
644
|
+
busy: ['ghcup'],
|
|
645
|
+
},
|
|
646
|
+
],
|
|
647
|
+
projects: [
|
|
648
|
+
{
|
|
649
|
+
id: 'haskell-build',
|
|
650
|
+
kind: 'build',
|
|
651
|
+
description: 'cabal/stack build output',
|
|
652
|
+
names: ['dist-newstyle', '.stack-work'],
|
|
653
|
+
markers: ['*.cabal', 'cabal.project', 'stack.yaml', 'package.yaml'],
|
|
654
|
+
busy: ['cabal', 'stack', 'ghc'],
|
|
655
|
+
},
|
|
656
|
+
],
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
id: 'scala',
|
|
660
|
+
name: 'Scala',
|
|
661
|
+
caches: [
|
|
662
|
+
{
|
|
663
|
+
id: 'coursier-cache',
|
|
664
|
+
description: 'Coursier download cache',
|
|
665
|
+
paths: [
|
|
666
|
+
'~/.cache/coursier',
|
|
667
|
+
'~/Library/Caches/Coursier',
|
|
668
|
+
'{LOCALAPPDATA}/Coursier/cache',
|
|
669
|
+
],
|
|
670
|
+
busy: ['java', 'sbt', 'cs', 'scala-cli', 'mill'],
|
|
671
|
+
},
|
|
672
|
+
{
|
|
673
|
+
id: 'ivy-sbt-cache',
|
|
674
|
+
description: 'Ivy download cache and sbt boot',
|
|
675
|
+
paths: ['~/.ivy2/cache', '~/.sbt/boot'],
|
|
676
|
+
busy: ['java', 'sbt'],
|
|
677
|
+
},
|
|
678
|
+
],
|
|
679
|
+
projects: [
|
|
680
|
+
{
|
|
681
|
+
id: 'sbt-target',
|
|
682
|
+
kind: 'build',
|
|
683
|
+
description: 'sbt build output',
|
|
684
|
+
names: ['target'],
|
|
685
|
+
markers: ['build.sbt', 'build.properties', 'plugins.sbt', 'build.sc'],
|
|
686
|
+
busy: ['java', 'sbt', 'mill', 'bloop'],
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: 'scala-ide-cache',
|
|
690
|
+
kind: 'cache',
|
|
691
|
+
description: 'Metals/Bloop project cache',
|
|
692
|
+
names: ['.bloop', '.metals', '.scala-build'],
|
|
693
|
+
busy: ['java', 'bloop', 'metals', 'scala-cli'],
|
|
694
|
+
},
|
|
695
|
+
],
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
id: 'elixir',
|
|
699
|
+
name: 'Elixir / Erlang',
|
|
700
|
+
caches: [
|
|
701
|
+
{
|
|
702
|
+
id: 'hex-cache',
|
|
703
|
+
description: 'Hex package cache',
|
|
704
|
+
paths: ['~/.hex/packages', '~/.cache/rebar3', '~/Library/Caches/hex'],
|
|
705
|
+
busy: ['beam.smp', 'mix', 'rebar3'],
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
projects: [
|
|
709
|
+
{
|
|
710
|
+
id: 'mix-build',
|
|
711
|
+
kind: 'build',
|
|
712
|
+
description: 'Mix build output and dependencies',
|
|
713
|
+
names: ['_build', 'deps'],
|
|
714
|
+
markers: ['mix.exs', 'rebar.config'],
|
|
715
|
+
busy: ['beam.smp', 'mix', 'rebar3'],
|
|
716
|
+
},
|
|
717
|
+
],
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
id: 'ocaml',
|
|
721
|
+
name: 'OCaml',
|
|
722
|
+
caches: [
|
|
723
|
+
{
|
|
724
|
+
id: 'opam-download-cache',
|
|
725
|
+
description: 'opam download cache',
|
|
726
|
+
paths: ['~/.opam/download-cache'],
|
|
727
|
+
native: { tool: 'opam', argv: ['opam', 'clean', '--download-cache'] },
|
|
728
|
+
busy: ['opam', 'dune', 'ocaml'],
|
|
729
|
+
},
|
|
730
|
+
],
|
|
731
|
+
projects: [
|
|
732
|
+
{
|
|
733
|
+
id: 'dune-build',
|
|
734
|
+
kind: 'build',
|
|
735
|
+
description: 'dune build output',
|
|
736
|
+
names: ['_build'],
|
|
737
|
+
markers: ['dune-project', 'dune'],
|
|
738
|
+
busy: ['dune', 'ocaml', 'ocamlfind'],
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
id: 'opam-local-switch',
|
|
742
|
+
kind: 'dependencies',
|
|
743
|
+
description: 'project-local opam switch',
|
|
744
|
+
names: ['_opam'],
|
|
745
|
+
markers: ['*.opam', 'dune-project'],
|
|
746
|
+
busy: ['opam', 'dune', 'ocaml'],
|
|
747
|
+
},
|
|
748
|
+
],
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
id: 'lean',
|
|
752
|
+
name: 'Lean',
|
|
753
|
+
caches: [
|
|
754
|
+
{
|
|
755
|
+
id: 'mathlib-cache',
|
|
756
|
+
description: 'Mathlib olean cache',
|
|
757
|
+
paths: ['~/.cache/mathlib', '~/Library/Caches/mathlib'],
|
|
758
|
+
busy: ['lake', 'lean'],
|
|
759
|
+
},
|
|
760
|
+
],
|
|
761
|
+
projects: [
|
|
762
|
+
{
|
|
763
|
+
id: 'lake-build',
|
|
764
|
+
kind: 'build',
|
|
765
|
+
description: 'Lake packages and build output',
|
|
766
|
+
names: ['.lake', 'lake-packages'],
|
|
767
|
+
markers: ['lakefile.lean', 'lakefile.toml', 'lean-toolchain'],
|
|
768
|
+
busy: ['lake', 'lean'],
|
|
769
|
+
},
|
|
770
|
+
],
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
id: 'julia',
|
|
774
|
+
name: 'Julia',
|
|
775
|
+
caches: [
|
|
776
|
+
{
|
|
777
|
+
id: 'julia-compiled',
|
|
778
|
+
description: 'Julia precompilation cache',
|
|
779
|
+
paths: ['~/.julia/compiled'],
|
|
780
|
+
busy: ['julia'],
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
id: 'julia-packages',
|
|
784
|
+
description: 'Julia packages and artifacts',
|
|
785
|
+
tier: 'moderate',
|
|
786
|
+
paths: ['~/.julia/packages'],
|
|
787
|
+
busy: ['julia'],
|
|
788
|
+
},
|
|
789
|
+
],
|
|
790
|
+
projects: [],
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
id: 'r',
|
|
794
|
+
name: 'R',
|
|
795
|
+
caches: [],
|
|
796
|
+
projects: [
|
|
797
|
+
{
|
|
798
|
+
id: 'renv-library',
|
|
799
|
+
kind: 'dependencies',
|
|
800
|
+
description: 'renv project library',
|
|
801
|
+
names: ['library'],
|
|
802
|
+
parentName: 'renv',
|
|
803
|
+
parentMarkers: ['renv.lock'],
|
|
804
|
+
busy: ['R', 'Rscript', 'rsession'],
|
|
805
|
+
},
|
|
806
|
+
],
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
id: 'zig',
|
|
810
|
+
name: 'Zig',
|
|
811
|
+
caches: [
|
|
812
|
+
{
|
|
813
|
+
id: 'zig-global-cache',
|
|
814
|
+
description: 'Zig global cache',
|
|
815
|
+
paths: ['~/.cache/zig', '~/Library/Caches/zig', '{LOCALAPPDATA}/zig'],
|
|
816
|
+
busy: ['zig', 'zls'],
|
|
817
|
+
},
|
|
818
|
+
],
|
|
819
|
+
projects: [
|
|
820
|
+
{
|
|
821
|
+
id: 'zig-cache',
|
|
822
|
+
kind: 'cache',
|
|
823
|
+
description: 'Zig local cache',
|
|
824
|
+
names: ['.zig-cache', 'zig-cache'],
|
|
825
|
+
markers: ['build.zig'],
|
|
826
|
+
busy: ['zig', 'zls'],
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
id: 'zig-out',
|
|
830
|
+
kind: 'build',
|
|
831
|
+
description: 'Zig install prefix',
|
|
832
|
+
names: ['zig-out'],
|
|
833
|
+
markers: ['build.zig'],
|
|
834
|
+
busy: ['zig'],
|
|
835
|
+
},
|
|
836
|
+
],
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
id: 'scripting',
|
|
840
|
+
name: 'Perl / Lua / Nim / Crystal',
|
|
841
|
+
caches: [
|
|
842
|
+
{
|
|
843
|
+
id: 'cpan-build',
|
|
844
|
+
description: 'cpanm and CPAN build directories',
|
|
845
|
+
paths: ['~/.cpanm/work', '~/.cpan/build', '~/.cpan/sources'],
|
|
846
|
+
busy: ['cpanm', 'cpan', 'perl'],
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
id: 'luarocks-cache',
|
|
850
|
+
description: 'LuaRocks cache',
|
|
851
|
+
paths: ['~/.cache/luarocks'],
|
|
852
|
+
busy: ['luarocks'],
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
id: 'nim-cache',
|
|
856
|
+
description: 'Nim compilation cache',
|
|
857
|
+
paths: ['~/.cache/nim', '~/nimcache'],
|
|
858
|
+
busy: ['nim', 'nimble'],
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
id: 'crystal-cache',
|
|
862
|
+
description: 'Crystal compilation cache',
|
|
863
|
+
paths: ['~/.cache/crystal', '~/Library/Caches/crystal'],
|
|
864
|
+
busy: ['crystal', 'shards'],
|
|
865
|
+
},
|
|
866
|
+
],
|
|
867
|
+
projects: [
|
|
868
|
+
{
|
|
869
|
+
id: 'lua-modules',
|
|
870
|
+
kind: 'dependencies',
|
|
871
|
+
description: 'LuaRocks project tree',
|
|
872
|
+
names: ['lua_modules'],
|
|
873
|
+
markers: ['*.rockspec', '.luarocks'],
|
|
874
|
+
busy: ['lua', 'luajit', 'luarocks'],
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
id: 'nimble-deps',
|
|
878
|
+
kind: 'dependencies',
|
|
879
|
+
description: 'Nimble local dependencies',
|
|
880
|
+
names: ['nimbledeps', 'nimcache'],
|
|
881
|
+
markers: ['*.nimble', 'config.nims'],
|
|
882
|
+
busy: ['nim', 'nimble'],
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
id: 'crystal-lib',
|
|
886
|
+
kind: 'dependencies',
|
|
887
|
+
description: 'Crystal shards',
|
|
888
|
+
names: ['lib'],
|
|
889
|
+
markers: ['shard.lock'],
|
|
890
|
+
busy: ['crystal', 'shards'],
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
id: 'perl-local-lib',
|
|
894
|
+
kind: 'dependencies',
|
|
895
|
+
description: 'Carton local library',
|
|
896
|
+
names: ['local'],
|
|
897
|
+
markers: ['cpanfile.snapshot'],
|
|
898
|
+
busy: ['perl', 'carton'],
|
|
899
|
+
},
|
|
900
|
+
],
|
|
901
|
+
},
|
|
902
|
+
];
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Project rules flattened with their ecosystem id.
|
|
906
|
+
*/
|
|
907
|
+
export const PROJECT_RULES = ECOSYSTEMS.flatMap((ecosystem) =>
|
|
908
|
+
ecosystem.projects.map((rule) => ({ ...rule, ecosystem: ecosystem.id }))
|
|
909
|
+
);
|
|
910
|
+
|
|
911
|
+
/**
|
|
912
|
+
* Global cache rules flattened with their ecosystem id.
|
|
913
|
+
*/
|
|
914
|
+
export const CACHE_RULES = ECOSYSTEMS.flatMap((ecosystem) =>
|
|
915
|
+
ecosystem.caches.map((rule) => ({ ...rule, ecosystem: ecosystem.id }))
|
|
916
|
+
);
|