@yoonion/mimi-seed-mcp 0.23.4 → 0.25.0

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 (288) hide show
  1. package/dist/admob/cli.js +34 -5
  2. package/dist/admob/errors.js +39 -14
  3. package/dist/ai/client.js +35 -14
  4. package/dist/ai/notes.js +14 -3
  5. package/dist/ai/review.js +17 -4
  6. package/dist/android/keystore-store.js +28 -8
  7. package/dist/android/keystore.d.ts +17 -2
  8. package/dist/android/keystore.js +110 -21
  9. package/dist/android/messages.d.ts +13 -11
  10. package/dist/android/messages.js +166 -72
  11. package/dist/android/playstore-sa.js +6 -3
  12. package/dist/appstore/analytics.js +46 -14
  13. package/dist/appstore/app-info-policy.js +7 -1
  14. package/dist/appstore/app-info.js +13 -3
  15. package/dist/appstore/apps.js +7 -1
  16. package/dist/appstore/asset-library-write.js +119 -37
  17. package/dist/appstore/asset-library.js +19 -5
  18. package/dist/appstore/auth.d.ts +2 -0
  19. package/dist/appstore/auth.js +31 -5
  20. package/dist/appstore/client.js +27 -6
  21. package/dist/appstore/declarations.js +22 -6
  22. package/dist/appstore/errors.d.ts +1 -1
  23. package/dist/appstore/errors.js +60 -34
  24. package/dist/appstore/http.d.ts +6 -0
  25. package/dist/appstore/http.js +22 -5
  26. package/dist/appstore/messages.js +86 -28
  27. package/dist/appstore/previews.js +22 -6
  28. package/dist/appstore/product-localization.js +10 -2
  29. package/dist/appstore/product-review.js +29 -10
  30. package/dist/appstore/products.js +20 -6
  31. package/dist/appstore/read-response.js +13 -3
  32. package/dist/appstore/release-target.js +13 -3
  33. package/dist/appstore/release.js +59 -22
  34. package/dist/appstore/review-preview.js +17 -6
  35. package/dist/appstore/review-submission.js +86 -35
  36. package/dist/appstore/sales.js +96 -44
  37. package/dist/appstore/screenshots.js +19 -5
  38. package/dist/appstore/testflight.js +41 -18
  39. package/dist/appstore/upload-parts.js +12 -3
  40. package/dist/appstore/versions.js +22 -10
  41. package/dist/auth/bigquery-auth.js +44 -15
  42. package/dist/auth/bigquery-setup-cli.js +1 -1
  43. package/dist/auth/cli.js +4 -2
  44. package/dist/auth/constants.js +13 -3
  45. package/dist/auth/drive-auth.d.ts +3 -2
  46. package/dist/auth/drive-auth.js +47 -17
  47. package/dist/auth/drive-setup-cli.js +1 -0
  48. package/dist/auth/errors.d.ts +75 -0
  49. package/dist/auth/errors.js +190 -86
  50. package/dist/auth/google-auth.d.ts +3 -1
  51. package/dist/auth/google-auth.js +39 -27
  52. package/dist/auth/playstore-auth.d.ts +1 -0
  53. package/dist/auth/playstore-auth.js +35 -15
  54. package/dist/auth/scopes.d.ts +18 -28
  55. package/dist/auth/scopes.js +53 -14
  56. package/dist/auth/youtube-channel.d.ts +8 -0
  57. package/dist/auth/youtube-channel.js +11 -3
  58. package/dist/bigquery/ids.js +19 -5
  59. package/dist/bigquery/tools.js +24 -8
  60. package/dist/billing/tools.js +22 -6
  61. package/dist/checks/appstore-submission.d.ts +1 -1
  62. package/dist/checks/appstore-submission.js +29 -8
  63. package/dist/checks/plan.js +169 -62
  64. package/dist/checks/release-status.js +10 -2
  65. package/dist/checks/risks.js +230 -63
  66. package/dist/checks/screenshots.d.ts +4 -4
  67. package/dist/checks/screenshots.js +63 -22
  68. package/dist/ci/config.js +8 -5
  69. package/dist/ci/gitlab.js +3 -1
  70. package/dist/core/atomic-write.d.ts +5 -2
  71. package/dist/core/atomic-write.js +8 -4
  72. package/dist/core/catch-scan.d.ts +17 -0
  73. package/dist/core/catch-scan.js +111 -0
  74. package/dist/core/checks/billing.d.ts +5 -0
  75. package/dist/core/checks/billing.js +36 -5
  76. package/dist/core/checks/lockfile.js +2 -0
  77. package/dist/core/checks/release-doctor/fcm.js +1 -0
  78. package/dist/core/checks/release-doctor/files.d.ts +3 -1
  79. package/dist/core/checks/release-doctor/files.js +12 -1
  80. package/dist/core/checks/release-doctor/gradle-apply.js +1 -0
  81. package/dist/core/checks/release-doctor/ios-xcode.js +22 -3
  82. package/dist/core/checks/release-doctor/target-sdk.js +1 -1
  83. package/dist/core/checks/release-doctor/util.d.ts +5 -0
  84. package/dist/core/checks/release-doctor/util.js +56 -0
  85. package/dist/core/checks/release-doctor.js +59 -16
  86. package/dist/core/credential-envelope.d.ts +25 -0
  87. package/dist/core/credential-envelope.js +66 -0
  88. package/dist/core/credential-keystore.d.ts +37 -0
  89. package/dist/core/credential-keystore.js +275 -0
  90. package/dist/core/credential-read.d.ts +33 -0
  91. package/dist/core/credential-read.js +112 -0
  92. package/dist/core/credential-store.d.ts +61 -0
  93. package/dist/core/credential-store.js +240 -0
  94. package/dist/core/http-errors.js +1 -0
  95. package/dist/core/i18n-scan.d.ts +10 -0
  96. package/dist/core/i18n-scan.js +79 -0
  97. package/dist/core/json-file.d.ts +30 -0
  98. package/dist/core/json-file.js +53 -0
  99. package/dist/core/lang.d.ts +14 -0
  100. package/dist/core/lang.js +22 -2
  101. package/dist/core/project-manifest.d.ts +24 -1
  102. package/dist/core/project-manifest.js +27 -16
  103. package/dist/drive/tools.js +86 -34
  104. package/dist/facebook/api.js +3 -1
  105. package/dist/facebook/config.js +11 -3
  106. package/dist/facebook/setup.d.ts +2 -0
  107. package/dist/facebook/setup.js +32 -9
  108. package/dist/firebase/cli.js +39 -5
  109. package/dist/firebase/tools.js +36 -10
  110. package/dist/ga4/cli.js +48 -4
  111. package/dist/ga4/tools.js +4 -2
  112. package/dist/googleads/config.js +24 -8
  113. package/dist/googleads/tools.js +3 -1
  114. package/dist/gsc/tools.d.ts +116 -9
  115. package/dist/gsc/tools.js +101 -17
  116. package/dist/helpers.d.ts +4 -2
  117. package/dist/helpers.js +82 -44
  118. package/dist/i18n/manifest-en.d.ts +6 -0
  119. package/dist/i18n/manifest-en.js +53 -0
  120. package/dist/i18n/tools-en/admob.d.ts +25 -0
  121. package/dist/i18n/tools-en/admob.js +24 -0
  122. package/dist/i18n/tools-en/ai.d.ts +14 -0
  123. package/dist/i18n/tools-en/ai.js +13 -0
  124. package/dist/i18n/tools-en/android.d.ts +14 -0
  125. package/dist/i18n/tools-en/android.js +13 -0
  126. package/dist/i18n/tools-en/appstore.d.ts +240 -0
  127. package/dist/i18n/tools-en/appstore.js +239 -0
  128. package/dist/i18n/tools-en/auth.d.ts +16 -0
  129. package/dist/i18n/tools-en/auth.js +15 -0
  130. package/dist/i18n/tools-en/bigquery.d.ts +16 -0
  131. package/dist/i18n/tools-en/bigquery.js +15 -0
  132. package/dist/i18n/tools-en/billing.d.ts +17 -0
  133. package/dist/i18n/tools-en/billing.js +16 -0
  134. package/dist/i18n/tools-en/checks.d.ts +23 -0
  135. package/dist/i18n/tools-en/checks.js +22 -0
  136. package/dist/i18n/tools-en/ci.d.ts +21 -0
  137. package/dist/i18n/tools-en/ci.js +20 -0
  138. package/dist/i18n/tools-en/drive.d.ts +33 -0
  139. package/dist/i18n/tools-en/drive.js +32 -0
  140. package/dist/i18n/tools-en/facebook.d.ts +14 -0
  141. package/dist/i18n/tools-en/facebook.js +13 -0
  142. package/dist/i18n/tools-en/firebase.d.ts +42 -0
  143. package/dist/i18n/tools-en/firebase.js +41 -0
  144. package/dist/i18n/tools-en/ga4.d.ts +35 -0
  145. package/dist/i18n/tools-en/ga4.js +34 -0
  146. package/dist/i18n/tools-en/googleads.d.ts +15 -0
  147. package/dist/i18n/tools-en/googleads.js +14 -0
  148. package/dist/i18n/tools-en/gsc.d.ts +27 -0
  149. package/dist/i18n/tools-en/gsc.js +26 -0
  150. package/dist/i18n/tools-en/iam.d.ts +15 -0
  151. package/dist/i18n/tools-en/iam.js +14 -0
  152. package/dist/i18n/tools-en/index.d.ts +7 -0
  153. package/dist/i18n/tools-en/index.js +58 -0
  154. package/dist/i18n/tools-en/instagram.d.ts +16 -0
  155. package/dist/i18n/tools-en/instagram.js +15 -0
  156. package/dist/i18n/tools-en/jenkins.d.ts +41 -0
  157. package/dist/i18n/tools-en/jenkins.js +40 -0
  158. package/dist/i18n/tools-en/naver.d.ts +10 -0
  159. package/dist/i18n/tools-en/naver.js +9 -0
  160. package/dist/i18n/tools-en/playstore.d.ts +148 -0
  161. package/dist/i18n/tools-en/playstore.js +147 -0
  162. package/dist/i18n/tools-en/registrar.d.ts +6 -0
  163. package/dist/i18n/tools-en/registrar.js +6 -0
  164. package/dist/i18n/tools-en/threads.d.ts +21 -0
  165. package/dist/i18n/tools-en/threads.js +20 -0
  166. package/dist/i18n/tools-en/tiktok.d.ts +21 -0
  167. package/dist/i18n/tools-en/tiktok.js +20 -0
  168. package/dist/i18n/tools-en/video.d.ts +59 -0
  169. package/dist/i18n/tools-en/video.js +58 -0
  170. package/dist/i18n/tools-en/youtube.d.ts +44 -0
  171. package/dist/i18n/tools-en/youtube.js +43 -0
  172. package/dist/iam/key-files.js +13 -3
  173. package/dist/instagram/api.js +19 -5
  174. package/dist/instagram/config.js +11 -3
  175. package/dist/instagram/setup.js +37 -11
  176. package/dist/jenkins/builds.d.ts +2 -2
  177. package/dist/jenkins/builds.js +70 -30
  178. package/dist/jenkins/config.d.ts +5 -0
  179. package/dist/jenkins/config.js +25 -6
  180. package/dist/jenkins/credentials.js +33 -13
  181. package/dist/jenkins/http.js +6 -3
  182. package/dist/jenkins/jobs.js +19 -5
  183. package/dist/jenkins/messages.js +93 -36
  184. package/dist/lib/cli-args.js +13 -7
  185. package/dist/lib/google-errors.js +31 -9
  186. package/dist/lib/http.js +10 -3
  187. package/dist/lib/json-file.d.ts +15 -0
  188. package/dist/lib/json-file.js +65 -0
  189. package/dist/lib/meta-auth.d.ts +1 -1
  190. package/dist/lib/meta-auth.js +26 -8
  191. package/dist/lib/package-name.js +15 -4
  192. package/dist/lib/package-root.js +1 -1
  193. package/dist/lib/paginate.js +10 -2
  194. package/dist/lib/path-containment.js +22 -6
  195. package/dist/lib/resource-id.js +10 -3
  196. package/dist/lib/store-create-result.js +54 -13
  197. package/dist/lib/text-validators.js +20 -5
  198. package/dist/lib/tool-registrar.d.ts +9 -0
  199. package/dist/lib/tool-registrar.js +33 -14
  200. package/dist/lib/tool-text.d.ts +31 -0
  201. package/dist/lib/tool-text.js +52 -0
  202. package/dist/lib/toolsets.js +13 -3
  203. package/dist/lib/url-path.js +3 -1
  204. package/dist/naver/tools.js +138 -46
  205. package/dist/playstore/data-safety.js +16 -4
  206. package/dist/playstore/errors.js +33 -8
  207. package/dist/playstore/financials.js +83 -35
  208. package/dist/playstore/listing.js +7 -1
  209. package/dist/playstore/messages.js +179 -57
  210. package/dist/playstore/products.js +10 -2
  211. package/dist/playstore/recovery.js +10 -2
  212. package/dist/playstore/releases.js +34 -14
  213. package/dist/playstore/reviews.js +14 -4
  214. package/dist/playstore/statistics.js +3 -1
  215. package/dist/prompts.js +160 -50
  216. package/dist/registers/admob.js +36 -11
  217. package/dist/registers/android.js +25 -9
  218. package/dist/registers/appstore/apps.js +22 -6
  219. package/dist/registers/appstore/customer-reviews.js +7 -1
  220. package/dist/registers/appstore/declarations.js +63 -19
  221. package/dist/registers/appstore/media.js +76 -24
  222. package/dist/registers/appstore/metadata.js +26 -8
  223. package/dist/registers/appstore/products.js +53 -19
  224. package/dist/registers/appstore/review-submission.js +31 -9
  225. package/dist/registers/appstore/testflight.js +82 -24
  226. package/dist/registers/appstore/versions.js +88 -30
  227. package/dist/registers/auth.js +343 -90
  228. package/dist/registers/bigquery.js +54 -14
  229. package/dist/registers/billing.js +18 -4
  230. package/dist/registers/checks.js +20 -5
  231. package/dist/registers/ci.js +60 -20
  232. package/dist/registers/drive.js +18 -7
  233. package/dist/registers/facebook.js +31 -9
  234. package/dist/registers/firebase.js +21 -7
  235. package/dist/registers/googleads.js +23 -6
  236. package/dist/registers/gsc.js +42 -39
  237. package/dist/registers/iam.js +44 -13
  238. package/dist/registers/instagram.js +19 -5
  239. package/dist/registers/jenkins.js +43 -14
  240. package/dist/registers/naver.js +13 -3
  241. package/dist/registers/playstore/financials.d.ts +6 -0
  242. package/dist/registers/playstore/financials.js +48 -0
  243. package/dist/registers/playstore/listing.d.ts +15 -0
  244. package/dist/registers/playstore/listing.js +138 -0
  245. package/dist/registers/playstore/media.d.ts +6 -0
  246. package/dist/registers/playstore/media.js +56 -0
  247. package/dist/registers/playstore/products.d.ts +21 -0
  248. package/dist/registers/playstore/products.js +238 -0
  249. package/dist/registers/playstore/recovery.d.ts +11 -0
  250. package/dist/registers/playstore/recovery.js +105 -0
  251. package/dist/registers/playstore/releases.d.ts +8 -0
  252. package/dist/registers/playstore/releases.js +157 -0
  253. package/dist/registers/playstore/reviews.d.ts +6 -0
  254. package/dist/registers/playstore/reviews.js +43 -0
  255. package/dist/registers/playstore/service-accounts.d.ts +13 -0
  256. package/dist/registers/playstore/service-accounts.js +127 -0
  257. package/dist/registers/playstore/shared.d.ts +12 -0
  258. package/dist/registers/playstore/shared.js +24 -0
  259. package/dist/registers/playstore.d.ts +8 -0
  260. package/dist/registers/playstore.js +28 -734
  261. package/dist/registers/threads.js +28 -8
  262. package/dist/registers/tiktok.js +4 -2
  263. package/dist/registers/video.js +3 -1
  264. package/dist/remote-sync.js +80 -28
  265. package/dist/resources.d.ts +0 -8
  266. package/dist/resources.js +73 -32
  267. package/dist/server.d.ts +2 -0
  268. package/dist/server.js +9 -1
  269. package/dist/social/profile-store.js +36 -12
  270. package/dist/social/setup-cli.js +1 -1
  271. package/dist/threads/api.js +23 -6
  272. package/dist/threads/setup.js +42 -14
  273. package/dist/tiktok-business/api.js +13 -3
  274. package/dist/tiktok-business/auth.js +10 -2
  275. package/dist/tiktok-business/config.js +8 -3
  276. package/dist/tiktok-business/posting.d.ts +6 -0
  277. package/dist/tiktok-business/posting.js +118 -36
  278. package/dist/tiktok-business/setup-cli.js +3 -1
  279. package/dist/tools-cli.js +4 -5
  280. package/dist/video/captions.js +3 -1
  281. package/dist/video/files.js +13 -3
  282. package/dist/video/project.js +65 -21
  283. package/dist/video/providers.js +52 -16
  284. package/dist/video/render.js +71 -22
  285. package/dist/video/research.js +10 -2
  286. package/dist/video/schemas.js +19 -5
  287. package/dist/video/youtube-publish.js +62 -32
  288. package/package.json +1 -1
@@ -1,5 +1,46 @@
1
1
  import fs from 'node:fs';
2
2
  import path from 'node:path';
3
+ import { catalog } from '#core/lang.js';
4
+ /** Labels and issues returned by screenshot_validate. Spec labels are getters so they read the language at call time. */
5
+ const S = catalog({
6
+ ipadPro129Gen3: 'iPad Pro 12.9" (3세대+)',
7
+ ipadPro129Gen2: 'iPad Pro 12.9" (2세대)',
8
+ phone: '전화 스크린샷',
9
+ sevenInch: '7인치 태블릿 스크린샷',
10
+ tenInch: '10인치 태블릿 스크린샷',
11
+ featureGraphic: '특성 그래픽',
12
+ missing: '파일 없음',
13
+ unreadable: 'PNG/JPEG가 아니거나 읽기 실패',
14
+ appTooLarge: (maxMb) => `파일 크기 초과 (최대 ${maxMb}MB)`,
15
+ resolutionMismatch: (label, expected, actual) => `해상도 불일치 (${label}): 필요 ${expected}, 현재 ${actual}`,
16
+ unknownResolution: (actual) => `알 수 없는 해상도 ${actual} — Apple 스펙과 일치하지 않음`,
17
+ over50mb: '파일 크기 50MB 초과',
18
+ unknownImageType: (imageType, valid) => `알 수 없는 imageType: ${imageType}. 유효값: ${valid}`,
19
+ playTooLarge: (sizeMb, maxMb) => `파일 크기 초과: ${sizeMb}MB (최대 ${maxMb}MB)`,
20
+ widthOut: (w, min, max) => `너비 범위 초과: ${w}px (${min}~${max}px 필요)`,
21
+ heightOut: (h, min, max) => `높이 범위 초과: ${h}px (${min}~${max}px 필요)`,
22
+ aspectOut: (ar, min, max) => `종횡비 범위 초과: ${ar} (${min}~${max} 필요)`,
23
+ summary: (platform, passed, total) => `📐 ${platform} 스크린샷 검증: ${passed}/${total} 통과\n`,
24
+ }, {
25
+ ipadPro129Gen3: 'iPad Pro 12.9" (3rd gen+)',
26
+ ipadPro129Gen2: 'iPad Pro 12.9" (2nd gen)',
27
+ phone: 'Phone screenshots',
28
+ sevenInch: '7-inch tablet screenshots',
29
+ tenInch: '10-inch tablet screenshots',
30
+ featureGraphic: 'Feature graphic',
31
+ missing: 'File not found',
32
+ unreadable: 'Not a PNG/JPEG, or failed to read',
33
+ appTooLarge: (maxMb) => `File size exceeded (max ${maxMb}MB)`,
34
+ resolutionMismatch: (label, expected, actual) => `Resolution mismatch (${label}): required ${expected}, actual ${actual}`,
35
+ unknownResolution: (actual) => `Unknown resolution ${actual} — does not match any Apple spec`,
36
+ over50mb: 'File size over 50MB',
37
+ unknownImageType: (imageType, valid) => `Unknown imageType: ${imageType}. Valid values: ${valid}`,
38
+ playTooLarge: (sizeMb, maxMb) => `File size exceeded: ${sizeMb}MB (max ${maxMb}MB)`,
39
+ widthOut: (w, min, max) => `Width out of range: ${w}px (${min}~${max}px required)`,
40
+ heightOut: (h, min, max) => `Height out of range: ${h}px (${min}~${max}px required)`,
41
+ aspectOut: (ar, min, max) => `Aspect ratio out of range: ${ar} (${min}~${max} required)`,
42
+ summary: (platform, passed, total) => `📐 ${platform} screenshot validation: ${passed}/${total} passed\n`,
43
+ });
3
44
  export const APPSTORE_SPECS = {
4
45
  'APP_IPHONE_69': { label: 'iPhone 6.9"', width: 1320, height: 2868, maxBytes: 50 * 1024 * 1024 },
5
46
  'APP_IPHONE_67': { label: 'iPhone 6.7"', width: 1290, height: 2796, maxBytes: 50 * 1024 * 1024 },
@@ -7,16 +48,16 @@ export const APPSTORE_SPECS = {
7
48
  'APP_IPHONE_61': { label: 'iPhone 6.1"', width: 1170, height: 2532, maxBytes: 50 * 1024 * 1024 },
8
49
  'APP_IPHONE_58': { label: 'iPhone 5.8"', width: 1125, height: 2436, maxBytes: 50 * 1024 * 1024 },
9
50
  'APP_IPHONE_55': { label: 'iPhone 5.5"', width: 1242, height: 2208, maxBytes: 50 * 1024 * 1024 },
10
- 'APP_IPAD_PRO_3GEN_129': { label: 'iPad Pro 12.9" (3세대+)', width: 2064, height: 2752, maxBytes: 50 * 1024 * 1024 },
51
+ 'APP_IPAD_PRO_3GEN_129': { get label() { return S().ipadPro129Gen3; }, width: 2064, height: 2752, maxBytes: 50 * 1024 * 1024 },
11
52
  'APP_IPAD_PRO_3GEN_11': { label: 'iPad Pro 11"', width: 1668, height: 2388, maxBytes: 50 * 1024 * 1024 },
12
- 'APP_IPAD_PRO_129': { label: 'iPad Pro 12.9" (2세대)', width: 2048, height: 2732, maxBytes: 50 * 1024 * 1024 },
53
+ 'APP_IPAD_PRO_129': { get label() { return S().ipadPro129Gen2; }, width: 2048, height: 2732, maxBytes: 50 * 1024 * 1024 },
13
54
  'APP_DESKTOP': { label: 'Mac', minWidth: 1280, maxWidth: 2560, minHeight: 800, maxHeight: 1600, width: 1440, height: 900, maxBytes: 50 * 1024 * 1024 },
14
55
  };
15
56
  export const PLAYSTORE_SPECS = {
16
- phoneScreenshots: { label: '전화 스크린샷', minWidth: 320, maxWidth: 3840, minHeight: 320, maxHeight: 3840, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
17
- sevenInchScreenshots: { label: '7인치 태블릿 스크린샷', minWidth: 320, maxWidth: 3840, minHeight: 320, maxHeight: 3840, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
18
- tenInchScreenshots: { label: '10인치 태블릿 스크린샷', minWidth: 1080, maxWidth: 7680, minHeight: 1080, maxHeight: 7680, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
19
- featureGraphic: { label: '특성 그래픽', minWidth: 1024, maxWidth: 1024, minHeight: 500, maxHeight: 500, minAspect: 2.048, maxAspect: 2.048, maxBytes: 1024 * 1024 },
57
+ phoneScreenshots: { get label() { return S().phone; }, minWidth: 320, maxWidth: 3840, minHeight: 320, maxHeight: 3840, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
58
+ sevenInchScreenshots: { get label() { return S().sevenInch; }, minWidth: 320, maxWidth: 3840, minHeight: 320, maxHeight: 3840, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
59
+ tenInchScreenshots: { get label() { return S().tenInch; }, minWidth: 1080, maxWidth: 7680, minHeight: 1080, maxHeight: 7680, minAspect: 0.5, maxAspect: 2.0, maxBytes: 8 * 1024 * 1024 },
60
+ featureGraphic: { get label() { return S().featureGraphic; }, minWidth: 1024, maxWidth: 1024, minHeight: 500, maxHeight: 500, minAspect: 2.048, maxAspect: 2.048, maxBytes: 1024 * 1024 },
20
61
  };
21
62
  const PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47];
22
63
  function readPngDimensions(filePath) {
@@ -31,7 +72,7 @@ function readPngDimensions(filePath) {
31
72
  }
32
73
  catch {
33
74
  return null;
34
- }
75
+ } // 치수를 못 읽으면 null — 호출자가 valid:false(unreadable)로 보고하므로 통과로 새지 않는다
35
76
  }
36
77
  function readJpegDimensions(filePath) {
37
78
  try {
@@ -58,7 +99,7 @@ function readJpegDimensions(filePath) {
58
99
  }
59
100
  catch {
60
101
  return null;
61
- }
102
+ } // 치수를 못 읽으면 null — 호출자가 valid:false(unreadable)로 보고하므로 통과로 새지 않는다
62
103
  }
63
104
  function getImageDimensions(filePath) {
64
105
  const ext = path.extname(filePath).toLowerCase();
@@ -73,24 +114,24 @@ export function validateAppStoreScreenshots(filePaths, expectedDisplayType) {
73
114
  const fileName = path.basename(filePath);
74
115
  const issues = [];
75
116
  if (!fs.existsSync(filePath)) {
76
- return { filePath, fileName, valid: false, issues: ['파일 없음'], info: { sizeBytes: 0 } };
117
+ return { filePath, fileName, valid: false, issues: [S().missing], info: { sizeBytes: 0 } };
77
118
  }
78
119
  const sizeBytes = fs.statSync(filePath).size;
79
120
  const dims = getImageDimensions(filePath);
80
121
  const info = { sizeBytes, detectedWidth: dims?.width, detectedHeight: dims?.height };
81
122
  if (!dims) {
82
- return { filePath, fileName, valid: false, issues: ['PNG/JPEG가 아니거나 읽기 실패'], info };
123
+ return { filePath, fileName, valid: false, issues: [S().unreadable], info };
83
124
  }
84
125
  let matchedSpec;
85
126
  if (expectedDisplayType && APPSTORE_SPECS[expectedDisplayType]) {
86
127
  const spec = APPSTORE_SPECS[expectedDisplayType];
87
128
  if (sizeBytes > spec.maxBytes)
88
- issues.push(`파일 크기 초과 (최대 ${spec.maxBytes / 1024 / 1024 | 0}MB)`);
129
+ issues.push(S().appTooLarge(spec.maxBytes / 1024 / 1024 | 0));
89
130
  const wOk = spec.minWidth ? dims.width >= spec.minWidth && dims.width <= (spec.maxWidth ?? Infinity) : dims.width === spec.width;
90
131
  const hOk = spec.minHeight ? dims.height >= spec.minHeight && dims.height <= (spec.maxHeight ?? Infinity) : dims.height === spec.height;
91
132
  if (!wOk || !hOk) {
92
133
  const expected = spec.minWidth ? `${spec.minWidth}~${spec.maxWidth}×${spec.minHeight}~${spec.maxHeight}` : `${spec.width}×${spec.height}`;
93
- issues.push(`해상도 불일치 (${spec.label}): 필요 ${expected}, 현재 ${dims.width}×${dims.height}`);
134
+ issues.push(S().resolutionMismatch(spec.label, expected, `${dims.width}×${dims.height}`));
94
135
  }
95
136
  else {
96
137
  matchedSpec = spec.label;
@@ -108,10 +149,10 @@ export function validateAppStoreScreenshots(filePaths, expectedDisplayType) {
108
149
  }
109
150
  }
110
151
  if (!matchedSpec) {
111
- issues.push(`알 수 없는 해상도 ${dims.width}×${dims.height} — Apple 스펙과 일치하지 않음`);
152
+ issues.push(S().unknownResolution(`${dims.width}×${dims.height}`));
112
153
  }
113
154
  if (sizeBytes > 50 * 1024 * 1024)
114
- issues.push('파일 크기 50MB 초과');
155
+ issues.push(S().over50mb);
115
156
  }
116
157
  return { filePath, fileName, valid: issues.length === 0, issues, info, matchedSpec };
117
158
  });
@@ -120,7 +161,7 @@ export function validatePlayStoreScreenshots(filePaths, imageType = 'phoneScreen
120
161
  if (!(imageType in PLAYSTORE_SPECS)) {
121
162
  return filePaths.map((fp) => ({
122
163
  filePath: fp, fileName: path.basename(fp), valid: false,
123
- issues: [`알 수 없는 imageType: ${imageType}. 유효값: ${Object.keys(PLAYSTORE_SPECS).join(', ')}`],
164
+ issues: [S().unknownImageType(imageType, Object.keys(PLAYSTORE_SPECS).join(', '))],
124
165
  info: { sizeBytes: 0 },
125
166
  }));
126
167
  }
@@ -129,32 +170,32 @@ export function validatePlayStoreScreenshots(filePaths, imageType = 'phoneScreen
129
170
  const fileName = path.basename(filePath);
130
171
  const issues = [];
131
172
  if (!fs.existsSync(filePath)) {
132
- return { filePath, fileName, valid: false, issues: ['파일 없음'], info: { sizeBytes: 0 } };
173
+ return { filePath, fileName, valid: false, issues: [S().missing], info: { sizeBytes: 0 } };
133
174
  }
134
175
  const sizeBytes = fs.statSync(filePath).size;
135
176
  if (sizeBytes > spec.maxBytes) {
136
- issues.push(`파일 크기 초과: ${(sizeBytes / 1024 / 1024).toFixed(1)}MB (최대 ${(spec.maxBytes / 1024 / 1024).toFixed(0)}MB)`);
177
+ issues.push(S().playTooLarge((sizeBytes / 1024 / 1024).toFixed(1), (spec.maxBytes / 1024 / 1024).toFixed(0)));
137
178
  }
138
179
  const dims = getImageDimensions(filePath);
139
180
  const info = { sizeBytes, detectedWidth: dims?.width, detectedHeight: dims?.height };
140
181
  if (!dims)
141
- return { filePath, fileName, valid: false, issues: ['PNG/JPEG가 아니거나 읽기 실패', ...issues], info };
182
+ return { filePath, fileName, valid: false, issues: [S().unreadable, ...issues], info };
142
183
  if (dims.width < spec.minWidth || dims.width > spec.maxWidth) {
143
- issues.push(`너비 범위 초과: ${dims.width}px (${spec.minWidth}~${spec.maxWidth}px 필요)`);
184
+ issues.push(S().widthOut(dims.width, spec.minWidth, spec.maxWidth));
144
185
  }
145
186
  if (dims.height < spec.minHeight || dims.height > spec.maxHeight) {
146
- issues.push(`높이 범위 초과: ${dims.height}px (${spec.minHeight}~${spec.maxHeight}px 필요)`);
187
+ issues.push(S().heightOut(dims.height, spec.minHeight, spec.maxHeight));
147
188
  }
148
189
  const ar = dims.width / dims.height;
149
190
  if (ar < spec.minAspect || ar > spec.maxAspect) {
150
- issues.push(`종횡비 범위 초과: ${ar.toFixed(2)} (${spec.minAspect}~${spec.maxAspect} 필요)`);
191
+ issues.push(S().aspectOut(ar.toFixed(2), spec.minAspect, spec.maxAspect));
151
192
  }
152
193
  return { filePath, fileName, valid: issues.length === 0, issues, info };
153
194
  });
154
195
  }
155
196
  export function formatValidationResults(results, platform) {
156
197
  const passed = results.filter((r) => r.valid).length;
157
- const lines = [`📐 ${platform} 스크린샷 검증: ${passed}/${results.length} 통과\n`];
198
+ const lines = [S().summary(platform, passed, results.length)];
158
199
  for (const r of results) {
159
200
  const dims = r.info.detectedWidth ? ` (${r.info.detectedWidth}×${r.info.detectedHeight})` : '';
160
201
  const size = ` ${(r.info.sizeBytes / 1024).toFixed(0)}KB`;
package/dist/ci/config.js CHANGED
@@ -1,14 +1,18 @@
1
- import fs from 'node:fs';
2
1
  import path from 'node:path';
3
2
  import os from 'node:os';
4
3
  import { writeCredentialJson } from '#core/atomic-write.js';
4
+ import { catalog } from '#core/lang.js';
5
5
  const CONFIG_DIR = path.join(os.homedir(), '.mimi-seed');
6
6
  const CI_CONFIG_PATH = path.join(CONFIG_DIR, 'ci.json');
7
+ const M = catalog({ notConfigured: 'CI 설정이 없습니다.\n' + 'ci_save_config 도구로 먼저 설정해주세요.\n' + '예시:\n' }, { notConfigured: 'CI is not configured.\n' + 'Configure it first with the ci_save_config tool.\n' + 'Example:\n' });
8
+ import { assertCredentialFileReadable } from '../lib/json-file.js';
9
+ import { readCredentialFileSync } from '#core/credential-read.js';
7
10
  export function loadCiConfig() {
8
11
  try {
9
- return JSON.parse(fs.readFileSync(CI_CONFIG_PATH, 'utf-8'));
12
+ return JSON.parse(readCredentialFileSync(CI_CONFIG_PATH));
10
13
  }
11
14
  catch {
15
+ // 읽을 수 없으면 '미설정' — 깨진 파일은 requireCiConfig · mimi_seed_status 가 json-file 로 따로 진단한다
12
16
  return null;
13
17
  }
14
18
  }
@@ -18,9 +22,8 @@ export function saveCiConfig(config) {
18
22
  export function requireCiConfig() {
19
23
  const cfg = loadCiConfig();
20
24
  if (!cfg) {
21
- throw new Error('CI 설정이 없습니다.\n' +
22
- 'ci_save_config 도구로 먼저 설정해주세요.\n' +
23
- '예시:\n' +
25
+ assertCredentialFileReadable(CI_CONFIG_PATH, 'ci_save_config');
26
+ throw new Error(M().notConfigured +
24
27
  ' GitHub: ci_save_config(provider="github", token=<GitHub token>, owner="my-org", repo="my-app")\n' +
25
28
  ' GitLab: ci_save_config(provider="gitlab", token=<GitLab token>, owner="my-group", repo="my-app")');
26
29
  }
package/dist/ci/gitlab.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { fetchWithTimeout } from '../lib/http.js';
2
2
  import { encodePathSegment } from '../lib/url-path.js';
3
3
  import { gitlabApiBase, gitlabProjectId } from '#core/ci.js';
4
+ import { catalog } from '#core/lang.js';
5
+ const M = catalog({ noWorkflows: 'GitLab은 workflow 파일 개념이 없습니다. ci_trigger_build(ref="main")로 해당 브랜치의 .gitlab-ci.yml을 즉시 실행하세요.' }, { noWorkflows: 'GitLab has no workflow files. Use ci_trigger_build(ref="main") to run that branch\'s .gitlab-ci.yml immediately.' });
4
6
  function headers(token) {
5
7
  return {
6
8
  'PRIVATE-TOKEN': token,
@@ -37,7 +39,7 @@ export async function listWorkflows(cfg) {
37
39
  id: t.id,
38
40
  description: t.description ?? '',
39
41
  })),
40
- note: 'GitLab은 workflow 파일 개념이 없습니다. ci_trigger_build(ref="main")로 해당 브랜치의 .gitlab-ci.yml을 즉시 실행하세요.',
42
+ note: M().noWorkflows,
41
43
  };
42
44
  }
43
45
  export async function triggerBuild(cfg, ref = 'main', variables = {}) {
@@ -35,7 +35,10 @@ export type RenameRetryDeps = Pick<AtomicWriteOptions, 'rename' | 'sleep'>;
35
35
  export declare function renameWithRetry(from: string, to: string, deps?: RenameRetryDeps): void;
36
36
  export declare function writeFileAtomic(filePath: string, contents: string | Uint8Array, options?: AtomicWriteOptions): void;
37
37
  export declare function writeJsonAtomic(filePath: string, value: unknown, options?: AtomicWriteOptions): void;
38
- /** 자격증명 JSON 저장 — 0600 파일 / 0700 디렉터리를 강제한다. */
38
+ /**
39
+ * 자격증명 JSON 저장 — 0600 파일 / 0700 디렉터리를 강제한다. 저장 모드가 암호화면(credential-store.ts) 봉투로 쓴다.
40
+ * 암호화는 temp 에 쓰기 **전에** 하므로, keychain 모드에서 키 저장소에 못 닿아 던져도 기존 파일은 그대로다.
41
+ */
39
42
  export declare function writeCredentialJson(filePath: string, value: unknown): void;
40
- /** 이미 직렬화된 자격증명(서비스 계정 키 원본, keystore 바이너리 등) 저장. */
43
+ /** 이미 직렬화된 자격증명(서비스 계정 키 원본, keystore 바이너리 등) 저장. 암호화 대상 경로의 문자열만 봉투가 된다. */
41
44
  export declare function writeCredentialFile(filePath: string, contents: string | Uint8Array): void;
@@ -16,6 +16,7 @@
16
16
  import { chmodSync, mkdirSync, renameSync, unlinkSync, writeFileSync } from 'node:fs';
17
17
  import { randomUUID } from 'node:crypto';
18
18
  import path from 'node:path';
19
+ import { sealForWrite } from './credential-store.js';
19
20
  /** 자격증명 파일 권한 — 소유자만 읽고 쓴다. */
20
21
  export const CREDENTIAL_FILE_MODE = 0o600;
21
22
  /** 자격증명 디렉터리 권한 — 소유자만 진입한다. */
@@ -84,11 +85,14 @@ export function writeFileAtomic(filePath, contents, options = {}) {
84
85
  export function writeJsonAtomic(filePath, value, options = {}) {
85
86
  writeFileAtomic(filePath, `${JSON.stringify(value, null, 2)}\n`, options);
86
87
  }
87
- /** 자격증명 JSON 저장 — 0600 파일 / 0700 디렉터리를 강제한다. */
88
+ /**
89
+ * 자격증명 JSON 저장 — 0600 파일 / 0700 디렉터리를 강제한다. 저장 모드가 암호화면(credential-store.ts) 봉투로 쓴다.
90
+ * 암호화는 temp 에 쓰기 **전에** 하므로, keychain 모드에서 키 저장소에 못 닿아 던져도 기존 파일은 그대로다.
91
+ */
88
92
  export function writeCredentialJson(filePath, value) {
89
- writeJsonAtomic(filePath, value, { mode: CREDENTIAL_FILE_MODE, dirMode: CREDENTIAL_DIR_MODE });
93
+ writeCredentialFile(filePath, `${JSON.stringify(value, null, 2)}\n`);
90
94
  }
91
- /** 이미 직렬화된 자격증명(서비스 계정 키 원본, keystore 바이너리 등) 저장. */
95
+ /** 이미 직렬화된 자격증명(서비스 계정 키 원본, keystore 바이너리 등) 저장. 암호화 대상 경로의 문자열만 봉투가 된다. */
92
96
  export function writeCredentialFile(filePath, contents) {
93
- writeFileAtomic(filePath, contents, { mode: CREDENTIAL_FILE_MODE, dirMode: CREDENTIAL_DIR_MODE });
97
+ writeFileAtomic(filePath, sealForWrite(filePath, contents), { mode: CREDENTIAL_FILE_MODE, dirMode: CREDENTIAL_DIR_MODE });
94
98
  }
@@ -0,0 +1,17 @@
1
+ export interface SilentCatch {
2
+ /** 1부터 세는 `catch` 의 줄 번호. */
3
+ line: number;
4
+ /** 주석을 뺀 본문 (한 줄로). */
5
+ body: string;
6
+ }
7
+ /**
8
+ * 주석 · 문자열 · 템플릿의 **내용**을 공백으로 가린 사본 (길이와 줄바꿈은 그대로). `catch` 찾기와 중괄호 짝 맞추기는
9
+ * 이 사본에서 한다 — 주석 속 예시 코드(`catch { return null }`)나 문자열 속 `{` 를 코드로 오인하지 않게.
10
+ * 이유 주석이 있는지는 원본에서 본다. (정규식 리터럴은 다루지 않는다 — 안에 따옴표가 있으면 오탐할 수 있다.)
11
+ */
12
+ export declare function maskNonCode(code: string): string;
13
+ /**
14
+ * 이유 없이 기본값만 돌려주는 catch 들. 이유로 인정하는 곳: catch 본문 안의 주석, catch 줄 끝의 주석,
15
+ * 또는 짝이 되는 `try` 바로 윗줄의 주석. (문자열 안의 `//` 오탐을 줄이려고 줄 단위로만 본다.)
16
+ */
17
+ export declare function silentFallbackCatches(code: string): SilentCatch[];
@@ -0,0 +1,111 @@
1
+ // "조용한 폴백 catch" 스캐너 — mcp-server 의 silent-catch.test.ts 가 세 패키지(cli · core · mcp-server) 소스에 쓴다.
2
+ //
3
+ // 에러를 받아 기본값(null · false · [] · undefined …)만 돌려주는 catch 는 호출자 입장에서 "값이 없음"과 "실패함"을
4
+ // 구분할 수 없게 만든다. 깨진 설정 파일이 "미설정"으로, 깨진 .mimi-seed.json 이 "매니페스트 없음"으로 보였던 것이
5
+ // 그 결과다. 그런 폴백이 정당한 경우(없는 파일 탐색 · 선택적 probe 등)는 많지만, **왜 정당한지 적혀 있어야 한다** —
6
+ // 이유가 없는 폴백만 잡는다.
7
+ /** catch 본문(주석 제외)이 이것뿐이면 "폴백만 하는 catch" 다. */
8
+ const FALLBACK_ONLY = /^(?:return(?:\s+(?:null|undefined|false|true|\[\]|\{\}|''|""|0|-1|[A-Za-z_$][\w$.]*))?;?|continue;?|break;?|[A-Za-z_$][\w$.]*\s*=\s*(?:null|undefined|false|\[\]|\{\}|''|""|0);?)$/;
9
+ /**
10
+ * 주석 · 문자열 · 템플릿의 **내용**을 공백으로 가린 사본 (길이와 줄바꿈은 그대로). `catch` 찾기와 중괄호 짝 맞추기는
11
+ * 이 사본에서 한다 — 주석 속 예시 코드(`catch { return null }`)나 문자열 속 `{` 를 코드로 오인하지 않게.
12
+ * 이유 주석이 있는지는 원본에서 본다. (정규식 리터럴은 다루지 않는다 — 안에 따옴표가 있으면 오탐할 수 있다.)
13
+ */
14
+ export function maskNonCode(code) {
15
+ const out = code.split('');
16
+ let i = 0;
17
+ const blank = (from, to) => { for (let k = from; k < to; k++)
18
+ if (out[k] !== '\n')
19
+ out[k] = ' '; };
20
+ while (i < code.length) {
21
+ const c = code[i];
22
+ const next = code[i + 1];
23
+ if (c === '/' && next === '/') {
24
+ const end = code.indexOf('\n', i);
25
+ const stop = end === -1 ? code.length : end;
26
+ blank(i, stop);
27
+ i = stop;
28
+ }
29
+ else if (c === '/' && next === '*') {
30
+ const end = code.indexOf('*/', i + 2);
31
+ const stop = end === -1 ? code.length : end + 2;
32
+ blank(i, stop);
33
+ i = stop;
34
+ }
35
+ else if (c === '"' || c === "'" || c === '`') {
36
+ let j = i + 1;
37
+ while (j < code.length && code[j] !== c)
38
+ j += code[j] === '\\' ? 2 : 1;
39
+ blank(i + 1, j); // 따옴표는 남기고 내용만 가린다
40
+ i = j + 1;
41
+ }
42
+ else {
43
+ i++;
44
+ }
45
+ }
46
+ return out.join('');
47
+ }
48
+ function closingBrace(code, open) {
49
+ let depth = 0;
50
+ for (let i = open; i < code.length; i++) {
51
+ if (code[i] === '{')
52
+ depth++;
53
+ else if (code[i] === '}') {
54
+ depth--;
55
+ if (depth === 0)
56
+ return i;
57
+ }
58
+ }
59
+ return code.length;
60
+ }
61
+ /** `try {` 의 위치 — catch 앞 블록을 거슬러 올라가 짝이 되는 try 를 찾는다. */
62
+ function matchingTry(code, catchIndex) {
63
+ const before = code.slice(0, catchIndex).trimEnd();
64
+ if (!before.endsWith('}'))
65
+ return -1;
66
+ let depth = 0;
67
+ for (let i = before.length - 1; i >= 0; i--) {
68
+ if (before[i] === '}')
69
+ depth++;
70
+ else if (before[i] === '{') {
71
+ depth--;
72
+ if (depth === 0) {
73
+ const m = /try\s*$/.exec(before.slice(0, i));
74
+ return m ? m.index : -1;
75
+ }
76
+ }
77
+ }
78
+ return -1;
79
+ }
80
+ const lineOf = (code, index) => code.slice(0, index).split('\n').length;
81
+ const hasComment = (text) => /\/\/|\/\*/.test(text);
82
+ /**
83
+ * 이유 없이 기본값만 돌려주는 catch 들. 이유로 인정하는 곳: catch 본문 안의 주석, catch 줄 끝의 주석,
84
+ * 또는 짝이 되는 `try` 바로 윗줄의 주석. (문자열 안의 `//` 오탐을 줄이려고 줄 단위로만 본다.)
85
+ */
86
+ export function silentFallbackCatches(code) {
87
+ const lines = code.split('\n');
88
+ const masked = maskNonCode(code);
89
+ const out = [];
90
+ for (const m of masked.matchAll(/\bcatch\s*(?:\([^)]*\))?\s*\{/g)) {
91
+ const open = m.index + m[0].length - 1;
92
+ const close = closingBrace(masked, open);
93
+ const rawBody = code.slice(open + 1, close);
94
+ const body = rawBody.replace(/\/\*[\s\S]*?\*\//g, '').replace(/\/\/[^\n]*/g, '').trim().replace(/\s+/g, ' ');
95
+ if (!body || !FALLBACK_ONLY.test(body))
96
+ continue; // 비어 있으면(주석만) 그 주석이 이유다 · 다른 처리가 있으면 대상 아님
97
+ if (hasComment(rawBody))
98
+ continue;
99
+ const catchLine = lineOf(code, m.index);
100
+ if (hasComment(lines[catchLine - 1] ?? ''))
101
+ continue;
102
+ const tryIndex = matchingTry(masked, m.index);
103
+ if (tryIndex >= 0) {
104
+ const tryLine = lineOf(code, tryIndex);
105
+ if (hasComment(lines[tryLine - 2] ?? '') || hasComment(lines[tryLine - 1] ?? ''))
106
+ continue;
107
+ }
108
+ out.push({ line: catchLine, body });
109
+ }
110
+ return out;
111
+ }
@@ -31,6 +31,11 @@ export interface BillingComplianceResult {
31
31
  status: BillingComplianceStatus;
32
32
  detectedVersions: string[];
33
33
  evidence: BillingEvidence[];
34
+ /**
35
+ * Folders and Gradle/package files under the project that could not be read (relative). A Billing dependency may
36
+ * sit in them, so a result that would otherwise be `pass` or `not_used` is `unresolved` while this is non-empty.
37
+ */
38
+ unreadPaths: string[];
34
39
  policy: {
35
40
  minimumSupportedMajor: number | null;
36
41
  submissionDeadline: string;
@@ -83,6 +83,7 @@ const SKIP_DIRS = new Set([
83
83
  ]);
84
84
  async function walk(root, maxDepth = 7) {
85
85
  const result = [];
86
+ const unread = [];
86
87
  async function visit(dir, depth) {
87
88
  if (depth > maxDepth)
88
89
  return;
@@ -91,6 +92,8 @@ async function walk(root, maxDepth = 7) {
91
92
  entries = await fs.readdir(dir, { withFileTypes: true });
92
93
  }
93
94
  catch {
95
+ // 읽지 못한 폴더의 Billing 의존성은 근거에서 빠진다 — unreadPaths 로 돌려줘 pass/not_used 를 unresolved 로 낮춘다
96
+ unread.push(path.relative(root, dir).replace(/\\/g, '/') || '.');
94
97
  return;
95
98
  }
96
99
  for (const entry of entries) {
@@ -111,7 +114,7 @@ async function walk(root, maxDepth = 7) {
111
114
  }
112
115
  }
113
116
  await visit(root, 0);
114
- return result;
117
+ return { files: result, unread };
115
118
  }
116
119
  function parseCatalog(text) {
117
120
  const versions = new Map();
@@ -251,7 +254,16 @@ async function reactNativeIapEvidence(root, manifestFile, manifestText, resolveT
251
254
  manifest = JSON.parse(manifestText);
252
255
  }
253
256
  catch {
254
- return null;
257
+ // 깨진 package.json 이 react-native-iap 를 언급하면 판정 불가(unresolved) — not_used 로 위장하지 않는다.
258
+ // 언급조차 없으면 이 파일은 Billing 근거가 아니다.
259
+ if (!manifestText.includes('react-native-iap'))
260
+ return null;
261
+ return {
262
+ file: displayPath(root, manifestFile),
263
+ module: 'com.android.billingclient:billing',
264
+ expression: 'package.json mentions react-native-iap but is not valid JSON; transitive Billing version is unresolved',
265
+ source: 'unresolved',
266
+ };
255
267
  }
256
268
  const dependencyGroups = ['dependencies', 'devDependencies', 'optionalDependencies']
257
269
  .map((key) => manifest[key])
@@ -511,10 +523,20 @@ export async function checkBillingCompliance(projectPath, now = new Date(), opti
511
523
  }
512
524
  if (!rootStat.isDirectory())
513
525
  throw new Error(`Android project path is not a directory: ${root}`);
514
- const files = await walk(root);
526
+ const walked = await walk(root);
527
+ const unreadPaths = walked.unread;
515
528
  const texts = new Map();
516
- for (const file of files)
517
- texts.set(file, await fs.readFile(file, 'utf8'));
529
+ for (const file of walked.files) {
530
+ try {
531
+ texts.set(file, await fs.readFile(file, 'utf8'));
532
+ }
533
+ catch {
534
+ // 못 읽은 Gradle/package 파일도 미독 폴더와 같다 — 검사 전체를 죽이지 않고 unreadPaths 로 알린다
535
+ unreadPaths.push(path.relative(root, file).replace(/\\/g, '/'));
536
+ }
537
+ }
538
+ unreadPaths.sort();
539
+ const files = walked.files.filter((file) => texts.has(file));
518
540
  const catalogs = files
519
541
  .filter((file) => path.basename(file) === 'libs.versions.toml')
520
542
  .map((file) => ({ file, scope: catalogScope(file), info: parseCatalog(texts.get(file) ?? '') }));
@@ -681,12 +703,21 @@ export async function checkBillingCompliance(projectPath, now = new Date(), opti
681
703
  status = 'pass';
682
704
  summary = `Billing Library ${detectedVersions.join(', ')} satisfies the current submission policy.`;
683
705
  }
706
+ if (unreadPaths.length > 0) {
707
+ const listed = unreadPaths.length > 3 ? `${unreadPaths.slice(0, 3).join(', ')}, +${unreadPaths.length - 3}` : unreadPaths.join(', ');
708
+ // A clear result needs the whole tree: a Billing dependency in an unread folder could be below the minimum.
709
+ if (status === 'pass' || status === 'not_used')
710
+ status = 'unresolved';
711
+ summary = `${summary} Some paths could not be read, so a Billing dependency in them was not checked: ${listed}.`;
712
+ actions.push('Fix the permissions on the unread paths (or narrow the project path to the app) and run the check again.');
713
+ }
684
714
  return {
685
715
  projectPath: root,
686
716
  checkedAt: now.toISOString(),
687
717
  status,
688
718
  detectedVersions,
689
719
  evidence,
720
+ unreadPaths,
690
721
  policy,
691
722
  summary,
692
723
  actions,
@@ -7,6 +7,7 @@ export async function readText(file) {
7
7
  return await fs.readFile(file, 'utf8');
8
8
  }
9
9
  catch {
10
+ // 없는 파일과 못 읽는 파일은 같은 '근거 없음' — 호출부가 undefined 를 다음 후보 · null catalog(판정 불가) · missed apply 로 처리한다
10
11
  return undefined;
11
12
  }
12
13
  }
@@ -16,6 +17,7 @@ async function exists(file) {
16
17
  return true;
17
18
  }
18
19
  catch {
20
+ // 존재 여부만 본다 — 접근할 수 없는 .git 은 저장소 루트 근거로 쓰지 않고 상위로 계속 찾는다
19
21
  return false;
20
22
  }
21
23
  }
@@ -107,6 +107,7 @@ async function firebaseAdminEvidence(files, root) {
107
107
  manifest = JSON.parse(file.text);
108
108
  }
109
109
  catch {
110
+ // 깨진 package.json 은 npm 도 설치하지 못한다 — FCM 검사는 경고만 내고 통과(OK) 판정이 없어, 빠져도 거짓 통과가 되지 않는다
110
111
  continue;
111
112
  }
112
113
  const declared = ['dependencies', 'devDependencies']
@@ -9,8 +9,10 @@ export declare function walk(root: string, maxSourceFiles?: number, maxDepth?: n
9
9
  files: ProjectFile[];
10
10
  fcmSources: ProjectFile[];
11
11
  sourceScanTruncated: boolean;
12
- /** Convention-build roots that could not be read completely. */
12
+ /** Convention-build roots that could not be read completely (over the walk bounds, or unreadable). */
13
13
  conventionTruncated: string[];
14
+ /** Folders and scan-relevant files of the project walk that could not be read (relative; `.` is the root). */
15
+ unread: string[];
14
16
  }>;
15
17
  /** Convention-build sources the Target API net reads: scripts and plugin sources in every JVM build language. */
16
18
  export declare const CONVENTION_SOURCE_FILE: RegExp;
@@ -59,6 +59,7 @@ export const UNRESOLVED_CODES = new Set([
59
59
  'IOS_XCODE_UNRESOLVED',
60
60
  'IOS_XCODE_MIXED_PINS',
61
61
  'IOS_SDK_POLICY_REFRESH_REQUIRED',
62
+ 'SCAN_PATHS_NOT_READ',
62
63
  ]);
63
64
  /**
64
65
  * Every Gradle script and plugin source of the convention builds in the scan: buildSrc/ and build-logic/ folders at
@@ -121,6 +122,8 @@ async function conventionFiles(root, files, found) {
121
122
  entries = await fs.readdir(dir, { withFileTypes: true });
122
123
  }
123
124
  catch {
125
+ // 읽지 못한 컨벤션 폴더에 targetSdk 설정이 있을 수 있다 — 건너뛰되 미완독으로 표시해 TARGET_SDK_OK 를 막는다
126
+ incomplete = true;
124
127
  return;
125
128
  }
126
129
  for (const entry of entries) {
@@ -148,6 +151,8 @@ async function conventionFiles(root, files, found) {
148
151
  return { absolute, relative, text: await fs.readFile(absolute, 'utf8'), sample: owner.sample, demo: owner.demo, convention: true };
149
152
  }
150
153
  catch {
154
+ // 읽지 못한 플러그인 소스가 targetSdk 를 덮어쓸 수 있다 — 미완독으로 표시해 TARGET_SDK_OK 를 막는다
155
+ incomplete = true;
151
156
  return undefined;
152
157
  }
153
158
  };
@@ -172,6 +177,7 @@ async function conventionFiles(root, files, found) {
172
177
  }
173
178
  export async function walk(root, maxSourceFiles = MAX_SOURCE_FILES, maxDepth = 7) {
174
179
  const files = [];
180
+ const unread = [];
175
181
  const conventionRoots = [];
176
182
  const sourceCandidates = [];
177
183
  // `excluded`: inside a test/fixture/vendored tree or a nested repository (a directory with its own `.git`).
@@ -185,6 +191,9 @@ export async function walk(root, maxSourceFiles = MAX_SOURCE_FILES, maxDepth = 7
185
191
  entries = await fs.readdir(dir, { withFileTypes: true });
186
192
  }
187
193
  catch {
194
+ // 읽지 못한 폴더(다른 사용자 소유의 볼륨 등) 안의 앱 모듈은 판정에서 빠진다 — unread 로 돌려주면
195
+ // scanReleaseDoctor 가 SCAN_PATHS_NOT_READ 로 알리고 보고서를 '확인 필요'로 둔다 (TARGET_SDK_OK 자체는 막지 않는다)
196
+ unread.push(path.relative(root, dir).replace(/\\/g, '/') || '.');
188
197
  return;
189
198
  }
190
199
  const nestedRepository = depth > 0 && entries.some((entry) => entry.name === '.git');
@@ -218,7 +227,8 @@ export async function walk(root, maxSourceFiles = MAX_SOURCE_FILES, maxDepth = 7
218
227
  files.push({ absolute, relative, text: await fs.readFile(absolute, 'utf8'), sample: sampleHere, demo });
219
228
  }
220
229
  catch {
221
- // Unreadable files are ignored; other evidence can still produce a useful partial report.
230
+ // 다른 근거로 부분 보고서는 낼 수 있다 — 대신 unread 로 돌려줘 SCAN_PATHS_NOT_READ 로 알린다
231
+ unread.push(relative);
222
232
  }
223
233
  continue;
224
234
  }
@@ -249,6 +259,7 @@ export async function walk(root, maxSourceFiles = MAX_SOURCE_FILES, maxDepth = 7
249
259
  fcmSources: await readFcmSources(prioritized.slice(0, maxSourceFiles)),
250
260
  sourceScanTruncated: prioritized.length > maxSourceFiles,
251
261
  conventionTruncated: convention.truncated,
262
+ unread: unread.sort(),
252
263
  };
253
264
  }
254
265
  // Source files are read only for the FCM markers; the text is kept only when a marker matches.
@@ -150,6 +150,7 @@ async function workspacePackage(name, context) {
150
150
  return text === undefined ? undefined : JSON.parse(text);
151
151
  }
152
152
  catch {
153
+ // 깨진 package.json 은 패키지 매니저도 workspace 멤버로 인식하지 못한다 — 이름을 대조할 근거가 없다
153
154
  return undefined;
154
155
  }
155
156
  };