projectops 4.109.0 → 4.110.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.
@@ -0,0 +1,215 @@
1
+ [
2
+ {
3
+ "id": "flutter",
4
+ "label": "Flutter",
5
+ "description": "Flutter",
6
+ "detect": {
7
+ "markers": ["pubspec.yaml"],
8
+ "extensions": { "patterns": ["\\.dart$"], "min_count": 1 },
9
+ "secondary": "`lib/` directory"
10
+ },
11
+ "path_search": { "files": ["pubspec.yaml"], "require_dir": "lib", "exclude_parts": ["example"] },
12
+ "version": {
13
+ "format": "pubspec",
14
+ "build_number": null,
15
+ "display": "pubspec.yaml",
16
+ "comment": "pubspec.yaml (version: x.y.z+i, includes buildNumber)",
17
+ "example": "version: 1.0.0+1"
18
+ },
19
+ "axes": { "deploy": [], "publish": [] },
20
+ "is_app": true,
21
+ "launch_kinds": ["app"],
22
+ "root_resolver": "flutter-root",
23
+ "deploy_trigger_workflows": [
24
+ "PROJECT-FLUTTER-ANDROID-FIREBASE-CICD.yaml",
25
+ "PROJECT-FLUTTER-ANDROID-PLAYSTORE-CICD.yaml",
26
+ "PROJECT-FLUTTER-ANDROID-SELFHOSTED-CICD.yaml",
27
+ "PROJECT-FLUTTER-IOS-TESTFLIGHT.yaml"
28
+ ]
29
+ },
30
+ {
31
+ "id": "spring",
32
+ "label": "Spring Boot",
33
+ "description": "Spring Boot",
34
+ "detect": {
35
+ "markers": ["build.gradle", "build.gradle.kts", "pom.xml"],
36
+ "extensions": { "patterns": ["\\.java$", "\\.kt$", "\\.gradle$"], "min_count": 3 },
37
+ "secondary": "`src/main/java/`, Spring dependencies"
38
+ },
39
+ "path_search": {
40
+ "files": ["build.gradle", "build.gradle.kts", "pom.xml"],
41
+ "exclude_parts": ["android"],
42
+ "gradle_settings_root": true
43
+ },
44
+ "version": {
45
+ "format": "gradle",
46
+ "build_number": null,
47
+ "display": "build.gradle",
48
+ "comment": "build.gradle (version = \"x.y.z\")",
49
+ "example": "version = '1.0.0'"
50
+ },
51
+ "axes": { "deploy": ["docker-ssh", "vercel"], "publish": ["nexus", "npm", "github-packages"] },
52
+ "is_app": false,
53
+ "launch_kinds": ["server"],
54
+ "root_resolver": null,
55
+ "deploy_trigger_workflows": [
56
+ "PROJECT-SPRING-SIMPLE-CICD.yaml",
57
+ "PROJECT-SPRING-NEXUS-PUBLISH.yml",
58
+ "PROJECT-SPRING-GITHUB-PACKAGES-PUBLISH.yml"
59
+ ]
60
+ },
61
+ {
62
+ "id": "python",
63
+ "label": "Python",
64
+ "description": "FastAPI/Django",
65
+ "detect": {
66
+ "markers": ["pyproject.toml", "setup.py", "requirements.txt"],
67
+ "extensions": { "patterns": ["\\.py$"], "min_count": 3 },
68
+ "secondary": "`manage.py` (Django), `main.py` (FastAPI)"
69
+ },
70
+ "path_search": { "files": ["pyproject.toml", "setup.py", "requirements.txt"] },
71
+ "version": {
72
+ "format": "pyproject",
73
+ "build_number": null,
74
+ "display": "pyproject.toml",
75
+ "comment": "pyproject.toml (version = \"x.y.z\")",
76
+ "example": "version = \"1.0.0\""
77
+ },
78
+ "axes": { "deploy": ["docker-ssh", "vercel"], "publish": ["nexus", "npm", "github-packages"] },
79
+ "is_app": false,
80
+ "launch_kinds": ["server"],
81
+ "root_resolver": null,
82
+ "deploy_trigger_workflows": ["PROJECT-PYTHON-SIMPLE-CICD.yaml"]
83
+ },
84
+ {
85
+ "id": "react",
86
+ "label": "React / Next.js",
87
+ "description": "React.js / Next.js",
88
+ "detect": {
89
+ "markers": ["package.json"],
90
+ "package_json": {
91
+ "requires_any": ["react", "next"],
92
+ "excludes_any": ["react-native"],
93
+ "excludes_any_prefix": ["@react-native/"]
94
+ },
95
+ "extensions": { "patterns": ["\\.tsx$", "\\.jsx$"], "min_count": 3 },
96
+ "secondary": "`src/` or `app/`, `tsconfig.json`, `next.config.js`"
97
+ },
98
+ "path_search": { "files": ["package.json"] },
99
+ "version": {
100
+ "format": "package_json",
101
+ "build_number": null,
102
+ "display": "package.json",
103
+ "comment": "package.json (\"version\": \"x.y.z\")",
104
+ "example": "\"version\": \"1.0.0\""
105
+ },
106
+ "axes": { "deploy": ["docker-ssh", "vercel"], "publish": ["nexus", "npm", "github-packages"] },
107
+ "is_app": false,
108
+ "launch_kinds": ["web"],
109
+ "root_resolver": null,
110
+ "deploy_trigger_workflows": ["PROJECT-REACT-CICD.yaml"]
111
+ },
112
+ {
113
+ "id": "react-native",
114
+ "label": "React Native CLI",
115
+ "description": "React Native CLI (no app workflows)",
116
+ "detect": {
117
+ "markers": ["package.json"],
118
+ "package_json": {
119
+ "requires_any": ["react-native"],
120
+ "requires_any_prefix": ["@react-native/"],
121
+ "excludes_any": ["expo"]
122
+ },
123
+ "secondary": "`android/`, `ios/` directories"
124
+ },
125
+ "path_search": { "files": ["package.json"] },
126
+ "version": {
127
+ "format": "rn_native",
128
+ "build_number": "rn_native",
129
+ "display": "Info.plist + build.gradle",
130
+ "comment": "iOS Info.plist or Android build.gradle",
131
+ "example": "CFBundleShortVersionString / versionName"
132
+ },
133
+ "axes": { "deploy": [], "publish": [] },
134
+ "is_app": true,
135
+ "launch_kinds": ["app"],
136
+ "root_resolver": null,
137
+ "deploy_trigger_workflows": []
138
+ },
139
+ {
140
+ "id": "react-native-expo",
141
+ "label": "React Native (Expo)",
142
+ "description": "Expo",
143
+ "detect": {
144
+ "markers": ["package.json"],
145
+ "package_json": {
146
+ "requires_all": ["expo"],
147
+ "requires_any": ["react-native"],
148
+ "requires_any_prefix": ["@react-native/"]
149
+ },
150
+ "secondary": "`expo` key in `app.json`; `android/` and `ios/` may be absent"
151
+ },
152
+ "path_search": { "files": ["app.json"] },
153
+ "version": {
154
+ "format": "expo_app_json",
155
+ "build_number": "expo_android_version_code",
156
+ "display": "app.json",
157
+ "comment": "app.json (expo.version)",
158
+ "example": "\"version\": \"1.0.0\""
159
+ },
160
+ "axes": { "deploy": [], "publish": [] },
161
+ "is_app": true,
162
+ "launch_kinds": ["app"],
163
+ "root_resolver": "expo-root",
164
+ "deploy_trigger_workflows": [
165
+ "PROJECT-REACT-NATIVE-EXPO-ANDROID-PLAYSTORE-CICD.yaml",
166
+ "PROJECT-REACT-NATIVE-EXPO-IOS-TESTFLIGHT.yaml"
167
+ ]
168
+ },
169
+ {
170
+ "id": "node",
171
+ "label": "Node.js",
172
+ "description": "Node.js",
173
+ "detect": {
174
+ "markers": ["package.json"],
175
+ "fallback_only": true,
176
+ "extensions": { "patterns": ["\\.ts$", "\\.js$"], "min_count": 3 },
177
+ "secondary": "`express`, `fastify`, and so on"
178
+ },
179
+ "path_search": { "files": ["package.json"] },
180
+ "version": {
181
+ "format": "package_json",
182
+ "build_number": null,
183
+ "display": "package.json",
184
+ "comment": "package.json (\"version\": \"x.y.z\")",
185
+ "example": "\"version\": \"1.0.0\""
186
+ },
187
+ "axes": { "deploy": ["docker-ssh", "vercel"], "publish": ["nexus", "npm", "github-packages"] },
188
+ "is_app": false,
189
+ "launch_kinds": ["web", "server"],
190
+ "root_resolver": null,
191
+ "deploy_trigger_workflows": ["PROJECT-NODE-NPM-PUBLISH.yaml"]
192
+ },
193
+ {
194
+ "id": "basic",
195
+ "label": "Basic",
196
+ "description": "General purpose",
197
+ "detect": {
198
+ "markers": [],
199
+ "secondary": "Only `version.yml` exists"
200
+ },
201
+ "path_search": { "files": [] },
202
+ "version": {
203
+ "format": null,
204
+ "build_number": null,
205
+ "display": "version.yml only",
206
+ "comment": "version.yml only",
207
+ "example": "-"
208
+ },
209
+ "axes": { "deploy": [], "publish": [] },
210
+ "is_app": false,
211
+ "launch_kinds": [],
212
+ "root_resolver": null,
213
+ "deploy_trigger_workflows": []
214
+ }
215
+ ]
@@ -52,6 +52,7 @@ const ERROR_ACTIONS = new Set(["error", "failed"]);
52
52
  const WARN_ACTIONS = new Set([
53
53
  "unresolved", "cancelled", "skipped-conflict", "leftover-old-gen",
54
54
  "neutralized", "detected", "replaced-bak", "incoming-failed", "baseline-failed",
55
+ "branch-synced", "not-applied", "not-recorded", // #1248 typed branch values
55
56
  ]);
56
57
  const DEBUG_ACTIONS = new Set([
57
58
  "copied", "skipped-unchanged", "excluded", "substituted", "branch-substituted",
@@ -4,6 +4,7 @@ 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
+ import { PROJECT_TYPES } from "./project-types.js";
7
8
 
8
9
  // Match patterns built from the value lists — adding a language or style to a list makes the parser read it automatically.
9
10
  // (Hardcoding languages in the pattern means a newly saved language is unreadable on the next update and reverts to ko.)
@@ -13,6 +14,9 @@ const DEPLOY_TRIGGER_BRANCH_RE = /^\s+deploy_trigger_branch:\s*["']?([A-Za-z0-9.
13
14
  const CI_MINUTES_SAVER_RE = /^\s+ci_minutes_saver:\s*["']?(true|false)["']?/;
14
15
  const LABEL_STYLE_RE = new RegExp(`^\\s+label_style:\\s*["']?(${alt(LABEL_STYLES)})["']?`);
15
16
 
17
+ // "Files synced per project type" lines, one per registry type (language-neutral, both headers)
18
+ const TYPE_SYNC_LINES = PROJECT_TYPES.map((type) => `# - ${type.id}: ${type.version.comment}`).join("\n");
19
+
16
20
  const HEADER_EN = `# ===================================================================
17
21
  # Project version management file
18
22
  # ===================================================================
@@ -37,13 +41,7 @@ const HEADER_EN = `# ===========================================================
37
41
  # - You may edit the version value by hand regardless of the rules above
38
42
  #
39
43
  # Files synced per project type:
40
- # - spring: build.gradle (version = "x.y.z")
41
- # - flutter: pubspec.yaml (version: x.y.z+i, includes buildNumber)
42
- # - react/node: package.json ("version": "x.y.z")
43
- # - react-native: iOS Info.plist or Android build.gradle
44
- # - react-native-expo: app.json (expo.version)
45
- # - python: pyproject.toml (version = "x.y.z")
46
- # - basic/other: only this version.yml file is used
44
+ ${TYPE_SYNC_LINES}
47
45
  #
48
46
  # Related workflows:
49
47
  # - .github/workflows/PROJECT-VERSION-CONTROL.yaml
@@ -82,13 +80,7 @@ const HEADER_KO = `# ===========================================================
82
80
  # - 위 판정과 무관하게 version 값을 직접 수정해도 됩니다
83
81
  #
84
82
  # 프로젝트 타입별 동기화 파일:
85
- # - spring: build.gradle (version = "x.y.z")
86
- # - flutter: pubspec.yaml (version: x.y.z+i, buildNumber 포함)
87
- # - react/node: package.json ("version": "x.y.z")
88
- # - react-native: iOS Info.plist 또는 Android build.gradle
89
- # - react-native-expo: app.json (expo.version)
90
- # - python: pyproject.toml (version = "x.y.z")
91
- # - basic/기타: version.yml 파일만 사용
83
+ ${TYPE_SYNC_LINES}
92
84
  #
93
85
  # 연관된 워크플로우:
94
86
  # - .github/workflows/PROJECT-VERSION-CONTROL.yaml
@@ -394,6 +386,52 @@ export function readDevelopmentBranch(content) {
394
386
  return null;
395
387
  }
396
388
 
389
+ /**
390
+ * Branch keys in an existing version.yml: development_branch + deploy_branch, deploy_trigger_branch (#1248)
391
+ * For modes that do not regenerate version.yml (workflows), so flags and the wizard give the same file as full mode
392
+ * deployBranch : "" = leave as is
393
+ * deployTriggerBranch : "" = remove the key (deploys follow the default branch), otherwise set
394
+ * Returns the new content (unchanged when nothing applies)
395
+ */
396
+ export function upsertBranchKeys(content, { deployBranch = "", deployTriggerBranch = "", language = null } = {}) {
397
+ const C = commentsFor(language === "ko" ? "ko" : "en");
398
+ const eol = String(content).includes("\r\n") ? "\r\n" : "\n";
399
+ const lines = String(content).split(/\r?\n/);
400
+ const findLine = (re) => lines.findIndex((l) => !l.startsWith("#") && re.test(l));
401
+
402
+ // metadata.development_branch / deploy_branch (both keys, same value — #915)
403
+ if (deployBranch) {
404
+ const developmentLine = ` development_branch: "${deployBranch}"`;
405
+ const legacyLine = ` deploy_branch: "${deployBranch}" # ${C.legacyDeployBranch}`;
406
+ const developmentIndex = findLine(/^ {2}development_branch:/);
407
+ const legacyIndex = findLine(/^ {2}deploy_branch:/);
408
+ if (developmentIndex >= 0) lines[developmentIndex] = developmentLine;
409
+ if (legacyIndex >= 0) lines[legacyIndex] = legacyLine;
410
+ if (developmentIndex < 0 || legacyIndex < 0) {
411
+ // Missing keys go right after default_branch (else right after metadata:), same order as buildVersionYml
412
+ const anchorIndex = findLine(/^ {2}default_branch:/) >= 0 ? findLine(/^ {2}default_branch:/) : findLine(/^metadata:/);
413
+ const missing = [];
414
+ if (developmentIndex < 0) missing.push(developmentLine);
415
+ if (legacyIndex < 0) missing.push(legacyLine);
416
+ if (anchorIndex >= 0) lines.splice(anchorIndex + 1, 0, ...missing);
417
+ }
418
+ }
419
+
420
+ // metadata.template.options.deploy_trigger_branch
421
+ const triggerIndex = findLine(/^ {6}deploy_trigger_branch:/);
422
+ if (deployTriggerBranch) {
423
+ const triggerLine = ` deploy_trigger_branch: "${deployTriggerBranch}" # ${C.deployTriggerBranch}`;
424
+ if (triggerIndex >= 0) lines[triggerIndex] = triggerLine;
425
+ else {
426
+ const optionsIndex = findLine(/^ {4}options:\s*$/);
427
+ if (optionsIndex >= 0) lines.splice(optionsIndex + 1, 0, triggerLine);
428
+ }
429
+ } else if (triggerIndex >= 0) {
430
+ lines.splice(triggerIndex, 1);
431
+ }
432
+ return lines.join(eol);
433
+ }
434
+
397
435
  // Extract values from the existing version.yml (line regexes, avoiding false hits on comment lines).
398
436
  export function parseExisting(content) {
399
437
  const text = String(content || "");
@@ -71,6 +71,13 @@ export default {
71
71
  "options.devBranch.hint": " Unless you have a reason, keep develop.",
72
72
  "options.devBranch.prompt": "Development (release source) branch",
73
73
  "options.devBranch.chosen": "Development (release source) branch: {value}",
74
+ "options.deployBranch.intro": "Which branch should run the deploys (store upload, server deploy)?",
75
+ "options.deployBranch.roles": " Default branch '{base}': version bump and release notes land here. Deploy branch: a push to it runs the deploy workflows.",
76
+ "options.deployBranch.why": " Keep '{base}' to deploy from the default branch as today. A separate branch (e.g. deploy) keeps the CI version and changelog commits on the default branch apart from deploys.",
77
+ "options.deployBranch.prompt": "Deploy branch",
78
+ "options.deployBranch.chosen": "Deploy branch: {value}",
79
+ "options.deployBranch.chosenDefault": "Deploy branch: {base} (the default branch, no separate deploy branch)",
80
+ "options.deployBranch.missing": "Deploy branch '{branch}' does not exist yet. The deploy workflows will run on it once it exists, and the first push to it runs them (store upload, server deploy).",
74
81
  "options.secret.short": "Secret server backup",
75
82
  "options.secret.desc": "A workflow that uploads config files stored in GitHub Secrets to a server over SSH and keeps their history.",
76
83
  "paths.multi": "Multi-type project detected: {total} types in total",
@@ -71,6 +71,13 @@ export default {
71
71
  "options.devBranch.hint": " 특별한 이유가 없으면 develop 그대로 두세요.",
72
72
  "options.devBranch.prompt": "개발(릴리스 소스) 브랜치",
73
73
  "options.devBranch.chosen": "개발(릴리스 소스) 브랜치: {value}",
74
+ "options.deployBranch.intro": "배포(스토어 업로드, 서버 배포)를 실행할 브랜치는 무엇인가요?",
75
+ "options.deployBranch.roles": " 기본 브랜치 '{base}': 버전 올림과 릴리스 노트가 여기에 쌓입니다. 배포 브랜치: 여기에 push되면 배포 워크플로가 실행됩니다.",
76
+ "options.deployBranch.why": " 지금처럼 기본 브랜치에서 배포하려면 '{base}' 그대로 두세요. 별도 브랜치(예: deploy)를 두면 기본 브랜치에 쌓이는 CI 버전·체인지로그 커밋과 배포가 분리됩니다.",
77
+ "options.deployBranch.prompt": "배포 브랜치",
78
+ "options.deployBranch.chosen": "배포 브랜치: {value}",
79
+ "options.deployBranch.chosenDefault": "배포 브랜치: {base} (기본 브랜치, 별도 배포 브랜치 없음)",
80
+ "options.deployBranch.missing": "배포 브랜치 '{branch}'가 아직 없습니다. 브랜치가 생기면 배포 워크플로가 그 브랜치에서 실행되고, 처음 push할 때 배포(스토어 업로드, 서버 배포)가 실행됩니다.",
74
81
  "options.secret.short": "Secret 서버 백업",
75
82
  "options.secret.desc": "GitHub Secret에 저장한 설정 파일을 SSH로 서버에 업로드·이력관리하는 워크플로우입니다.",
76
83
  "paths.multi": "멀티타입 프로젝트가 감지되었습니다. 총 {total}개 타입",
@@ -33,6 +33,19 @@ export default {
33
33
  "done.notInstalled.deleted-by-user": "you deleted it earlier",
34
34
  "done.notInstalled.no-dev-branch": "only runs on {branch}, which this repo does not have",
35
35
  "done.notInstalledHint": "To install one anyway, copy the file shown above. To stop being told, add it to options.excluded_workflows in version.yml.",
36
+ // #1248 typed branch values
37
+ "done.branchSyncedTitle": "Applied the branch settings to {count} workflow(s) you had modified: only branch names differed (originals saved as .bak)",
38
+ "done.branchNotAppliedTitle": "{count} typed branch value(s) were not applied",
39
+ "done.branchKind.development": "Development branch '{branch}'",
40
+ "done.branchKind.deploy-trigger": "Deploy branch '{branch}'",
41
+ "done.branchKind.workflow-files": "Branch setting ({branch})",
42
+ "done.branchReason.version-yml-missing": "not recorded: this repo has no version.yml. Run --mode version (or full) first, then run again.",
43
+ "done.branchReason.missing-on-remote": "does not exist on origin yet. Workflows that run on it wait until you create and push it.",
44
+ "done.branchReason.not-pushed": "exists only locally. Push it so the workflows can run on it: git push -u origin {branch}",
45
+ "done.branchReason.kept-user-modified": "not applied in workflows you modified (they still name the old branch). Merge the incoming copy shown above:",
46
+ "done.branchFilesSkipped": "not installed because the branch is missing:",
47
+ "done.branchDeployWarn": "The first push to the deploy branch runs the deploy workflows (store upload, server deploy). Create it when you are ready to deploy.",
48
+ "done.branchCreateHint": "Create it from the default branch: git branch {branch} {base} && git push -u origin {branch}",
36
49
  "done.legacyTitle": "{count} retired workflow(s) are still installed and run alongside their replacements",
37
50
  "done.legacyHint": "Delete them once the new workflow works, or rerun with --remove-legacy to rename them to .bak.",
38
51
  "done.replacedHint": "If you had edits, copy them over from the .bak files. (The update baseline is recorded by this run.)",
@@ -33,6 +33,19 @@ export default {
33
33
  "done.notInstalled.deleted-by-user": "예전에 직접 지운 파일",
34
34
  "done.notInstalled.no-dev-branch": "{branch} 브랜치에서만 실행되는데 이 레포에는 그 브랜치가 없음",
35
35
  "done.notInstalledHint": "그래도 쓰려면 위에 적힌 파일을 복사하세요. 안내를 그만 보려면 version.yml 의 options.excluded_workflows 에 추가하세요.",
36
+ // #1248 입력한 브랜치 값
37
+ "done.branchSyncedTitle": "직접 수정한 워크플로 {count}개에 브랜치 설정을 반영했습니다: 브랜치 이름만 달랐습니다 (원본은 .bak 으로 백업)",
38
+ "done.branchNotAppliedTitle": "입력한 브랜치 값 {count}개를 반영하지 못했습니다",
39
+ "done.branchKind.development": "개발 브랜치 '{branch}'",
40
+ "done.branchKind.deploy-trigger": "배포 브랜치 '{branch}'",
41
+ "done.branchKind.workflow-files": "브랜치 설정 ({branch})",
42
+ "done.branchReason.version-yml-missing": "기록하지 못함: 이 레포에 version.yml 이 없습니다. --mode version (또는 full) 을 먼저 실행한 뒤 다시 실행하세요.",
43
+ "done.branchReason.missing-on-remote": "origin 에 아직 없습니다. 이 브랜치에서 도는 워크플로는 브랜치를 만들어 push할 때까지 실행되지 않습니다.",
44
+ "done.branchReason.not-pushed": "로컬에만 있습니다. 워크플로가 돌 수 있게 push하세요: git push -u origin {branch}",
45
+ "done.branchReason.kept-user-modified": "직접 수정한 워크플로에는 반영하지 못했습니다 (아직 이전 브랜치 이름). 위에 안내한 새 템플릿 사본과 합치세요:",
46
+ "done.branchFilesSkipped": "브랜치가 없어 설치하지 않은 워크플로:",
47
+ "done.branchDeployWarn": "배포 브랜치에 처음 push하면 배포 워크플로(스토어 업로드, 서버 배포)가 실행됩니다. 배포할 준비가 됐을 때 만드세요.",
48
+ "done.branchCreateHint": "기본 브랜치에서 만들기: git branch {branch} {base} && git push -u origin {branch}",
36
49
  "done.legacyTitle": "은퇴한 구세대 워크플로우 {count}개가 남아 신형과 함께 실행됩니다",
37
50
  "done.legacyHint": "신형이 동작하는 걸 확인한 뒤 지우거나, --remove-legacy 로 다시 실행하면 .bak 으로 치웁니다.",
38
51
  "done.replacedHint": "직접 수정한 내용이 있었다면 .bak 에서 옮겨 오세요. (업데이트 기준점은 이번 실행으로 새로 기록됩니다)",
package/src/index.js CHANGED
@@ -23,6 +23,7 @@ import { resolveProjectPaths, markerForType } from "./core/paths-resolve.js";
23
23
  import { resolveOptions } from "./core/resolve-options.js";
24
24
  import { detectStoreLocalesHint } from "./core/store-locales-hint.js";
25
25
  import { runDevelopmentBranchStep } from "./core/development-branch.js";
26
+ import { listUnappliedBranchValues } from "./core/branch-report.js";
26
27
  import { printBannerCompact } from "./ui/banner.js";
27
28
  import { printSummary } from "./ui/summary.js";
28
29
  import { runFull } from "./commands/full.js";
@@ -240,6 +241,7 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
240
241
  changelogProvider: context.changelogProvider,
241
242
  coderabbit: context.codeReviewCoderabbit,
242
243
  deployBranch: context.deployBranch || "(not given, falls back to develop)",
244
+ deployTriggerBranch: context.deployTriggerBranch || "(not given, the default branch)",
243
245
  recordMode: context.recordMode,
244
246
  });
245
247
  trace.event("resolve", "semver-auto", String(context.semverAuto), {
@@ -317,6 +319,11 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
317
319
  say: (line) => console.error(line),
318
320
  });
319
321
  const isDevelopmentBranchReady = developmentBranchResult ? developmentBranchResult.status !== "failed" : null;
322
+ // Typed branch values not applied (#1248) — after branch creation, so a branch created just now is not reported
323
+ const unappliedBranches = recordArtifacts ? listUnappliedBranchValues({
324
+ targetRoot: cwd, defaultBranch: branch, deployBranch: context.deployBranch, deployTriggerBranch: context.deployTriggerBranch,
325
+ workflowsResult: result?.workflows, isBranchRecorded: result?.isBranchRecorded !== false, isNonInteractive: true, trace,
326
+ }) : [];
320
327
 
321
328
  // Migration record (#493/#494) — Layer 2/3 trace files + Layer 1 guide entry
322
329
  let migrationGuidePath = null;
@@ -349,6 +356,8 @@ async function runCore(argv, { cwd = process.cwd(), source = { type: "git" }, cl
349
356
  replacedBak: result?.workflows?.replacedBak ?? [], // #673 notice for files replaced without a reference point
350
357
  legacyLeftover: migrationsResult?.confirmPending ?? [], // #809 notice for old and new generations running together
351
358
  notInstalled: result?.workflows?.notInstalled ?? [], // #810 notice for workflows not installed
359
+ branchSynced: result?.workflows?.branchSynced ?? [], // #1248 kept files applied (branch-only diff)
360
+ unappliedBranches, defaultBranch: branch, // #1248 typed branch values not applied
352
361
  semverAutoNewlyOn: sources.semverAutoNewlyOn && context.semverAuto === true, // Notice that the update turned it on
353
362
  storeLocalesHint, // #843 multi-language store notice
354
363
  verification: result?.verification, // #549 post-install verification result (only in full/workflows modes)
package/src/ui/prompts.js CHANGED
@@ -3,6 +3,7 @@
3
3
  // Cancel (ESC/Ctrl+C) makes each function return the CANCEL symbol → the caller exits normally (exit 0).
4
4
  import * as engine from "./readline-engine.js";
5
5
  import { t } from "../i18n/index.js";
6
+ import { VALID_TYPES } from "../core/project-types.js";
6
7
 
7
8
  export const CANCEL = engine.CANCEL;
8
9
 
@@ -65,7 +66,7 @@ export async function editMenu({ showOptional = false, axes = null } = {}) {
65
66
 
66
67
  // Type multiselect.
67
68
  export async function selectTypes(current = []) {
68
- const all = ["spring", "flutter", "react", "react-native", "react-native-expo", "node", "python", "basic"];
69
+ const all = VALID_TYPES;
69
70
  return engine.multiselect({
70
71
  message: t("types.prompt"),
71
72
  options: all.map((t) => ({ value: t, label: t })),
package/src/ui/summary.js CHANGED
@@ -147,6 +147,22 @@ export function printSummary(ctx, targetRoot = ".", write = null) {
147
147
  err(` ${t("done.notInstalledHint")}`);
148
148
  }
149
149
 
150
+ // Kept user-modified workflows that differed only in branch names were applied (#1248).
151
+ const branchSynced = ctx?.branchSynced ?? [];
152
+ if (branchSynced.length > 0) {
153
+ err("");
154
+ err(` ${CYAN}ℹ️ ${t("done.branchSyncedTitle", { count: branchSynced.length })}${NC}`);
155
+ for (const f of branchSynced) err(` 🔀 .github/workflows/${f} (.bak)`);
156
+ }
157
+
158
+ // Typed branch values this run could not apply, with the reason (#1248) — never keep the old branch silently.
159
+ const unappliedBranches = ctx?.unappliedBranches ?? [];
160
+ if (unappliedBranches.length > 0) {
161
+ err("");
162
+ err(` ${YELLOW}⚠️ ${t("done.branchNotAppliedTitle", { count: unappliedBranches.length })}${NC}`);
163
+ for (const entry of unappliedBranches) printUnappliedBranch(entry, ctx?.defaultBranch || "main", err);
164
+ }
165
+
150
166
  // Retired old-generation workflows still installed: they run next to their replacements (#809).
151
167
  const legacy = ctx?.legacyLeftover ?? [];
152
168
  if (legacy.length > 0) {
@@ -327,3 +343,17 @@ export function printSummary(ctx, targetRoot = ".", write = null) {
327
343
  err("");
328
344
  }
329
345
  }
346
+
347
+ /**
348
+ * One unapplied branch entry: kind + reason > files > next step (create command, deploy warning)
349
+ */
350
+ function printUnappliedBranch(entry, defaultBranch, err) {
351
+ const { kind, branch, reason, files = [] } = entry;
352
+ err(` ⏭️ ${t(`done.branchKind.${kind}`, { branch })}: ${t(`done.branchReason.${reason}`, { branch })}`);
353
+ if (reason === "missing-on-remote" && files.length) err(` ${t("done.branchFilesSkipped")}`);
354
+ for (const f of files) err(` • ${f}`);
355
+ if (reason === "missing-on-remote") {
356
+ err(` ${t("done.branchCreateHint", { branch, base: defaultBranch })}`);
357
+ if (kind === "deploy-trigger") err(` ${t("done.branchDeployWarn")}`);
358
+ }
359
+ }