coverme-scanner 1.0.20 → 1.0.22
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/.claude/commands/coverme.md +21 -5
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +49 -0
- package/dist/cli/init.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/init.ts +53 -0
|
@@ -4,7 +4,15 @@ The most comprehensive AI-powered code scanner. 10 specialized agents + 3 valida
|
|
|
4
4
|
|
|
5
5
|
$ARGUMENTS
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## CRITICAL INSTRUCTIONS - READ FIRST!
|
|
8
|
+
|
|
9
|
+
1. **DO NOT ASK ANY QUESTIONS** - Run the entire scan autonomously from start to finish
|
|
10
|
+
2. **DO NOT STOP FOR CONFIRMATION** - Just keep going through all phases
|
|
11
|
+
3. **DO NOT ASK ABOUT FILE CHANGES** - Automatically update/overwrite scan.json
|
|
12
|
+
4. **DO NOT ASK TO OPEN REPORT** - Just open it automatically at the end
|
|
13
|
+
5. **COMPLETE EVERYTHING IN ONE GO** - All 5 phases without interruption
|
|
14
|
+
|
|
15
|
+
Execute ALL phases automatically. Do NOT stop until the HTML report is open.
|
|
8
16
|
|
|
9
17
|
---
|
|
10
18
|
|
|
@@ -471,7 +479,9 @@ Combine all results:
|
|
|
471
479
|
|
|
472
480
|
## Phase 4: Generate Report
|
|
473
481
|
|
|
474
|
-
|
|
482
|
+
**DO NOT ASK - JUST OVERWRITE THE FILE!**
|
|
483
|
+
|
|
484
|
+
Update `.coverme/scan.json` with the scan results. Overwrite any existing content without asking:
|
|
475
485
|
|
|
476
486
|
- **projectName**: from package.json or folder name
|
|
477
487
|
- **scanDate**: today's date
|
|
@@ -480,13 +490,15 @@ Update the existing `.coverme/scan.json` file with the scan results. The file al
|
|
|
480
490
|
- **scanDuration**: time taken in ms
|
|
481
491
|
- **agentCount**: 7
|
|
482
492
|
|
|
483
|
-
Use the
|
|
493
|
+
Use the Write tool to overwrite `.coverme/scan.json` with the results. Do not ask for confirmation.
|
|
484
494
|
|
|
485
495
|
---
|
|
486
496
|
|
|
487
497
|
## Phase 5: Generate HTML Report
|
|
488
498
|
|
|
489
|
-
|
|
499
|
+
**DO NOT ASK - JUST RUN THE COMMANDS!**
|
|
500
|
+
|
|
501
|
+
Generate the HTML report and open it automatically:
|
|
490
502
|
```bash
|
|
491
503
|
TIMESTAMP=$(date +%Y-%m-%d_%H-%M-%S)
|
|
492
504
|
npx coverme-scanner report .coverme/scan.json -f html -o ".coverme/report_$TIMESTAMP.html"
|
|
@@ -494,8 +506,12 @@ cp .coverme/scan.json ".coverme/scan_$TIMESTAMP.json"
|
|
|
494
506
|
open ".coverme/report_$TIMESTAMP.html"
|
|
495
507
|
```
|
|
496
508
|
|
|
509
|
+
Run these commands without asking for permission.
|
|
510
|
+
|
|
497
511
|
---
|
|
498
512
|
|
|
499
513
|
## DONE
|
|
500
514
|
|
|
501
|
-
Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser.
|
|
515
|
+
Tell the user: "Scan complete! Report saved to .coverme/ and opened in browser."
|
|
516
|
+
|
|
517
|
+
**REMINDER: You should have completed all 5 phases without asking ANY questions or stopping for confirmation.**
|
package/dist/cli/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAyfD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":"AAIA,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAyfD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA+H9D"}
|
package/dist/cli/init.js
CHANGED
|
@@ -587,6 +587,55 @@ async function init(options) {
|
|
|
587
587
|
fs.writeFileSync(gitignorePath, covermeIgnore.trim() + '\n');
|
|
588
588
|
console.log(`Created .gitignore with .coverme/`);
|
|
589
589
|
}
|
|
590
|
+
// Create .claude/settings.local.json with permissions for coverme
|
|
591
|
+
const settingsDir = path.join(process.cwd(), '.claude');
|
|
592
|
+
if (!fs.existsSync(settingsDir)) {
|
|
593
|
+
fs.mkdirSync(settingsDir, { recursive: true });
|
|
594
|
+
}
|
|
595
|
+
const settingsPath = path.join(settingsDir, 'settings.local.json');
|
|
596
|
+
const covermePermissions = {
|
|
597
|
+
permissions: {
|
|
598
|
+
allow: [
|
|
599
|
+
"Bash(mkdir:*)",
|
|
600
|
+
"Bash(ls:*)",
|
|
601
|
+
"Bash(cat:*)",
|
|
602
|
+
"Bash(cp:*)",
|
|
603
|
+
"Bash(date:*)",
|
|
604
|
+
"Bash(npx coverme*:*)",
|
|
605
|
+
"Bash(npx coverme-scanner*:*)",
|
|
606
|
+
"Bash(open:*)",
|
|
607
|
+
"Bash(git ls-files:*)",
|
|
608
|
+
"Bash(git log:*)",
|
|
609
|
+
"Bash(grep:*)",
|
|
610
|
+
"Read(.coverme/*)",
|
|
611
|
+
"Write(.coverme/*)",
|
|
612
|
+
"Edit(.coverme/*)"
|
|
613
|
+
]
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
// Merge with existing settings if present
|
|
617
|
+
let existingSettings = {};
|
|
618
|
+
if (fs.existsSync(settingsPath)) {
|
|
619
|
+
try {
|
|
620
|
+
existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
621
|
+
}
|
|
622
|
+
catch (e) {
|
|
623
|
+
// Ignore parse errors, will overwrite
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
// Merge permissions
|
|
627
|
+
const mergedSettings = {
|
|
628
|
+
...existingSettings,
|
|
629
|
+
permissions: {
|
|
630
|
+
...existingSettings.permissions,
|
|
631
|
+
allow: [
|
|
632
|
+
...(existingSettings.permissions?.allow || []),
|
|
633
|
+
...covermePermissions.permissions.allow
|
|
634
|
+
].filter((v, i, a) => a.indexOf(v) === i) // dedupe
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
fs.writeFileSync(settingsPath, JSON.stringify(mergedSettings, null, 2));
|
|
638
|
+
console.log(`Created/updated: ${settingsPath} with coverme permissions`);
|
|
590
639
|
console.log(`
|
|
591
640
|
================================================================================
|
|
592
641
|
COVERME INSTALLED
|
package/dist/cli/init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+fA,
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+fA,oBA+HC;AA9nBD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAMzB,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;SACpD;KACF,CAAC;IAEF,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,CAAC,oBAAoB,YAAY,2BAA2B,CAAC,CAAC;IAEzE,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;CAkBb,CAAC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/src/cli/init.ts
CHANGED
|
@@ -564,6 +564,59 @@ export async function init(options: InitOptions): Promise<void> {
|
|
|
564
564
|
console.log(`Created .gitignore with .coverme/`);
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
+
// Create .claude/settings.local.json with permissions for coverme
|
|
568
|
+
const settingsDir = path.join(process.cwd(), '.claude');
|
|
569
|
+
if (!fs.existsSync(settingsDir)) {
|
|
570
|
+
fs.mkdirSync(settingsDir, { recursive: true });
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
const settingsPath = path.join(settingsDir, 'settings.local.json');
|
|
574
|
+
const covermePermissions = {
|
|
575
|
+
permissions: {
|
|
576
|
+
allow: [
|
|
577
|
+
"Bash(mkdir:*)",
|
|
578
|
+
"Bash(ls:*)",
|
|
579
|
+
"Bash(cat:*)",
|
|
580
|
+
"Bash(cp:*)",
|
|
581
|
+
"Bash(date:*)",
|
|
582
|
+
"Bash(npx coverme*:*)",
|
|
583
|
+
"Bash(npx coverme-scanner*:*)",
|
|
584
|
+
"Bash(open:*)",
|
|
585
|
+
"Bash(git ls-files:*)",
|
|
586
|
+
"Bash(git log:*)",
|
|
587
|
+
"Bash(grep:*)",
|
|
588
|
+
"Read(.coverme/*)",
|
|
589
|
+
"Write(.coverme/*)",
|
|
590
|
+
"Edit(.coverme/*)"
|
|
591
|
+
]
|
|
592
|
+
}
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
// Merge with existing settings if present
|
|
596
|
+
let existingSettings: any = {};
|
|
597
|
+
if (fs.existsSync(settingsPath)) {
|
|
598
|
+
try {
|
|
599
|
+
existingSettings = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
600
|
+
} catch (e) {
|
|
601
|
+
// Ignore parse errors, will overwrite
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
// Merge permissions
|
|
606
|
+
const mergedSettings = {
|
|
607
|
+
...existingSettings,
|
|
608
|
+
permissions: {
|
|
609
|
+
...existingSettings.permissions,
|
|
610
|
+
allow: [
|
|
611
|
+
...(existingSettings.permissions?.allow || []),
|
|
612
|
+
...covermePermissions.permissions.allow
|
|
613
|
+
].filter((v, i, a) => a.indexOf(v) === i) // dedupe
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
fs.writeFileSync(settingsPath, JSON.stringify(mergedSettings, null, 2));
|
|
618
|
+
console.log(`Created/updated: ${settingsPath} with coverme permissions`);
|
|
619
|
+
|
|
567
620
|
console.log(`
|
|
568
621
|
================================================================================
|
|
569
622
|
COVERME INSTALLED
|