repomeld 3.0.3 โ 3.0.5
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 +169 -35
- package/bin/cli.js +1 -1
- package/bin/repoclean.js +102 -0
- package/package.json +6 -5
- package/src/core/cleaner.js +82 -0
package/README.md
CHANGED
|
@@ -1,32 +1,78 @@
|
|
|
1
1
|
# repomeld ๐ฅ
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Turn your entire codebase into a single AI-ready file โ in seconds.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/repomeld)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
+
Works with:
|
|
9
|
+
|
|
10
|
+
| ChatGPT | Claude | Gemini | Cursor | Windsurf |
|
|
11
|
+
|---------|--------|--------|--------|----------|
|
|
12
|
+
| โ
| โ
| โ
| โ
| โ
|
|
|
13
|
+
|
|
8
14
|
---
|
|
9
15
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
## The Problem
|
|
17
|
+
|
|
18
|
+
AI tools are powerful โ but they struggle with large repositories.
|
|
19
|
+
|
|
20
|
+
Copying files manually is:
|
|
21
|
+
- **Slow** โ jumping between files, copy-pasting one by one
|
|
22
|
+
- **Error-prone** โ missing imports, missing context, wrong versions
|
|
23
|
+
- **Incomplete** โ AI sees fragments, not the full picture
|
|
24
|
+
|
|
25
|
+
The result? Vague suggestions. Wrong answers. Wasted time.
|
|
13
26
|
|
|
14
27
|
---
|
|
15
28
|
|
|
16
|
-
##
|
|
29
|
+
## The Solution
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
```bash
|
|
32
|
+
npx repomeld
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
repomeld scans your entire repository and produces a single, clean, AI-ready document containing:
|
|
36
|
+
|
|
37
|
+
โ
Project structure
|
|
38
|
+
โ
All source code
|
|
39
|
+
โ
Dependencies and config
|
|
40
|
+
โ
Optional Mermaid dependency diagrams
|
|
41
|
+
โ
Clean context โ nothing AI doesn't need
|
|
42
|
+
|
|
43
|
+
One file. Paste it. Ask anything.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Demo
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npx repomeld --style markdown --output context.md
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Upload `context.md` to ChatGPT, Claude, or Gemini and ask:
|
|
54
|
+
|
|
55
|
+
> *"Review my project and suggest improvements."*
|
|
56
|
+
|
|
57
|
+
Or drop it into Cursor / Windsurf as project context before starting a session.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Why repomeld Instead of repomix?
|
|
62
|
+
|
|
63
|
+
Many developers discover this category by searching for repomix. Here's how repomeld compares:
|
|
64
|
+
|
|
65
|
+
| Feature | repomeld | repomix |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| Auto-numbered outputs (never overwrites) | โ
| โ |
|
|
68
|
+
| Automatic backup zip creation | โ
| โ |
|
|
69
|
+
| `repoclean` โ one-command artifact cleanup | โ
| โ |
|
|
70
|
+
| Mermaid dependency graph | โ
| โ |
|
|
71
|
+
| Force include support | โ
| โ
|
|
|
72
|
+
| Multiple output styles (banner/markdown/minimal) | โ
| โ
|
|
|
73
|
+
| Gitignore support | โ
| โ
|
|
|
74
|
+
| Binary file detection + caching | โ
| โ
|
|
|
75
|
+
| Cross-platform (Windows, macOS, Linux) | โ
| โ
|
|
|
30
76
|
|
|
31
77
|
---
|
|
32
78
|
|
|
@@ -51,7 +97,25 @@ cd your-project
|
|
|
51
97
|
repomeld
|
|
52
98
|
```
|
|
53
99
|
|
|
54
|
-
|
|
100
|
+
repomeld walks your project, respects `.gitignore`, skips binary files, and writes everything into one readable file.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## โจ Features
|
|
105
|
+
|
|
106
|
+
- ๐ **Fast & Efficient** - Async scanning with real-time progress and binary caching
|
|
107
|
+
- ๐จ **Multiple Styles** - Banner, Markdown, or Minimal output
|
|
108
|
+
- ๐ **Smart Filtering** - Extension, pattern, and size-based filtering
|
|
109
|
+
- ๐ **Gitignore Support** - Respects your .gitignore rules automatically
|
|
110
|
+
- ๐พ **Binary Detection** - Intelligent caching for binary file detection
|
|
111
|
+
- ๐ฆ **Single File Output** - Perfect for AI context windows
|
|
112
|
+
- ๐ **Auto-Numbering** - Never overwrites existing files
|
|
113
|
+
- ๐ฟ **Zip Backup** - Creates auto-numbered backups in `repomeld_zips/` folder
|
|
114
|
+
- ๐ **Update Notifications** - Non-intrusive version checking
|
|
115
|
+
- ๐ฏ **Force Include** - Override ignore rules when needed
|
|
116
|
+
- ๐ **Dependency Graph** - Optional Mermaid diagram of file dependencies
|
|
117
|
+
- ๐งน **repoclean** - One command to delete all repomeld-generated files and zips
|
|
118
|
+
- ๐ **Cross-Platform** - Works perfectly on Windows, macOS, and Linux
|
|
55
119
|
|
|
56
120
|
---
|
|
57
121
|
|
|
@@ -256,7 +320,83 @@ The zip file contains:
|
|
|
256
320
|
To disable backups: `repomeld --no-backup`
|
|
257
321
|
|
|
258
322
|
---
|
|
259
|
-
|
|
323
|
+
|
|
324
|
+
## ๐งน repoclean โ Remove All repomeld Artifacts
|
|
325
|
+
|
|
326
|
+
After several runs, your project root can accumulate output files and zip backups. `repoclean` removes all of them in one command.
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
repoclean
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
It finds and deletes everything repomeld creates:
|
|
333
|
+
|
|
334
|
+
| What gets deleted | Examples |
|
|
335
|
+
|---|---|
|
|
336
|
+
| Output text files | `repomeld_output.txt`, `repomeld_output__2.txt`, ... |
|
|
337
|
+
| Custom-named outputs | `repomeld_myproject.txt` |
|
|
338
|
+
| Backup zip folder | `repomeld_zips/` (entire folder) |
|
|
339
|
+
|
|
340
|
+
### repoclean Options
|
|
341
|
+
|
|
342
|
+
```
|
|
343
|
+
Usage: repoclean [options]
|
|
344
|
+
|
|
345
|
+
Options:
|
|
346
|
+
-V, --version Show version number
|
|
347
|
+
-h, --help Show help
|
|
348
|
+
--dry-run Preview what would be deleted โ nothing is removed
|
|
349
|
+
-y, --yes Skip confirmation prompt (useful for scripts/CI)
|
|
350
|
+
-d, --dir <path> Clean a specific directory instead of cwd
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### repoclean Examples
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
# Interactive โ lists items and asks for confirmation
|
|
357
|
+
repoclean
|
|
358
|
+
|
|
359
|
+
# Preview only โ shows what would be deleted without removing anything
|
|
360
|
+
repoclean --dry-run
|
|
361
|
+
|
|
362
|
+
# Skip confirmation (for CI or scripts)
|
|
363
|
+
repoclean --yes
|
|
364
|
+
|
|
365
|
+
# Clean a specific directory
|
|
366
|
+
repoclean --dir /path/to/project
|
|
367
|
+
|
|
368
|
+
# Preview a different directory
|
|
369
|
+
repoclean --dry-run --dir ../other-project
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Typical repoclean session
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
376
|
+
โ repoclean v3.1.0 โ
|
|
377
|
+
โ Remove all repomeld-generated files ๐งน โ
|
|
378
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
|
|
379
|
+
โ ๐ผ susheelhbti@gmail.com โ Open for work โ
|
|
380
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
381
|
+
|
|
382
|
+
๐ Target : /your/project
|
|
383
|
+
|
|
384
|
+
๐ Found 4 item(s) to remove:
|
|
385
|
+
|
|
386
|
+
๐ repomeld_output.txt
|
|
387
|
+
๐ repomeld_output__2.txt
|
|
388
|
+
๐ repomeld_output__3.txt
|
|
389
|
+
๐ repomeld_zips\ (entire folder)
|
|
390
|
+
|
|
391
|
+
โ ๏ธ Delete all 4 item(s)? This cannot be undone. [y/N] y
|
|
392
|
+
|
|
393
|
+
โจ repoclean complete!
|
|
394
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
395
|
+
โ
Deleted : 4 item(s)
|
|
396
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
260
400
|
|
|
261
401
|
## Performance Optimizations
|
|
262
402
|
|
|
@@ -320,15 +460,19 @@ repomeld --include src --style markdown --output analysis.md
|
|
|
320
460
|
# Then render the Mermaid graph in the output
|
|
321
461
|
```
|
|
322
462
|
|
|
323
|
-
|
|
324
|
-
|
|
463
|
+
### ๐งน Clean Up After AI Sessions
|
|
464
|
+
```bash
|
|
465
|
+
# After multiple repomeld runs, tidy up in one shot
|
|
466
|
+
repoclean
|
|
467
|
+
```
|
|
325
468
|
|
|
469
|
+
---
|
|
326
470
|
|
|
327
471
|
## Development
|
|
328
472
|
|
|
329
473
|
```bash
|
|
330
474
|
# Clone the repo
|
|
331
|
-
git clone https://github.com/
|
|
475
|
+
git clone https://github.com/susheelhbti/repomeld.git
|
|
332
476
|
cd repomeld
|
|
333
477
|
|
|
334
478
|
# Install dependencies
|
|
@@ -340,14 +484,12 @@ npm start -- --dry-run
|
|
|
340
484
|
# Link for global testing
|
|
341
485
|
npm link
|
|
342
486
|
repomeld --help
|
|
487
|
+
repoclean --help
|
|
343
488
|
|
|
344
489
|
# Run tests
|
|
345
490
|
npm test
|
|
346
491
|
```
|
|
347
492
|
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
|
|
351
493
|
---
|
|
352
494
|
|
|
353
495
|
## Contributing
|
|
@@ -362,8 +504,6 @@ Contributions are welcome! Please feel free to submit a Pull Request.
|
|
|
362
504
|
|
|
363
505
|
---
|
|
364
506
|
|
|
365
|
-
|
|
366
|
-
|
|
367
507
|
## License
|
|
368
508
|
|
|
369
509
|
MIT ยฉ [Susheel](mailto:susheelhbti@gmail.com)
|
|
@@ -378,16 +518,10 @@ MIT ยฉ [Susheel](mailto:susheelhbti@gmail.com)
|
|
|
378
518
|
|
|
379
519
|
---
|
|
380
520
|
|
|
381
|
-
> ## ๐ผ
|
|
521
|
+
> ## ๐ผ Open to Work
|
|
382
522
|
> Built by a developer available for **freelance and full-time opportunities**.
|
|
383
523
|
> Got a project? Let's talk โ ๐ง **[susheelhbti@gmail.com](mailto:susheelhbti@gmail.com)**
|
|
384
524
|
|
|
385
525
|
---
|
|
386
526
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
[](https://star-history.com/#susheel/repomeld&Date)
|
|
390
|
-
|
|
391
|
-
---
|
|
392
|
-
|
|
393
|
-
**Made with โค๏ธ for developers who need better context for AI tools**
|
|
527
|
+
**Made with โค๏ธ for developers who need better context for AI tools**
|
package/bin/cli.js
CHANGED
package/bin/repoclean.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const readline = require("readline");
|
|
5
|
+
const { program } = require("commander");
|
|
6
|
+
const { findRepomeldArtifacts, deleteArtifacts } = require("../src/core/cleaner");
|
|
7
|
+
const { getVersion } = require("../src/utils/version");
|
|
8
|
+
|
|
9
|
+
const { version: VERSION } = getVersion();
|
|
10
|
+
|
|
11
|
+
function printBanner() {
|
|
12
|
+
console.log(`
|
|
13
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
14
|
+
โ repoclean v${VERSION} โ
|
|
15
|
+
โ Remove all repomeld-generated files ๐งน โ
|
|
16
|
+
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฃ
|
|
17
|
+
โ ๐ผ susheelhbti@gmail.com โ Open for work โ
|
|
18
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
async function confirm(question) {
|
|
22
|
+
const rl = readline.createInterface({
|
|
23
|
+
input: process.stdin,
|
|
24
|
+
output: process.stdout,
|
|
25
|
+
});
|
|
26
|
+
return new Promise((resolve) => {
|
|
27
|
+
rl.question(question, (answer) => {
|
|
28
|
+
rl.close();
|
|
29
|
+
resolve(answer.trim().toLowerCase());
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
program
|
|
35
|
+
.name("repoclean")
|
|
36
|
+
.description("Delete all files and folders created by repomeld")
|
|
37
|
+
.version(VERSION)
|
|
38
|
+
.option("--dry-run", "Preview what would be deleted without actually deleting")
|
|
39
|
+
.option("-y, --yes", "Skip confirmation prompt and delete immediately")
|
|
40
|
+
.option("-d, --dir <path>", "Target directory to clean (defaults to cwd)")
|
|
41
|
+
.action(async (options) => {
|
|
42
|
+
printBanner();
|
|
43
|
+
|
|
44
|
+
const cwd = options.dir ? path.resolve(options.dir) : process.cwd();
|
|
45
|
+
console.log(`\n ๐ Target : ${cwd}\n`);
|
|
46
|
+
|
|
47
|
+
let artifacts;
|
|
48
|
+
try {
|
|
49
|
+
artifacts = await findRepomeldArtifacts(cwd);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
console.error(`\nโ Error: ${err.message}`);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const total = artifacts.files.length + artifacts.dirs.length;
|
|
56
|
+
|
|
57
|
+
if (total === 0) {
|
|
58
|
+
console.log(" โ
Nothing to clean โ no repomeld artifacts found.\n");
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Show what was found
|
|
63
|
+
console.log(` ๐ Found ${total} item(s) to remove:\n`);
|
|
64
|
+
for (const f of artifacts.files) {
|
|
65
|
+
console.log(` ๐ ${path.relative(cwd, f)}`);
|
|
66
|
+
}
|
|
67
|
+
for (const d of artifacts.dirs) {
|
|
68
|
+
console.log(` ๐ ${path.relative(cwd, d)}${path.sep} (entire folder)`);
|
|
69
|
+
}
|
|
70
|
+
console.log();
|
|
71
|
+
|
|
72
|
+
if (options.dryRun) {
|
|
73
|
+
console.log(" ๐งช Dry run โ nothing was deleted.\n");
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Confirm unless --yes supplied
|
|
78
|
+
if (!options.yes) {
|
|
79
|
+
const answer = await confirm(` โ ๏ธ Delete all ${total} item(s)? This cannot be undone. [y/N] `);
|
|
80
|
+
if (answer !== "y" && answer !== "yes") {
|
|
81
|
+
console.log("\n ๐ซ Aborted. Nothing was deleted.\n");
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const { deleted, failed } = await deleteArtifacts(artifacts, false);
|
|
87
|
+
|
|
88
|
+
console.log(`\n โจ repoclean complete!`);
|
|
89
|
+
console.log(` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ`);
|
|
90
|
+
console.log(` โ
Deleted : ${deleted.length} item(s)`);
|
|
91
|
+
if (failed.length) {
|
|
92
|
+
console.log(` โ Failed : ${failed.length} item(s)`);
|
|
93
|
+
for (const f of failed) {
|
|
94
|
+
console.log(` โข ${path.relative(cwd, f.path)} โ ${f.reason}`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
console.log(` โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n`);
|
|
98
|
+
|
|
99
|
+
if (failed.length) process.exit(1);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repomeld",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Meld your entire repo into a single file โ perfect for AI context & code reviews",
|
|
5
5
|
"main": "bin/cli.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"repomeld": "bin/cli.js"
|
|
7
|
+
"repomeld": "bin/cli.js",
|
|
8
|
+
"repoclean": "bin/repoclean.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"start": "node bin/cli.js",
|
|
@@ -32,10 +33,10 @@
|
|
|
32
33
|
},
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/
|
|
36
|
+
"url": "git+https://github.com/susheelhbti/repomeld.git"
|
|
36
37
|
},
|
|
37
38
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/
|
|
39
|
+
"url": "https://github.com/susheelhbti/repomeld/issues"
|
|
39
40
|
},
|
|
40
|
-
"homepage": "https://github.com/
|
|
41
|
+
"homepage": "https://github.com/susheelhbti/repomeld#readme"
|
|
41
42
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const fs = require("fs").promises;
|
|
2
|
+
const fsSync = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Finds all repomeld-generated files and folders in cwd.
|
|
7
|
+
*
|
|
8
|
+
* repomeld creates:
|
|
9
|
+
* - repomeld_output.txt
|
|
10
|
+
* - repomeld_output__2.txt, repomeld_output__3.txt, ... (any custom --output name too)
|
|
11
|
+
* - repomeld_zips/ (entire folder)
|
|
12
|
+
*
|
|
13
|
+
* The rule: anything whose name starts with "repomeld" (case-insensitive),
|
|
14
|
+
* which is exactly the same REPOMELD_PATTERN already used in fileScanner.js.
|
|
15
|
+
*/
|
|
16
|
+
const REPOMELD_PATTERN = /^repomeld/i;
|
|
17
|
+
|
|
18
|
+
async function findRepomeldArtifacts(cwd) {
|
|
19
|
+
const files = [];
|
|
20
|
+
const dirs = [];
|
|
21
|
+
|
|
22
|
+
let entries;
|
|
23
|
+
try {
|
|
24
|
+
entries = await fs.readdir(cwd, { withFileTypes: true });
|
|
25
|
+
} catch (err) {
|
|
26
|
+
throw new Error(`Cannot read directory: ${err.message}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
for (const entry of entries) {
|
|
30
|
+
if (!REPOMELD_PATTERN.test(entry.name)) continue;
|
|
31
|
+
|
|
32
|
+
const fullPath = path.join(cwd, entry.name);
|
|
33
|
+
if (entry.isDirectory()) {
|
|
34
|
+
dirs.push(fullPath);
|
|
35
|
+
} else if (entry.isFile()) {
|
|
36
|
+
files.push(fullPath);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return { files, dirs };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function deleteArtifacts({ files, dirs }, dryRun) {
|
|
44
|
+
const deleted = [];
|
|
45
|
+
const failed = [];
|
|
46
|
+
|
|
47
|
+
for (const filePath of files) {
|
|
48
|
+
if (dryRun) {
|
|
49
|
+
deleted.push(filePath);
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
await fs.unlink(filePath);
|
|
54
|
+
deleted.push(filePath);
|
|
55
|
+
} catch (err) {
|
|
56
|
+
failed.push({ path: filePath, reason: err.message });
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
for (const dirPath of dirs) {
|
|
61
|
+
if (dryRun) {
|
|
62
|
+
deleted.push(dirPath);
|
|
63
|
+
continue;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
await fs.rm(dirPath, { recursive: true, force: true });
|
|
67
|
+
deleted.push(dirPath);
|
|
68
|
+
} catch (err) {
|
|
69
|
+
// fs.rm may not exist on Node 14 โ fall back to rmdir recursive
|
|
70
|
+
try {
|
|
71
|
+
fsSync.rmdirSync(dirPath, { recursive: true });
|
|
72
|
+
deleted.push(dirPath);
|
|
73
|
+
} catch (err2) {
|
|
74
|
+
failed.push({ path: dirPath, reason: err2.message });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return { deleted, failed };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
module.exports = { findRepomeldArtifacts, deleteArtifacts };
|