🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

skill-base

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

skill-base - npm Package Compare versions

Comparing version
2.0.33
to
2.0.34
static/assets/index-11hKsgCK.css

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",

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