@buiducnhat/agent-skills 0.5.5 → 0.5.7

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from "node:module";
3
- import fs, { existsSync, lstatSync, mkdtempSync, readdirSync } from "node:fs";
3
+ import fs, { existsSync, lstatSync, mkdtempSync, readdirSync, rmSync } from "node:fs";
4
4
  import os, { tmpdir } from "node:os";
5
5
  import path, { dirname, join } from "node:path";
6
6
  import N, { stdin, stdout } from "node:process";
@@ -2174,7 +2174,10 @@ async function fetchTemplates() {
2174
2174
  }
2175
2175
  function cleanupTemp(tempDir) {
2176
2176
  try {
2177
- execSync(`rm -rf "${tempDir}"`, { stdio: "pipe" });
2177
+ rmSync(tempDir, {
2178
+ recursive: true,
2179
+ force: true
2180
+ });
2178
2181
  } catch {}
2179
2182
  }
2180
2183
 
@@ -2315,7 +2318,15 @@ function setupCursorSkillsDir(baseDir, copy) {
2315
2318
  recursive: true,
2316
2319
  force: true
2317
2320
  });
2318
- else if (!fs.existsSync(destPath)) fs.symlinkSync(srcPath, destPath);
2321
+ else if (!fs.existsSync(destPath)) try {
2322
+ fs.symlinkSync(srcPath, destPath);
2323
+ } catch {
2324
+ R.warn(`Symlink not supported — copying ${name} instead. Use --copy to suppress this warning.`);
2325
+ fs.cpSync(srcPath, destPath, {
2326
+ recursive: true,
2327
+ force: true
2328
+ });
2329
+ }
2319
2330
  }
2320
2331
  }
2321
2332
  function printHelp() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buiducnhat/agent-skills",
3
- "version": "0.5.5",
3
+ "version": "0.5.7",
4
4
  "description": "Install AI agent workflow skills for coding assistants",
5
5
  "type": "module",
6
6
  "bin": {