jkpark 2.3.0 → 2.3.2
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/README.md +15 -0
- package/dist/index.js +17 -32
- package/package.json +16 -7
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# jkpark
|
|
2
|
+
|
|
3
|
+
To install dependencies:
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
bun install
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
To run:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun run src/index.ts
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This project was created using `bun init` in bun v1.3.9. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
1
|
import { createRequire } from "node:module";
|
|
3
2
|
var __create = Object.create;
|
|
4
3
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -25708,14 +25707,22 @@ class PathManager {
|
|
|
25708
25707
|
static getWorkspaces(root) {
|
|
25709
25708
|
if (!fs.existsSync(root))
|
|
25710
25709
|
return [];
|
|
25710
|
+
let entries;
|
|
25711
25711
|
try {
|
|
25712
|
-
|
|
25713
|
-
const fullPath = path2.join(root, f);
|
|
25714
|
-
return !f.startsWith(".") && fs.statSync(fullPath).isDirectory();
|
|
25715
|
-
});
|
|
25712
|
+
entries = fs.readdirSync(root);
|
|
25716
25713
|
} catch (e) {
|
|
25717
25714
|
return [];
|
|
25718
25715
|
}
|
|
25716
|
+
return entries.filter((f) => {
|
|
25717
|
+
if (f.startsWith("."))
|
|
25718
|
+
return false;
|
|
25719
|
+
const fullPath = path2.join(root, f);
|
|
25720
|
+
try {
|
|
25721
|
+
return fs.statSync(fullPath).isDirectory();
|
|
25722
|
+
} catch {
|
|
25723
|
+
return false;
|
|
25724
|
+
}
|
|
25725
|
+
});
|
|
25719
25726
|
}
|
|
25720
25727
|
static resolveFinalPath(baseDir, relativeOrAbsolute) {
|
|
25721
25728
|
return path2.isAbsolute(relativeOrAbsolute) ? relativeOrAbsolute : path2.resolve(baseDir, relativeOrAbsolute);
|
|
@@ -25741,7 +25748,9 @@ class PluginManager {
|
|
|
25741
25748
|
if (fs2.existsSync(pluginJsonPath)) {
|
|
25742
25749
|
try {
|
|
25743
25750
|
config = { ...config, ...JSON.parse(fs2.readFileSync(pluginJsonPath, "utf8")) };
|
|
25744
|
-
} catch (e) {
|
|
25751
|
+
} catch (e) {
|
|
25752
|
+
console.warn(`Failed to parse plugin config at ${pluginJsonPath}:`, e);
|
|
25753
|
+
}
|
|
25745
25754
|
}
|
|
25746
25755
|
return { ...config, value: dir };
|
|
25747
25756
|
});
|
|
@@ -25750,7 +25759,7 @@ class PluginManager {
|
|
|
25750
25759
|
const skillsDir = path3.join(this.pluginsDir, category, "skills");
|
|
25751
25760
|
if (!fs2.existsSync(skillsDir))
|
|
25752
25761
|
return [];
|
|
25753
|
-
const skills = fs2.readdirSync(skillsDir).filter((
|
|
25762
|
+
const skills = fs2.readdirSync(skillsDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name);
|
|
25754
25763
|
return skills.map((skill) => {
|
|
25755
25764
|
const skillPath = path3.join(skillsDir, skill, "SKILL.md");
|
|
25756
25765
|
let description = "No description provided";
|
|
@@ -25931,32 +25940,8 @@ var program2 = new Command;
|
|
|
25931
25940
|
program2.name("jkpark").description("JK Park의 개인용 패키지 관리 도구").version("2.3.0");
|
|
25932
25941
|
program2.command("install").description("패키지 설치 마법사를 실행합니다").action(() => runInstallWizard(projectRoot));
|
|
25933
25942
|
program2.command("list").description("사용 가능한 모든 플러그인과 스킬을 나열합니다").action(() => runListCommand(projectRoot));
|
|
25934
|
-
async function runMainMenu() {
|
|
25935
|
-
console.log(`
|
|
25936
|
-
\uD83C\uDFD7️ jkpark CLI - Main Menu
|
|
25937
|
-
`);
|
|
25938
|
-
const { action } = await dist_default14.prompt([
|
|
25939
|
-
{
|
|
25940
|
-
type: "list",
|
|
25941
|
-
name: "action",
|
|
25942
|
-
message: "수행할 작업을 선택하세요:",
|
|
25943
|
-
choices: [
|
|
25944
|
-
{ name: "\uD83D\uDE80 Install Skills (설치 마법사)", value: "install" },
|
|
25945
|
-
{ name: "\uD83D\uDCE6 List Available (목록 보기)", value: "list" },
|
|
25946
|
-
{ name: "❌ Exit (종료)", value: "exit" }
|
|
25947
|
-
]
|
|
25948
|
-
}
|
|
25949
|
-
]);
|
|
25950
|
-
if (action === "install") {
|
|
25951
|
-
await runInstallWizard(projectRoot);
|
|
25952
|
-
} else if (action === "list") {
|
|
25953
|
-
await runListCommand(projectRoot);
|
|
25954
|
-
} else {
|
|
25955
|
-
process.exit(0);
|
|
25956
|
-
}
|
|
25957
|
-
}
|
|
25958
25943
|
if (!process.argv.slice(2).length) {
|
|
25959
|
-
|
|
25944
|
+
program2.outputHelp();
|
|
25960
25945
|
} else {
|
|
25961
25946
|
program2.parse(process.argv);
|
|
25962
25947
|
}
|
package/package.json
CHANGED
|
@@ -1,33 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jkpark",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "JK Park's Personal Package Manager (Bun Powered)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "bun build ./src/index.ts --outdir ./dist --target node --bundle",
|
|
8
8
|
"dev": "bun run ./src/index.ts",
|
|
9
|
-
"test": "echo \"Error: no test specified\"
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
10
10
|
},
|
|
11
11
|
"keywords": [],
|
|
12
|
-
"author":
|
|
13
|
-
|
|
12
|
+
"author": {
|
|
13
|
+
"name": "JK Park",
|
|
14
|
+
"url": "https://github.com/jkpark"
|
|
15
|
+
},
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/jkpark/jkpark-cli.git"
|
|
20
|
+
},
|
|
14
21
|
"dependencies": {
|
|
15
22
|
"commander": "^14.0.3",
|
|
16
23
|
"fs-extra": "^11.3.3",
|
|
17
24
|
"inquirer": "^13.3.0"
|
|
18
25
|
},
|
|
19
26
|
"bin": {
|
|
20
|
-
"jkpark": "
|
|
27
|
+
"jkpark": "dist/index.js"
|
|
21
28
|
},
|
|
22
29
|
"devDependencies": {
|
|
23
30
|
"@types/commander": "^2.12.5",
|
|
24
31
|
"@types/fs-extra": "^11.0.4",
|
|
25
32
|
"@types/inquirer": "^9.0.9",
|
|
26
33
|
"@types/node": "^25.3.0",
|
|
27
|
-
"typescript": "^5.9.3"
|
|
34
|
+
"typescript": "^5.9.3",
|
|
35
|
+
"@types/bun": "latest"
|
|
28
36
|
},
|
|
29
37
|
"files": [
|
|
30
38
|
"dist",
|
|
31
39
|
"plugins"
|
|
32
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"module": "src/index.ts"
|
|
33
42
|
}
|