skill-base
Advanced tools
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
+1
-1
| { | ||
| "name": "skill-base", | ||
| "version": "2.0.33", | ||
| "version": "2.0.34", | ||
| "description": "Skill Base - A lightweight, privately deployable agent skills distribution hub", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
+19
-2
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const db = require('../database'); | ||
| const SkillModel = require('../models/skill'); | ||
@@ -8,2 +9,17 @@ const VersionModel = require('../models/version'); | ||
| function listCollaboratorUsersForSkillDetail(skillId) { | ||
| const rows = db.prepare(` | ||
| SELECT u.id as user_id, u.username, u.name | ||
| FROM skill_collaborators sc | ||
| JOIN users u ON sc.user_id = u.id | ||
| WHERE sc.skill_id = ? AND sc.role = 'collaborator' | ||
| ORDER BY sc.created_at ASC | ||
| `).all(skillId); | ||
| return rows.map((r) => ({ | ||
| id: r.user_id, | ||
| username: r.username, | ||
| name: r.name | ||
| })); | ||
| } | ||
| // Format skill, convert owner to object | ||
@@ -30,3 +46,2 @@ function formatSkill(skill, currentUser) { | ||
| } else { | ||
| const db = require('../database'); | ||
| const collab = db.prepare('SELECT role FROM skill_collaborators WHERE skill_id = ? AND user_id = ?').get(skill.id, currentUser.id); | ||
@@ -87,3 +102,5 @@ if (collab) { | ||
| return formatSkill(skill, request.user); | ||
| const formatted = formatSkill(skill, request.user); | ||
| formatted.collaborators = listCollaboratorUsersForSkillDetail(skill_id); | ||
| return formatted; | ||
| }); | ||
@@ -90,0 +107,0 @@ |
@@ -12,4 +12,4 @@ <!DOCTYPE html> | ||
| <title>Skill Base</title> | ||
| <script type="module" crossorigin src="./assets/index-BRia_9xP.js"></script> | ||
| <link rel="stylesheet" crossorigin href="./assets/index-oLMg54m4.css"> | ||
| <script type="module" crossorigin src="./assets/index-CT0gtgxK.js"></script> | ||
| <link rel="stylesheet" crossorigin href="./assets/index-11hKsgCK.css"> | ||
| </head> | ||
@@ -16,0 +16,0 @@ <body> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
14337078
0.01%9693
0.2%10
11.11%