claude-code-kr 0.3.13 → 0.3.14
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/patcher.js +12 -11
- package/package.json +1 -1
package/lib/patcher.js
CHANGED
|
@@ -120,17 +120,8 @@ function apply(cliJs, { force = false } = {}) {
|
|
|
120
120
|
const markerPath = cliJs + '.cckr';
|
|
121
121
|
const ccVersion = getCliVersion(cliJs);
|
|
122
122
|
|
|
123
|
-
//
|
|
124
|
-
|
|
125
|
-
try {
|
|
126
|
-
const marker = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
|
|
127
|
-
if (marker.ccVersion === ccVersion && marker.cckrVersion === pkg.version) {
|
|
128
|
-
return { ok: true, skipped: true, ccVersion, testedCcVersion: TESTED_CC_VERSION };
|
|
129
|
-
}
|
|
130
|
-
} catch {}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// 세션 시작 시점 캡처 — SessionStart hook이 CCKR_SESSION_PPID env로 호출
|
|
123
|
+
// 세션 시작 시점 캡처 — 마커 스킵보다 먼저 (스킵돼도 세션 정보는 항상 기록)
|
|
124
|
+
// SessionStart hook이 CCKR_SESSION_PPID env로 호출
|
|
134
125
|
// 패치 직전의 marker = 이 세션이 메모리에 로드한 cli.js 버전
|
|
135
126
|
const sessionPpid = process.env.CCKR_SESSION_PPID;
|
|
136
127
|
if (sessionPpid && /^\d+$/.test(sessionPpid)) {
|
|
@@ -161,6 +152,16 @@ function apply(cliJs, { force = false } = {}) {
|
|
|
161
152
|
} catch {}
|
|
162
153
|
}
|
|
163
154
|
|
|
155
|
+
// 마커 체크 — CC 버전 + cckr 버전이 같으면 스킵
|
|
156
|
+
if (!force && fs.existsSync(markerPath)) {
|
|
157
|
+
try {
|
|
158
|
+
const marker = JSON.parse(fs.readFileSync(markerPath, 'utf8'));
|
|
159
|
+
if (marker.ccVersion === ccVersion && marker.cckrVersion === pkg.version) {
|
|
160
|
+
return { ok: true, skipped: true, ccVersion, testedCcVersion: TESTED_CC_VERSION };
|
|
161
|
+
}
|
|
162
|
+
} catch {}
|
|
163
|
+
}
|
|
164
|
+
|
|
164
165
|
const bakPath = cliJs + '.bak';
|
|
165
166
|
|
|
166
167
|
// 백업 생성 또는 백업에서 복원 (중복 패치 방지)
|