@gaonjs/cli 0.1.1 → 0.1.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/dist/index.d.ts +7 -3
- package/dist/index.js +15 -11
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -11,8 +11,12 @@ export interface RoadmapReport {
|
|
|
11
11
|
}[];
|
|
12
12
|
}
|
|
13
13
|
/** `--json` 출력용 구조화 리포트. */
|
|
14
|
-
export declare function roadmapReport(): RoadmapReport;
|
|
14
|
+
export declare function roadmapReport(version?: string): RoadmapReport;
|
|
15
15
|
/** 사람이 읽는 로드맵 텍스트. */
|
|
16
|
-
export declare function renderRoadmap(): string;
|
|
16
|
+
export declare function renderRoadmap(version?: string): string;
|
|
17
|
+
/** runCli 옵션. version 은 파사드가 주입하는 표시 버전(설치 패키지 버전). */
|
|
18
|
+
export interface RunOptions {
|
|
19
|
+
readonly version?: string;
|
|
20
|
+
}
|
|
17
21
|
/** CLI 진입점. argv 는 실행 인자(process.argv.slice(2))를 받는다. */
|
|
18
|
-
export declare function runCli(argv: readonly string[]): void;
|
|
22
|
+
export declare function runCli(argv: readonly string[], opts?: RunOptions): void;
|
package/dist/index.js
CHANGED
|
@@ -4,13 +4,16 @@
|
|
|
4
4
|
* M1(현재) 스텁: 로드맵·개발 상태·참여 안내를 출력한다.
|
|
5
5
|
* 모든 명령은 `--json` 출력을 함께 제공한다 (CLAUDE.md §4).
|
|
6
6
|
* 실제 제너레이터·스캐폴딩은 로드맵 이후 마일스톤에서 구현한다.
|
|
7
|
+
*
|
|
8
|
+
* 표시 버전은 호출자(파사드)가 주입한다 — 사용자가 설치한 패키지
|
|
9
|
+
* (`gaonjs`) 버전을 그대로 보여주기 위함. 미주입 시 core 버전을 쓴다.
|
|
7
10
|
*/
|
|
8
11
|
import { MILESTONES, VERSION, HOMEPAGE } from "@gaonjs/core";
|
|
9
12
|
/** `--json` 출력용 구조화 리포트. */
|
|
10
|
-
export function roadmapReport() {
|
|
13
|
+
export function roadmapReport(version = VERSION) {
|
|
11
14
|
return {
|
|
12
15
|
name: "gaon",
|
|
13
|
-
version
|
|
16
|
+
version,
|
|
14
17
|
stage: "stub",
|
|
15
18
|
homepage: HOMEPAGE,
|
|
16
19
|
docs: HOMEPAGE,
|
|
@@ -18,11 +21,11 @@ export function roadmapReport() {
|
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
/** 사람이 읽는 로드맵 텍스트. */
|
|
21
|
-
export function renderRoadmap() {
|
|
24
|
+
export function renderRoadmap(version = VERSION) {
|
|
22
25
|
const lines = [];
|
|
23
26
|
lines.push("");
|
|
24
27
|
lines.push(` Gaon (가온) — AI가 개발을 가장 잘하는 Node.js 풀스택 웹 프레임웍`);
|
|
25
|
-
lines.push(` v${
|
|
28
|
+
lines.push(` v${version} · 개발 중 (스텁) · ${HOMEPAGE}`);
|
|
26
29
|
lines.push("");
|
|
27
30
|
lines.push(" 이 패키지는 아직 개발 초기 단계입니다. 런타임 기능은 아직 없고,");
|
|
28
31
|
lines.push(" 자리(스코프·이름)를 잡아 두기 위한 동작하는 스텁입니다.");
|
|
@@ -42,10 +45,10 @@ export function renderRoadmap() {
|
|
|
42
45
|
lines.push("");
|
|
43
46
|
return lines.join("\n");
|
|
44
47
|
}
|
|
45
|
-
function renderHelp() {
|
|
48
|
+
function renderHelp(version = VERSION) {
|
|
46
49
|
return [
|
|
47
50
|
"",
|
|
48
|
-
" gaon — Gaon 프레임웍 CLI (v" +
|
|
51
|
+
" gaon — Gaon 프레임웍 CLI (v" + version + ", 스텁)",
|
|
49
52
|
"",
|
|
50
53
|
" 사용법:",
|
|
51
54
|
" gaon 로드맵과 개발 상태를 출력",
|
|
@@ -58,18 +61,19 @@ function renderHelp() {
|
|
|
58
61
|
].join("\n");
|
|
59
62
|
}
|
|
60
63
|
/** CLI 진입점. argv 는 실행 인자(process.argv.slice(2))를 받는다. */
|
|
61
|
-
export function runCli(argv) {
|
|
64
|
+
export function runCli(argv, opts = {}) {
|
|
65
|
+
const version = opts.version ?? VERSION;
|
|
62
66
|
if (argv.includes("--help") || argv.includes("-h")) {
|
|
63
|
-
process.stdout.write(renderHelp() + "\n");
|
|
67
|
+
process.stdout.write(renderHelp(version) + "\n");
|
|
64
68
|
return;
|
|
65
69
|
}
|
|
66
70
|
if (argv.includes("--version") || argv.includes("-v")) {
|
|
67
|
-
process.stdout.write(
|
|
71
|
+
process.stdout.write(version + "\n");
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
70
74
|
if (argv.includes("--json")) {
|
|
71
|
-
process.stdout.write(JSON.stringify(roadmapReport(), null, 2) + "\n");
|
|
75
|
+
process.stdout.write(JSON.stringify(roadmapReport(version), null, 2) + "\n");
|
|
72
76
|
return;
|
|
73
77
|
}
|
|
74
|
-
process.stdout.write(renderRoadmap() + "\n");
|
|
78
|
+
process.stdout.write(renderRoadmap(version) + "\n");
|
|
75
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gaonjs/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Gaon CLI 구현: 제너레이터·스캐폴딩·로드맵 출력 (M1 스텁)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@gaonjs/core": "0.1.
|
|
27
|
+
"@gaonjs/core": "0.1.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "node ../../node_modules/typescript/bin/tsc -p tsconfig.json"
|