ccperm 1.1.0 → 1.1.1
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/dist/scanner.js +10 -1
- package/package.json +1 -1
package/dist/scanner.js
CHANGED
|
@@ -13,11 +13,20 @@ const PERM_RE = /"(Bash|Write|Edit|Read|Glob|Grep|WebSearch|WebFetch|mcp_)[^"]*"
|
|
|
13
13
|
const DEPRECATED_RE = /:\*\)|:\*"/g;
|
|
14
14
|
exports.DEPRECATED_PERM_RE = /:\*$|:\*\)/;
|
|
15
15
|
function findSettingsFiles(searchDir) {
|
|
16
|
+
const prune = ['node_modules', '.git', '.cache', '.local', '.npm', '.nvm', '.bun',
|
|
17
|
+
'snap', '.vscode', '.docker', '.cargo', '.rustup', 'go', '.gradle', '.m2',
|
|
18
|
+
'Library', '.Trash', 'Pictures', 'Music', 'Videos', 'Downloads'];
|
|
19
|
+
const pruneArgs = prune.flatMap((d) => ['-name', d, '-o']).slice(0, -1);
|
|
16
20
|
let lines;
|
|
17
21
|
try {
|
|
18
|
-
const out = (0, node_child_process_1.execFileSync)('find', [
|
|
22
|
+
const out = (0, node_child_process_1.execFileSync)('find', [
|
|
23
|
+
searchDir,
|
|
24
|
+
'(', ...pruneArgs, ')', '-prune',
|
|
25
|
+
'-o', '-path', '*/.claude/settings*.json', '-type', 'f', '-print',
|
|
26
|
+
], {
|
|
19
27
|
encoding: 'utf8',
|
|
20
28
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
29
|
+
timeout: 10000,
|
|
21
30
|
});
|
|
22
31
|
lines = out.trim().split('\n').filter(Boolean);
|
|
23
32
|
}
|