agentaudit 3.9.25 → 3.9.26
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/cli.mjs +8 -1
- package/package.json +1 -1
package/cli.mjs
CHANGED
|
@@ -388,7 +388,14 @@ function banner() {
|
|
|
388
388
|
|
|
389
389
|
function slugFromUrl(url) {
|
|
390
390
|
const match = url.match(/github\.com\/([^/]+)\/([^/.\s]+)/);
|
|
391
|
-
if (match)
|
|
391
|
+
if (match) {
|
|
392
|
+
const owner = match[1].toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
393
|
+
const repo = match[2].toLowerCase().replace(/[^a-z0-9-]/g, '-');
|
|
394
|
+
// Generic repo names get owner prefix to avoid collisions
|
|
395
|
+
const generic = ['mcp', 'server', 'plugin', 'tool', 'agent', 'sdk', 'api', 'app', 'cli', 'lib', 'core'];
|
|
396
|
+
if (generic.includes(repo)) return `${owner}-${repo}`;
|
|
397
|
+
return repo;
|
|
398
|
+
}
|
|
392
399
|
return url.replace(/[^a-z0-9]/gi, '-').toLowerCase().slice(0, 60);
|
|
393
400
|
}
|
|
394
401
|
|