jkpark 2.0.0 → 2.2.0
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/dist/index.js +51 -41
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -25699,13 +25699,18 @@ class PathManager {
|
|
|
25699
25699
|
static getOpenClawRoot() {
|
|
25700
25700
|
return path2.join(os2.homedir(), ".openclaw");
|
|
25701
25701
|
}
|
|
25702
|
-
static
|
|
25703
|
-
|
|
25702
|
+
static getClaudeRoot() {
|
|
25703
|
+
return path2.join(os2.homedir(), ".claude");
|
|
25704
|
+
}
|
|
25705
|
+
static getGitHubRoot() {
|
|
25706
|
+
return path2.join(os2.homedir(), ".config", "gh");
|
|
25707
|
+
}
|
|
25708
|
+
static getWorkspaces(root) {
|
|
25704
25709
|
if (!fs.existsSync(root))
|
|
25705
25710
|
return [];
|
|
25706
25711
|
return fs.readdirSync(root).filter((f) => {
|
|
25707
25712
|
const fullPath = path2.join(root, f);
|
|
25708
|
-
return f.startsWith("workspace-") && fs.statSync(fullPath).isDirectory();
|
|
25713
|
+
return (f.startsWith("workspace-") || f.startsWith("project-")) && fs.statSync(fullPath).isDirectory();
|
|
25709
25714
|
});
|
|
25710
25715
|
}
|
|
25711
25716
|
static resolveFinalPath(baseDir, relativeOrAbsolute) {
|
|
@@ -25760,6 +25765,18 @@ async function runInstallWizard(projectRoot) {
|
|
|
25760
25765
|
console.log("❌ 설치 가능한 플러그인이 없습니다. plugins 폴더를 확인해 주세요.");
|
|
25761
25766
|
return;
|
|
25762
25767
|
}
|
|
25768
|
+
const { targetType } = await dist_default14.prompt([
|
|
25769
|
+
{
|
|
25770
|
+
type: "list",
|
|
25771
|
+
name: "targetType",
|
|
25772
|
+
message: "설치 타겟 유형을 선택하세요:",
|
|
25773
|
+
choices: [
|
|
25774
|
+
{ name: "OpenClaw", value: "openclaw" },
|
|
25775
|
+
{ name: "Claude", value: "claude" },
|
|
25776
|
+
{ name: "GitHub", value: "github" }
|
|
25777
|
+
]
|
|
25778
|
+
}
|
|
25779
|
+
]);
|
|
25763
25780
|
const { selectedCategory } = await dist_default14.prompt([
|
|
25764
25781
|
{
|
|
25765
25782
|
type: "list",
|
|
@@ -25783,47 +25800,38 @@ async function runInstallWizard(projectRoot) {
|
|
|
25783
25800
|
validate: (answer) => answer.length > 0 ? true : "최소 하나 이상의 스킬을 선택해야 합니다."
|
|
25784
25801
|
}
|
|
25785
25802
|
]);
|
|
25786
|
-
|
|
25803
|
+
let finalTargetDir;
|
|
25804
|
+
let rootPath;
|
|
25805
|
+
if (targetType === "openclaw") {
|
|
25806
|
+
rootPath = PathManager.getOpenClawRoot();
|
|
25807
|
+
} else if (targetType === "claude") {
|
|
25808
|
+
rootPath = PathManager.getClaudeRoot();
|
|
25809
|
+
} else {
|
|
25810
|
+
rootPath = PathManager.getGitHubRoot();
|
|
25811
|
+
}
|
|
25812
|
+
const workspaces = PathManager.getWorkspaces(rootPath);
|
|
25813
|
+
const scopeChoices = [
|
|
25814
|
+
{ name: "Current Directory (현재 프로젝트)", value: process.cwd() }
|
|
25815
|
+
];
|
|
25816
|
+
if (targetType === "openclaw") {
|
|
25817
|
+
scopeChoices.push({ name: `Shared Skills (모든 에이전트 공유: ${path4.join(rootPath, "skills")})`, value: path4.join(rootPath, "skills") });
|
|
25818
|
+
} else if (targetType === "claude") {
|
|
25819
|
+
scopeChoices.push({ name: `Global Skills (~/.claude/skills)`, value: path4.join(rootPath, "skills") });
|
|
25820
|
+
} else if (targetType === "github") {
|
|
25821
|
+
scopeChoices.push({ name: `GitHub Extensions (~/.config/gh/extensions)`, value: path4.join(rootPath, "extensions") });
|
|
25822
|
+
}
|
|
25823
|
+
scopeChoices.push(...workspaces.map((ws) => ({ name: `Workspace: ${ws}`, value: path4.join(rootPath, ws) })));
|
|
25824
|
+
scopeChoices.push({ name: "Custom Path (직접 입력)", value: "custom" });
|
|
25825
|
+
const { scope } = await dist_default14.prompt([
|
|
25787
25826
|
{
|
|
25788
25827
|
type: "list",
|
|
25789
|
-
name: "
|
|
25790
|
-
message:
|
|
25791
|
-
choices:
|
|
25792
|
-
|
|
25793
|
-
{ name: "Custom Path", value: "custom" }
|
|
25794
|
-
]
|
|
25828
|
+
name: "scope",
|
|
25829
|
+
message: `${targetType} 설치 범위를 선택하세요 (Default: Current Directory):`,
|
|
25830
|
+
choices: scopeChoices,
|
|
25831
|
+
default: 0
|
|
25795
25832
|
}
|
|
25796
25833
|
]);
|
|
25797
|
-
|
|
25798
|
-
if (baseType === "openclaw") {
|
|
25799
|
-
const openClawRoot = PathManager.getOpenClawRoot();
|
|
25800
|
-
const workspaces = PathManager.getWorkspaces();
|
|
25801
|
-
const { scope } = await dist_default14.prompt([
|
|
25802
|
-
{
|
|
25803
|
-
type: "list",
|
|
25804
|
-
name: "scope",
|
|
25805
|
-
message: "OpenClaw 설치 범위를 선택하세요:",
|
|
25806
|
-
choices: [
|
|
25807
|
-
{ name: "Shared Skills (모든 에이전트 공유: ~/.openclaw/skills)", value: path4.join(openClawRoot, "skills") },
|
|
25808
|
-
...workspaces.map((ws) => ({ name: `Workspace: ${ws}`, value: path4.join(openClawRoot, ws) })),
|
|
25809
|
-
{ name: "Custom Path inside OpenClaw", value: "custom_inner" }
|
|
25810
|
-
]
|
|
25811
|
-
}
|
|
25812
|
-
]);
|
|
25813
|
-
if (scope === "custom_inner") {
|
|
25814
|
-
const { innerPath } = await dist_default14.prompt([
|
|
25815
|
-
{
|
|
25816
|
-
type: "input",
|
|
25817
|
-
name: "innerPath",
|
|
25818
|
-
message: "OpenClaw 내부의 상대 경로를 입력하세요:",
|
|
25819
|
-
validate: (input) => input.trim() !== "" ? true : "경로를 입력해야 합니다."
|
|
25820
|
-
}
|
|
25821
|
-
]);
|
|
25822
|
-
finalTargetDir = path4.join(openClawRoot, innerPath);
|
|
25823
|
-
} else {
|
|
25824
|
-
finalTargetDir = scope;
|
|
25825
|
-
}
|
|
25826
|
-
} else {
|
|
25834
|
+
if (scope === "custom") {
|
|
25827
25835
|
const { customPath } = await dist_default14.prompt([
|
|
25828
25836
|
{
|
|
25829
25837
|
type: "input",
|
|
@@ -25833,8 +25841,10 @@ async function runInstallWizard(projectRoot) {
|
|
|
25833
25841
|
}
|
|
25834
25842
|
]);
|
|
25835
25843
|
finalTargetDir = PathManager.resolveFinalPath(process.cwd(), customPath);
|
|
25844
|
+
} else {
|
|
25845
|
+
finalTargetDir = scope;
|
|
25836
25846
|
}
|
|
25837
|
-
const skillsBaseDir = path4.join(finalTargetDir, "skills");
|
|
25847
|
+
const skillsBaseDir = targetType === "github" && scope.endsWith("extensions") ? finalTargetDir : path4.join(finalTargetDir, "skills");
|
|
25838
25848
|
console.log(`
|
|
25839
25849
|
\uD83D\uDCCD Base Target Path: ${finalTargetDir}`);
|
|
25840
25850
|
console.log(`\uD83D\uDEE0️ Selected Skills: ${selectedSkills.join(", ")}`);
|