projectops 4.104.5 → 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,7 +1,7 @@
1
- // 워크플로우 복사 엔진.
1
+ // Workflow copy engine.
2
2
  //
3
- // 충돌(기존 파일과 다름)의 처리 결정은 hooks.decisions(Map<파일명, 'skip'|'backup'|'template'>)로 받는다.
4
- // - 실제 마법사(commands/interactive.js)는 listWorkflowConflicts 로 충돌 목록을 얻어 직접 Map 을 만든다.
3
+ // Conflict decisions (differs from the existing file) come in via hooks.decisions (Map<filename, 'skip'|'backup'|'template'>).
4
+ // - The real wizard (commands/interactive.js) gets the conflict list from listWorkflowConflicts and builds the Map itself.
5
5
  import { join, basename } from "node:path";
6
6
  import { existsSync, readFileSync, writeFileSync, renameSync } from "node:fs";
7
7
  import { PATHS } from "../paths.js";
@@ -15,9 +15,9 @@ import { PUBLISH_TARGETS } from "../constants.js";
15
15
  import { commonOptionalGroups, serverDeployEnabled, SERVER_DEPLOY_DIR } from "../workflow-groups.js";
16
16
  import { t } from "../../i18n/index.js";
17
17
 
18
- // on: 블록의 브랜치 필터가 전부 develop 뿐인가 (#810).
19
- // 개발 브랜치가 없는 레포에 깔면 영영 실행되지 않는 워크플로우를 가린다.
20
- // workflow_dispatch 외의 다른 이벤트(schedule·issues 등)가 있으면 그것만으로도 돌 수 있으니 false.
18
+ // Are all branch filters in the on: block develop only? (#810)
19
+ // Spots workflows that would never run when installed in a repo without a development branch.
20
+ // Any event other than workflow_dispatch (schedule, issues, etc.) can make it run on its own, so false.
21
21
  export function onlyTriggersOnDevelop(content) {
22
22
  const m = String(content).match(/^on:\s*\n((?:[ \t]+.*\n|\s*\n)+)/m);
23
23
  if (!m) return false;
@@ -27,15 +27,15 @@ export function onlyTriggersOnDevelop(content) {
27
27
  const branches = [];
28
28
  for (const b of block.matchAll(/^\s+branches:\s*\[([^\]]*)\]/gm)) branches.push(...b[1].split(",").map((s) => s.trim().replace(/["']/g, "")).filter(Boolean));
29
29
  for (const b of block.matchAll(/^\s+branches:\s*\n((?:\s+-\s*.*\n)+)/gm)) branches.push(...[...b[1].matchAll(/-\s*["']?([^"'\s#]+)/g)].map((x) => x[1]));
30
- // push/pull_request 마다 branches 필터가 있어야 한다 — 필터 없는 push 는 모든 브랜치에서 돈다
30
+ // Every push/pull_request needs a branches filter — a push without a filter runs on every branch
31
31
  const filtered = (block.match(/^\s+branches:/gm) || []).length;
32
32
  const needFilter = events.filter((e) => e !== "workflow_dispatch").length;
33
33
  return branches.length > 0 && filtered >= needFilter && branches.every((b) => b === "develop");
34
34
  }
35
35
 
36
- // 한 파일에 env 치환을 적용해 대상 파일을 갱신.
37
- // values/useDefaults: env 계획(promptEnvPlan) 결과 — 미지정이면 기본값 경로(현행 force 동작).
38
- // trace(#494): 치환 1건당 env.substituted 이벤트 (before/after 포함 — 치환 불일치류 버그의 즉시 발견 근거).
36
+ // Apply env substitution to one file and update the target file.
37
+ // values/useDefaults: env plan (promptEnvPlan) result — if unset, the default path (current force behavior).
38
+ // trace (#494): one env.substituted event per substitution (with before/after — evidence to spot substitution mismatch bugs at once).
39
39
  function configureEnv(targetPath, filename, { type, projectPath = ".", repoName = "", resolvers = {}, collectAsks = null, values = new Map(), useDefaults = true, trace = null }) {
40
40
  const content = readFileSync(targetPath, "utf8");
41
41
  if (!content.includes("@wizard")) return;
@@ -47,23 +47,23 @@ function configureEnv(targetPath, filename, { type, projectPath = ".", repoName
47
47
  }
48
48
  }
49
49
 
50
- // util 버전 동기화 워크플로우 (#491) — .github/util/ 모듈(version.json)이 있는 레포에서만 의미가 있다.
51
- // util이 없는 레포(예: spring 단독)에 복사하면 트리거가 영원히 안 걸리는 no-op 오염이 된다.
50
+ // util version sync workflow (#491) — meaningful only in repos with .github/util/ modules (version.json).
51
+ // Copied into a repo without util (e.g. spring alone), its trigger never fires — no-op pollution.
52
52
  const UTIL_VERSION_SYNC = "PROJECT-COMMON-TEMPLATE-UTIL-VERSION-SYNC.yml";
53
53
 
54
- // 이 통합에서 util 모듈이 존재하게 되는가 — 대상에 이미 있거나(업데이트),
55
- // 선택 타입의 util이 템플릿에 있어 곧 복사될 예정(runFull 6단계)이면 true.
54
+ // Will util modules exist in this integration — true if already in the target (update),
55
+ // or if the selected types' util is in the template and about to be copied (runFull step 6).
56
56
  function utilSyncApplies(tempDir, targetRoot, types) {
57
57
  if (exists(join(targetRoot, ".github", "util"))) return true;
58
58
  return types.some((t) => exists(join(tempDir, ".github", "util", t)));
59
59
  }
60
60
 
61
- // 4분류 (신규/unchanged/upstream/changed) — 대상 워크플로우 디렉토리 기준.
61
+ // 4 classes (new/unchanged/upstream/changed) — relative to the target workflow directory.
62
62
  //
63
- // upstream(#557): 사용자가 손대지 않았는데 템플릿만 바뀐 파일. 질문할 이유가 없으므로
64
- // 그냥 최신으로 올린다. baseline(설치 시점 해시)이 있어야 판정할 수 있다.
65
- // baseline이 없거나 그 파일 기록이 없으면 판정 불가 → 종전대로 changed로 떨어뜨린다
66
- // (기존 통합 레포의 동작이 바뀌지 않는다).
63
+ // upstream (#557): the user did not touch it, only the template changed. No reason to ask,
64
+ // so just bring it up to date. Needs the baseline (install-time hashes) to decide.
65
+ // Without a baseline or a record for the file, it cannot be decided → falls into changed as before
66
+ // (behavior of existing integrated repos does not change).
67
67
  function classify(srcDir, workflowsDir, envOpts, baseline = null) {
68
68
  const result = { newFiles: [], unchanged: [], changed: [], upstream: [] };
69
69
  for (const filename of listYamlFiles(srcDir)) {
@@ -73,8 +73,8 @@ function classify(srcDir, workflowsDir, envOpts, baseline = null) {
73
73
  const tpl = readFileSync(src, "utf8");
74
74
  const inst = readFileSync(dst, "utf8");
75
75
  if (isUnchanged(tpl, inst, { ...envOpts, filename })) { result.unchanged.push(filename); continue; }
76
- // 여기 왔다는 건 "지금 템플릿 렌더 결과 ≠ 설치본" — 사용자 수정이거나 업스트림 변경이다.
77
- // baseline이 그 둘을 가른다.
76
+ // Reaching here means "current template render ≠ installed copy" — either a user edit or an upstream change.
77
+ // The baseline tells the two apart.
78
78
  const modified = isUserModified(baseline, filename, inst);
79
79
  if (modified === false) result.upstream.push(filename);
80
80
  else result.changed.push(filename);
@@ -85,42 +85,42 @@ function classify(srcDir, workflowsDir, envOpts, baseline = null) {
85
85
  return result;
86
86
  }
87
87
 
88
- // copy_workflows 본체 (동기 — 기존 호출부 무변경).
88
+ // copy_workflows main body (sync — existing callers unchanged).
89
89
  // context: { types:[], paths:Map, deployTarget, publishTargets:[], includeSecretBackup, aiPrSummary, force, repoName, resolvers,
90
- // envValues?:Map<key,value>, envUseDefaults?:boolean } ← env 계획(promptEnvPlan) 결과 주입점
91
- // deployTarget(#439 택1): 'docker-ssh'(기본) | 'vercel' | 'none' — server-deploy는 docker-ssh일 때만,
92
- // common/deploy/<target>/은 해당 타겟일 때 복사. publishTargets(#439 다중): 'nexus'|'npm'|'github-packages'.
93
- // hooks: { decisions?: Map<filename, 'skip'|'backup'|'template'> } — 기존 파일(changed) 충돌 결정.
94
- // 반환: {copied, skipped, templateAdded, optionalCopied, copiedFiles[]} — copiedFiles는 실제 복사·교체된 파일명 (#473 요약용)
90
+ // envValues?:Map<key,value>, envUseDefaults?:boolean } ← injection point for the env plan (promptEnvPlan) result
91
+ // deployTarget (#439 pick one): 'docker-ssh' (default) | 'vercel' | 'none' — server-deploy only with docker-ssh,
92
+ // common/deploy/<target>/ copied for that target. publishTargets (#439 multiple): 'nexus'|'npm'|'github-packages'.
93
+ // hooks: { decisions?: Map<filename, 'skip'|'backup'|'template'> } — conflict decisions for existing (changed) files.
94
+ // Returns {copied, skipped, templateAdded, optionalCopied, copiedFiles[]} — copiedFiles are the file names actually copied or replaced (#473 summary)
95
95
  export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
96
96
  const { types = [], paths = new Map(), deployTarget = "docker-ssh", publishTargets = [], includeSecretBackup = false, aiPrSummary = true, projectsSync = true, repoName = "", resolvers = {}, envValues = new Map(), envUseDefaults = true, branch = "", deployBranch = "", deployTriggerBranch = "", ciMinutesSaver = false } = context;
97
97
  const decisions = hooks.decisions instanceof Map ? hooks.decisions : new Map();
98
- const trace = hooks.trace ?? null; // #494 — 실행 트레이스 (null-safe: 미주입이면 전 이벤트 no-op)
98
+ const trace = hooks.trace ?? null; // #494 — run trace (null-safe: every event is a no-op when not injected)
99
99
  const workflowsDir = join(targetRoot, PATHS.workflowsDir);
100
- // 설치 시점 기준점(#557) — 없으면 null이고 classify가 종전 2-way로 폴백한다.
100
+ // Install-time reference point (#557) — null if missing, and classify falls back to the old 2-way check.
101
101
  const baseline = readBaseline(targetRoot);
102
102
  const projectTypesDir = join(tempDir, PATHS.workflowsDir, PATHS.projectTypesDir);
103
103
  if (!exists(projectTypesDir)) throw new Error(t("copy.templateStructureError"));
104
104
 
105
105
  const counters = { copied: 0, skipped: 0, templateAdded: 0, optionalCopied: 0, copiedFiles: [],
106
- replacedBak: [], // #673 — 기준점이 없어 수정 여부를 모른 채 .bak 백업 후 교체한 파일명
107
- skippedConflicts: [] }; // #654 — 유지한 사용자 수정본별 { filename, incoming, added, removed }
108
- const deployValues = new Map(); // Map<type, Map<key,value>> — deploy 블록용 ask 값
106
+ replacedBak: [], // #673 — files replaced after a .bak backup without knowing whether they were edited (no reference point)
107
+ skippedConflicts: [] }; // #654 — { filename, incoming, added, removed } per kept user-edited file
108
+ const deployValues = new Map(); // Map<type, Map<key,value>> — ask values for the deploy block
109
109
  counters.deployValues = deployValues;
110
- // 브랜치 전략 (#477) — 표준(main/develop)이면 치환·가상비교 모두 no-op
110
+ // Branch strategy (#477) — with the standard (main/develop), substitution and virtual comparison are both no-ops
111
111
  const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "", ciMinutesSaver: !!ciMinutesSaver };
112
- // values/useDefaults는 치환 경로에서만 의미 (isUnchanged는 내부에서 useDefaults:true 강제 — 가상 비교 무손상)
112
+ // values/useDefaults matter only on the substitution path (isUnchanged forces useDefaults:true internally — virtual comparison intact)
113
113
  const envOptsFor = (type) => ({ type, projectPath: paths.get(type) || ".", repoName, resolvers, values: envValues, useDefaults: envUseDefaults, branches });
114
114
 
115
- // 설치하지 않을 새 파일 (#810) — 깔 때마다 다시 생기던 것들.
116
- // excluded : version.yml options.excluded_workflows 에 사용자가 적은 파일
117
- // deleted-by-user : 우리가 깐 기록(baseline)이 있는데 지금 없다 = 사용자가 지웠다 (.bak 은 우리가 치운 것이라 제외)
118
- // no-dev-branch : 개발 브랜치가 원격에 확실히 없는데 그 브랜치에서만 도는 워크플로우
115
+ // New files not to install (#810) — the ones that came back on every install.
116
+ // excluded : files the user listed in version.yml options.excluded_workflows
117
+ // deleted-by-user : we have an install record (baseline) but the file is gone = the user deleted it (.bak files are our own cleanup, so excluded)
118
+ // no-dev-branch : workflows that run only on the development branch when it is definitely missing on the remote
119
119
  const notInstalled = [];
120
120
  Object.defineProperty(counters, "notInstalled", { value: notInstalled, enumerable: false });
121
121
  const excludedSet = new Set(context.excludedWorkflows || []);
122
122
  const devName = branches.deployBranch;
123
- let devMissing = null; // 필요할 때 한 번만 원격을 조회한다
123
+ let devMissing = null; // Query the remote only once, when needed
124
124
  const isDevMissing = () => {
125
125
  if (devMissing === null) {
126
126
  const st = devName === branches.defaultBranch ? null : branchStatus(targetRoot, devName);
@@ -138,23 +138,23 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
138
138
  if (!reason) return false;
139
139
  const info = { filename, reason, incoming: "" };
140
140
  try {
141
- // 마음이 바뀌면 cp 한 번으로 되살릴 수 있게 렌더본을 incoming 에 남긴다
141
+ // Leave the render in incoming so a change of mind can restore it with one cp
142
142
  const rendered = substituteBranches(substituteEnv(readFileSync(join(srcDir, filename), "utf8"),
143
143
  { ...envOptsFor(group.split("/")[0]), useDefaults: true }), branches, filename);
144
144
  info.incoming = saveIncoming(targetRoot, filename, rendered);
145
- } catch { /* 안내만 빠진다 */ }
145
+ } catch { /* Only the notice is lost */ }
146
146
  notInstalled.push(info);
147
147
  trace?.event("copy", "not-installed", filename, { group, reason });
148
148
  return true;
149
149
  };
150
150
  Object.defineProperty(counters, "skipNew", { value: skipNew, enumerable: false });
151
151
 
152
- // 사용자 수정본을 유지할 때 새 템플릿 사본을 incoming에 남긴다 (#654).
153
- // 실패는 경고 한 줄로 흡수한다 — 병합 안내 때문에 복사 전체가 죽으면 안 된다.
152
+ // When keeping a user-edited file, leave a copy of the new template in incoming (#654).
153
+ // Failures shrink to one warning line — the merge notice must not kill the whole copy.
154
154
  const onSkip = (srcDir, filename, type) => {
155
155
  const info = { filename, incoming: "", added: null, removed: null };
156
156
  try {
157
- // 설치 때와 같은 렌더(기본값 치환 + 브랜치 치환)를 거쳐야 diff가 "진짜 차이"만 보여준다
157
+ // Must go through the same render as install (default substitution + branch substitution) so the diff shows only "real differences"
158
158
  const rendered = substituteBranches(
159
159
  substituteEnv(readFileSync(join(srcDir, filename), "utf8"), { ...envOptsFor(type), useDefaults: true }), branches, filename);
160
160
  info.incoming = saveIncoming(targetRoot, filename, rendered);
@@ -167,18 +167,18 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
167
167
  counters.skippedConflicts.push(info);
168
168
  return info;
169
169
  };
170
- // 반환 객체의 열거 가능한 필드를 늘리지 않는다 (기존 호출부·테스트가 counters 모양에 기대고 있다)
170
+ // Do not add enumerable fields to the returned object (existing callers and tests rely on the counters shape)
171
171
  Object.defineProperty(counters, "onSkip", { value: onSkip, enumerable: false });
172
172
 
173
- // (1) common — 타입별과 동일한 판정·보호를 받는다 (#560).
174
- // 릴리스 파이프라인처럼 프로젝트마다 뒤에 붙일 일이 다른 워크플로우는 common 이어도 사용자가 고쳐 쓴다.
175
- // 그래서 수정본을 무조건 덮어쓰지 않고 타입별과 같은 충돌 판정·백업을 거친다.
173
+ // (1) common — gets the same checks and protection as per-type files (#560).
174
+ // Workflows like the release pipeline, where each project appends different steps, get edited by users even in common.
175
+ // So edited files are not blindly overwritten; they go through the same conflict check and backup as per-type files.
176
176
  const commonDir = join(projectTypesDir, "common");
177
177
  if (exists(commonDir)) {
178
178
  const commonEnv = envOptsFor("common");
179
179
  const commonClass = classify(commonDir, workflowsDir, commonEnv, baseline);
180
180
  for (const filename of listYamlFiles(commonDir)) {
181
- // #491 — util 동기화 워크플로우는 util 모듈이 있(게 되)는 레포에만 복사
181
+ // #491 — copy the util sync workflow only to repos that have (or will have) util modules
182
182
  if (filename === UTIL_VERSION_SYNC && !utilSyncApplies(tempDir, targetRoot, types)) {
183
183
  trace?.event("copy", "excluded", filename, { reason: "util-modules-absent" });
184
184
  continue;
@@ -188,7 +188,7 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
188
188
  trace?.event("copy", "skipped-unchanged", filename, { group: "common" });
189
189
  continue;
190
190
  }
191
- // 사용자가 손댄 적 없고 템플릿만 바뀐 파일 — 물어볼 것 없이 최신으로 올린다(종전과 동일).
191
+ // Never touched by the user, only the template changed — bring it up to date without asking (as before).
192
192
  if (commonClass.newFiles.includes(filename) && skipNew(commonDir, filename, "common")) continue;
193
193
  if (commonClass.newFiles.includes(filename) || commonClass.upstream.includes(filename)) {
194
194
  copyFileSync(join(commonDir, filename), join(workflowsDir, filename));
@@ -198,38 +198,38 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
198
198
  filename, { group: "common" });
199
199
  continue;
200
200
  }
201
- // 여기부터는 changed — "지금 템플릿 렌더 결과 ≠ 설치본"이다. 둘로 갈린다.
201
+ // From here on, changed — "current template render ≠ installed copy". It splits two ways.
202
202
  const dst = join(workflowsDir, filename);
203
203
  const modified = isUserModified(baseline, filename, readFileSync(dst, "utf8"));
204
204
  if (modified === null) {
205
- // 판정 불가(기준점 없음 = 기존 통합 레포). common의 종전 계약은 "항상 최신으로 갱신"이라
206
- // 여기서 skip하면 기존 레포가 업데이트를 영영 못 받는다. 계약은 지키되 되돌릴 수단을
207
- // 남긴다 — 덮어쓰기 전 .bak. (#560: common/deploy조차 .bak을 남기는데 본체만 없었다)
205
+ // Cannot decide (no reference point = existing integrated repo). common's old contract is "always update to latest",
206
+ // so skipping here would leave existing repos without updates forever. Keep the contract but leave a way
207
+ // back — a .bak before overwriting. (#560: even common/deploy left a .bak, only the main body did not)
208
208
  renameSync(dst, dst + ".bak");
209
209
  copyFileSync(join(commonDir, filename), dst);
210
210
  counters.copied++;
211
211
  counters.copiedFiles.push(filename);
212
212
  trace?.event("copy", "replaced-bak", filename, { group: "common", reason: "baseline-absent" });
213
- counters.replacedBak.push(filename); // #673 — 수정 가능성이 있는 파일을 교체했음을 화면에 알린다
213
+ counters.replacedBak.push(filename); // #673 — show on screen that a possibly edited file was replaced
214
214
  continue;
215
215
  }
216
- // 사용자가 손댄 것이 확인된 파일 — 결정에 따라 처리(미지정이면 유지).
216
+ // A file confirmed as touched by the user — handled by the decision (kept if unset).
217
217
  applyDecision(decisions.get(filename), commonDir, workflowsDir, filename, counters, trace, "common");
218
218
  }
219
219
  }
220
220
 
221
- // (2~4) 타입별
221
+ // (2~4) per type
222
222
  for (const type of types) {
223
223
  const asks = new Map();
224
224
  copyWorkflowsForType(type, projectTypesDir, workflowsDir, { deployTarget, publishTargets, ...context, envOptsFor, collectAsks: asks, decisions, trace, baseline }, counters);
225
225
  if (asks.size) deployValues.set(type, asks);
226
226
  }
227
227
 
228
- // (4.5~5) common/ 아래 선택형 폴더 — deploy/<target>, pr-summary, projects-sync, secret-backup.
229
- // 어느 폴더를 켜는지는 workflow-groups.js 한 곳이 정한다 (#851). 고아 감지도 같은 표를 쓴다.
230
- // bak-replace: 템플릿과 같으면 건너뛰고, 다르면 .bak 으로 남기고 교체한다.
231
- // new-only : 이미 있으면 건드리지 않는다. 새로 깔 때만 레포 이름을 채운다 (#729 — 고정값이면
232
- // 모든 프로젝트가 서버의 같은 폴더에 Secret 을 덮어쓴다).
228
+ // (4.5~5) optional folders under common/ — deploy/<target>, pr-summary, projects-sync, secret-backup.
229
+ // Which folders are on is decided in one place, workflow-groups.js (#851). Orphan detection uses the same table.
230
+ // bak-replace: skip if identical to the template, else keep a .bak and replace.
231
+ // new-only : leave alone if it exists. Fill in the repo name only on a fresh install (#729 — with a fixed value,
232
+ // every project would overwrite secrets in the same server folder).
233
233
  for (const group of commonOptionalGroups(commonDir, { includeSecretBackup, aiPrSummary, projectsSync, deployTarget })) {
234
234
  const groupDir = join(commonDir, group.dir);
235
235
  if (!group.enabled || !exists(groupDir)) continue;
@@ -266,8 +266,8 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
266
266
  }
267
267
  }
268
268
 
269
- // (6) 브랜치 치환 post-pass (#477) — 표준과 다른 브랜치 전략이거나 CI 사용 시간 절약(#1114)일 때만 복사된 파일에 적용.
270
- // isUnchanged 가상 비교에도 같은 branches가 들어가므로 다음 업데이트에서 재복사 churn이 없다.
269
+ // (6) Branch substitution post-pass (#477) — applied to copied files only for a non-standard branch strategy or the CI minutes saver (#1114).
270
+ // The isUnchanged virtual comparison uses the same branches, so the next update has no recopy churn.
271
271
  if (branches.defaultBranch !== "main" || branches.deployBranch !== "develop" || branches.deployTriggerBranch || branches.ciMinutesSaver) {
272
272
  for (const f of counters.copiedFiles) {
273
273
  const p = join(workflowsDir, f);
@@ -281,16 +281,16 @@ export function copyWorkflows(context, tempDir, targetRoot = ".", hooks = {}) {
281
281
  }
282
282
  }
283
283
 
284
- // (7) 기준점 기록 (#557) — 다음 업데이트가 "누가 바꿨는지"를 가릴 근거.
285
- // 이번에 실제로 쓴 파일만 installed를 갱신한다. 유지(skip)한 파일에 우리가 쓴 것처럼
286
- // 기록하면 다음 업데이트에서 사용자 수정이 조용히 덮인다.
284
+ // (7) Record the reference point (#557) — the basis for the next update to tell "who changed it".
285
+ // Update installed only for files actually written this time. Recording kept (skipped) files as if we wrote them
286
+ // would silently overwrite user edits on the next update.
287
287
  recordBaseline(workflowsDir, targetRoot, counters, baseline, context.templateVersion, context.now, trace);
288
288
 
289
289
  return counters;
290
290
  }
291
291
 
292
- // 설치 직후의 디스크 내용을 기준점으로 남긴다. 실패해도 통합을 막지 않는다 —
293
- // 기준점이 없으면 다음 업데이트가 종전 2-way 판정으로 폴백할 뿐이다.
292
+ // Keep the disk content right after install as the reference point. Failure does not block the integration —
293
+ // without a reference point, the next update just falls back to the old 2-way check.
294
294
  function recordBaseline(workflowsDir, targetRoot, counters, previous, templateVersion, now, trace = null) {
295
295
  try {
296
296
  const entries = new Map();
@@ -298,10 +298,10 @@ function recordBaseline(workflowsDir, targetRoot, counters, previous, templateVe
298
298
  const p = join(workflowsDir, f);
299
299
  if (!existsSync(p)) continue;
300
300
  const content = readFileSync(p, "utf8");
301
- // 치환까지 끝난 최종 디스크 내용이 곧 우리가 쓴 것이자, 이 시점의 렌더 결과다.
301
+ // The final disk content after substitution is both what we wrote and the render result at this point.
302
302
  entries.set(f, { installed: sha256(content), rendered: sha256(content) });
303
303
  }
304
- if (entries.size === 0 && previous) return; // 새로 쓴 게 없으면 기존 기준점을 건드리지 않는다
304
+ if (entries.size === 0 && previous) return; // Nothing newly written — leave the existing reference point alone
305
305
  trace?.event("baseline", "recorded", "", { files: entries.size, hadPrevious: !!previous });
306
306
  writeBaseline(targetRoot, {
307
307
  templateVersion: templateVersion || "unknown",
@@ -310,18 +310,18 @@ function recordBaseline(workflowsDir, targetRoot, counters, previous, templateVe
310
310
  previous,
311
311
  });
312
312
  } catch (e) {
313
- // 기준점 기록 실패는 통합 실패가 아니다
313
+ // Failing to record the reference point is not an integration failure
314
314
  trace?.event("baseline", "baseline-failed", "", { message: e?.message || String(e) });
315
315
  }
316
316
  }
317
317
 
318
- // changed(기존에 있고 내용이 바뀐) 파일 1개를 결정에 따라 처리 (3지선: 백업 교체·템플릿 사본·유지).
319
- // 'skip'(기본): 기존 유지. 'backup': 기존→.bak 후 교체. 'template': 기존 유지 + 새 버전을 .template.yaml로.
318
+ // Handle one changed file (exists and content changed) by decision (3 choices: backup and replace, template copy, keep).
319
+ // 'skip' (default): keep existing. 'backup': existing → .bak then replace. 'template': keep existing + new version as .template.yaml.
320
320
  function applyDecision(decision, srcDir, workflowsDir, filename, counters, trace = null, type = "") {
321
321
  const src = join(srcDir, filename);
322
322
  const dst = join(workflowsDir, filename);
323
323
  if (decision === "backup") {
324
- // 백업 교체: 기존을 .bak으로 백업 후 새 버전으로 교체
324
+ // Backup and replace: back up the existing file as .bak, then replace with the new version
325
325
  renameSync(dst, dst + ".bak");
326
326
  copyFileSync(src, dst);
327
327
  counters.copied++;
@@ -330,15 +330,15 @@ function applyDecision(decision, srcDir, workflowsDir, filename, counters, trace
330
330
  return;
331
331
  }
332
332
  if (decision === "template") {
333
- // 템플릿 사본: `<이름>.template.yaml` — .yaml만 strip (.yml은 그대로 뒤에 붙음)
333
+ // Template copy: `<name>.template.yaml` — strips only .yaml (.yml stays and the suffix is appended)
334
334
  const templateName = (filename.endsWith(".yaml") ? filename.slice(0, -".yaml".length) : filename) + ".template.yaml";
335
- copyFileSync(src, join(workflowsDir, templateName)); // 기존 .template.yaml 덮어씀
335
+ copyFileSync(src, join(workflowsDir, templateName)); // Overwrites an existing .template.yaml
336
336
  counters.templateAdded++;
337
337
  trace?.event("copy", "template-added", templateName, { original: filename });
338
338
  return;
339
339
  }
340
- counters.skipped++; // 'skip'/미지정/ESC → 기존 유지 (force 기본)
341
- // #654 — 새 템플릿을 incoming에 남기고 diff 줄 수를 detail로 함께 기록
340
+ counters.skipped++; // 'skip'/unset/ESC → keep existing (force default)
341
+ // #654 — leave the new template in incoming and record diff line counts in detail
342
342
  const inc = counters.onSkip?.(srcDir, filename, type) ?? {};
343
343
  trace?.event("copy", "skipped-conflict", filename, {
344
344
  decision: decision ?? "skip", note: "kept the user-modified file — candidate for merge review",
@@ -346,19 +346,19 @@ function applyDecision(decision, srcDir, workflowsDir, filename, counters, trace
346
346
  });
347
347
  }
348
348
 
349
- // 대상 워크플로우 디렉토리에서 changed(충돌) 파일 목록만 뽑는다 — 마법사(commands/interactive.js)가 쓴다.
350
- // copyWorkflows 본체와 동일한 classify 기준을 써야 결정 Map이 실제 처리 대상과 1:1로 맞는다.
349
+ // List only changed (conflict) files in the target workflow directory — used by the wizard (commands/interactive.js).
350
+ // Must use the same classify rules as copyWorkflows so the decision Map matches the real targets 1:1.
351
351
  export function listWorkflowConflicts(context, tempDir, targetRoot = ".") {
352
352
  const { types = [], paths = new Map(), deployTarget = "docker-ssh", repoName = "", resolvers = {}, branch = "", deployBranch = "", deployTriggerBranch = "", ciMinutesSaver = false } = context;
353
353
  const workflowsDir = join(targetRoot, PATHS.workflowsDir);
354
- // 설치 시점 기준점(#557) — 없으면 null이고 classify가 종전 2-way로 폴백한다.
354
+ // Install-time reference point (#557) — null if missing, and classify falls back to the old 2-way check.
355
355
  const baseline = readBaseline(targetRoot);
356
356
  const projectTypesDir = join(tempDir, PATHS.workflowsDir, PATHS.projectTypesDir);
357
- const conflicts = []; // [{ filename, type }] — 엔진 처리 순서와 동일 (common → 타입 순회 → server-deploy)
358
- const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "", ciMinutesSaver: !!ciMinutesSaver }; // #477 — 엔진과 동일 기준
357
+ const conflicts = []; // [{ filename, type }] — same order as the engine (common → type loop → server-deploy)
358
+ const branches = { defaultBranch: branch || "main", deployBranch: deployBranch || "develop", deployTriggerBranch: deployTriggerBranch || "", ciMinutesSaver: !!ciMinutesSaver }; // #477 — same rules as the engine
359
359
 
360
- // common (#560) — 사용자가 손댄 것이 "확인된" 파일만 질문 대상이다.
361
- // 기준점이 없어 판정 불가인 파일은 엔진이 .bak을 남기고 덮어쓰므로 질문하지 않는다.
360
+ // common (#560) — only files "confirmed" as touched by the user are asked about.
361
+ // Files that cannot be decided (no reference point) are not asked; the engine leaves a .bak and overwrites them.
362
362
  const commonDir = join(projectTypesDir, "common");
363
363
  if (exists(commonDir)) {
364
364
  const commonEnv = { type: "common", projectPath: ".", repoName, resolvers, branches };
@@ -388,30 +388,30 @@ function copyWorkflowsForType(type, projectTypesDir, workflowsDir, ctx, counters
388
388
  const typeDir = join(projectTypesDir, type);
389
389
  const envOpts = envOptsFor(type);
390
390
  let unchangedNames = [];
391
- // upstream 갱신 전 설치본의 env 실값 (#810 조사 중 발견). 템플릿만 바뀐 파일을 새로 깔 때
392
- // 기본값으로 다시 치환해, 사용자가 고른 값(JAVA_VERSION 17 등)이 조용히 21로 돌아갔다.
391
+ // Env values of the installed copy before the upstream update (found while investigating #810). When reinstalling a file where only the template changed,
392
+ // it was re-substituted with defaults, silently turning user choices (JAVA_VERSION 17, etc.) back to 21.
393
393
  const carried = new Map(); // Map<filename, Map<key,value>>
394
394
  const upstreamCopy = (srcDir, f, group) => {
395
395
  const dst = join(workflowsDir, f);
396
- try { carried.set(f, extractEnvValues(readFileSync(dst, "utf8"))); } catch { /* 읽기 실패 — 기본값으로 */ }
396
+ try { carried.set(f, extractEnvValues(readFileSync(dst, "utf8"))); } catch { /* Read failed — use defaults */ }
397
397
  copyFileSync(join(srcDir, f), dst);
398
398
  counters.copied++; counters.copiedFiles.push(f);
399
399
  trace?.event("copy", "upstream-updated", f, { group, reason: "baseline-match", carried: carried.get(f)?.size ?? 0 });
400
400
  };
401
401
 
402
- // 타입별 워크플로우 (직하위)
402
+ // Per-type workflows (direct children)
403
403
  if (exists(typeDir)) {
404
404
  const { newFiles, unchanged, changed, upstream } = classify(typeDir, workflowsDir, envOpts, baseline);
405
405
  unchangedNames = unchanged.slice();
406
406
  for (const f of unchanged) { counters.skipped++; trace?.event("copy", "skipped-unchanged", f, { group: type }); }
407
407
  for (const f of newFiles) { if (counters.skipNew(typeDir, f, type)) continue; copyFileSync(join(typeDir, f), join(workflowsDir, f)); counters.copied++; counters.copiedFiles.push(f); trace?.event("copy", "copied", f, { group: type }); }
408
- // upstream(#557): 사용자가 손대지 않았고 템플릿만 바뀐 파일 — 물어볼 것 없이 최신으로 올린다.
408
+ // upstream (#557): not touched by the user, only the template changed — bring it up to date without asking.
409
409
  for (const f of upstream) upstreamCopy(typeDir, f, type);
410
- // changed: 결정 Map에 따라 처리 (미지정=skip → 현행 force 동작과 동일)
410
+ // changed: handled by the decision Map (unset = skip → same as the current force behavior)
411
411
  for (const f of changed) applyDecision(decisions.get(f), typeDir, workflowsDir, f, counters, trace, type);
412
412
  }
413
413
 
414
- // server-deploy — deploy=docker-ssh일 때만 포함 (#439)
414
+ // server-deploy — included only with deploy=docker-ssh (#439)
415
415
  const serverDeployDir = join(typeDir, SERVER_DEPLOY_DIR);
416
416
  if (exists(serverDeployDir) && serverDeployEnabled(deployTarget)) {
417
417
  const { newFiles, unchanged, changed, upstream } = classify(serverDeployDir, workflowsDir, envOpts, baseline);
@@ -421,7 +421,7 @@ function copyWorkflowsForType(type, projectTypesDir, workflowsDir, ctx, counters
421
421
  for (const f of changed) applyDecision(decisions.get(f), serverDeployDir, workflowsDir, f, counters, trace, type);
422
422
  }
423
423
 
424
- // publish/<target> (opt-in — #439 publish 축. 타입은 파일 위치일 뿐 게이트가 아니다)
424
+ // publish/<target> (opt-in — #439 publish axis. The type is only the file location, not a gate)
425
425
  const pubDirs = [];
426
426
  for (const target of PUBLISH_TARGETS) {
427
427
  const pubDir = join(typeDir, "publish", target);
@@ -447,20 +447,20 @@ function copyWorkflowsForType(type, projectTypesDir, workflowsDir, ctx, counters
447
447
  }
448
448
  }
449
449
 
450
- // env 치환 — 이 타입의 원본 디렉토리들에서 복사돼 존재하고 unchanged 아닌 파일만
450
+ // env substitution — only files copied from this type's source directories that exist and are not unchanged
451
451
  for (const srcDir of [typeDir, serverDeployDir, ...pubDirs]) {
452
452
  if (!exists(srcDir)) continue;
453
453
  for (const filename of listYamlFiles(srcDir)) {
454
454
  const target = join(workflowsDir, filename);
455
- if (!existsSync(target)) continue; // 건너뛴 파일 제외
456
- if (unchangedNames.includes(filename)) continue; // unchanged 제외
455
+ if (!existsSync(target)) continue; // Skip skipped files
456
+ if (unchangedNames.includes(filename)) continue; // Skip unchanged
457
457
  const prev = carried.get(filename);
458
458
  if (prev && prev.size) {
459
- // 이월값 위에 이번 실행에서 명시로 고른 값을 덮는다 (명시 선택이 이긴다)
459
+ // Overlay values explicitly chosen in this run on top of carried-over values (explicit choice wins)
460
460
  const values = new Map([...prev, ...(envOpts.useDefaults ? [] : envOpts.values)]);
461
461
  configureEnv(target, filename, { ...envOpts, values, useDefaults: false, collectAsks, trace });
462
462
  } else {
463
- configureEnv(target, filename, { ...envOpts, collectAsks, trace }); // env 계획 values/useDefaults 포함
463
+ configureEnv(target, filename, { ...envOpts, collectAsks, trace }); // includes env plan values/useDefaults
464
464
  }
465
465
  }
466
466
  }
@@ -1,5 +1,5 @@
1
- // 실 파일시스템 프로젝트 감지.
2
- // SP2-A detect.js 순수 함수를 fs/git으로 구동한다.
1
+ // Project detection on the real filesystem.
2
+ // Drives the SP2-A detect.js pure functions with fs/git.
3
3
  import { existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  import { join, basename } from "node:path";
5
5
  import { execFileSync } from "node:child_process";
@@ -18,11 +18,11 @@ function gitOut(root, args) {
18
18
  } catch { return ""; }
19
19
  }
20
20
 
21
- // 확장자 스캔용 파일 목록 (depth≤3, vendor 폴더 프루닝).
21
+ // File list for the extension scan (depth≤3, vendor folders pruned).
22
22
  const SCAN_PRUNE = new Set([
23
23
  "node_modules", ".git", "build", "dist", ".dart_tool",
24
24
  "android", "ios", ".gradle", "venv", ".venv", "__pycache__",
25
- // 템플릿이 스스로 설치하는 .github/scripts/*.py 가 python 으로 오탐되지 않게 한다 (#671)
25
+ // Keeps the template's own .github/scripts/*.py from being misdetected as python (#671)
26
26
  ".github",
27
27
  ]);
28
28
  export function listScanFiles(root, maxDepth = 3) {
@@ -44,27 +44,27 @@ export function listScanFiles(root, maxDepth = 3) {
44
44
  return files;
45
45
  }
46
46
 
47
- // 타입 감지 — version.yml의 project_types 최우선(source of truth), 없으면 마커 스캔.
48
- // 마커도 전혀 없으면(basic 폴백) 확장자 빈도 스캔으로 2차 추천 (#458).
47
+ // Type detection — version.yml project_types first (source of truth), else a marker scan.
48
+ // With no markers at all (basic fallback), a secondary recommendation from extension frequency (#458).
49
49
  export function detectTypes(root) {
50
50
  const vy = join(root, "version.yml");
51
51
  if (existsSync(vy)) {
52
52
  const { types } = parseExisting(readFileSync(vy, "utf8"));
53
- if (types.length) return types; // basic 포함, 명시돼 있으면 그대로
54
- // v4.1.0 이전 단수 project_type 키 (#718) — 마커가 없어도 명시된 값을 복원한다.
55
- // 안 그러면 마커 없는 저장소가 basic 으로 떨어져 기존 타입의 워크플로우가 고아가 된다.
53
+ if (types.length) return types; // Includes basic; use as is when explicit
54
+ // Singular project_type key from before v4.1.0 (#718) — restore the explicit value even without markers.
55
+ // Otherwise a repo without markers drops to basic and the existing type's workflows are orphaned.
56
56
  const legacy = (convertLegacySingularType(readFileSync(vy, "utf8")) || "").match(/^project_types: \["([a-z-]+)"\]/m);
57
57
  if (legacy && VALID_TYPES.includes(legacy[1])) return [legacy[1]];
58
58
  }
59
59
  const byMarkers = detectTypesFromMarkers({ has: hasFile(root), read: readFile(root) });
60
60
  if (byMarkers.length === 1 && byMarkers[0] === "basic") {
61
61
  const scanned = suggestTypesByExtScan(listScanFiles(root));
62
- if (scanned.length) return scanned; // 추천값 — 마법사 확인/수정 루프에서 사용자가 확정
62
+ if (scanned.length) return scanned; // Recommendation — the user confirms it in the wizard's confirm/edit loop
63
63
  }
64
64
  return byMarkers;
65
65
  }
66
66
 
67
- // 버전 감지. jq 유무는 command 존재로 판정.
67
+ // Version detection. jq availability is judged by the command existing.
68
68
  export function detectVersion(root, { hasJq } = {}) {
69
69
  const read = readFile(root);
70
70
  const readJson = (rel) => { const c = read(rel); try { return c ? JSON.parse(c) : null; } catch { return null; } };
@@ -73,20 +73,20 @@ export function detectVersion(root, { hasJq } = {}) {
73
73
  return detectVersionFromFiles({ read, readJson, hasJq: jq, gitTag });
74
74
  }
75
75
 
76
- // 기본 브랜치 감지 — symbolic-ref → remote show → main.
76
+ // Default branch detection — symbolic-ref → remote show → main.
77
77
  export function detectDefaultBranch(root) {
78
78
  let b = gitOut(root, ["symbolic-ref", "refs/remotes/origin/HEAD"]);
79
79
  if (b) return b.replace(/^refs\/remotes\/origin\//, "");
80
80
  const show = gitOut(root, ["remote", "show", "origin"]);
81
81
  const m = show.match(/HEAD branch:\s*(\S+)/);
82
82
  if (m) return m[1];
83
- // origin 없는 로컬 레포(#477) — 현재 HEAD 브랜치가 최선의 추정 (대화형 수정 메뉴로 교정 가능)
83
+ // Local repo without origin (#477) — the current HEAD branch is the best guess (fixable in the interactive edit menu)
84
84
  const head = gitOut(root, ["branch", "--show-current"]);
85
85
  if (head) return head;
86
86
  return "main";
87
87
  }
88
88
 
89
- // 레포명 — git remote get-url origin 마지막 세그먼트, 실패 시 폴더명.
89
+ // Repo name — last segment of git remote get-url origin, folder name on failure.
90
90
  export function detectRepoName(root) {
91
91
  const url = gitOut(root, ["remote", "get-url", "origin"]);
92
92
  if (url) {
@@ -103,18 +103,18 @@ function hasCommand(cmd) {
103
103
  } catch { return false; }
104
104
  }
105
105
 
106
- // Spring application*.yml 탐색
107
- // find {base} -path "*/src/main/resources/application*.yml" | head -1 의 fs 재귀 구현.
108
- // 반환: root 기준 상대경로 (예: "server/src/main/resources/application.yml") 또는 "".
106
+ // Find Spring application*.yml
107
+ // fs recursive version of find {base} -path "*/src/main/resources/application*.yml" | head -1.
108
+ // Returns a path relative to root (e.g. "server/src/main/resources/application.yml") or "".
109
109
  export function findSpringAppYml(root, base = ".") {
110
110
  const startRel = base === "." ? "" : base;
111
111
  const PRUNE = new Set(["node_modules", ".git", "build", ".gradle", "target", ".idea"]);
112
112
  let hit = "";
113
113
  const walk = (rel, depth) => {
114
- if (hit || depth > 8) return; // head -1 등가 — 첫 매치에서 중단
114
+ if (hit || depth > 8) return; // Equivalent to head -1 — stop at the first match
115
115
  let entries;
116
116
  try { entries = readdirSync(join(root, rel), { withFileTypes: true }); } catch { return; }
117
- // 정렬로 순회 순서 결정화 (find 순서 플랫폼 편차 제거)
117
+ // Sort to make traversal order deterministic (removes platform differences in find order)
118
118
  for (const e of entries.sort((a, b) => a.name.localeCompare(b.name))) {
119
119
  if (hit) return;
120
120
  const childRel = rel ? `${rel}/${e.name}` : e.name;
@@ -130,8 +130,8 @@ export function findSpringAppYml(root, base = ".") {
130
130
  return hit;
131
131
  }
132
132
 
133
- // 실 resolver 4종 세트 생성 — index/interactive 공용.
134
- // paths: Map<type, path> (모노레포 경로).
133
+ // Builds the real set of 4 resolvers — shared by index and interactive.
134
+ // paths: Map<type, path> (monorepo paths).
135
135
  export function makeResolvers(root, repoName, paths) {
136
136
  const springBase = (t) => paths.get(t || "spring") || paths.get("spring") || ".";
137
137
  return {