eskill 1.2.3 → 1.2.4
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.js +1 -1
- package/lib/installer.js +11 -5
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ const program = new Command();
|
|
|
13
13
|
program
|
|
14
14
|
.name('eskill')
|
|
15
15
|
.description('Unified AI Agent Skills Management - Install skills from Git URLs')
|
|
16
|
-
.version('1.2.
|
|
16
|
+
.version('1.2.4')
|
|
17
17
|
.option('-g, --global', '使用全局技能目录(~/.eskill/skills/),否则使用当前目录(./.claude/skills/)', false);
|
|
18
18
|
|
|
19
19
|
// 安装命令
|
package/lib/installer.js
CHANGED
|
@@ -434,7 +434,12 @@ async function copyFromGlobal(skillName, options = {}) {
|
|
|
434
434
|
console.log(` 源: ${sourcePath}`);
|
|
435
435
|
console.log(` 目标: ${targetPath}\n`);
|
|
436
436
|
|
|
437
|
-
|
|
437
|
+
// 使用 -L 选项解引用符号链接,复制实际文件内容
|
|
438
|
+
if (process.platform === 'win32') {
|
|
439
|
+
execSync(`xcopy "${sourcePath}" "${targetPath}" /E /I /H /Y`, { stdio: 'inherit' });
|
|
440
|
+
} else {
|
|
441
|
+
execSync(`cp -rL "${sourcePath}" "${targetPath}"`, { stdio: 'inherit' });
|
|
442
|
+
}
|
|
438
443
|
|
|
439
444
|
// 复制元数据,并标记来源
|
|
440
445
|
const globalMeta = getSkillMeta(skillName, true);
|
|
@@ -597,12 +602,13 @@ export async function installFromGitUrl(gitUrl, options = {}) {
|
|
|
597
602
|
console.log(`\n创建符号链接: ${sourcePath} -> ${targetPath}`);
|
|
598
603
|
symlinkSync(sourcePath, targetPath, 'dir');
|
|
599
604
|
} else {
|
|
600
|
-
//
|
|
605
|
+
// 复制文件(使用 -L 选项跟随符号链接,复制实际文件而非链接本身)
|
|
601
606
|
console.log(`\n复制文件到: ${targetPath}`);
|
|
602
607
|
if (process.platform === 'win32') {
|
|
603
608
|
execSync(`xcopy "${sourcePath}" "${targetPath}" /E /I /H /Y`, { stdio: 'inherit' });
|
|
604
609
|
} else {
|
|
605
|
-
|
|
610
|
+
// 使用 -L 选项解引用符号链接,复制实际文件内容
|
|
611
|
+
execSync(`cp -rL "${sourcePath}" "${targetPath}"`, { stdio: 'inherit' });
|
|
606
612
|
}
|
|
607
613
|
}
|
|
608
614
|
|
|
@@ -982,11 +988,11 @@ export async function updateSkill(skillName, options = {}) {
|
|
|
982
988
|
// 删除旧技能
|
|
983
989
|
rmSync(targetPath, { recursive: true, force: true });
|
|
984
990
|
|
|
985
|
-
//
|
|
991
|
+
// 复制新技能(使用 -L 选项解引用符号链接)
|
|
986
992
|
if (process.platform === 'win32') {
|
|
987
993
|
execSync(`xcopy "${sourcePath}" "${targetPath}" /E /I /H /Y`, { stdio: 'inherit' });
|
|
988
994
|
} else {
|
|
989
|
-
execSync(`cp -
|
|
995
|
+
execSync(`cp -rL "${sourcePath}" "${targetPath}"`, { stdio: 'inherit' });
|
|
990
996
|
}
|
|
991
997
|
|
|
992
998
|
// 更新元数据
|