ccperm 1.8.0 → 1.8.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/interactive.js +2 -2
- package/dist/renderer.js +2 -2
- package/package.json +1 -1
package/dist/interactive.js
CHANGED
|
@@ -33,10 +33,10 @@ function boxSep(width) {
|
|
|
33
33
|
}
|
|
34
34
|
function startInteractive(merged, results) {
|
|
35
35
|
return new Promise((resolve) => {
|
|
36
|
-
const globals = merged.filter((r) => r.
|
|
36
|
+
const globals = merged.filter((r) => r.isGlobal);
|
|
37
37
|
const projects = merged.filter((r) => r.totalCount > 0 && !r.isGlobal).sort((a, b) => b.totalCount - a.totalCount);
|
|
38
38
|
const withPerms = [...globals, ...projects];
|
|
39
|
-
const emptyCount = merged.filter((r) => r.totalCount === 0).length;
|
|
39
|
+
const emptyCount = merged.filter((r) => r.totalCount === 0 && !r.isGlobal).length;
|
|
40
40
|
if (withPerms.length === 0) {
|
|
41
41
|
console.log(`\n ${colors_js_1.GREEN}No projects with permissions found.${colors_js_1.NC}\n`);
|
|
42
42
|
resolve();
|
package/dist/renderer.js
CHANGED
|
@@ -14,10 +14,10 @@ function rpad(s, n) {
|
|
|
14
14
|
function printCompact(entries, summary) {
|
|
15
15
|
const cats = ['Bash', 'WebFetch', 'MCP', 'Tools'];
|
|
16
16
|
const catsPresent = cats.filter((c) => entries.some((r) => r.groups.has(c)));
|
|
17
|
-
const globals = entries.filter((r) => r.
|
|
17
|
+
const globals = entries.filter((r) => r.isGlobal);
|
|
18
18
|
const projects = entries.filter((r) => r.totalCount > 0 && !r.isGlobal).sort((a, b) => b.totalCount - a.totalCount);
|
|
19
19
|
const withPerms = [...globals, ...projects];
|
|
20
|
-
const emptyCount = entries.filter((r) => r.totalCount === 0).length;
|
|
20
|
+
const emptyCount = entries.filter((r) => r.totalCount === 0 && !r.isGlobal).length;
|
|
21
21
|
// header
|
|
22
22
|
const nameWidths = withPerms.map((r) => r.shortName.length + 2);
|
|
23
23
|
const nameWidth = Math.min(Math.max(...nameWidths, 7), 40);
|