egovframe-scaffold-mcp 0.5.0 → 0.6.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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # egovframe-scaffold-mcp
2
2
 
3
3
  [![CI](https://github.com/EricSeokgon/egovframe-scaffold-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/EricSeokgon/egovframe-scaffold-mcp/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/egovframe-scaffold-mcp)](https://www.npmjs.com/package/egovframe-scaffold-mcp)
4
5
 
5
6
  전자정부 표준프레임워크(eGovFrame) 프로젝트 스캐폴딩 **MCP(Model Context Protocol) 서버** — PoC
6
7
 
@@ -17,7 +18,7 @@ Claude, VS Code(Copilot), Cursor 등 MCP를 지원하는 AI 도구에서 **대
17
18
  | `create_egovframe_project` | 공식 템플릿을 내려받아 projectName(artifactId)·groupId·DB 타입을 적용한 새 프로젝트 생성 |
18
19
  | `list_egovframe_templates` | 사용 가능한 공식 템플릿 목록 |
19
20
  | `list_egovframe_components` | 선택 설치 가능한 공통컴포넌트 카탈로그 (저장소 스캔 자동 생성, 68종) |
20
- | `add_egovframe_components` | 공통컴포넌트 선택 조립 — 의존성 포함 소스·매퍼·JSP 복사, DB DDL·DML 스크립트 복사(`database`), 충돌 시 전체 거부, `dryRun` 미리보기 |
21
+ | `add_egovframe_components` | 공통컴포넌트 선택 조립 — 의존성 포함 소스·매퍼·JSP 복사, **컴포넌트별 선별 DDL·DML 생성**(`database`), 충돌 시 전체 거부, `dryRun` 미리보기 |
21
22
  | `search_egovframe_components` | 키워드로 컴포넌트 검색 (id·이름·설명, 점수순 상위 10건) |
22
23
  | `remove_egovframe_components` | 설치 매니페스트 기반 컴포넌트 제거 — 의존 컴포넌트 보호, `dryRun` 미리보기 |
23
24
  | `validate_egovframe_project` | 조립 프로젝트 무결성 진단 — 파일 존재·DbType↔DB 스크립트 일치 |
@@ -36,7 +37,7 @@ Claude, VS Code(Copilot), Cursor 등 MCP를 지원하는 AI 도구에서 **대
36
37
 
37
38
  ## 설치·사용
38
39
 
39
- npm 배포 후에는 설치 없이 바로 실행할 수 있습니다:
40
+ [npm에 배포되어](https://www.npmjs.com/package/egovframe-scaffold-mcp) 설치 없이 바로 실행할 수 있습니다:
40
41
 
41
42
  ```json
42
43
  {
@@ -109,6 +110,8 @@ Claude Desktop / Claude Code 설정 예 (`mcpServers`):
109
110
 
110
111
  ## 변경 이력
111
112
 
113
+ - **0.6.0** — 컴포넌트별 테이블 선별 DDL(M4): 카탈로그에 매퍼 기반 참조 테이블 자동 추출(48/68종), `database` 지정 시 통합 스크립트에서 해당 컴포넌트 구문만 추출해 `ddl|dml/<컴포넌트id>.sql` 생성(테이블 미상 컴포넌트는 통합본 폴백), 매니페스트에 컴포넌트별 스크립트 귀속(제거 시 함께 정리).
114
+
112
115
  - **0.5.0** — 조립 수명주기 완성: `search_egovframe_components`(키워드 검색), 설치 매니페스트(`.egovframe-components.json`) 기록, `remove_egovframe_components`(의존 보호·dryRun), `validate_egovframe_project`(파일 무결성·DbType↔DDL 일치 진단), 중복 설치 거부.
113
116
 
114
117
  - **0.4.0** — 공통컴포넌트 선택 설치 M3: 저장소 구조 스캔으로 카탈로그 자동 생성(`scripts/generate-catalog.mjs`), 커버리지 3종 → 68종(2단계 패키지 단위, cmm 하위 통합). 이름·설명·의존성은 `catalog/overrides.json`으로 큐레이션(기본 의존성 휴리스틱: cmm).
@@ -3,7 +3,7 @@
3
3
  "source": {
4
4
  "repo": "eGovFramework/egovframe-common-components",
5
5
  "branch": "main",
6
- "surveyedAt": "2026-07-10"
6
+ "surveyedAt": "2026-07-11"
7
7
  },
8
8
  "sqlNote": "DB 스크립트는 script/ddl|dml/<db>/ 의 통합본(com_DDL_<db>.sql 등)으로 제공됩니다. 컴포넌트별 테이블 선별 적용은 로드맵 항목입니다.",
9
9
  "generatedBy": "scripts/generate-catalog.mjs",
@@ -19,7 +19,14 @@
19
19
  "src/main/webapp/WEB-INF/jsp/egovframework/com/cmm/"
20
20
  ],
21
21
  "dependsOn": [],
22
- "approxFiles": 108
22
+ "approxFiles": 108,
23
+ "tables": [
24
+ "COMTCCMMNDETAILCODE",
25
+ "COMTNAUTHORGROUPINFO",
26
+ "COMTNFILE",
27
+ "COMTNFILEDETAIL",
28
+ "COMTNORGNZTINFO"
29
+ ]
23
30
  },
24
31
  {
25
32
  "id": "cop.adb",
@@ -34,7 +41,15 @@
34
41
  "dependsOn": [
35
42
  "cmm"
36
43
  ],
37
- "approxFiles": 22
44
+ "approxFiles": 22,
45
+ "tables": [
46
+ "COMTNADBK",
47
+ "COMTNADBKMANAGE",
48
+ "COMTNEMPLYRINFO",
49
+ "COMTNENTRPRSMBER",
50
+ "COMTNGNRLMBER",
51
+ "COMTNNCRD"
52
+ ]
38
53
  },
39
54
  {
40
55
  "id": "bbs",
@@ -49,7 +64,19 @@
49
64
  "dependsOn": [
50
65
  "cmm"
51
66
  ],
52
- "approxFiles": 63
67
+ "approxFiles": 63,
68
+ "tables": [
69
+ "COMTCCMMNDETAILCODE",
70
+ "COMTNBBS",
71
+ "COMTNBBSMASTER",
72
+ "COMTNBBSMASTEROPTN",
73
+ "COMTNBBSUSE",
74
+ "COMTNBLOG",
75
+ "COMTNBLOGUSER",
76
+ "COMTNCOMMENT",
77
+ "COMTNEMPLYRSCRTYESTBS",
78
+ "COMTNTMPLATINFO"
79
+ ]
53
80
  },
54
81
  {
55
82
  "id": "cop.cmt",
@@ -64,7 +91,10 @@
64
91
  "dependsOn": [
65
92
  "cmm"
66
93
  ],
67
- "approxFiles": 15
94
+ "approxFiles": 15,
95
+ "tables": [
96
+ "COMTNCOMMENT"
97
+ ]
68
98
  },
69
99
  {
70
100
  "id": "cop.cmy",
@@ -79,7 +109,14 @@
79
109
  "dependsOn": [
80
110
  "cmm"
81
111
  ],
82
- "approxFiles": 47
112
+ "approxFiles": 47,
113
+ "tables": [
114
+ "COMTCCMMNDETAILCODE",
115
+ "COMTNBBSMASTER",
116
+ "COMTNCMMNTY",
117
+ "COMTNCMMNTYUSER",
118
+ "COMTNTMPLATINFO"
119
+ ]
83
120
  },
84
121
  {
85
122
  "id": "cop.com",
@@ -94,7 +131,13 @@
94
131
  "dependsOn": [
95
132
  "cmm"
96
133
  ],
97
- "approxFiles": 26
134
+ "approxFiles": 26,
135
+ "tables": [
136
+ "COMTNCLUB",
137
+ "COMTNCLUBUSER",
138
+ "COMTNCMMNTY",
139
+ "COMTNCMMNTYUSER"
140
+ ]
98
141
  },
99
142
  {
100
143
  "id": "cop.ems",
@@ -109,7 +152,12 @@
109
152
  "dependsOn": [
110
153
  "cmm"
111
154
  ],
112
- "approxFiles": 45
155
+ "approxFiles": 45,
156
+ "tables": [
157
+ "COMTCCMMNDETAILCODE",
158
+ "COMTHEMAILDSPTCHMANAGE",
159
+ "COMTNFILEDETAIL"
160
+ ]
113
161
  },
114
162
  {
115
163
  "id": "cop.ncm",
@@ -124,7 +172,11 @@
124
172
  "dependsOn": [
125
173
  "cmm"
126
174
  ],
127
- "approxFiles": 20
175
+ "approxFiles": 20,
176
+ "tables": [
177
+ "COMTNNCRD",
178
+ "COMTNNCRDUSER"
179
+ ]
128
180
  },
129
181
  {
130
182
  "id": "cop.scp",
@@ -139,7 +191,10 @@
139
191
  "dependsOn": [
140
192
  "cmm"
141
193
  ],
142
- "approxFiles": 18
194
+ "approxFiles": 18,
195
+ "tables": [
196
+ "COMTNSCRAP"
197
+ ]
143
198
  },
144
199
  {
145
200
  "id": "cop.sms",
@@ -154,7 +209,11 @@
154
209
  "dependsOn": [
155
210
  "cmm"
156
211
  ],
157
- "approxFiles": 25
212
+ "approxFiles": 25,
213
+ "tables": [
214
+ "COMTNSMS",
215
+ "COMTNSMSRECPTN"
216
+ ]
158
217
  },
159
218
  {
160
219
  "id": "cop.smt",
@@ -169,7 +228,23 @@
169
228
  "dependsOn": [
170
229
  "cmm"
171
230
  ],
172
- "approxFiles": 202
231
+ "approxFiles": 202,
232
+ "tables": [
233
+ "COMTCCMMNDETAILCODE",
234
+ "COMTNDEPTJOB",
235
+ "COMTNDEPTJOBBX",
236
+ "COMTNDIARYINFO",
237
+ "COMTNEMPLYRINFO",
238
+ "COMTNGNRLMBER",
239
+ "COMTNLEADERSCHDUL",
240
+ "COMTNLEADERSCHDULDE",
241
+ "COMTNLEADERSTTUS",
242
+ "COMTNMEMOREPRT",
243
+ "COMTNMEMOTODO",
244
+ "COMTNORGNZTINFO",
245
+ "COMTNSCHDULINFO",
246
+ "COMTNWIKMNTHNGREPRT"
247
+ ]
173
248
  },
174
249
  {
175
250
  "id": "cop.stf",
@@ -184,7 +259,10 @@
184
259
  "dependsOn": [
185
260
  "cmm"
186
261
  ],
187
- "approxFiles": 12
262
+ "approxFiles": 12,
263
+ "tables": [
264
+ "COMTNSTSFDG"
265
+ ]
188
266
  },
189
267
  {
190
268
  "id": "cop.tpl",
@@ -199,7 +277,13 @@
199
277
  "dependsOn": [
200
278
  "cmm"
201
279
  ],
202
- "approxFiles": 22
280
+ "approxFiles": 22,
281
+ "tables": [
282
+ "COMTCCMMNDETAILCODE",
283
+ "COMTNBBSMASTER",
284
+ "COMTNEMPLYRINFO",
285
+ "COMTNTMPLATINFO"
286
+ ]
203
287
  },
204
288
  {
205
289
  "id": "dam.app",
@@ -214,7 +298,13 @@
214
298
  "dependsOn": [
215
299
  "cmm"
216
300
  ],
217
- "approxFiles": 17
301
+ "approxFiles": 17,
302
+ "tables": [
303
+ "COMTNDAMKNOIFM",
304
+ "COMTNDAMMAPKNO",
305
+ "COMTNDAMMAPTEAM",
306
+ "COMTNDAMPRO"
307
+ ]
218
308
  },
219
309
  {
220
310
  "id": "dam.map",
@@ -229,7 +319,11 @@
229
319
  "dependsOn": [
230
320
  "cmm"
231
321
  ],
232
- "approxFiles": 36
322
+ "approxFiles": 36,
323
+ "tables": [
324
+ "COMTNDAMMAPKNO",
325
+ "COMTNDAMMAPTEAM"
326
+ ]
233
327
  },
234
328
  {
235
329
  "id": "dam.mgm",
@@ -244,7 +338,13 @@
244
338
  "dependsOn": [
245
339
  "cmm"
246
340
  ],
247
- "approxFiles": 17
341
+ "approxFiles": 17,
342
+ "tables": [
343
+ "COMTNDAMKNOIFM",
344
+ "COMTNDAMMAPKNO",
345
+ "COMTNDAMMAPTEAM",
346
+ "COMTNEMPLYRSCRTYESTBS"
347
+ ]
248
348
  },
249
349
  {
250
350
  "id": "dam.per",
@@ -259,7 +359,12 @@
259
359
  "dependsOn": [
260
360
  "cmm"
261
361
  ],
262
- "approxFiles": 18
362
+ "approxFiles": 18,
363
+ "tables": [
364
+ "COMTNDAMKNOIFM",
365
+ "COMTNDAMMAPKNO",
366
+ "COMTNDAMMAPTEAM"
367
+ ]
263
368
  },
264
369
  {
265
370
  "id": "dam.spe",
@@ -274,7 +379,14 @@
274
379
  "dependsOn": [
275
380
  "cmm"
276
381
  ],
277
- "approxFiles": 36
382
+ "approxFiles": 36,
383
+ "tables": [
384
+ "COMTNDAMCALRES",
385
+ "COMTNDAMMAPKNO",
386
+ "COMTNDAMMAPTEAM",
387
+ "COMTNDAMPRO",
388
+ "COMTNEMPLYRINFO"
389
+ ]
278
390
  },
279
391
  {
280
392
  "id": "ext.captcha",
@@ -289,7 +401,8 @@
289
401
  "dependsOn": [
290
402
  "cmm"
291
403
  ],
292
- "approxFiles": 3
404
+ "approxFiles": 3,
405
+ "tables": []
293
406
  },
294
407
  {
295
408
  "id": "ext.easybatch",
@@ -304,7 +417,8 @@
304
417
  "dependsOn": [
305
418
  "cmm"
306
419
  ],
307
- "approxFiles": 2
420
+ "approxFiles": 2,
421
+ "tables": []
308
422
  },
309
423
  {
310
424
  "id": "ext.ldapumt",
@@ -319,7 +433,8 @@
319
433
  "dependsOn": [
320
434
  "cmm"
321
435
  ],
322
- "approxFiles": 14
436
+ "approxFiles": 14,
437
+ "tables": []
323
438
  },
324
439
  {
325
440
  "id": "ext.msg",
@@ -334,7 +449,8 @@
334
449
  "dependsOn": [
335
450
  "cmm"
336
451
  ],
337
- "approxFiles": 15
452
+ "approxFiles": 15,
453
+ "tables": []
338
454
  },
339
455
  {
340
456
  "id": "ext.oauth",
@@ -349,7 +465,8 @@
349
465
  "dependsOn": [
350
466
  "cmm"
351
467
  ],
352
- "approxFiles": 6
468
+ "approxFiles": 6,
469
+ "tables": []
353
470
  },
354
471
  {
355
472
  "id": "sec.drm",
@@ -364,7 +481,12 @@
364
481
  "dependsOn": [
365
482
  "cmm"
366
483
  ],
367
- "approxFiles": 16
484
+ "approxFiles": 16,
485
+ "tables": [
486
+ "COMTNEMPLYRINFO",
487
+ "COMTNEMPLYRSCRTYESTBS",
488
+ "COMTNORGNZTINFO"
489
+ ]
368
490
  },
369
491
  {
370
492
  "id": "sec.gmt",
@@ -379,7 +501,10 @@
379
501
  "dependsOn": [
380
502
  "cmm"
381
503
  ],
382
- "approxFiles": 18
504
+ "approxFiles": 18,
505
+ "tables": [
506
+ "COMTNAUTHORGROUPINFO"
507
+ ]
383
508
  },
384
509
  {
385
510
  "id": "sec.pki",
@@ -394,7 +519,8 @@
394
519
  "dependsOn": [
395
520
  "cmm"
396
521
  ],
397
- "approxFiles": 2
522
+ "approxFiles": 2,
523
+ "tables": []
398
524
  },
399
525
  {
400
526
  "id": "sec.ram",
@@ -409,7 +535,12 @@
409
535
  "dependsOn": [
410
536
  "cmm"
411
537
  ],
412
- "approxFiles": 33
538
+ "approxFiles": 33,
539
+ "tables": [
540
+ "COMTNAUTHORINFO",
541
+ "COMTNAUTHORROLERELATE",
542
+ "COMTNROLEINFO"
543
+ ]
413
544
  },
414
545
  {
415
546
  "id": "sec.rgm",
@@ -424,7 +555,14 @@
424
555
  "dependsOn": [
425
556
  "cmm"
426
557
  ],
427
- "approxFiles": 15
558
+ "approxFiles": 15,
559
+ "tables": [
560
+ "COMTCCMMNDETAILCODE",
561
+ "COMTNEMPLYRINFO",
562
+ "COMTNEMPLYRSCRTYESTBS",
563
+ "COMTNENTRPRSMBER",
564
+ "COMTNGNRLMBER"
565
+ ]
428
566
  },
429
567
  {
430
568
  "id": "sec.rmt",
@@ -439,7 +577,11 @@
439
577
  "dependsOn": [
440
578
  "cmm"
441
579
  ],
442
- "approxFiles": 17
580
+ "approxFiles": 17,
581
+ "tables": [
582
+ "COMTCCMMNDETAILCODE",
583
+ "COMTNROLEINFO"
584
+ ]
443
585
  },
444
586
  {
445
587
  "id": "sec.security",
@@ -454,7 +596,8 @@
454
596
  "dependsOn": [
455
597
  "cmm"
456
598
  ],
457
- "approxFiles": 1
599
+ "approxFiles": 1,
600
+ "tables": []
458
601
  },
459
602
  {
460
603
  "id": "ssi.syi",
@@ -469,7 +612,16 @@
469
612
  "dependsOn": [
470
613
  "cmm"
471
614
  ],
472
- "approxFiles": 82
615
+ "approxFiles": 82,
616
+ "tables": [
617
+ "COMTNCNTCINSTT",
618
+ "COMTNCNTCMESSAGE",
619
+ "COMTNCNTCMESSAGEITEM",
620
+ "COMTNCNTCSERVICE",
621
+ "COMTNCNTCSYSTEM",
622
+ "COMTNSYSTEMCNTC",
623
+ "COMTNTRSMRCVLOG"
624
+ ]
473
625
  },
474
626
  {
475
627
  "id": "sts.bst",
@@ -484,7 +636,13 @@
484
636
  "dependsOn": [
485
637
  "cmm"
486
638
  ],
487
- "approxFiles": 15
639
+ "approxFiles": 15,
640
+ "tables": [
641
+ "COMTNBBS",
642
+ "COMTNBBSMASTER",
643
+ "COMTNTMPLATINFO",
644
+ "COMTSBBSSUMMARY"
645
+ ]
488
646
  },
489
647
  {
490
648
  "id": "sts.com",
@@ -499,7 +657,8 @@
499
657
  "dependsOn": [
500
658
  "cmm"
501
659
  ],
502
- "approxFiles": 1
660
+ "approxFiles": 1,
661
+ "tables": []
503
662
  },
504
663
  {
505
664
  "id": "sts.cst",
@@ -514,7 +673,11 @@
514
673
  "dependsOn": [
515
674
  "cmm"
516
675
  ],
517
- "approxFiles": 14
676
+ "approxFiles": 14,
677
+ "tables": [
678
+ "COMTNLOGINLOG",
679
+ "COMTSSYSLOGSUMMARY"
680
+ ]
518
681
  },
519
682
  {
520
683
  "id": "sts.dst",
@@ -529,7 +692,14 @@
529
692
  "dependsOn": [
530
693
  "cmm"
531
694
  ],
532
- "approxFiles": 16
695
+ "approxFiles": 16,
696
+ "tables": [
697
+ "COMTNBBS",
698
+ "COMTNBBSMASTER",
699
+ "COMTNDTAUSESTATS",
700
+ "COMTNFILE",
701
+ "COMTNFILEDETAIL"
702
+ ]
533
703
  },
534
704
  {
535
705
  "id": "sts.rst",
@@ -544,7 +714,11 @@
544
714
  "dependsOn": [
545
715
  "cmm"
546
716
  ],
547
- "approxFiles": 17
717
+ "approxFiles": 17,
718
+ "tables": [
719
+ "COMTCCMMNDETAILCODE",
720
+ "COMTNREPRTSTATS"
721
+ ]
548
722
  },
549
723
  {
550
724
  "id": "sts.sst",
@@ -559,7 +733,11 @@
559
733
  "dependsOn": [
560
734
  "cmm"
561
735
  ],
562
- "approxFiles": 14
736
+ "approxFiles": 14,
737
+ "tables": [
738
+ "COMTNPROGRMLIST",
739
+ "COMTSWEBLOGSUMMARY"
740
+ ]
563
741
  },
564
742
  {
565
743
  "id": "sts.ust",
@@ -574,7 +752,13 @@
574
752
  "dependsOn": [
575
753
  "cmm"
576
754
  ],
577
- "approxFiles": 15
755
+ "approxFiles": 15,
756
+ "tables": [
757
+ "COMTNEMPLYRINFO",
758
+ "COMTNENTRPRSMBER",
759
+ "COMTNGNRLMBER",
760
+ "COMTSUSERSUMMARY"
761
+ ]
578
762
  },
579
763
  {
580
764
  "id": "sym.adr",
@@ -589,7 +773,8 @@
589
773
  "dependsOn": [
590
774
  "cmm"
591
775
  ],
592
- "approxFiles": 2
776
+ "approxFiles": 2,
777
+ "tables": []
593
778
  },
594
779
  {
595
780
  "id": "sym.bat",
@@ -604,7 +789,14 @@
604
789
  "dependsOn": [
605
790
  "cmm"
606
791
  ],
607
- "approxFiles": 56
792
+ "approxFiles": 56,
793
+ "tables": [
794
+ "COMTCCMMNDETAILCODE",
795
+ "COMTNBATCHOPERT",
796
+ "COMTNBATCHRESULT",
797
+ "COMTNBATCHSCHDUL",
798
+ "COMTNBATCHSCHDULDFK"
799
+ ]
608
800
  },
609
801
  {
610
802
  "id": "sym.cal",
@@ -619,7 +811,11 @@
619
811
  "dependsOn": [
620
812
  "cmm"
621
813
  ],
622
- "approxFiles": 32
814
+ "approxFiles": 32,
815
+ "tables": [
816
+ "COMTCCMMNDETAILCODE",
817
+ "COMTNRESTDE"
818
+ ]
623
819
  },
624
820
  {
625
821
  "id": "sym.ccm",
@@ -634,7 +830,18 @@
634
830
  "dependsOn": [
635
831
  "cmm"
636
832
  ],
637
- "approxFiles": 143
833
+ "approxFiles": 143,
834
+ "tables": [
835
+ "COMTCADMINISTCODE",
836
+ "COMTCADMINISTCODERECPTNLOG",
837
+ "COMTCCMMNCLCODE",
838
+ "COMTCCMMNCODE",
839
+ "COMTCCMMNDETAILCODE",
840
+ "COMTCZIP",
841
+ "COMTNINSTTCODE",
842
+ "COMTNINSTTCODERECPTNLOG",
843
+ "COMTRDNMADRZIP"
844
+ ]
638
845
  },
639
846
  {
640
847
  "id": "sym.log",
@@ -649,7 +856,20 @@
649
856
  "dependsOn": [
650
857
  "cmm"
651
858
  ],
652
- "approxFiles": 118
859
+ "approxFiles": 118,
860
+ "tables": [
861
+ "COMTCCMMNDETAILCODE",
862
+ "COMTHSYSHIST",
863
+ "COMTNLOGINLOG",
864
+ "COMTNPRIVACYLOG",
865
+ "COMTNSYSLOG",
866
+ "COMTNTRSMRCVLOG",
867
+ "COMTNUSERLOG",
868
+ "COMTNWEBLOG",
869
+ "COMTSSYSLOGSUMMARY",
870
+ "COMTSTRSMRCVLOGSUMMARY",
871
+ "COMTSWEBLOGSUMMARY"
872
+ ]
653
873
  },
654
874
  {
655
875
  "id": "sym.mnu",
@@ -664,7 +884,16 @@
664
884
  "dependsOn": [
665
885
  "cmm"
666
886
  ],
667
- "approxFiles": 91
887
+ "approxFiles": 91,
888
+ "tables": [
889
+ "COMTNAUTHORINFO",
890
+ "COMTNBKMKMENUMANAGERESULT",
891
+ "COMTNEMPLYRSCRTYESTBS",
892
+ "COMTNMENUCREATDTLS",
893
+ "COMTNMENUINFO",
894
+ "COMTNPROGRMLIST",
895
+ "COMTNSITEMAP"
896
+ ]
668
897
  },
669
898
  {
670
899
  "id": "sym.prm",
@@ -679,7 +908,11 @@
679
908
  "dependsOn": [
680
909
  "cmm"
681
910
  ],
682
- "approxFiles": 36
911
+ "approxFiles": 36,
912
+ "tables": [
913
+ "COMTHPROGRMCHANGEDTLS",
914
+ "COMTNPROGRMLIST"
915
+ ]
683
916
  },
684
917
  {
685
918
  "id": "sym.sym",
@@ -694,7 +927,17 @@
694
927
  "dependsOn": [
695
928
  "cmm"
696
929
  ],
697
- "approxFiles": 82
930
+ "approxFiles": 82,
931
+ "tables": [
932
+ "COMTCCMMNDETAILCODE",
933
+ "COMTNBACKUPOPERT",
934
+ "COMTNBACKUPRESULT",
935
+ "COMTNBACKUPSCHDULDFK",
936
+ "COMTNNTWRKINFO",
937
+ "COMTNSERVEREQPMNINFO",
938
+ "COMTNSERVEREQPMNRELATE",
939
+ "COMTNSERVERINFO"
940
+ ]
698
941
  },
699
942
  {
700
943
  "id": "sym.tbm",
@@ -709,7 +952,11 @@
709
952
  "dependsOn": [
710
953
  "cmm"
711
954
  ],
712
- "approxFiles": 34
955
+ "approxFiles": 34,
956
+ "tables": [
957
+ "COMTCCMMNDETAILCODE",
958
+ "COMTNTROBLINFO"
959
+ ]
713
960
  },
714
961
  {
715
962
  "id": "uat.sso",
@@ -724,7 +971,8 @@
724
971
  "dependsOn": [
725
972
  "cmm"
726
973
  ],
727
- "approxFiles": 3
974
+ "approxFiles": 3,
975
+ "tables": []
728
976
  },
729
977
  {
730
978
  "id": "uat.uap",
@@ -739,7 +987,10 @@
739
987
  "dependsOn": [
740
988
  "cmm"
741
989
  ],
742
- "approxFiles": 18
990
+ "approxFiles": 18,
991
+ "tables": [
992
+ "COMTNLOGINPOLICY"
993
+ ]
743
994
  },
744
995
  {
745
996
  "id": "login",
@@ -754,7 +1005,12 @@
754
1005
  "dependsOn": [
755
1006
  "cmm"
756
1007
  ],
757
- "approxFiles": 31
1008
+ "approxFiles": 31,
1009
+ "tables": [
1010
+ "COMTNEMPLYRINFO",
1011
+ "COMTNENTRPRSMBER",
1012
+ "COMTNGNRLMBER"
1013
+ ]
758
1014
  },
759
1015
  {
760
1016
  "id": "uss.cmt",
@@ -769,7 +1025,10 @@
769
1025
  "dependsOn": [
770
1026
  "cmm"
771
1027
  ],
772
- "approxFiles": 15
1028
+ "approxFiles": 15,
1029
+ "tables": [
1030
+ "COMTNCOMMUTE"
1031
+ ]
773
1032
  },
774
1033
  {
775
1034
  "id": "uss.ion",
@@ -784,7 +1043,49 @@
784
1043
  "dependsOn": [
785
1044
  "cmm"
786
1045
  ],
787
- "approxFiles": 567
1046
+ "approxFiles": 567,
1047
+ "tables": [
1048
+ "COMTCCMMNDETAILCODE",
1049
+ "COMTNANNVRSRYMANAGE",
1050
+ "COMTNBANNER",
1051
+ "COMTNBNDTCECKMANAGE",
1052
+ "COMTNBNDTDIARY",
1053
+ "COMTNBNDTMANAGE",
1054
+ "COMTNCTSNNMANAGE",
1055
+ "COMTNEMPLYRINFO",
1056
+ "COMTNEVENTATDRN",
1057
+ "COMTNEVENTINFO",
1058
+ "COMTNEVENTMANAGE",
1059
+ "COMTNEXTRLHRINFO",
1060
+ "COMTNFILEDETAIL",
1061
+ "COMTNGNRLMBER",
1062
+ "COMTNINDVDLYRYCMANAGE",
1063
+ "COMTNINFRMLSANCTN",
1064
+ "COMTNINTNETSVC",
1065
+ "COMTNLOGINSCRINIMAGE",
1066
+ "COMTNMAINIMAGE",
1067
+ "COMTNMTGPLACEMANAGE",
1068
+ "COMTNMTGPLACERESVE",
1069
+ "COMTNNEWSINFO",
1070
+ "COMTNNOTE",
1071
+ "COMTNNOTERECPTN",
1072
+ "COMTNNOTETRNSMIT",
1073
+ "COMTNNTFCINFO",
1074
+ "COMTNORGNZTINFO",
1075
+ "COMTNPOPUPMANAGE",
1076
+ "COMTNRECENTSRCHWRD",
1077
+ "COMTNRECENTSRCHWRDMANAGE",
1078
+ "COMTNRECOMENDSITEINFO",
1079
+ "COMTNROUGHMAP",
1080
+ "COMTNRSS",
1081
+ "COMTNRWARDMANAGE",
1082
+ "COMTNSITELIST",
1083
+ "COMTNTWITTER",
1084
+ "COMTNUNITYLINK",
1085
+ "COMTNUSERABSNCE",
1086
+ "COMTNVCATNMANAGE",
1087
+ "COMTNWIKIBKMK"
1088
+ ]
788
1089
  },
789
1090
  {
790
1091
  "id": "uss.mpe",
@@ -799,7 +1100,10 @@
799
1100
  "dependsOn": [
800
1101
  "cmm"
801
1102
  ],
802
- "approxFiles": 17
1103
+ "approxFiles": 17,
1104
+ "tables": [
1105
+ "COMTNINDVDLPGECNTNTS"
1106
+ ]
803
1107
  },
804
1108
  {
805
1109
  "id": "uss.olh",
@@ -814,7 +1118,18 @@
814
1118
  "dependsOn": [
815
1119
  "cmm"
816
1120
  ],
817
- "approxFiles": 116
1121
+ "approxFiles": 116,
1122
+ "tables": [
1123
+ "COMTCCMMNDETAILCODE",
1124
+ "COMTNADMINISTRATIONWORD",
1125
+ "COMTNEMPLYRINFO",
1126
+ "COMTNFAQINFO",
1127
+ "COMTNHPCMINFO",
1128
+ "COMTNONLINEMANUAL",
1129
+ "COMTNORGNZTINFO",
1130
+ "COMTNQAINFO",
1131
+ "COMTNWORDDICARYINFO"
1132
+ ]
818
1133
  },
819
1134
  {
820
1135
  "id": "uss.olp",
@@ -829,7 +1144,24 @@
829
1144
  "dependsOn": [
830
1145
  "cmm"
831
1146
  ],
832
- "approxFiles": 206
1147
+ "approxFiles": 206,
1148
+ "tables": [
1149
+ "COMTCCMMNDETAILCODE",
1150
+ "COMTNCNSLTLIST",
1151
+ "COMTNEMPLYRINFO",
1152
+ "COMTNMTGINFO",
1153
+ "COMTNONLINEPOLLIEM",
1154
+ "COMTNONLINEPOLLMANAGE",
1155
+ "COMTNONLINEPOLLRESULT",
1156
+ "COMTNORGNZTINFO",
1157
+ "COMTNQAINFO",
1158
+ "COMTNQESTNRINFO",
1159
+ "COMTNQUSTNRIEM",
1160
+ "COMTNQUSTNRQESITM",
1161
+ "COMTNQUSTNRRESPONDINFO",
1162
+ "COMTNQUSTNRRSPNSRESULT",
1163
+ "COMTNQUSTNRTMPLAT"
1164
+ ]
833
1165
  },
834
1166
  {
835
1167
  "id": "uss.sam",
@@ -844,7 +1176,12 @@
844
1176
  "dependsOn": [
845
1177
  "cmm"
846
1178
  ],
847
- "approxFiles": 55
1179
+ "approxFiles": 55,
1180
+ "tables": [
1181
+ "COMTNCPYRHTINFO",
1182
+ "COMTNINDVDLINFOPOLICY",
1183
+ "COMTNSTPLATINFO"
1184
+ ]
848
1185
  },
849
1186
  {
850
1187
  "id": "uss.umt",
@@ -859,7 +1196,15 @@
859
1196
  "dependsOn": [
860
1197
  "cmm"
861
1198
  ],
862
- "approxFiles": 82
1199
+ "approxFiles": 82,
1200
+ "tables": [
1201
+ "COMTHEMPLYRINFOCHANGEDTLS",
1202
+ "COMTNEMPLYRINFO",
1203
+ "COMTNENTRPRSMBER",
1204
+ "COMTNGNRLMBER",
1205
+ "COMTNORGNZTINFO",
1206
+ "COMTNSTPLATINFO"
1207
+ ]
863
1208
  },
864
1209
  {
865
1210
  "id": "utl.cal",
@@ -874,7 +1219,8 @@
874
1219
  "dependsOn": [
875
1220
  "cmm"
876
1221
  ],
877
- "approxFiles": 1
1222
+ "approxFiles": 1,
1223
+ "tables": []
878
1224
  },
879
1225
  {
880
1226
  "id": "utl.cas",
@@ -889,7 +1235,8 @@
889
1235
  "dependsOn": [
890
1236
  "cmm"
891
1237
  ],
892
- "approxFiles": 2
1238
+ "approxFiles": 2,
1239
+ "tables": []
893
1240
  },
894
1241
  {
895
1242
  "id": "utl.fcc",
@@ -904,7 +1251,8 @@
904
1251
  "dependsOn": [
905
1252
  "cmm"
906
1253
  ],
907
- "approxFiles": 13
1254
+ "approxFiles": 13,
1255
+ "tables": []
908
1256
  },
909
1257
  {
910
1258
  "id": "utl.fda",
@@ -919,7 +1267,8 @@
919
1267
  "dependsOn": [
920
1268
  "cmm"
921
1269
  ],
922
- "approxFiles": 1
1270
+ "approxFiles": 1,
1271
+ "tables": []
923
1272
  },
924
1273
  {
925
1274
  "id": "utl.jso",
@@ -934,7 +1283,8 @@
934
1283
  "dependsOn": [
935
1284
  "cmm"
936
1285
  ],
937
- "approxFiles": 3
1286
+ "approxFiles": 3,
1287
+ "tables": []
938
1288
  },
939
1289
  {
940
1290
  "id": "utl.mdl",
@@ -949,7 +1299,8 @@
949
1299
  "dependsOn": [
950
1300
  "cmm"
951
1301
  ],
952
- "approxFiles": 1
1302
+ "approxFiles": 1,
1303
+ "tables": []
953
1304
  },
954
1305
  {
955
1306
  "id": "utl.pao",
@@ -964,7 +1315,8 @@
964
1315
  "dependsOn": [
965
1316
  "cmm"
966
1317
  ],
967
- "approxFiles": 15
1318
+ "approxFiles": 15,
1319
+ "tables": []
968
1320
  },
969
1321
  {
970
1322
  "id": "utl.sim",
@@ -979,7 +1331,8 @@
979
1331
  "dependsOn": [
980
1332
  "cmm"
981
1333
  ],
982
- "approxFiles": 11
1334
+ "approxFiles": 11,
1335
+ "tables": []
983
1336
  },
984
1337
  {
985
1338
  "id": "utl.slm",
@@ -994,7 +1347,8 @@
994
1347
  "dependsOn": [
995
1348
  "cmm"
996
1349
  ],
997
- "approxFiles": 2
1350
+ "approxFiles": 2,
1351
+ "tables": []
998
1352
  },
999
1353
  {
1000
1354
  "id": "utl.sys",
@@ -1009,7 +1363,33 @@
1009
1363
  "dependsOn": [
1010
1364
  "cmm"
1011
1365
  ],
1012
- "approxFiles": 217
1366
+ "approxFiles": 217,
1367
+ "tables": [
1368
+ "COMTCCMMNDETAILCODE",
1369
+ "COMTHDBMNTRNGLOGINFO",
1370
+ "COMTHHTTPMONLOGINFO",
1371
+ "COMTHTRSMRCVMNTRNGLOGINFO",
1372
+ "COMTNCNTCINSTT",
1373
+ "COMTNCNTCSERVICE",
1374
+ "COMTNCNTCSYSTEM",
1375
+ "COMTNDBMNTRNG",
1376
+ "COMTNFILESYSMNTRNG",
1377
+ "COMTNFILESYSMNTRNGLOGINFO",
1378
+ "COMTNHTTPMON",
1379
+ "COMTNNTWRKSVCMNTRNG",
1380
+ "COMTNNTWRKSVCMNTRNGLOGINFO",
1381
+ "COMTNPROCESSMON",
1382
+ "COMTNPROCESSMONLOGINFO",
1383
+ "COMTNPROXYINFO",
1384
+ "COMTNPROXYLOGINFO",
1385
+ "COMTNSERVEREQPMNINFO",
1386
+ "COMTNSERVEREQPMNRELATE",
1387
+ "COMTNSERVERINFO",
1388
+ "COMTNSERVERRESRCELOGINFO",
1389
+ "COMTNSYNCHRNSERVERINFO",
1390
+ "COMTNSYSTEMCNTC",
1391
+ "COMTNTRSMRCVMNTRNG"
1392
+ ]
1013
1393
  },
1014
1394
  {
1015
1395
  "id": "utl.wed",
@@ -1024,7 +1404,8 @@
1024
1404
  "dependsOn": [
1025
1405
  "cmm"
1026
1406
  ],
1027
- "approxFiles": 8
1407
+ "approxFiles": 8,
1408
+ "tables": []
1028
1409
  }
1029
1410
  ]
1030
1411
  }
package/dist/index.js CHANGED
@@ -279,15 +279,59 @@ export async function addComponents(opts) {
279
279
  }
280
280
  if (plan.length === 0)
281
281
  throw new Error("복사할 파일이 없습니다 — 카탈로그 pathPrefixes를 확인하세요");
282
- // DB 스크립트 수집
282
+ // DB 스크립트 수집 — 컴포넌트별 테이블 선별 추출 (M4)
283
283
  const sqlPlan = [];
284
284
  if (opts.database) {
285
+ const db = opts.database;
286
+ // 통합 스크립트 본문 로드 (ddl·dml)
287
+ const scriptText = new Map();
285
288
  for (const e of entries) {
286
289
  const r = rel(e.entryName);
287
290
  for (const kind of ["ddl", "dml"]) {
288
- const prefix = `script/${kind}/${opts.database}/`;
289
- if (r.startsWith(prefix))
290
- sqlPlan.push({ entry: e, relPath: `scripts/egovframe-components/${opts.database}/${kind}/` + r.slice(prefix.length) });
291
+ if (r.startsWith(`script/${kind}/${db}/`))
292
+ scriptText.set(kind + ":" + r, e.getData().toString("utf8"));
293
+ }
294
+ }
295
+ /** 통합 스크립트에서 특정 테이블 관련 구문만 추출 */
296
+ const extractFor = (tables, kind) => {
297
+ const re = new RegExp("\\b(" + tables.join("|") + ")\\b");
298
+ const parts = [];
299
+ for (const [key, text] of scriptText) {
300
+ if (!key.startsWith(kind + ":"))
301
+ continue;
302
+ for (const stmt of text.split(/;\s*(?:\r?\n|$)/)) {
303
+ const t = stmt.trim();
304
+ if (t && re.test(t))
305
+ parts.push(t + ";");
306
+ }
307
+ }
308
+ return parts.join("\n\n");
309
+ };
310
+ const noTables = [];
311
+ for (const c of order) {
312
+ if (!c.tables || c.tables.length === 0) {
313
+ noTables.push(c);
314
+ continue;
315
+ }
316
+ for (const kind of ["ddl", "dml"]) {
317
+ const sql = extractFor(c.tables, kind);
318
+ if (sql)
319
+ sqlPlan.push({
320
+ relPath: `scripts/egovframe-components/${db}/${kind}/${c.id}.sql`,
321
+ content: Buffer.from(`-- ${c.id} (${c.name}) — ${kind.toUpperCase()} 선별 추출: ${c.tables.join(", ")}\n\n` + sql + "\n", "utf8"),
322
+ componentId: c.id,
323
+ });
324
+ }
325
+ }
326
+ // 테이블 정보가 없는 컴포넌트가 있으면 통합본을 함께 복사 (폴백)
327
+ if (noTables.length > 0) {
328
+ for (const [key, text] of scriptText) {
329
+ const [kind, r] = [key.slice(0, 3), key.slice(4)];
330
+ sqlPlan.push({
331
+ relPath: `scripts/egovframe-components/${db}/${kind}/` + r.split("/").pop(),
332
+ content: Buffer.from(text, "utf8"),
333
+ componentId: noTables[0].id,
334
+ });
291
335
  }
292
336
  }
293
337
  }
@@ -315,18 +359,22 @@ export async function addComponents(opts) {
315
359
  countBy.set(componentId, (countBy.get(componentId) ?? 0) + 1);
316
360
  }
317
361
  const sqlScripts = [];
318
- for (const { entry, relPath } of sqlPlan) {
362
+ const sqlBy = new Map();
363
+ for (const { relPath, content, componentId } of sqlPlan) {
319
364
  const dest = path.join(projectDir, relPath);
320
365
  if (!dest.startsWith(projectDir + path.sep))
321
366
  continue;
322
367
  fs.mkdirSync(path.dirname(dest), { recursive: true });
323
- fs.writeFileSync(dest, entry.getData());
368
+ fs.writeFileSync(dest, content);
324
369
  sqlScripts.push(relPath);
370
+ if (!sqlBy.has(componentId))
371
+ sqlBy.set(componentId, []);
372
+ sqlBy.get(componentId).push(relPath);
325
373
  }
326
374
  const nextSteps = [
327
375
  opts.database
328
- ? `scripts/egovframe-components/${opts.database}/ 의 DDL·DML에서 설치한 컴포넌트 관련 테이블을 선별해 DB에 적용하세요 (통합 스크립트입니다).`
329
- : "database 파라미터를 지정하면 DB DDL·DML 스크립트도 함께 복사됩니다.",
376
+ ? `scripts/egovframe-components/${opts.database}/ddl|dml/<컴포넌트id>.sql — 컴포넌트별로 선별 추출된 스크립트를 순서대로 DB에 적용하세요.`
377
+ : "database 파라미터를 지정하면 컴포넌트별로 선별 추출된 DDL·DML 스크립트도 함께 생성됩니다.",
330
378
  "복사된 소스는 egovframework.com.* 원본 패키지를 유지합니다 (eGovFrame IDE 마법사와 동일).",
331
379
  "빈 스캐너/설정에 egovframework.com 패키지 스캔이 포함되어 있는지 확인 후 mvn compile로 빌드를 검증하세요.",
332
380
  "일부 컴포넌트는 web.xml·필터·스케줄러 등 수동 설정이 필요할 수 있습니다 (공통컴포넌트 가이드 참조).",
@@ -348,7 +396,7 @@ export async function addComponents(opts) {
348
396
  manifest.components[c.id] = {
349
397
  installedAt: now,
350
398
  files: filesBy.get(c.id) ?? [],
351
- sqlScripts: c === order[0] ? sqlScripts : [],
399
+ sqlScripts: sqlBy.get(c.id) ?? [],
352
400
  };
353
401
  writeManifest(projectDir, manifest);
354
402
  return {
@@ -512,7 +560,7 @@ export async function validateProject(opts) {
512
560
  /* MCP 서버 */
513
561
  /* ------------------------------------------------------------------ */
514
562
  export function buildServer() {
515
- const server = new McpServer({ name: "egovframe-scaffold-mcp", version: "0.5.0" });
563
+ const server = new McpServer({ name: "egovframe-scaffold-mcp", version: "0.6.0" });
516
564
  server.tool("list_egovframe_templates", "사용 가능한 전자정부 표준프레임워크 프로젝트 템플릿 목록을 반환합니다.", {}, async () => ({
517
565
  content: [
518
566
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovframe-scaffold-mcp",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "전자정부 표준프레임워크(eGovFrame) 프로젝트 스캐폴딩·공통컴포넌트 조립 MCP 서버 — create/search/add/validate/remove",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",