mdk-skills 2.2.7 → 2.2.8

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.
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "test2",
3
+ "version": "1.0.0",
4
+ "description": "测试技能2",
5
+ "tags": ["test", "frontend"]
6
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "test3",
3
+ "version": "1.0.0",
4
+ "description": "测试技能3",
5
+ "tags": ["test", "frontend"]
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdk-skills",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "mdk-engineer - 沉稳靠谱的前端开发助手 Claude Skills 配置包,一键注入 .claude/ 技能目录和 CLAUDE.md 人设配置",
5
5
  "author": "XiaoMa",
6
6
  "license": "MIT",
@@ -321,6 +321,7 @@ async function handleApi(req, res) {
321
321
  const enabledCount = userSkills.filter((s) => s.enabled).length;
322
322
  const mdExists = fs.existsSync(path.join(projectRoot, "CLAUDE.md"));
323
323
  return sendJSON(res, {
324
+ pkgSkills,
324
325
  enabledCount,
325
326
  totalCount: pkgSkills.length,
326
327
  activeProfile: activeProfile
@@ -344,11 +345,14 @@ async function handleApi(req, res) {
344
345
  if (method === "POST" && pathname === "/api/source/connect") {
345
346
  const body = await parseBody(req);
346
347
  const repoPath = body.path;
347
- if (!repoPath)
348
- return sendJSON(res, { error: "缺少仓库路径" }, 400);
348
+ if (!repoPath) return sendJSON(res, { error: "缺少仓库路径" }, 400);
349
349
  const resolved = path.resolve(repoPath);
350
350
  if (!fs.existsSync(path.join(resolved, ".claude", "skills"))) {
351
- return sendJSON(res, { error: `路径 "${resolved}" 下没有 .claude/skills/` }, 400);
351
+ return sendJSON(
352
+ res,
353
+ { error: `路径 "${resolved}" 下没有 .claude/skills/` },
354
+ 400,
355
+ );
352
356
  }
353
357
  const settings = readSettings();
354
358
  settings._skill_source = resolved;
@@ -373,8 +377,7 @@ async function handleApi(req, res) {
373
377
  if (method === "POST" && pathname === "/api/source/sync") {
374
378
  const settings = readSettings();
375
379
  const sourcePath = settings._skill_source;
376
- if (!sourcePath)
377
- return sendJSON(res, { error: "尚未绑定技能源" }, 400);
380
+ if (!sourcePath) return sendJSON(res, { error: "尚未绑定技能源" }, 400);
378
381
  if (!fs.existsSync(path.join(sourcePath, ".claude"))) {
379
382
  return sendJSON(res, { error: "绑定的路径已失效" }, 400);
380
383
  }