projectops 4.104.6 → 4.104.7

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 (85) hide show
  1. package/README.md +1 -1
  2. package/bin/projectops.js +4 -4
  3. package/package.json +1 -1
  4. package/src/cli/args.js +43 -43
  5. package/src/cli/errors.js +8 -8
  6. package/src/cli/help.js +4 -4
  7. package/src/commands/doctor.js +39 -39
  8. package/src/commands/full.js +29 -29
  9. package/src/commands/interactive.js +86 -86
  10. package/src/commands/issues.js +5 -5
  11. package/src/commands/skills.js +13 -13
  12. package/src/commands/version.js +8 -8
  13. package/src/commands/workflows.js +19 -19
  14. package/src/context.js +24 -24
  15. package/src/core/agent-guide.js +5 -5
  16. package/src/core/assets.js +11 -11
  17. package/src/core/baseline.js +24 -24
  18. package/src/core/branch-sub.js +23 -23
  19. package/src/core/breaking-check.js +21 -21
  20. package/src/core/breaking.js +6 -6
  21. package/src/core/ci-minutes-sub.js +13 -13
  22. package/src/core/constants.js +17 -17
  23. package/src/core/copy/coderabbit.js +10 -10
  24. package/src/core/copy/gitignore.js +9 -9
  25. package/src/core/copy/readme.js +7 -7
  26. package/src/core/copy/simple.js +35 -35
  27. package/src/core/copy/util.js +9 -9
  28. package/src/core/copy/workflows.js +99 -99
  29. package/src/core/detect-fs.js +21 -21
  30. package/src/core/detect.js +12 -12
  31. package/src/core/development-branch.js +11 -11
  32. package/src/core/exclusions.js +12 -12
  33. package/src/core/fsutil.js +9 -9
  34. package/src/core/git-branch.js +11 -11
  35. package/src/core/ide/adapter.js +23 -23
  36. package/src/core/ide/adapters/claude.js +12 -12
  37. package/src/core/ide/adapters/codex.js +4 -4
  38. package/src/core/ide/adapters/copilot.js +12 -12
  39. package/src/core/ide/adapters/cursor.js +7 -7
  40. package/src/core/ide/adapters/gemini.js +5 -5
  41. package/src/core/ide/adapters/pi-common.js +12 -12
  42. package/src/core/ide/adapters/pi-harness.js +7 -7
  43. package/src/core/ide/adapters/pi.js +3 -3
  44. package/src/core/ide/home-skills.js +6 -6
  45. package/src/core/ide/legacy.js +8 -8
  46. package/src/core/ide/registry.js +6 -6
  47. package/src/core/ide/runner.js +15 -15
  48. package/src/core/ide/skills-copy.js +34 -34
  49. package/src/core/ide/stable-entry.js +11 -11
  50. package/src/core/ide/util.js +4 -4
  51. package/src/core/incoming.js +13 -13
  52. package/src/core/label-style.js +12 -12
  53. package/src/core/migration-guide.js +19 -19
  54. package/src/core/migrations/index.js +16 -16
  55. package/src/core/migrations/registry.js +39 -39
  56. package/src/core/migrations/rules/legacy-dirs.js +6 -6
  57. package/src/core/migrations/rules/obsolete-workflows.js +4 -4
  58. package/src/core/migrations/rules/root-files.js +3 -3
  59. package/src/core/migrations/rules/settings-extractors.js +8 -8
  60. package/src/core/options-ask.js +104 -104
  61. package/src/core/options-schema.js +23 -23
  62. package/src/core/orphan-workflows.js +14 -14
  63. package/src/core/paths-resolve.js +54 -54
  64. package/src/core/paths.js +2 -2
  65. package/src/core/placeholder-triggers.js +10 -10
  66. package/src/core/repo-language.js +10 -10
  67. package/src/core/resolve-options.js +30 -30
  68. package/src/core/run-trace.js +54 -54
  69. package/src/core/store-locales-hint.js +13 -13
  70. package/src/core/verify.js +27 -27
  71. package/src/core/version-yml.js +115 -115
  72. package/src/core/wizard-env.js +42 -42
  73. package/src/core/wizard-labels.js +31 -31
  74. package/src/core/workflow-groups.js +14 -14
  75. package/src/i18n/core.en.js +1 -1
  76. package/src/i18n/doctor.en.js +1 -1
  77. package/src/i18n/ide.en.js +1 -1
  78. package/src/i18n/migrate.en.js +1 -1
  79. package/src/i18n/options.en.js +1 -1
  80. package/src/index.js +60 -60
  81. package/src/ui/ansi.js +5 -5
  82. package/src/ui/env-plan.js +44 -44
  83. package/src/ui/prompts.js +21 -21
  84. package/src/ui/readline-engine.js +38 -38
  85. package/src/ui/skills-prompts.js +4 -4
@@ -1,12 +1,12 @@
1
- // version.yml 파싱·생성 (전체 재생성 전략 D4).
2
- // ⚠️ YAML 재직렬화 금지 — 주석이 데이터. 템플릿 문자열로 바이트 단위 고정.
1
+ // version.yml parse and generate (full regeneration strategy D4).
2
+ // ⚠️ No YAML re-serialization — comments are data. Pinned byte for byte with template strings.
3
3
  import { execFileSync } from "node:child_process";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { DEPLOY_TARGETS, LABEL_STYLES } from "./constants.js";
6
6
  import { REPO_LANGUAGES } from "./repo-language.js";
7
7
 
8
- // 값 목록으로 만든 매칭 패턴 — 목록에 언어·표기를 추가하면 파서가 저절로 읽는다.
9
- // (언어를 패턴에 박아 두면 새 언어를 저장한 뒤 다음 업데이트에서 못 읽고 ko 로 되돌아간다.)
8
+ // Match patterns built from the value lists — adding a language or style to a list makes the parser read it automatically.
9
+ // (Hardcoding languages in the pattern means a newly saved language is unreadable on the next update and reverts to ko.)
10
10
  const alt = (values) => values.map((v) => v.replace(/[.*+?^${}()|[\]\\-]/g, "\\$&")).join("|");
11
11
  const LANGUAGE_RE = new RegExp(`^\\s+language:\\s*["']?(${alt(REPO_LANGUAGES)})["']?`);
12
12
  const DEPLOY_TRIGGER_BRANCH_RE = /^\s+deploy_trigger_branch:\s*["']?([A-Za-z0-9._\/-]+)["']?/;
@@ -56,8 +56,8 @@ const HEADER_EN = `# ===========================================================
56
56
  # ===================================================================
57
57
  `;
58
58
 
59
- // 한국어 레포(options.language: ko)는 주석도 한국어로 쓴다 (#811).
60
- // 업데이트(--force 는 화면이 en 고정)마다 한국어 주석이 영문으로 바뀌어 version.yml diff 가 86줄이 됐다.
59
+ // Korean repos (options.language: ko) get Korean comments too (#811).
60
+ // Every update (--force fixes the screen to en) turned the Korean comments English, making the version.yml diff 86 lines.
61
61
  const HEADER_KO = `# ===================================================================
62
62
  # 프로젝트 버전 관리 파일
63
63
  # ===================================================================
@@ -101,7 +101,7 @@ const HEADER_KO = `# ===========================================================
101
101
  # ===================================================================
102
102
  `;
103
103
 
104
- // 키 옆 한 줄 주석. 언어는 화면 언어가 아니라 레포 문구 언어(options.language)를 따른다.
104
+ // One-line comment next to each key. Language follows the repo text language (options.language), not the screen language.
105
105
  const COMMENTS = {
106
106
  en: {
107
107
  versionCode: "app build number",
@@ -146,37 +146,37 @@ const COMMENTS = {
146
146
  };
147
147
  const commentsFor = (lang) => COMMENTS[lang === "ko" ? "ko" : "en"];
148
148
 
149
- // last_updated_by 결정 (#811): 실행한 git 사용자 → 기존 값 → template_integrator.
150
- // 매번 "template_integrator"로 덮어쓰면 누가 바꿨는지가 사라진다.
149
+ // Decide last_updated_by (#811): the git user who ran it → existing value → template_integrator.
150
+ // Overwriting with "template_integrator" every time loses who made the change.
151
151
  export function resolveUpdatedBy(existingContent = "", cwd = ".") {
152
152
  try {
153
153
  const name = execFileSync("git", ["config", "user.name"],
154
154
  { cwd, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] }).trim();
155
155
  if (name) return name;
156
- } catch { /* git 없음·설정 없음(CI) — 기존 값으로 */ }
156
+ } catch { /* No git or no config (CI) — use the existing value */ }
157
157
  const m = String(existingContent || "").match(/^\s+last_updated_by:\s*"([^"]*)"/m);
158
158
  return m && m[1] ? m[1] : "template_integrator";
159
159
  }
160
160
 
161
- // metadata.template.options 상태머신 파싱.
162
- // 반환(#439 배포/publish 축): { deploy: string|null, publish: string[]|null, secretBackup: bool|null }
163
- // deploy: 'docker-ssh'|'vercel'|'none', publish: ['nexus','npm','github-packages'] 부분집합. null=미기재.
164
- // 구 키(nexus/npm_publish/synology)는 신 축으로 자동 마이그레이션해 읽는다 (v4.2.0 이전 파일 호환):
165
- // nexus:true → publish에 'nexus' + deploy 미기재면 'none' (구 동작: nexus면 서버 배포 제외)
166
- // npm_publish:true → publish에 'npm'
167
- // synology:true → secret_backup 미기재면 true (#473 — 구 Synology 옵션은 Secret 업로드를 포함했으므로
168
- // 승계하지 않으면 비대화형 업데이트에서 Secret 백업 워크플로우를 조용히 잃는다)
169
- // (options-ask.js가 이 함수를 import한다 — 순환 방지 위해 여기(version-yml)에 정의.)
161
+ // State-machine parse of metadata.template.options.
162
+ // Returns (#439 deploy/publish axes): { deploy: string|null, publish: string[]|null, secretBackup: bool|null }
163
+ // deploy: 'docker-ssh'|'vercel'|'none', publish: subset of ['nexus','npm','github-packages']. null = not set.
164
+ // Old keys (nexus/npm_publish/synology) are migrated to the new axes on read (compat with files before v4.2.0):
165
+ // nexus:true → 'nexus' in publish + 'none' if deploy is unset (old behavior: nexus excluded server deploy)
166
+ // npm_publish:true → 'npm' in publish
167
+ // synology:true → secret_backup true if unset (#473 — the old Synology option included the secret upload, so
168
+ // without carrying it over, a non-interactive update silently loses the secret backup workflow)
169
+ // (options-ask.js imports this function — defined here (version-yml) to avoid a circular import.)
170
170
  export function parseTemplateOptions(content) {
171
171
  const out = { deploy: null, publish: null, secretBackup: null,
172
172
  changelogProvider: null, changelogBaseUrl: null, codeReviewCoderabbit: null, aiPrSummary: null, projectsSync: null,
173
173
  deployBranch: null, deployTriggerBranch: null, ciMinutesSaver: null, intent: null, semverAuto: null, appRelease: null, labelStyle: null, closeOnRelease: null, language: null, excludedWorkflows: null, storeLocales: null, storeLocalesIos: null, storeLocalesPlay: null };
174
- // 개발 브랜치는 metadata 직속(#456) — template.options 밖이라 별도로 스캔한다.
174
+ // The development branch sits directly under metadata (#456) — outside template.options, so scanned separately.
175
175
  out.deployBranch = readDevelopmentBranch(content);
176
176
  let legacyNexus = null;
177
177
  let legacyNpm = null;
178
178
  let legacySynology = null;
179
- // 값 정규화: 따옴표 제거 + 트림
179
+ // Normalize a value: strip quotes + trim
180
180
  const strip = (s) => String(s).replace(/["']/g, "").trim();
181
181
  let inTemplate = false;
182
182
  let inOptions = false;
@@ -186,14 +186,14 @@ export function parseTemplateOptions(content) {
186
186
  if (/^\s*template:/.test(line)) { inTemplate = true; continue; }
187
187
  if (inTemplate && /^\s+options:/.test(line)) { inOptions = true; continue; }
188
188
  if (inTemplate && inOptions) {
189
- // 중첩 블록 헤더 감지 (options 밑 한 단계) — code_review / changelog (#455)
189
+ // Detect nested block headers (one level under options) — code_review / changelog (#455)
190
190
  if (/^\s+code_review:\s*$/.test(line)) { inCodeReview = true; inChangelog = false; continue; }
191
191
  if (/^\s+changelog:\s*$/.test(line)) { inChangelog = true; inCodeReview = false; continue; }
192
192
  if (inCodeReview) {
193
193
  const cm = line.match(/^\s+coderabbit:\s*(.+)/);
194
194
  if (cm) { const v = strip(cm[1]); if (v === "true") out.codeReviewCoderabbit = true; if (v === "false") out.codeReviewCoderabbit = false; continue; }
195
- // #566 — AI 변경 요약 워크플로우 포함 여부. 키가 없으면 null(미설정)로 두어
196
- // 기존 저장소가 업데이트할 때 마법사가 한 번 물어볼 수 있게 한다.
195
+ // #566 — whether the AI change summary workflow is included. A missing key stays null (unset)
196
+ // so the wizard can ask once when an existing repo updates.
197
197
  const am = line.match(/^\s+ai_summary:\s*(.+)/);
198
198
  if (am) { const v = strip(am[1]); if (v === "true") out.aiPrSummary = true; if (v === "false") out.aiPrSummary = false; continue; }
199
199
  }
@@ -203,8 +203,8 @@ export function parseTemplateOptions(content) {
203
203
  const bm = line.match(/^\s+base_url:\s*(.*)/);
204
204
  if (bm) { out.changelogBaseUrl = strip(bm[1]); continue; }
205
205
  }
206
- // intent(프로젝트 성격, #485) — deploy 라인보다 먼저 매칭 (deploy: 와 intent: 구분).
207
- // 값 뒤 인라인 주석(# ...)이 붙으므로 따옴표 안 or 첫 토큰만 취한다.
206
+ // intent (project nature, #485) — matched before the deploy line (tells deploy: from intent:).
207
+ // An inline comment (# ...) follows the value, so take only the quoted value or the first token.
208
208
  let im = line.match(/^\s+intent:\s*["']?([a-z]+)["']?/);
209
209
  if (im) {
210
210
  const v = im[1];
@@ -236,69 +236,69 @@ export function parseTemplateOptions(content) {
236
236
  if (v === "false") out.secretBackup = false;
237
237
  continue;
238
238
  }
239
- // semver 자동 승격(#546). null(미기재)이면 호출부가 ON(true)으로 해석한다 (#814). 명시적 false 만 끈다.
240
- // 캡처를 true|false로 한정한다(intent와 같은 방식) — 값 뒤 인라인 주석이 값에 딸려오면
241
- // strip()은 따옴표·공백만 걷어내므로 "true # ..."가 되어 매칭이 조용히 실패한다.
239
+ // Automatic semver bump (#546). null (unset) is read as ON (true) by the caller (#814). Only an explicit false turns it off.
240
+ // Capture is limited to true|false (same as intent) — if the trailing inline comment came along with the value,
241
+ // strip() only removes quotes and spaces, leaving "true # ..." and the match fails silently.
242
242
  m = line.match(/^\s+semver_auto:\s*["']?(true|false)["']?/);
243
243
  if (m) {
244
244
  out.semverAuto = m[1] === "true";
245
245
  continue;
246
246
  }
247
- // 레포 문구 언어(#769) — en | ko. 미기재는 "기존 통합 레포" 신호라 호출부가 ko 로 해석한다.
247
+ // Repo text language (#769) — en | ko. Unset signals an "existing integrated repo", which the caller reads as ko.
248
248
  m = line.match(LANGUAGE_RE);
249
249
  if (m) {
250
250
  out.language = m[1];
251
251
  continue;
252
252
  }
253
- // 상태 라벨 표기(#776) — en(영문 표준) | ko(기존 한글). 미기재는 "기존 통합 레포" 신호라 호출부가 ko로 해석한다.
253
+ // Status label style (#776) — en (English standard) | ko (legacy Korean). Unset signals an "existing integrated repo", which the caller reads as ko.
254
254
  m = line.match(LABEL_STYLE_RE);
255
255
  if (m) {
256
256
  out.labelStyle = m[1];
257
257
  continue;
258
258
  }
259
- // 배포 트리거 브랜치(#1114) — 미기재면 기본 브랜치와 같다.
259
+ // Deploy trigger branch (#1114) — same as the default branch when unset.
260
260
  m = line.match(DEPLOY_TRIGGER_BRANCH_RE);
261
261
  if (m) {
262
262
  out.deployTriggerBranch = m[1];
263
263
  continue;
264
264
  }
265
- // CI 사용 시간 절약(#1114) — 미기재면 꺼짐.
265
+ // CI minutes saver (#1114) — off when unset.
266
266
  m = line.match(CI_MINUTES_SAVER_RE);
267
267
  if (m) {
268
268
  out.ciMinutesSaver = m[1] === "true";
269
269
  continue;
270
270
  }
271
- // Projects 보드 동기화(#716). null(미기재)이면 호출부가 "이미 설치돼 있으면 유지, 아니면 제외"로 해석한다.
271
+ // Projects board sync (#716). null (unset) is read by the caller as "keep if already installed, else exclude".
272
272
  m = line.match(/^\s+projects_sync:\s*["']?(true|false)["']?/);
273
273
  if (m) {
274
274
  out.projectsSync = m[1] === "true";
275
275
  continue;
276
276
  }
277
- // 릴리스 시 완료 이슈 닫기(#771). null(미기재)은 "기존 통합 레포" 신호 — 워크플로우가 아무것도 하지 않는다.
277
+ // Close done issues on release (#771). null (unset) signals an "existing integrated repo" — the workflow does nothing.
278
278
  m = line.match(/^\s+close_on_release:\s*["']?(true|false)["']?/);
279
279
  if (m) {
280
280
  out.closeOnRelease = m[1] === "true";
281
281
  continue;
282
282
  }
283
- // 설치하지 않을 워크플로우 (#810) — 인라인 배열. 업데이트가 지운 파일을 되살리지 않게 하는 명시 수단이다.
283
+ // Workflows not to install (#810) — inline array. The explicit way to keep updates from restoring deleted files.
284
284
  m = line.match(/^\s+excluded_workflows:\s*\[([^\]]*)\]/);
285
285
  if (m) {
286
286
  out.excludedWorkflows = m[1].split(",").map((s) => s.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
287
287
  continue;
288
288
  }
289
- // 스토어 릴리스 노트 언어 (#829) — 인라인 배열, 첫 항목이 기본 언어. 미기재면 현행 동작(한 문구를 모든 언어에).
289
+ // Store release note languages (#829) — inline array, first entry is the default. Unset keeps current behavior (one text for every language).
290
290
  m = line.match(/^\s+store_locales:\s*\[([^\]]*)\]/);
291
291
  if (m) {
292
292
  out.storeLocales = m[1].split(",").map((s) => s.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
293
293
  continue;
294
294
  }
295
- // 스토어마다 지원 언어가 다를 때만 쓰는 선택 키 — 있으면 그 스토어는 공통 store_locales 대신 이것을 쓴다.
295
+ // Optional key used only when stores support different languages — if present, that store uses it instead of the shared store_locales.
296
296
  m = line.match(/^\s+store_locales_(ios|play):\s*\[([^\]]*)\]/);
297
297
  if (m) {
298
298
  out[m[1] === "ios" ? "storeLocalesIos" : "storeLocalesPlay"] = m[2].split(",").map((s) => s.trim().replace(/^["']|["']$/g, "")).filter(Boolean);
299
299
  continue;
300
300
  }
301
- // 프로젝트 성격(#553) — 앱 심사로 이어지는 레포인가. 워크플로우와 스킬이 같은 값을 본다.
301
+ // Project nature (#553) — whether the repo goes through app review. Workflows and skills read the same value.
302
302
  m = line.match(/^\s+app_release:\s*["']?(true|false)["']?/);
303
303
  if (m) {
304
304
  out.appRelease = m[1] === "true";
@@ -318,13 +318,13 @@ export function parseTemplateOptions(content) {
318
318
  if (v === "false") legacySynology = false;
319
319
  continue;
320
320
  }
321
- // 들여쓰기 0~4칸의 다른 키 → options 섹션 종료
321
+ // Another key indented 0-4 spaces → end of the options section
322
322
  if (/^\s{0,4}[a-z_]+:/.test(line)) { inOptions = false; inTemplate = false; }
323
323
  }
324
- // 최상위 키 → template 섹션 종료
324
+ // Top-level key → end of the template section
325
325
  if (inTemplate && /^[a-z_]+:/.test(line)) { inTemplate = false; inOptions = false; }
326
326
  }
327
- // ── 구 키 마이그레이션 — 신 publish 키가 없을 때만 ──
327
+ // ── Old key migration — only when the new publish key is absent ──
328
328
  if (out.publish === null && (legacyNexus !== null || legacyNpm !== null)) {
329
329
  out.publish = [];
330
330
  if (legacyNexus === true) {
@@ -333,17 +333,17 @@ export function parseTemplateOptions(content) {
333
333
  }
334
334
  if (legacyNpm === true) out.publish.push("npm");
335
335
  }
336
- // 구 synology 키 → secret_backup 승계 (#473) — 신 키가 명시된 경우는 신 키 우선
336
+ // Old synology key → carry over to secret_backup (#473) — if the new key is explicit, it wins
337
337
  if (out.secretBackup === null && legacySynology === true) out.secretBackup = true;
338
338
  return out;
339
339
  }
340
340
 
341
- // deploy/publish 저장값에서 intent(프로젝트 성격) 역추론 (#485 — intent 키 없는 구 version.yml 하위호환).
342
- // deploy≠none & publish=[] → app (서버/앱만)
343
- // deploy=none & publish≠[] → library (라이브러리만)
341
+ // Infer intent (project nature) back from saved deploy/publish values (#485 — compat with old version.yml without an intent key).
342
+ // deploy≠none & publish=[] → app (server/app only)
343
+ // deploy=none & publish≠[] → library (library only)
344
344
  // deploy≠none & publish≠[] → both
345
345
  // deploy=none & publish=[] → none
346
- // deploy/publish가 아직 null(미설정)이면 intent도 추론 불가 → null 반환(진입 질문을 하도록).
346
+ // If deploy/publish are still null (unset), intent cannot be inferred either → return null (so the intro question is asked).
347
347
  export function inferIntent(deploy, publish) {
348
348
  if (deploy == null && (publish == null)) return null;
349
349
  const hasServer = deploy != null && deploy !== "none";
@@ -354,11 +354,11 @@ export function inferIntent(deploy, publish) {
354
354
  return "none";
355
355
  }
356
356
 
357
- // v4.1.0 이전 단수 project_type 키 → project_types 배열 최소 변환 (#471).
358
- // version.yml을 재생성하지 않는 경로(workflows 모드)에서 신형 version_manager(단수 키 명시 거부)와의
359
- // 정합을 맞춘다 — 해당 라인만 교체하고 나머지 내용은 손대지 않는다.
360
- // 배열 키가 이미 있으면 남은 단수 키만 제거한다(4.1.0: 공존 시 단수 무시 — 잔재 정리).
361
- // 반환: 변환된 전체 내용 문자열, 변환할 것이 없으면 null.
357
+ // Minimal conversion of the pre-v4.1.0 singular project_type key → project_types array (#471).
358
+ // On paths that do not regenerate version.yml (workflows mode), keeps it consistent with the new version_manager (which rejects
359
+ // an explicit singular key) — replaces only that line and leaves the rest untouched.
360
+ // If the array key already exists, only the leftover singular key is removed (4.1.0: singular ignored when both exist — cleanup).
361
+ // Returns the full converted content string, or null when there is nothing to convert.
362
362
  export function convertLegacySingularType(content) {
363
363
  const lines = String(content || "").split(/\r?\n/);
364
364
  let hasArray = false, idx = -1, value = "";
@@ -372,14 +372,14 @@ export function convertLegacySingularType(content) {
372
372
  lines.splice(idx, 1);
373
373
  return lines.join("\n");
374
374
  }
375
- const type = value === "next" ? "react" : value; // next 타입은 4.1.0에서 react로 흡수
375
+ const type = value === "next" ? "react" : value; // The next type was merged into react in 4.1.0
376
376
  lines[idx] = `project_types: ["${type}"] # array of types, first entry is primary, safe to edit by hand`;
377
377
  return lines.join("\n");
378
378
  }
379
379
 
380
- // 개발(릴리스 소스) 브랜치 = 릴리스 PR head (#915)
381
- // 키 2개: development_branch(정본) > deploy_branch(구 이름 — 이것만 읽는 구버전 스킬이 있어 함께 기록)
382
- // 반환: 브랜치명, 둘 다 없으면 null
380
+ // Development (release source) branch = release PR head (#915)
381
+ // 2 keys: development_branch (source of truth) > deploy_branch (old name — written too, as old skills read only that)
382
+ // Returns the branch name, or null if neither exists
383
383
  export const DEVELOPMENT_BRANCH_KEYS = ["development_branch", "deploy_branch"];
384
384
  export function readDevelopmentBranch(content) {
385
385
  const lines = String(content || "").split("\n").filter((l) => !l.startsWith("#"));
@@ -393,27 +393,27 @@ export function readDevelopmentBranch(content) {
393
393
  return null;
394
394
  }
395
395
 
396
- // 기존 version.yml에서 값 추출 (라인 정규식, 주석 라인 오탐 방지).
396
+ // Extract values from the existing version.yml (line regexes, avoiding false hits on comment lines).
397
397
  export function parseExisting(content) {
398
398
  const text = String(content || "");
399
399
  const line = (re) => {
400
400
  for (const l of text.split("\n")) {
401
- if (l.startsWith("#")) continue; // 주석 제외
401
+ if (l.startsWith("#")) continue; // Skip comments
402
402
  const m = l.match(re);
403
403
  if (m) return m[1];
404
404
  }
405
405
  return null;
406
406
  };
407
- // version: "x.y.z" (숫자.숫자.숫자 형태만)
407
+ // version: "x.y.z" (only number.number.number)
408
408
  const version = line(/^version:\s*["']?([0-9][0-9.]*)["']?/) || "";
409
- // version_code: N (양의 정수, 아니면 1)
409
+ // version_code: N (positive integer, else 1)
410
410
  let versionCode = parseInt(line(/^version_code:\s*([0-9]+)/) || "", 10);
411
411
  if (!Number.isInteger(versionCode) || versionCode <= 0) versionCode = 1;
412
412
  // project_types: ["a","b"]
413
413
  const typesRaw = line(/^project_types:\s*(\[[^\]]*\])/);
414
414
  let types = [];
415
415
  if (typesRaw) types = [...typesRaw.matchAll(/"([^"]+)"/g)].map((m) => m[1]);
416
- // project_paths 블록: " type: "path""
416
+ // project_paths block: " type: "path""
417
417
  const paths = new Map();
418
418
  let inPaths = false;
419
419
  for (const l of text.split("\n")) {
@@ -421,10 +421,10 @@ export function parseExisting(content) {
421
421
  if (inPaths) {
422
422
  const m = l.match(/^\s+([a-z-]+):\s*"([^"]*)"/);
423
423
  if (m) paths.set(m[1], m[2]);
424
- else if (/^\S/.test(l)) inPaths = false; // 들여쓰기 끝 → 블록 종료
424
+ else if (/^\S/.test(l)) inPaths = false; // Indentation ends → end of block
425
425
  }
426
426
  }
427
- // template: 블록 내 version + mode (#502 — 업데이트 모드가 재실행할 통합 범위)
427
+ // version + mode in the template: block (#502 — the integration scope that update mode re-runs)
428
428
  let templateVersion = "";
429
429
  let templateMode = null;
430
430
  let inTemplate = false;
@@ -438,29 +438,29 @@ export function parseExisting(content) {
438
438
  if (/^\S/.test(l)) break;
439
439
  }
440
440
  }
441
- // 브랜치 정보 (#456) — default_branch(레포 기본)와 개발 브랜치(릴리스 PR head)는 별개.
441
+ // Branch info (#456) — default_branch (repo default) and the development branch (release PR head) are separate.
442
442
  const defaultBranch = line(/^\s*default_branch:\s*"([^"]*)"/);
443
443
  const deployBranch = readDevelopmentBranch(text);
444
- // 선택 워크플로우 옵션 (metadata.template.options — nexus/secret_backup)
444
+ // Optional workflow options (metadata.template.options — nexus/secret_backup)
445
445
  const options = parseTemplateOptions(text);
446
446
  return { version, versionCode, types, paths, templateVersion, templateMode, options, defaultBranch, deployBranch };
447
447
  }
448
448
 
449
- // ── 생성기가 모르는 키를 지키기 (#835) ─────────────────────────────────────────────
450
- // version.yml 은 매 full/version 실행마다 처음부터 다시 쓴다. 생성기가 아는 키만 쓰면 사용자가 넣은 것은 사라진다 —
451
- // 특히 문서화된 `options.issue_helper`(브랜치 접두사·커밋 템플릿·시간대 …)가 업데이트마다 조용히 초기화됐다.
452
- // 그래서 아는 키는 지금처럼 만들고, 모르는 키는 **글자 그대로**(들여쓰기·주석 포함) 되돌려 쓴다.
453
- // project_type(단수)는 v4.1.0 에서 없앴다 — 남기면 version_manager 가 거부한다. 그래서 보존하지 않고 버린다.
449
+ // ── Keep keys the generator does not know (#835) ─────────────────────────────────────────────
450
+ // version.yml is rewritten from scratch on every full/version run. Writing only known keys drops what the user added —
451
+ // notably the documented `options.issue_helper` (branch prefix, commit template, time zone …) was silently reset on every update.
452
+ // So known keys are built as now, and unknown keys are written back **verbatim** (including indentation and comments).
453
+ // project_type (singular) was removed in v4.1.0 — keeping it makes version_manager reject the file. So it is dropped, not kept.
454
454
  const OWNED_TOP = new Set(["version", "version_code", "project_types", "project_type", "project_paths", "metadata", "deploy"]);
455
- // metadata.template.options 아래에서 생성기가 직접 쓰는 키. 여기에 없는 것만 보존한다.
456
- // buildVersionYml 이 쓰는 6칸 키와 같아야 한다 — 빠지면 재실행마다 그 키가 두 번 쓰인다 (대조: test/version-yml-preserve.test.js).
457
- // nexus · npm_publish · synology 는 옛 키다 — 파서가 신형(publish · secret_backup)으로 바꿔 쓰므로 그대로 두면 이중 기록이 된다.
455
+ // Keys under metadata.template.options that the generator writes itself. Only keys not listed here are kept.
456
+ // Must match the 6-space keys buildVersionYml writes — a missing one gets written twice on every re-run.
457
+ // nexus · npm_publish · synology are old keys — the parser rewrites them in the new form (publish · secret_backup), so keeping them would double-record.
458
458
  export const OWNED_OPTION_KEYS = new Set(["intent", "deploy", "publish", "secret_backup", "semver_auto", "projects_sync", "close_on_release",
459
459
  "language", "label_style", "deploy_trigger_branch", "ci_minutes_saver", "app_release", "excluded_workflows", "store_locales", "store_locales_ios", "store_locales_play",
460
460
  "code_review", "changelog",
461
461
  "nexus", "npm_publish", "synology"]);
462
462
 
463
- // indent 칸으로 시작하는 키 한 줄과 그 자식(더 깊은 들여쓰기·빈 줄·그 아래의 주석)을 한 덩어리로 자른다.
463
+ // Cut one key line starting at indent spaces together with its children (deeper indentation, blank lines, comments below) as one chunk.
464
464
  function keyBlocks(lines, indent, isOwned) {
465
465
  const keyRe = new RegExp(`^ {${indent}}([A-Za-z_][\\w-]*):`);
466
466
  const blocks = [];
@@ -470,7 +470,7 @@ function keyBlocks(lines, indent, isOwned) {
470
470
  let j = i + 1;
471
471
  while (j < lines.length && (lines[j].trim() === "" || /^\s/.test(lines[j]) && lines[j].search(/\S/) > indent
472
472
  || (lines[j].trim().startsWith("#") && lines[j].search(/\S/) > indent))) j++;
473
- while (j > i + 1 && lines[j - 1].trim() === "") j--; // 덩어리 끝의 빈 줄은 뺀다
473
+ while (j > i + 1 && lines[j - 1].trim() === "") j--; // Drop blank lines at the end of the chunk
474
474
  const block = lines.slice(i, j).join("\n");
475
475
  if (!isOwned(m[1]) && looksWellFormed(block)) blocks.push(block);
476
476
  i = j - 1;
@@ -478,10 +478,10 @@ function keyBlocks(lines, indent, isOwned) {
478
478
  return blocks;
479
479
  }
480
480
 
481
- // 되돌려 쓸 덩어리가 깨진 YAML 이면 version.yml 전체가 깨진다 — 그러면 모든 워크플로가 버전을 못 읽는다.
482
- // 의존성 없이 확인할 수 있는 만큼만 본다: 괄호·중괄호 짝, 닫히지 않은 따옴표. 의심스러우면 버린다(보존보다 파일 무결성이 먼저).
481
+ // If a chunk written back is broken YAML, the whole version.yml breaks — and no workflow can read the version.
482
+ // Check only what is possible without dependencies: matching brackets/braces, unclosed quotes. Drop it when in doubt (file integrity before preservation).
483
483
  function looksWellFormed(block) {
484
- const text = block.split("\n").map((l) => l.replace(/\s#.*$/, "")).join("\n"); // 줄 끝 주석은 짝 검사에서 뺀다
484
+ const text = block.split("\n").map((l) => l.replace(/\s#.*$/, "")).join("\n"); // Leave trailing comments out of the pair check
485
485
  const stack = [];
486
486
  const pairs = { "]": "[", "}": "{" };
487
487
  let quote = null;
@@ -494,11 +494,11 @@ function looksWellFormed(block) {
494
494
  return !quote && stack.length === 0;
495
495
  }
496
496
 
497
- /** 기존 version.yml 에서 생성기가 모르는 것만 뽑는다. { optionBlocks: string[], topBlocks: string[] } */
497
+ /** Extract only what the generator does not know from the existing version.yml. { optionBlocks: string[], topBlocks: string[] } */
498
498
  export function extractCustomYml(content) {
499
499
  const lines = String(content || "").split(/\r?\n/);
500
500
  const topBlocks = keyBlocks(lines, 0, (k) => OWNED_TOP.has(k));
501
- // metadata → template → options 구간만 잘라 6칸 들여쓴 키를 본다
501
+ // Cut only the metadata → template → options range and look at 6-space indented keys
502
502
  const find = (from, to, re) => { for (let i = from; i < to; i++) if (re.test(lines[i])) return i; return -1; };
503
503
  const end = (start, indent) => { let j = start + 1; while (j < lines.length && (lines[j].trim() === "" || lines[j].search(/\S/) > indent)) j++; return j; };
504
504
  const md = find(0, lines.length, /^metadata:/);
@@ -516,8 +516,8 @@ export function extractCustomYml(content) {
516
516
  }
517
517
 
518
518
  /**
519
- * buildVersionYml 에 그대로 펼쳐 넣는 도우미: `...customYml(경로)`.
520
- * 파일이 없거나 읽을 수 없으면 아무것도 보존하지 않는다 — 읽기 실패가 업데이트를 막으면 안 된다.
519
+ * Helper spread straight into buildVersionYml: `...customYml(path)`.
520
+ * Keeps nothing if the file is missing or unreadable — a read failure must not block the update.
521
521
  */
522
522
  export function customYml(file) {
523
523
  try {
@@ -528,9 +528,9 @@ export function customYml(file) {
528
528
  }
529
529
  }
530
530
 
531
- // 기존 version.yml 의 deploy 블록 → Map<type, Map<key,value>> (#670 — 재실행 시 사용자 수정값 보존용).
532
- // 4.28.0 이 만든 깨진 구조(deploy 아래에 2칸 들여쓴 template 이 딸려 있음)도 읽을 수 있게,
533
- // 2칸 키 `template` 은 타입이 아니라 블록 종료로 본다.
531
+ // deploy block of the existing version.yml → Map<type, Map<key,value>> (#670 — keeps user edits on re-run).
532
+ // To also read the broken structure 4.28.0 produced (a 2-space indented template hanging under deploy),
533
+ // the 2-space key `template` is treated as the end of the block, not a type.
534
534
  export function parseDeployBlock(content) {
535
535
  const out = new Map();
536
536
  let inDeploy = false;
@@ -548,8 +548,8 @@ export function parseDeployBlock(content) {
548
548
  return out;
549
549
  }
550
550
 
551
- // 재실행 시 기존 deploy 값 우선 병합 (#670) — 사용자가 version.yml 에서 직접 고친 값이 템플릿 기본값에
552
- // 덮이지 않게 한다. 기존 값이 이기고, 이번에 새로 묻는 키만 추가된다.
551
+ // On re-run, merge with existing deploy values first (#670) — values the user edited in version.yml are not
552
+ // overwritten by template defaults. Existing values win; only keys newly asked this time are added.
553
553
  export function mergeDeployValues(existingContent, fresh) {
554
554
  const merged = parseDeployBlock(existingContent);
555
555
  for (const [t, kv] of fresh) {
@@ -559,13 +559,13 @@ export function mergeDeployValues(existingContent, fresh) {
559
559
  return merged;
560
560
  }
561
561
 
562
- // version.yml 전체 생성 (metadata > template 옵션 > deploy > 사용자 블록).
562
+ // Generate the whole version.yml (metadata > template options > deploy > user blocks).
563
563
  // opts: { version, types:[], paths:Map, pathMarkers?:Map, branch, versionCode, now, today, templateOptions? }
564
- // primary 타입은 별도 키 없이 project_types[0]이다 (v4.1.0 SSOT — 단수 project_type 키 제거).
565
- // now = "YYYY-MM-DD HH:MM:SS" (UTC) — 결정성 위해 주입
564
+ // The primary type has no separate key; it is project_types[0] (v4.1.0 SSOT — singular project_type key removed).
565
+ // now = "YYYY-MM-DD HH:MM:SS" (UTC) — injected for determinism
566
566
  // today = "YYYY-MM-DD" (UTC)
567
- // pathMarkers = Map<type, markerFilename> (project_paths 주석용)
568
- // templateOptions = { templateVersion, deployTarget, publishTargets, includeSecretBackup, optionsDate } (template 블록)
567
+ // pathMarkers = Map<type, markerFilename> (for project_paths comments)
568
+ // templateOptions = { templateVersion, deployTarget, publishTargets, includeSecretBackup, optionsDate } (template block)
569
569
  export function buildVersionYml({ version, types = [], paths = new Map(), pathMarkers = new Map(), branch = "main", deployBranch = "", versionCode = 1, now, today, templateOptions = null, deployValues = new Map(), updatedBy = "template_integrator", customOptionBlocks = [], customTopBlocks = [] }) {
570
570
  const lang = templateOptions?.language === "ko" ? "ko" : "en";
571
571
  const C = commentsFor(lang);
@@ -573,10 +573,10 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
573
573
 
574
574
  let out = (lang === "ko" ? HEADER_KO : HEADER_EN) + "\n";
575
575
  out += `version: "${version}"\n`;
576
- out += `version_code: ${versionCode} # ${C.versionCode}\n`; // 공백 1칸 — version_manager.py 가 쓰는 형태와 같아야 업데이트 diff 가 안 생긴다
576
+ out += `version_code: ${versionCode} # ${C.versionCode}\n`; // One space — must match what version_manager.py writes so updates produce no diff
577
577
  out += `project_types: ${typesJson} # ${C.projectTypes}\n`;
578
578
 
579
- // project_paths 블록. pathMarkers: Map<type, markerFilename> (있으면 " type: "path" # path/marker" 주석).
579
+ // project_paths block. pathMarkers: Map<type, markerFilename> (if present, a " type: "path" # path/marker" comment).
580
580
  if (paths.size) {
581
581
  out += `project_paths: # ${C.projectPaths}\n`;
582
582
  for (const [t, p] of paths) {
@@ -590,9 +590,9 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
590
590
  out += ` last_updated: "${now}"\n`;
591
591
  out += ` last_updated_by: "${String(updatedBy || "template_integrator").replace(/"/g, "")}"\n`;
592
592
  out += ` default_branch: "${branch}"\n`;
593
- // 개발(릴리스 소스) 브랜치 = 릴리스 PR head (#456). default_branch(레포 기본)와 별개 개념.
594
- // 지정된 경우에만 출력 — 미지정이면 스킬이 develop로 폴백.
595
- // deploy_branch 병기: 그 키만 읽는 구버전 스킬(changelog_cli)이 develop로 폴백하지 않게 (#915)
593
+ // Development (release source) branch = release PR head (#456). A separate concept from default_branch (repo default).
594
+ // Written only when set — if unset, skills fall back to develop.
595
+ // Also write deploy_branch: so old skills (changelog_cli) that read only that key do not fall back to develop (#915)
596
596
  if (deployBranch) {
597
597
  out += ` development_branch: "${deployBranch}"\n`;
598
598
  out += ` deploy_branch: "${deployBranch}" # ${C.legacyDeployBranch}\n`;
@@ -600,18 +600,18 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
600
600
  out += ` integrated_from: "projectops"\n`;
601
601
  out += ` integration_date: "${today}"\n`;
602
602
 
603
- // template 옵션 블록. templateOptions 지정 시.
603
+ // template options block. When templateOptions is given.
604
604
  if (templateOptions) {
605
605
  const { templateVersion = "unknown", deployTarget = "docker-ssh", publishTargets = [], includeSecretBackup = false, optionsDate = today,
606
606
  changelogProvider = "commit", changelogBaseUrl = "", codeReviewCoderabbit = true, aiPrSummary = true, intent = null, mode = null,
607
607
  semverAuto = true, appRelease = null, labelStyle = null, deployTriggerBranch = "", ciMinutesSaver = false, closeOnRelease = null, projectsSync = null, language = null, excludedWorkflows = null, storeLocales = null, storeLocalesIos = null, storeLocalesPlay = null } = templateOptions;
608
608
  const publishJson = `[${publishTargets.map((t) => `"${t}"`).join(",")}]`;
609
- // intent(프로젝트 성격, #485) — 미지정이면 deploy/publish에서 역추론해 기록 (재통합 시 진입 질문 생략용)
609
+ // intent (project nature, #485) — if unset, inferred from deploy/publish and recorded (skips the intro question on re-integration)
610
610
  const intentVal = intent || inferIntent(deployTarget, publishTargets) || "manual";
611
611
  out += ` template:\n`;
612
612
  out += ` source: "projectops"\n`;
613
613
  out += ` version: "${templateVersion}"\n`;
614
- // mode(#502) — 이 레포에 통합된 범위. 업데이트 모드가 같은 범위를 재실행하는 기준.
614
+ // mode (#502) — the scope integrated into this repo. The basis for update mode re-running the same scope.
615
615
  if (mode) out += ` mode: "${mode}" # ${C.mode}\n`;
616
616
  out += ` integrated_date: "${optionsDate}"\n`;
617
617
  out += ` last_update_date: "${optionsDate}"\n`;
@@ -620,27 +620,27 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
620
620
  out += ` deploy: "${deployTarget}"\n`;
621
621
  out += ` publish: ${publishJson}\n`;
622
622
  out += ` secret_backup: ${includeSecretBackup}\n`;
623
- // semver 자동 승격(#546) — 릴리스 시 커밋 제목으로 major/minor/patch 결정. false면 항상 patch.
623
+ // Automatic semver bump (#546) — on release, decides major/minor/patch from commit titles. false means always patch.
624
624
  out += ` semver_auto: ${semverAuto} # ${C.semverAuto}\n`;
625
- // Projects 보드 동기화(#716) — 미지정이면 키를 쓰지 않는다.
625
+ // Projects board sync (#716) — no key written when unset.
626
626
  if (projectsSync !== null) out += ` projects_sync: ${projectsSync} # ${C.projectsSync}\n`;
627
- // 릴리스 시 완료 이슈 닫기(#771) — 미지정이면 키를 쓰지 않는다(기존 레포는 현행 유지).
627
+ // Close done issues on release (#771) — no key written when unset (existing repos keep current behavior).
628
628
  if (closeOnRelease !== null) out += ` close_on_release: ${closeOnRelease} # ${C.closeOnRelease}\n`;
629
- // 상태 라벨 표기(#776) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
630
- // 레포 문구 언어(#769) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
631
- // 설치 제외 목록(#810) — 전체 재생성이라 다시 쓰지 않으면 사용자가 적은 목록이 사라진다.
629
+ // Status label style (#776) — no key written when unset (existing repos unchanged).
630
+ // Repo text language (#769) — no key written when unset (existing repos unchanged).
631
+ // Install exclusion list (#810) — full regeneration, so not rewriting it would drop the user's list.
632
632
  if (excludedWorkflows && excludedWorkflows.length) out += ` excluded_workflows: [${excludedWorkflows.map((f) => `"${f}"`).join(", ")}] # ${C.excluded}\n`;
633
- // 스토어 릴리스 노트 언어(#829) — 미지정이면 키를 쓰지 않는다. 전체 재생성이라 다시 쓰지 않으면 사용자가 적은 값이 사라진다.
633
+ // Store release note languages (#829) — no key written when unset. Full regeneration, so not rewriting it would drop the user's value.
634
634
  if (storeLocales && storeLocales.length) out += ` store_locales: [${storeLocales.map((l) => `"${l}"`).join(", ")}] # ${C.storeLocales}\n`;
635
635
  if (storeLocalesIos && storeLocalesIos.length) out += ` store_locales_ios: [${storeLocalesIos.map((l) => `"${l}"`).join(", ")}] # App Store: ${C.storeLocalesStore}\n`;
636
636
  if (storeLocalesPlay && storeLocalesPlay.length) out += ` store_locales_play: [${storeLocalesPlay.map((l) => `"${l}"`).join(", ")}] # Play: ${C.storeLocalesStore}\n`;
637
637
  if (language) out += ` language: ${language} # ${C.language}\n`;
638
638
  if (labelStyle) out += ` label_style: ${labelStyle} # ${C.labelStyle}\n`;
639
- // 배포 트리거 브랜치(#1114) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
639
+ // Deploy trigger branch (#1114) — no key written when unset (existing repos unchanged).
640
640
  if (deployTriggerBranch) out += ` deploy_trigger_branch: "${deployTriggerBranch}" # ${C.deployTriggerBranch}\n`;
641
- // CI 사용 시간 절약(#1114) — 켰을 때만 쓴다(기존 레포 무변화).
641
+ // CI minutes saver (#1114) — written only when on (existing repos unchanged).
642
642
  if (ciMinutesSaver) out += ` ci_minutes_saver: true # ${C.ciMinutesSaver}\n`;
643
- // 앱 심사 배포 레포 여부(#553) — 미지정이면 키를 쓰지 않는다(기존 레포 무변화).
643
+ // Whether the repo deploys through app review (#553) — no key written when unset (existing repos unchanged).
644
644
  if (appRelease !== null) {
645
645
  out += ` app_release: ${appRelease} # ${C.appRelease}\n`;
646
646
  }
@@ -650,13 +650,13 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
650
650
  out += ` changelog:\n`;
651
651
  out += ` provider: "${changelogProvider}"\n`;
652
652
  out += ` base_url: "${changelogBaseUrl}"\n`;
653
- // 생성기가 모르는 옵션(issue_helper 등)은 그대로 되돌려 쓴다 (#835)
653
+ // Options the generator does not know (issue_helper, etc.) are written back as is (#835)
654
654
  for (const b of customOptionBlocks) out += `${b}\n`;
655
655
  }
656
656
 
657
- // deploy 블록. deployValues: Map<type, Map<key,value>>.
658
- // WF ask 값이 있는 타입만. 반드시 template 뒤의 별도 최상위 키로 둔다 — metadata 와 template
659
- // 사이에 끼면 template 이 deploy 의 자식이 되어 metadata.template.options 구조가 깨진다 (#670).
657
+ // deploy block. deployValues: Map<type, Map<key,value>>.
658
+ // Only types with WF ask values. Must be a separate top-level key after template — placed between metadata and template,
659
+ // template would become a child of deploy and break the metadata.template.options structure (#670).
660
660
  const deployTypes = [...deployValues.keys()].filter((t) => deployValues.get(t) && deployValues.get(t).size > 0);
661
661
  if (deployTypes.length) {
662
662
  out += `\n`;
@@ -666,7 +666,7 @@ export function buildVersionYml({ version, types = [], paths = new Map(), pathMa
666
666
  for (const [k, v] of deployValues.get(t)) out += ` ${k}: "${v}"\n`;
667
667
  }
668
668
  }
669
- // 최상위의 모르는 키도 그대로 (#835)
669
+ // Unknown top-level keys are also kept as is (#835)
670
670
  for (const b of customTopBlocks) out += `\n${b}\n`;
671
671
  return out;
672
672
  }