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.
Files changed (2) hide show
  1. package/lib/init.js +14 -12
  2. 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
- if (content.includes(marker)) {
162
- return;
163
- }
164
-
165
- if (content.includes(oldMarker)) {
166
- const oldSectionStart = content.lastIndexOf('---\n\n' + oldMarker);
167
- if (oldSectionStart !== -1) {
168
- content = content.substring(0, oldSectionStart) + docukingSection;
169
- fs.writeFileSync(claudeMdPath, content, 'utf-8');
170
- return;
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
- fs.appendFileSync(claudeMdPath, docukingSection, 'utf-8');
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docuking-mcp",
3
- "version": "3.6.0",
3
+ "version": "3.6.1",
4
4
  "description": "DocuKing MCP Server - AI 시대의 문서 협업 플랫폼",
5
5
  "type": "module",
6
6
  "main": "index.js",