docuking-mcp 3.6.0 → 3.6.1
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/lib/init.js +14 -12
- package/package.json +1 -1
package/lib/init.js
CHANGED
|
@@ -158,20 +158,22 @@ project/
|
|
|
158
158
|
if (fs.existsSync(claudeMdPath)) {
|
|
159
159
|
let content = fs.readFileSync(claudeMdPath, 'utf-8');
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
// 기존 DocuKing 섹션 모두 삭제 후 새로 추가
|
|
162
|
+
// 패턴: "---\n\n## DocuKing" 으로 시작하는 섹션 찾아서 끝까지 삭제
|
|
163
|
+
const docukingPatterns = [
|
|
164
|
+
/---\n\n## DocuKing 연결됨[\s\S]*$/,
|
|
165
|
+
/---\n\n## DocuKing AI 작업 기록[\s\S]*$/,
|
|
166
|
+
/## DocuKing 연결됨[\s\S]*$/,
|
|
167
|
+
/## DocuKing AI 작업 기록[\s\S]*$/,
|
|
168
|
+
];
|
|
169
|
+
|
|
170
|
+
for (const pattern of docukingPatterns) {
|
|
171
|
+
content = content.replace(pattern, '');
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
|
|
174
|
+
// 끝에 새 섹션 추가
|
|
175
|
+
content = content.trimEnd() + '\n' + docukingSection;
|
|
176
|
+
fs.writeFileSync(claudeMdPath, content, 'utf-8');
|
|
175
177
|
} else {
|
|
176
178
|
const newContent = `# Project Instructions
|
|
177
179
|
|