@empline/preflight 1.1.11 → 1.1.13

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 (709) hide show
  1. package/dist/checks/consolidated/auth-storage-state.d.ts +3 -0
  2. package/dist/checks/consolidated/auth-storage-state.d.ts.map +1 -0
  3. package/dist/checks/consolidated/auth-storage-state.js +146 -0
  4. package/dist/checks/consolidated/auth-storage-state.js.map +1 -0
  5. package/dist/checks/consolidated/business.d.ts +50 -0
  6. package/dist/checks/consolidated/business.d.ts.map +1 -0
  7. package/dist/checks/consolidated/business.js +252 -0
  8. package/dist/checks/consolidated/business.js.map +1 -0
  9. package/dist/checks/consolidated/caching-strategy.d.ts +104 -0
  10. package/dist/checks/consolidated/caching-strategy.d.ts.map +1 -0
  11. package/dist/checks/consolidated/caching-strategy.js +725 -0
  12. package/dist/checks/consolidated/caching-strategy.js.map +1 -0
  13. package/dist/checks/consolidated/code-quality.d.ts +83 -0
  14. package/dist/checks/consolidated/code-quality.d.ts.map +1 -0
  15. package/dist/checks/consolidated/code-quality.js +445 -0
  16. package/dist/checks/consolidated/code-quality.js.map +1 -0
  17. package/dist/checks/consolidated/console-statements.d.ts +32 -0
  18. package/dist/checks/consolidated/console-statements.d.ts.map +1 -0
  19. package/dist/checks/consolidated/console-statements.js +304 -0
  20. package/dist/checks/consolidated/console-statements.js.map +1 -0
  21. package/dist/checks/consolidated/css-advanced-validation.d.ts +24 -0
  22. package/dist/checks/consolidated/css-advanced-validation.d.ts.map +1 -0
  23. package/dist/checks/consolidated/css-advanced-validation.js +415 -0
  24. package/dist/checks/consolidated/css-advanced-validation.js.map +1 -0
  25. package/dist/checks/consolidated/css-organization.d.ts +14 -0
  26. package/dist/checks/consolidated/css-organization.d.ts.map +1 -0
  27. package/dist/checks/consolidated/css-organization.js +432 -0
  28. package/dist/checks/consolidated/css-organization.js.map +1 -0
  29. package/dist/checks/consolidated/css-runtime-validation.d.ts +22 -0
  30. package/dist/checks/consolidated/css-runtime-validation.d.ts.map +1 -0
  31. package/dist/checks/consolidated/css-runtime-validation.js +330 -0
  32. package/dist/checks/consolidated/css-runtime-validation.js.map +1 -0
  33. package/dist/checks/consolidated/css-variable-validation.d.ts +17 -0
  34. package/dist/checks/consolidated/css-variable-validation.d.ts.map +1 -0
  35. package/dist/checks/consolidated/css-variable-validation.js +412 -0
  36. package/dist/checks/consolidated/css-variable-validation.js.map +1 -0
  37. package/dist/checks/consolidated/dark-mode-consistency.d.ts +23 -0
  38. package/dist/checks/consolidated/dark-mode-consistency.d.ts.map +1 -0
  39. package/dist/checks/consolidated/dark-mode-consistency.js +291 -0
  40. package/dist/checks/consolidated/dark-mode-consistency.js.map +1 -0
  41. package/dist/checks/consolidated/database.d.ts +95 -0
  42. package/dist/checks/consolidated/database.d.ts.map +1 -0
  43. package/dist/checks/consolidated/database.js +427 -0
  44. package/dist/checks/consolidated/database.js.map +1 -0
  45. package/dist/checks/consolidated/e2e-checks.d.ts +52 -0
  46. package/dist/checks/consolidated/e2e-checks.d.ts.map +1 -0
  47. package/dist/checks/consolidated/e2e-checks.js +157 -0
  48. package/dist/checks/consolidated/e2e-checks.js.map +1 -0
  49. package/dist/checks/consolidated/e2e-regression-coverage.d.ts +14 -0
  50. package/dist/checks/consolidated/e2e-regression-coverage.d.ts.map +1 -0
  51. package/dist/checks/consolidated/e2e-regression-coverage.js +151 -0
  52. package/dist/checks/consolidated/e2e-regression-coverage.js.map +1 -0
  53. package/dist/checks/consolidated/e2e-validation.d.ts +137 -0
  54. package/dist/checks/consolidated/e2e-validation.d.ts.map +1 -0
  55. package/dist/checks/consolidated/e2e-validation.js +1001 -0
  56. package/dist/checks/consolidated/e2e-validation.js.map +1 -0
  57. package/dist/checks/consolidated/enterprise-baseline.d.ts +9 -0
  58. package/dist/checks/consolidated/enterprise-baseline.d.ts.map +1 -0
  59. package/dist/checks/consolidated/enterprise-baseline.js +277 -0
  60. package/dist/checks/consolidated/enterprise-baseline.js.map +1 -0
  61. package/dist/checks/consolidated/generate-pageload-config.d.ts +6 -0
  62. package/dist/checks/consolidated/generate-pageload-config.d.ts.map +1 -0
  63. package/dist/checks/consolidated/generate-pageload-config.js +161 -0
  64. package/dist/checks/consolidated/generate-pageload-config.js.map +1 -0
  65. package/dist/checks/consolidated/hardened-checks.d.ts +276 -0
  66. package/dist/checks/consolidated/hardened-checks.d.ts.map +1 -0
  67. package/dist/checks/consolidated/hardened-checks.js +3056 -0
  68. package/dist/checks/consolidated/hardened-checks.js.map +1 -0
  69. package/dist/checks/consolidated/homepage-ux.d.ts +12 -0
  70. package/dist/checks/consolidated/homepage-ux.d.ts.map +1 -0
  71. package/dist/checks/consolidated/homepage-ux.js +242 -0
  72. package/dist/checks/consolidated/homepage-ux.js.map +1 -0
  73. package/dist/checks/consolidated/images.d.ts +76 -0
  74. package/dist/checks/consolidated/images.d.ts.map +1 -0
  75. package/dist/checks/consolidated/images.js +311 -0
  76. package/dist/checks/consolidated/images.js.map +1 -0
  77. package/dist/checks/consolidated/import-cycles.d.ts +63 -0
  78. package/dist/checks/consolidated/import-cycles.d.ts.map +1 -0
  79. package/dist/checks/consolidated/import-cycles.js +291 -0
  80. package/dist/checks/consolidated/import-cycles.js.map +1 -0
  81. package/dist/checks/consolidated/imports.d.ts +112 -0
  82. package/dist/checks/consolidated/imports.d.ts.map +1 -0
  83. package/dist/checks/consolidated/imports.js +977 -0
  84. package/dist/checks/consolidated/imports.js.map +1 -0
  85. package/dist/checks/consolidated/inline-style-conflicts.d.ts +21 -0
  86. package/dist/checks/consolidated/inline-style-conflicts.d.ts.map +1 -0
  87. package/dist/checks/consolidated/inline-style-conflicts.js +300 -0
  88. package/dist/checks/consolidated/inline-style-conflicts.js.map +1 -0
  89. package/dist/checks/consolidated/lib-organization.d.ts +12 -0
  90. package/dist/checks/consolidated/lib-organization.d.ts.map +1 -0
  91. package/dist/checks/consolidated/lib-organization.js +419 -0
  92. package/dist/checks/consolidated/lib-organization.js.map +1 -0
  93. package/dist/checks/consolidated/n-plus-one.d.ts +63 -0
  94. package/dist/checks/consolidated/n-plus-one.d.ts.map +1 -0
  95. package/dist/checks/consolidated/n-plus-one.js +331 -0
  96. package/dist/checks/consolidated/n-plus-one.js.map +1 -0
  97. package/dist/checks/consolidated/nextjs.d.ts +51 -0
  98. package/dist/checks/consolidated/nextjs.d.ts.map +1 -0
  99. package/dist/checks/consolidated/nextjs.js +205 -0
  100. package/dist/checks/consolidated/nextjs.js.map +1 -0
  101. package/dist/checks/consolidated/organization.d.ts +54 -0
  102. package/dist/checks/consolidated/organization.d.ts.map +1 -0
  103. package/dist/checks/consolidated/organization.js +158 -0
  104. package/dist/checks/consolidated/organization.js.map +1 -0
  105. package/dist/checks/consolidated/pageload.d.ts +12 -0
  106. package/dist/checks/consolidated/pageload.d.ts.map +1 -0
  107. package/dist/checks/consolidated/pageload.js +138 -0
  108. package/dist/checks/consolidated/pageload.js.map +1 -0
  109. package/dist/checks/consolidated/performance.d.ts +112 -0
  110. package/dist/checks/consolidated/performance.d.ts.map +1 -0
  111. package/dist/checks/consolidated/performance.js +1546 -0
  112. package/dist/checks/consolidated/performance.js.map +1 -0
  113. package/dist/checks/consolidated/quality.d.ts +52 -0
  114. package/dist/checks/consolidated/quality.d.ts.map +1 -0
  115. package/dist/checks/consolidated/quality.js +253 -0
  116. package/dist/checks/consolidated/quality.js.map +1 -0
  117. package/dist/checks/consolidated/react.d.ts +48 -0
  118. package/dist/checks/consolidated/react.d.ts.map +1 -0
  119. package/dist/checks/consolidated/react.js +203 -0
  120. package/dist/checks/consolidated/react.js.map +1 -0
  121. package/dist/checks/consolidated/regression-hygiene.d.ts +17 -0
  122. package/dist/checks/consolidated/regression-hygiene.d.ts.map +1 -0
  123. package/dist/checks/consolidated/regression-hygiene.js +242 -0
  124. package/dist/checks/consolidated/regression-hygiene.js.map +1 -0
  125. package/dist/checks/consolidated/regression.d.ts +20 -0
  126. package/dist/checks/consolidated/regression.d.ts.map +1 -0
  127. package/dist/checks/consolidated/regression.js +121 -0
  128. package/dist/checks/consolidated/regression.js.map +1 -0
  129. package/dist/checks/consolidated/runtime.d.ts +53 -0
  130. package/dist/checks/consolidated/runtime.d.ts.map +1 -0
  131. package/dist/checks/consolidated/runtime.js +160 -0
  132. package/dist/checks/consolidated/runtime.js.map +1 -0
  133. package/dist/checks/consolidated/script-performance.d.ts +17 -0
  134. package/dist/checks/consolidated/script-performance.d.ts.map +1 -0
  135. package/dist/checks/consolidated/script-performance.js +137 -0
  136. package/dist/checks/consolidated/script-performance.js.map +1 -0
  137. package/dist/checks/consolidated/security.d.ts +78 -0
  138. package/dist/checks/consolidated/security.d.ts.map +1 -0
  139. package/dist/checks/consolidated/security.js +404 -0
  140. package/dist/checks/consolidated/security.js.map +1 -0
  141. package/dist/checks/consolidated/seo.d.ts +31 -0
  142. package/dist/checks/consolidated/seo.d.ts.map +1 -0
  143. package/dist/checks/consolidated/seo.js +1438 -0
  144. package/dist/checks/consolidated/seo.js.map +1 -0
  145. package/dist/checks/consolidated/sx-prop-deprecation.d.ts +22 -0
  146. package/dist/checks/consolidated/sx-prop-deprecation.d.ts.map +1 -0
  147. package/dist/checks/consolidated/sx-prop-deprecation.js +280 -0
  148. package/dist/checks/consolidated/sx-prop-deprecation.js.map +1 -0
  149. package/dist/checks/consolidated/tailwind-class-validation.d.ts +25 -0
  150. package/dist/checks/consolidated/tailwind-class-validation.d.ts.map +1 -0
  151. package/dist/checks/consolidated/tailwind-class-validation.js +533 -0
  152. package/dist/checks/consolidated/tailwind-class-validation.js.map +1 -0
  153. package/dist/checks/consolidated/testing.d.ts +54 -0
  154. package/dist/checks/consolidated/testing.d.ts.map +1 -0
  155. package/dist/checks/consolidated/testing.js +163 -0
  156. package/dist/checks/consolidated/testing.js.map +1 -0
  157. package/dist/checks/consolidated/typescript.d.ts +3 -0
  158. package/dist/checks/consolidated/typescript.d.ts.map +1 -0
  159. package/dist/checks/consolidated/typescript.js +31 -0
  160. package/dist/checks/consolidated/typescript.js.map +1 -0
  161. package/dist/checks/consolidated/ui-accessibility-advanced.d.ts +104 -0
  162. package/dist/checks/consolidated/ui-accessibility-advanced.d.ts.map +1 -0
  163. package/dist/checks/consolidated/ui-accessibility-advanced.js +689 -0
  164. package/dist/checks/consolidated/ui-accessibility-advanced.js.map +1 -0
  165. package/dist/checks/consolidated/ui-accessibility.d.ts +121 -0
  166. package/dist/checks/consolidated/ui-accessibility.d.ts.map +1 -0
  167. package/dist/checks/consolidated/ui-accessibility.js +776 -0
  168. package/dist/checks/consolidated/ui-accessibility.js.map +1 -0
  169. package/dist/checks/consolidated/ui-advanced-spacing.d.ts +142 -0
  170. package/dist/checks/consolidated/ui-advanced-spacing.d.ts.map +1 -0
  171. package/dist/checks/consolidated/ui-advanced-spacing.js +1220 -0
  172. package/dist/checks/consolidated/ui-advanced-spacing.js.map +1 -0
  173. package/dist/checks/consolidated/ui-animation-duration.d.ts +108 -0
  174. package/dist/checks/consolidated/ui-animation-duration.d.ts.map +1 -0
  175. package/dist/checks/consolidated/ui-animation-duration.js +531 -0
  176. package/dist/checks/consolidated/ui-animation-duration.js.map +1 -0
  177. package/dist/checks/consolidated/ui-border-radius.d.ts +90 -0
  178. package/dist/checks/consolidated/ui-border-radius.d.ts.map +1 -0
  179. package/dist/checks/consolidated/ui-border-radius.js +519 -0
  180. package/dist/checks/consolidated/ui-border-radius.js.map +1 -0
  181. package/dist/checks/consolidated/ui-buttons.d.ts +32 -0
  182. package/dist/checks/consolidated/ui-buttons.d.ts.map +1 -0
  183. package/dist/checks/consolidated/ui-buttons.js +481 -0
  184. package/dist/checks/consolidated/ui-buttons.js.map +1 -0
  185. package/dist/checks/consolidated/ui-cards.d.ts +29 -0
  186. package/dist/checks/consolidated/ui-cards.d.ts.map +1 -0
  187. package/dist/checks/consolidated/ui-cards.js +504 -0
  188. package/dist/checks/consolidated/ui-cards.js.map +1 -0
  189. package/dist/checks/consolidated/ui-checks.d.ts +48 -0
  190. package/dist/checks/consolidated/ui-checks.d.ts.map +1 -0
  191. package/dist/checks/consolidated/ui-checks.js +264 -0
  192. package/dist/checks/consolidated/ui-checks.js.map +1 -0
  193. package/dist/checks/consolidated/ui-cleanup.d.ts +81 -0
  194. package/dist/checks/consolidated/ui-cleanup.d.ts.map +1 -0
  195. package/dist/checks/consolidated/ui-cleanup.js +650 -0
  196. package/dist/checks/consolidated/ui-cleanup.js.map +1 -0
  197. package/dist/checks/consolidated/ui-components.d.ts +255 -0
  198. package/dist/checks/consolidated/ui-components.d.ts.map +1 -0
  199. package/dist/checks/consolidated/ui-components.js +2008 -0
  200. package/dist/checks/consolidated/ui-components.js.map +1 -0
  201. package/dist/checks/consolidated/ui-consistency-advanced.d.ts +130 -0
  202. package/dist/checks/consolidated/ui-consistency-advanced.d.ts.map +1 -0
  203. package/dist/checks/consolidated/ui-consistency-advanced.js +982 -0
  204. package/dist/checks/consolidated/ui-consistency-advanced.js.map +1 -0
  205. package/dist/checks/consolidated/ui-consistency-comprehensive.d.ts +30 -0
  206. package/dist/checks/consolidated/ui-consistency-comprehensive.d.ts.map +1 -0
  207. package/dist/checks/consolidated/ui-consistency-comprehensive.js +1018 -0
  208. package/dist/checks/consolidated/ui-consistency-comprehensive.js.map +1 -0
  209. package/dist/checks/consolidated/ui-consistency-extended.d.ts +26 -0
  210. package/dist/checks/consolidated/ui-consistency-extended.d.ts.map +1 -0
  211. package/dist/checks/consolidated/ui-consistency-extended.js +606 -0
  212. package/dist/checks/consolidated/ui-consistency-extended.js.map +1 -0
  213. package/dist/checks/consolidated/ui-data-display.d.ts +103 -0
  214. package/dist/checks/consolidated/ui-data-display.d.ts.map +1 -0
  215. package/dist/checks/consolidated/ui-data-display.js +740 -0
  216. package/dist/checks/consolidated/ui-data-display.js.map +1 -0
  217. package/dist/checks/consolidated/ui-deprecated.d.ts +22 -0
  218. package/dist/checks/consolidated/ui-deprecated.d.ts.map +1 -0
  219. package/dist/checks/consolidated/ui-deprecated.js +336 -0
  220. package/dist/checks/consolidated/ui-deprecated.js.map +1 -0
  221. package/dist/checks/consolidated/ui-empty-null-states.d.ts +90 -0
  222. package/dist/checks/consolidated/ui-empty-null-states.d.ts.map +1 -0
  223. package/dist/checks/consolidated/ui-empty-null-states.js +511 -0
  224. package/dist/checks/consolidated/ui-empty-null-states.js.map +1 -0
  225. package/dist/checks/consolidated/ui-error-states.d.ts +99 -0
  226. package/dist/checks/consolidated/ui-error-states.d.ts.map +1 -0
  227. package/dist/checks/consolidated/ui-error-states.js +694 -0
  228. package/dist/checks/consolidated/ui-error-states.js.map +1 -0
  229. package/dist/checks/consolidated/ui-feedback-confirmations.d.ts +90 -0
  230. package/dist/checks/consolidated/ui-feedback-confirmations.d.ts.map +1 -0
  231. package/dist/checks/consolidated/ui-feedback-confirmations.js +596 -0
  232. package/dist/checks/consolidated/ui-feedback-confirmations.js.map +1 -0
  233. package/dist/checks/consolidated/ui-forms.d.ts +32 -0
  234. package/dist/checks/consolidated/ui-forms.d.ts.map +1 -0
  235. package/dist/checks/consolidated/ui-forms.js +568 -0
  236. package/dist/checks/consolidated/ui-forms.js.map +1 -0
  237. package/dist/checks/consolidated/ui-gradient-shadow.d.ts +90 -0
  238. package/dist/checks/consolidated/ui-gradient-shadow.d.ts.map +1 -0
  239. package/dist/checks/consolidated/ui-gradient-shadow.js +568 -0
  240. package/dist/checks/consolidated/ui-gradient-shadow.js.map +1 -0
  241. package/dist/checks/consolidated/ui-grid-responsive.d.ts +27 -0
  242. package/dist/checks/consolidated/ui-grid-responsive.d.ts.map +1 -0
  243. package/dist/checks/consolidated/ui-grid-responsive.js +441 -0
  244. package/dist/checks/consolidated/ui-grid-responsive.js.map +1 -0
  245. package/dist/checks/consolidated/ui-icon-size-tokens.d.ts +104 -0
  246. package/dist/checks/consolidated/ui-icon-size-tokens.d.ts.map +1 -0
  247. package/dist/checks/consolidated/ui-icon-size-tokens.js +514 -0
  248. package/dist/checks/consolidated/ui-icon-size-tokens.js.map +1 -0
  249. package/dist/checks/consolidated/ui-iconography.d.ts +90 -0
  250. package/dist/checks/consolidated/ui-iconography.d.ts.map +1 -0
  251. package/dist/checks/consolidated/ui-iconography.js +565 -0
  252. package/dist/checks/consolidated/ui-iconography.js.map +1 -0
  253. package/dist/checks/consolidated/ui-interactive-states.d.ts +240 -0
  254. package/dist/checks/consolidated/ui-interactive-states.d.ts.map +1 -0
  255. package/dist/checks/consolidated/ui-interactive-states.js +2474 -0
  256. package/dist/checks/consolidated/ui-interactive-states.js.map +1 -0
  257. package/dist/checks/consolidated/ui-layout.d.ts +256 -0
  258. package/dist/checks/consolidated/ui-layout.d.ts.map +1 -0
  259. package/dist/checks/consolidated/ui-layout.js +1371 -0
  260. package/dist/checks/consolidated/ui-layout.js.map +1 -0
  261. package/dist/checks/consolidated/ui-loading-skeletons.d.ts +11 -0
  262. package/dist/checks/consolidated/ui-loading-skeletons.d.ts.map +1 -0
  263. package/dist/checks/consolidated/ui-loading-skeletons.js +145 -0
  264. package/dist/checks/consolidated/ui-loading-skeletons.js.map +1 -0
  265. package/dist/checks/consolidated/ui-loading-state-skeletons.d.ts +9 -0
  266. package/dist/checks/consolidated/ui-loading-state-skeletons.d.ts.map +1 -0
  267. package/dist/checks/consolidated/ui-loading-state-skeletons.js +125 -0
  268. package/dist/checks/consolidated/ui-loading-state-skeletons.js.map +1 -0
  269. package/dist/checks/consolidated/ui-media.d.ts +74 -0
  270. package/dist/checks/consolidated/ui-media.d.ts.map +1 -0
  271. package/dist/checks/consolidated/ui-media.js +408 -0
  272. package/dist/checks/consolidated/ui-media.js.map +1 -0
  273. package/dist/checks/consolidated/ui-micro-interactions.d.ts +107 -0
  274. package/dist/checks/consolidated/ui-micro-interactions.d.ts.map +1 -0
  275. package/dist/checks/consolidated/ui-micro-interactions.js +825 -0
  276. package/dist/checks/consolidated/ui-micro-interactions.js.map +1 -0
  277. package/dist/checks/consolidated/ui-microcopy-consistency.d.ts +114 -0
  278. package/dist/checks/consolidated/ui-microcopy-consistency.d.ts.map +1 -0
  279. package/dist/checks/consolidated/ui-microcopy-consistency.js +566 -0
  280. package/dist/checks/consolidated/ui-microcopy-consistency.js.map +1 -0
  281. package/dist/checks/consolidated/ui-mobile-ux.d.ts +251 -0
  282. package/dist/checks/consolidated/ui-mobile-ux.d.ts.map +1 -0
  283. package/dist/checks/consolidated/ui-mobile-ux.js +2212 -0
  284. package/dist/checks/consolidated/ui-mobile-ux.js.map +1 -0
  285. package/dist/checks/consolidated/ui-motion-accessibility.d.ts +93 -0
  286. package/dist/checks/consolidated/ui-motion-accessibility.d.ts.map +1 -0
  287. package/dist/checks/consolidated/ui-motion-accessibility.js +450 -0
  288. package/dist/checks/consolidated/ui-motion-accessibility.js.map +1 -0
  289. package/dist/checks/consolidated/ui-navigation.d.ts +85 -0
  290. package/dist/checks/consolidated/ui-navigation.d.ts.map +1 -0
  291. package/dist/checks/consolidated/ui-navigation.js +673 -0
  292. package/dist/checks/consolidated/ui-navigation.js.map +1 -0
  293. package/dist/checks/consolidated/ui-patterns.d.ts +174 -0
  294. package/dist/checks/consolidated/ui-patterns.d.ts.map +1 -0
  295. package/dist/checks/consolidated/ui-patterns.js +1532 -0
  296. package/dist/checks/consolidated/ui-patterns.js.map +1 -0
  297. package/dist/checks/consolidated/ui-responsive.d.ts +89 -0
  298. package/dist/checks/consolidated/ui-responsive.d.ts.map +1 -0
  299. package/dist/checks/consolidated/ui-responsive.js +588 -0
  300. package/dist/checks/consolidated/ui-responsive.js.map +1 -0
  301. package/dist/checks/consolidated/ui-spacing-standards.d.ts +43 -0
  302. package/dist/checks/consolidated/ui-spacing-standards.d.ts.map +1 -0
  303. package/dist/checks/consolidated/ui-spacing-standards.js +874 -0
  304. package/dist/checks/consolidated/ui-spacing-standards.js.map +1 -0
  305. package/dist/checks/consolidated/ui-spacing.d.ts +751 -0
  306. package/dist/checks/consolidated/ui-spacing.d.ts.map +1 -0
  307. package/dist/checks/consolidated/ui-spacing.js +4996 -0
  308. package/dist/checks/consolidated/ui-spacing.js.map +1 -0
  309. package/dist/checks/consolidated/ui-standards-auto-fixer.d.ts +70 -0
  310. package/dist/checks/consolidated/ui-standards-auto-fixer.d.ts.map +1 -0
  311. package/dist/checks/consolidated/ui-standards-auto-fixer.js +429 -0
  312. package/dist/checks/consolidated/ui-standards-auto-fixer.js.map +1 -0
  313. package/dist/checks/consolidated/ui-standards-enforcement.d.ts +100 -0
  314. package/dist/checks/consolidated/ui-standards-enforcement.d.ts.map +1 -0
  315. package/dist/checks/consolidated/ui-standards-enforcement.js +935 -0
  316. package/dist/checks/consolidated/ui-standards-enforcement.js.map +1 -0
  317. package/dist/checks/consolidated/ui-state-consistency.d.ts +90 -0
  318. package/dist/checks/consolidated/ui-state-consistency.d.ts.map +1 -0
  319. package/dist/checks/consolidated/ui-state-consistency.js +659 -0
  320. package/dist/checks/consolidated/ui-state-consistency.js.map +1 -0
  321. package/dist/checks/consolidated/ui-style-validation.d.ts +74 -0
  322. package/dist/checks/consolidated/ui-style-validation.d.ts.map +1 -0
  323. package/dist/checks/consolidated/ui-style-validation.js +403 -0
  324. package/dist/checks/consolidated/ui-style-validation.js.map +1 -0
  325. package/dist/checks/consolidated/ui-tokens.d.ts +110 -0
  326. package/dist/checks/consolidated/ui-tokens.d.ts.map +1 -0
  327. package/dist/checks/consolidated/ui-tokens.js +990 -0
  328. package/dist/checks/consolidated/ui-tokens.js.map +1 -0
  329. package/dist/checks/consolidated/ui-typography.d.ts +77 -0
  330. package/dist/checks/consolidated/ui-typography.d.ts.map +1 -0
  331. package/dist/checks/consolidated/ui-typography.js +416 -0
  332. package/dist/checks/consolidated/ui-typography.js.map +1 -0
  333. package/dist/checks/consolidated/ui-visual-hierarchy.d.ts +90 -0
  334. package/dist/checks/consolidated/ui-visual-hierarchy.d.ts.map +1 -0
  335. package/dist/checks/consolidated/ui-visual-hierarchy.js +562 -0
  336. package/dist/checks/consolidated/ui-visual-hierarchy.js.map +1 -0
  337. package/dist/checks/consolidated/woocommerce.d.ts +50 -0
  338. package/dist/checks/consolidated/woocommerce.d.ts.map +1 -0
  339. package/dist/checks/consolidated/woocommerce.js +198 -0
  340. package/dist/checks/consolidated/woocommerce.js.map +1 -0
  341. package/dist/checks/core/api-route-protection.d.ts +2 -0
  342. package/dist/checks/core/api-route-protection.d.ts.map +1 -0
  343. package/dist/checks/core/api-route-protection.js +101 -0
  344. package/dist/checks/core/api-route-protection.js.map +1 -0
  345. package/dist/checks/core/critical.d.ts +8 -0
  346. package/dist/checks/core/critical.d.ts.map +1 -0
  347. package/dist/checks/core/critical.js +200 -0
  348. package/dist/checks/core/critical.js.map +1 -0
  349. package/dist/checks/core/database.d.ts +8 -0
  350. package/dist/checks/core/database.d.ts.map +1 -0
  351. package/dist/checks/core/database.js +699 -0
  352. package/dist/checks/core/database.js.map +1 -0
  353. package/dist/checks/core/development.d.ts +8 -0
  354. package/dist/checks/core/development.d.ts.map +1 -0
  355. package/dist/checks/core/development.js +417 -0
  356. package/dist/checks/core/development.js.map +1 -0
  357. package/dist/checks/core/hydration-mismatch-check.d.ts +38 -0
  358. package/dist/checks/core/hydration-mismatch-check.d.ts.map +1 -0
  359. package/dist/checks/core/hydration-mismatch-check.js +411 -0
  360. package/dist/checks/core/hydration-mismatch-check.js.map +1 -0
  361. package/dist/checks/core/performance.d.ts +8 -0
  362. package/dist/checks/core/performance.d.ts.map +1 -0
  363. package/dist/checks/core/performance.js +474 -0
  364. package/dist/checks/core/performance.js.map +1 -0
  365. package/dist/checks/core/security.d.ts +8 -0
  366. package/dist/checks/core/security.d.ts.map +1 -0
  367. package/dist/checks/core/security.js +275 -0
  368. package/dist/checks/core/security.js.map +1 -0
  369. package/dist/checks/core/standardized-error-handling.d.ts +43 -0
  370. package/dist/checks/core/standardized-error-handling.d.ts.map +1 -0
  371. package/dist/checks/core/standardized-error-handling.js +384 -0
  372. package/dist/checks/core/standardized-error-handling.js.map +1 -0
  373. package/dist/checks/core/supercatch.d.ts +8 -0
  374. package/dist/checks/core/supercatch.d.ts.map +1 -0
  375. package/dist/checks/core/supercatch.js +750 -0
  376. package/dist/checks/core/supercatch.js.map +1 -0
  377. package/dist/checks/core/suppression-check.d.ts +2 -0
  378. package/dist/checks/core/suppression-check.d.ts.map +1 -0
  379. package/dist/checks/core/suppression-check.js +129 -0
  380. package/dist/checks/core/suppression-check.js.map +1 -0
  381. package/dist/checks/core/ui-quality.d.ts +8 -0
  382. package/dist/checks/core/ui-quality.d.ts.map +1 -0
  383. package/dist/checks/core/ui-quality.js +1736 -0
  384. package/dist/checks/core/ui-quality.js.map +1 -0
  385. package/dist/checks/core/unused-assets-check.d.ts +2 -0
  386. package/dist/checks/core/unused-assets-check.d.ts.map +1 -0
  387. package/dist/checks/core/unused-assets-check.js +112 -0
  388. package/dist/checks/core/unused-assets-check.js.map +1 -0
  389. package/dist/checks/core/use-status-ssr-safety.d.ts +34 -0
  390. package/dist/checks/core/use-status-ssr-safety.d.ts.map +1 -0
  391. package/dist/checks/core/use-status-ssr-safety.js +283 -0
  392. package/dist/checks/core/use-status-ssr-safety.js.map +1 -0
  393. package/dist/checks/email/email-flow-validation.d.ts +23 -0
  394. package/dist/checks/email/email-flow-validation.d.ts.map +1 -0
  395. package/dist/checks/email/email-flow-validation.js +468 -0
  396. package/dist/checks/email/email-flow-validation.js.map +1 -0
  397. package/dist/checks/email/email-template-db-verification.d.ts +20 -0
  398. package/dist/checks/email/email-template-db-verification.d.ts.map +1 -0
  399. package/dist/checks/email/email-template-db-verification.js +46 -0
  400. package/dist/checks/email/email-template-db-verification.js.map +1 -0
  401. package/dist/checks/email/email-template-validation.d.ts +24 -0
  402. package/dist/checks/email/email-template-validation.d.ts.map +1 -0
  403. package/dist/checks/email/email-template-validation.js +688 -0
  404. package/dist/checks/email/email-template-validation.js.map +1 -0
  405. package/dist/checks/jsx/comment-placement.d.ts +45 -0
  406. package/dist/checks/jsx/comment-placement.d.ts.map +1 -0
  407. package/dist/checks/jsx/comment-placement.js +316 -0
  408. package/dist/checks/jsx/comment-placement.js.map +1 -0
  409. package/dist/checks/specialized/admin-layout-check.d.ts +19 -0
  410. package/dist/checks/specialized/admin-layout-check.d.ts.map +1 -0
  411. package/dist/checks/specialized/admin-layout-check.js +166 -0
  412. package/dist/checks/specialized/admin-layout-check.js.map +1 -0
  413. package/dist/checks/specialized/client-server-separation.d.ts +14 -0
  414. package/dist/checks/specialized/client-server-separation.d.ts.map +1 -0
  415. package/dist/checks/specialized/client-server-separation.js +197 -0
  416. package/dist/checks/specialized/client-server-separation.js.map +1 -0
  417. package/dist/checks/specialized/cost-optimization.d.ts +18 -0
  418. package/dist/checks/specialized/cost-optimization.d.ts.map +1 -0
  419. package/dist/checks/specialized/cost-optimization.js +78 -0
  420. package/dist/checks/specialized/cost-optimization.js.map +1 -0
  421. package/dist/checks/specialized/database-migration-sync.d.ts +21 -0
  422. package/dist/checks/specialized/database-migration-sync.d.ts.map +1 -0
  423. package/dist/checks/specialized/database-migration-sync.js +150 -0
  424. package/dist/checks/specialized/database-migration-sync.js.map +1 -0
  425. package/dist/checks/specialized/database-model-validation.d.ts +15 -0
  426. package/dist/checks/specialized/database-model-validation.d.ts.map +1 -0
  427. package/dist/checks/specialized/database-model-validation.js +35 -0
  428. package/dist/checks/specialized/database-model-validation.js.map +1 -0
  429. package/dist/checks/specialized/database-schema-migrations-diff.d.ts +27 -0
  430. package/dist/checks/specialized/database-schema-migrations-diff.d.ts.map +1 -0
  431. package/dist/checks/specialized/database-schema-migrations-diff.js +177 -0
  432. package/dist/checks/specialized/database-schema-migrations-diff.js.map +1 -0
  433. package/dist/checks/specialized/database-schema-sync.d.ts +23 -0
  434. package/dist/checks/specialized/database-schema-sync.d.ts.map +1 -0
  435. package/dist/checks/specialized/database-schema-sync.js +77 -0
  436. package/dist/checks/specialized/database-schema-sync.js.map +1 -0
  437. package/dist/checks/specialized/decimal-serialization.d.ts +24 -0
  438. package/dist/checks/specialized/decimal-serialization.d.ts.map +1 -0
  439. package/dist/checks/specialized/decimal-serialization.js +400 -0
  440. package/dist/checks/specialized/decimal-serialization.js.map +1 -0
  441. package/dist/checks/specialized/detect-router-issues.d.ts +14 -0
  442. package/dist/checks/specialized/detect-router-issues.d.ts.map +1 -0
  443. package/dist/checks/specialized/detect-router-issues.js +96 -0
  444. package/dist/checks/specialized/detect-router-issues.js.map +1 -0
  445. package/dist/checks/specialized/enum-validation.d.ts +15 -0
  446. package/dist/checks/specialized/enum-validation.d.ts.map +1 -0
  447. package/dist/checks/specialized/enum-validation.js +35 -0
  448. package/dist/checks/specialized/enum-validation.js.map +1 -0
  449. package/dist/checks/specialized/hash-collision.d.ts +18 -0
  450. package/dist/checks/specialized/hash-collision.d.ts.map +1 -0
  451. package/dist/checks/specialized/hash-collision.js +78 -0
  452. package/dist/checks/specialized/hash-collision.js.map +1 -0
  453. package/dist/checks/specialized/id-generation-enforcement.d.ts +16 -0
  454. package/dist/checks/specialized/id-generation-enforcement.d.ts.map +1 -0
  455. package/dist/checks/specialized/id-generation-enforcement.js +307 -0
  456. package/dist/checks/specialized/id-generation-enforcement.js.map +1 -0
  457. package/dist/checks/specialized/image-data-integrity.d.ts +15 -0
  458. package/dist/checks/specialized/image-data-integrity.d.ts.map +1 -0
  459. package/dist/checks/specialized/image-data-integrity.js +79 -0
  460. package/dist/checks/specialized/image-data-integrity.js.map +1 -0
  461. package/dist/checks/specialized/image-health.d.ts +14 -0
  462. package/dist/checks/specialized/image-health.d.ts.map +1 -0
  463. package/dist/checks/specialized/image-health.js +122 -0
  464. package/dist/checks/specialized/image-health.js.map +1 -0
  465. package/dist/checks/specialized/image-metadata-validation.d.ts +14 -0
  466. package/dist/checks/specialized/image-metadata-validation.d.ts.map +1 -0
  467. package/dist/checks/specialized/image-metadata-validation.js +95 -0
  468. package/dist/checks/specialized/image-metadata-validation.js.map +1 -0
  469. package/dist/checks/specialized/image-optimization.d.ts +16 -0
  470. package/dist/checks/specialized/image-optimization.d.ts.map +1 -0
  471. package/dist/checks/specialized/image-optimization.js +86 -0
  472. package/dist/checks/specialized/image-optimization.js.map +1 -0
  473. package/dist/checks/specialized/invalid-module-imports.d.ts +24 -0
  474. package/dist/checks/specialized/invalid-module-imports.d.ts.map +1 -0
  475. package/dist/checks/specialized/invalid-module-imports.js +209 -0
  476. package/dist/checks/specialized/invalid-module-imports.js.map +1 -0
  477. package/dist/checks/specialized/lint-validation.d.ts +26 -0
  478. package/dist/checks/specialized/lint-validation.d.ts.map +1 -0
  479. package/dist/checks/specialized/lint-validation.js +193 -0
  480. package/dist/checks/specialized/lint-validation.js.map +1 -0
  481. package/dist/checks/specialized/listing-workflow.d.ts +19 -0
  482. package/dist/checks/specialized/listing-workflow.d.ts.map +1 -0
  483. package/dist/checks/specialized/listing-workflow.js +89 -0
  484. package/dist/checks/specialized/listing-workflow.js.map +1 -0
  485. package/dist/checks/specialized/mui-imports-validation.d.ts +18 -0
  486. package/dist/checks/specialized/mui-imports-validation.d.ts.map +1 -0
  487. package/dist/checks/specialized/mui-imports-validation.js +134 -0
  488. package/dist/checks/specialized/mui-imports-validation.js.map +1 -0
  489. package/dist/checks/specialized/nextauth-v5-compliance.d.ts +16 -0
  490. package/dist/checks/specialized/nextauth-v5-compliance.d.ts.map +1 -0
  491. package/dist/checks/specialized/nextauth-v5-compliance.js +164 -0
  492. package/dist/checks/specialized/nextauth-v5-compliance.js.map +1 -0
  493. package/dist/checks/specialized/nextjs-params-check.d.ts +14 -0
  494. package/dist/checks/specialized/nextjs-params-check.d.ts.map +1 -0
  495. package/dist/checks/specialized/nextjs-params-check.js +140 -0
  496. package/dist/checks/specialized/nextjs-params-check.js.map +1 -0
  497. package/dist/checks/specialized/no-legacy-catalog-aliases-validation.d.ts +16 -0
  498. package/dist/checks/specialized/no-legacy-catalog-aliases-validation.d.ts.map +1 -0
  499. package/dist/checks/specialized/no-legacy-catalog-aliases-validation.js +36 -0
  500. package/dist/checks/specialized/no-legacy-catalog-aliases-validation.js.map +1 -0
  501. package/dist/checks/specialized/no-wata-cardgraded-validation.d.ts +22 -0
  502. package/dist/checks/specialized/no-wata-cardgraded-validation.d.ts.map +1 -0
  503. package/dist/checks/specialized/no-wata-cardgraded-validation.js +97 -0
  504. package/dist/checks/specialized/no-wata-cardgraded-validation.js.map +1 -0
  505. package/dist/checks/specialized/parameter-consistency-check.d.ts +20 -0
  506. package/dist/checks/specialized/parameter-consistency-check.d.ts.map +1 -0
  507. package/dist/checks/specialized/parameter-consistency-check.js +115 -0
  508. package/dist/checks/specialized/parameter-consistency-check.js.map +1 -0
  509. package/dist/checks/specialized/prisma-field-names-validation.d.ts +15 -0
  510. package/dist/checks/specialized/prisma-field-names-validation.d.ts.map +1 -0
  511. package/dist/checks/specialized/prisma-field-names-validation.js +35 -0
  512. package/dist/checks/specialized/prisma-field-names-validation.js.map +1 -0
  513. package/dist/checks/specialized/prisma-null-syntax.d.ts +34 -0
  514. package/dist/checks/specialized/prisma-null-syntax.d.ts.map +1 -0
  515. package/dist/checks/specialized/prisma-null-syntax.js +330 -0
  516. package/dist/checks/specialized/prisma-null-syntax.js.map +1 -0
  517. package/dist/checks/specialized/prisma-query-validation.d.ts +15 -0
  518. package/dist/checks/specialized/prisma-query-validation.d.ts.map +1 -0
  519. package/dist/checks/specialized/prisma-query-validation.js +35 -0
  520. package/dist/checks/specialized/prisma-query-validation.js.map +1 -0
  521. package/dist/checks/specialized/product-type-validation.d.ts +17 -0
  522. package/dist/checks/specialized/product-type-validation.d.ts.map +1 -0
  523. package/dist/checks/specialized/product-type-validation.js +129 -0
  524. package/dist/checks/specialized/product-type-validation.js.map +1 -0
  525. package/dist/checks/specialized/responsive-image-validation.d.ts +14 -0
  526. package/dist/checks/specialized/responsive-image-validation.d.ts.map +1 -0
  527. package/dist/checks/specialized/responsive-image-validation.js +101 -0
  528. package/dist/checks/specialized/responsive-image-validation.js.map +1 -0
  529. package/dist/checks/specialized/root-cleanliness.d.ts +21 -0
  530. package/dist/checks/specialized/root-cleanliness.d.ts.map +1 -0
  531. package/dist/checks/specialized/root-cleanliness.js +251 -0
  532. package/dist/checks/specialized/root-cleanliness.js.map +1 -0
  533. package/dist/checks/specialized/rotation-detection-validation.d.ts +16 -0
  534. package/dist/checks/specialized/rotation-detection-validation.d.ts.map +1 -0
  535. package/dist/checks/specialized/rotation-detection-validation.js +113 -0
  536. package/dist/checks/specialized/rotation-detection-validation.js.map +1 -0
  537. package/dist/checks/specialized/script-organization.d.ts +17 -0
  538. package/dist/checks/specialized/script-organization.d.ts.map +1 -0
  539. package/dist/checks/specialized/script-organization.js +487 -0
  540. package/dist/checks/specialized/script-organization.js.map +1 -0
  541. package/dist/checks/specialized/shared-components-migration.d.ts +137 -0
  542. package/dist/checks/specialized/shared-components-migration.d.ts.map +1 -0
  543. package/dist/checks/specialized/shared-components-migration.js +1288 -0
  544. package/dist/checks/specialized/shared-components-migration.js.map +1 -0
  545. package/dist/checks/specialized/store-specialties-normalization.d.ts +10 -0
  546. package/dist/checks/specialized/store-specialties-normalization.d.ts.map +1 -0
  547. package/dist/checks/specialized/store-specialties-normalization.js +126 -0
  548. package/dist/checks/specialized/store-specialties-normalization.js.map +1 -0
  549. package/dist/checks/specialized/two-stage-trim-validation.d.ts +16 -0
  550. package/dist/checks/specialized/two-stage-trim-validation.d.ts.map +1 -0
  551. package/dist/checks/specialized/two-stage-trim-validation.js +115 -0
  552. package/dist/checks/specialized/two-stage-trim-validation.js.map +1 -0
  553. package/dist/checks/specialized/underscore-variable-audit.d.ts +26 -0
  554. package/dist/checks/specialized/underscore-variable-audit.d.ts.map +1 -0
  555. package/dist/checks/specialized/underscore-variable-audit.js +219 -0
  556. package/dist/checks/specialized/underscore-variable-audit.js.map +1 -0
  557. package/dist/checks/specialized/unified-badge-consistency.d.ts +16 -0
  558. package/dist/checks/specialized/unified-badge-consistency.d.ts.map +1 -0
  559. package/dist/checks/specialized/unified-badge-consistency.js +284 -0
  560. package/dist/checks/specialized/unified-badge-consistency.js.map +1 -0
  561. package/dist/checks/specialized/validate-integration-enums.d.ts +15 -0
  562. package/dist/checks/specialized/validate-integration-enums.d.ts.map +1 -0
  563. package/dist/checks/specialized/validate-integration-enums.js +131 -0
  564. package/dist/checks/specialized/validate-integration-enums.js.map +1 -0
  565. package/dist/checks/testing/action-regression.d.ts +23 -0
  566. package/dist/checks/testing/action-regression.d.ts.map +1 -0
  567. package/dist/checks/testing/action-regression.js +192 -0
  568. package/dist/checks/testing/action-regression.js.map +1 -0
  569. package/dist/checks/testing/critical-api-coverage.d.ts +21 -0
  570. package/dist/checks/testing/critical-api-coverage.d.ts.map +1 -0
  571. package/dist/checks/testing/critical-api-coverage.js +158 -0
  572. package/dist/checks/testing/critical-api-coverage.js.map +1 -0
  573. package/dist/checks/testing/data-entry-regression-required.d.ts +24 -0
  574. package/dist/checks/testing/data-entry-regression-required.d.ts.map +1 -0
  575. package/dist/checks/testing/data-entry-regression-required.js +378 -0
  576. package/dist/checks/testing/data-entry-regression-required.js.map +1 -0
  577. package/dist/checks/testing/e2e-best-practices.d.ts +24 -0
  578. package/dist/checks/testing/e2e-best-practices.d.ts.map +1 -0
  579. package/dist/checks/testing/e2e-best-practices.js +791 -0
  580. package/dist/checks/testing/e2e-best-practices.js.map +1 -0
  581. package/dist/checks/testing/e2e-flake-patterns.d.ts +26 -0
  582. package/dist/checks/testing/e2e-flake-patterns.d.ts.map +1 -0
  583. package/dist/checks/testing/e2e-flake-patterns.js +305 -0
  584. package/dist/checks/testing/e2e-flake-patterns.js.map +1 -0
  585. package/dist/checks/testing/e2e-redundant-visibility-checks.d.ts +25 -0
  586. package/dist/checks/testing/e2e-redundant-visibility-checks.d.ts.map +1 -0
  587. package/dist/checks/testing/e2e-redundant-visibility-checks.js +613 -0
  588. package/dist/checks/testing/e2e-redundant-visibility-checks.js.map +1 -0
  589. package/dist/checks/testing/e2e-slow-tests.d.ts +9 -0
  590. package/dist/checks/testing/e2e-slow-tests.d.ts.map +1 -0
  591. package/dist/checks/testing/e2e-slow-tests.js +142 -0
  592. package/dist/checks/testing/e2e-slow-tests.js.map +1 -0
  593. package/dist/checks/testing/e2e-timeouts.d.ts +9 -0
  594. package/dist/checks/testing/e2e-timeouts.d.ts.map +1 -0
  595. package/dist/checks/testing/e2e-timeouts.js +82 -0
  596. package/dist/checks/testing/e2e-timeouts.js.map +1 -0
  597. package/dist/checks/testing/integration-e2e-depth.d.ts +20 -0
  598. package/dist/checks/testing/integration-e2e-depth.d.ts.map +1 -0
  599. package/dist/checks/testing/integration-e2e-depth.js +575 -0
  600. package/dist/checks/testing/integration-e2e-depth.js.map +1 -0
  601. package/dist/checks/testing/playwright-feature-coverage-gaps.d.ts +31 -0
  602. package/dist/checks/testing/playwright-feature-coverage-gaps.d.ts.map +1 -0
  603. package/dist/checks/testing/playwright-feature-coverage-gaps.js +1582 -0
  604. package/dist/checks/testing/playwright-feature-coverage-gaps.js.map +1 -0
  605. package/dist/checks/testing/playwright-mock-inventory.d.ts +24 -0
  606. package/dist/checks/testing/playwright-mock-inventory.d.ts.map +1 -0
  607. package/dist/checks/testing/playwright-mock-inventory.js +380 -0
  608. package/dist/checks/testing/playwright-mock-inventory.js.map +1 -0
  609. package/dist/checks/testing/test-coverage-threshold.d.ts +25 -0
  610. package/dist/checks/testing/test-coverage-threshold.d.ts.map +1 -0
  611. package/dist/checks/testing/test-coverage-threshold.js +166 -0
  612. package/dist/checks/testing/test-coverage-threshold.js.map +1 -0
  613. package/dist/checks/testing/test-flakiness-score.d.ts +27 -0
  614. package/dist/checks/testing/test-flakiness-score.d.ts.map +1 -0
  615. package/dist/checks/testing/test-flakiness-score.js +358 -0
  616. package/dist/checks/testing/test-flakiness-score.js.map +1 -0
  617. package/dist/checks/testing/test-patterns.d.ts +16 -0
  618. package/dist/checks/testing/test-patterns.d.ts.map +1 -0
  619. package/dist/checks/testing/test-patterns.js +156 -0
  620. package/dist/checks/testing/test-patterns.js.map +1 -0
  621. package/dist/checks/workflows/a-plus-rating-validation.d.ts +42 -0
  622. package/dist/checks/workflows/a-plus-rating-validation.d.ts.map +1 -0
  623. package/dist/checks/workflows/a-plus-rating-validation.js +527 -0
  624. package/dist/checks/workflows/a-plus-rating-validation.js.map +1 -0
  625. package/dist/checks/workflows/affected.d.ts +14 -0
  626. package/dist/checks/workflows/affected.d.ts.map +1 -0
  627. package/dist/checks/workflows/affected.js +126 -0
  628. package/dist/checks/workflows/affected.js.map +1 -0
  629. package/dist/checks/workflows/ai.d.ts +6 -0
  630. package/dist/checks/workflows/ai.d.ts.map +1 -0
  631. package/dist/checks/workflows/ai.js +42 -0
  632. package/dist/checks/workflows/ai.js.map +1 -0
  633. package/dist/checks/workflows/all.d.ts +31 -0
  634. package/dist/checks/workflows/all.d.ts.map +1 -0
  635. package/dist/checks/workflows/all.js +2688 -0
  636. package/dist/checks/workflows/all.js.map +1 -0
  637. package/dist/checks/workflows/commit.d.ts +19 -0
  638. package/dist/checks/workflows/commit.d.ts.map +1 -0
  639. package/dist/checks/workflows/commit.js +207 -0
  640. package/dist/checks/workflows/commit.js.map +1 -0
  641. package/dist/checks/workflows/critical.d.ts +9 -0
  642. package/dist/checks/workflows/critical.d.ts.map +1 -0
  643. package/dist/checks/workflows/critical.js +213 -0
  644. package/dist/checks/workflows/critical.js.map +1 -0
  645. package/dist/checks/workflows/database-id-validation.d.ts +9 -0
  646. package/dist/checks/workflows/database-id-validation.d.ts.map +1 -0
  647. package/dist/checks/workflows/database-id-validation.js +13 -0
  648. package/dist/checks/workflows/database-id-validation.js.map +1 -0
  649. package/dist/checks/workflows/deploy.d.ts +20 -0
  650. package/dist/checks/workflows/deploy.d.ts.map +1 -0
  651. package/dist/checks/workflows/deploy.js +107 -0
  652. package/dist/checks/workflows/deploy.js.map +1 -0
  653. package/dist/checks/workflows/deployment-readiness.d.ts +12 -0
  654. package/dist/checks/workflows/deployment-readiness.d.ts.map +1 -0
  655. package/dist/checks/workflows/deployment-readiness.js +403 -0
  656. package/dist/checks/workflows/deployment-readiness.js.map +1 -0
  657. package/dist/checks/workflows/dev.d.ts +19 -0
  658. package/dist/checks/workflows/dev.d.ts.map +1 -0
  659. package/dist/checks/workflows/dev.js +88 -0
  660. package/dist/checks/workflows/dev.js.map +1 -0
  661. package/dist/checks/workflows/development.d.ts +9 -0
  662. package/dist/checks/workflows/development.d.ts.map +1 -0
  663. package/dist/checks/workflows/development.js +65 -0
  664. package/dist/checks/workflows/development.js.map +1 -0
  665. package/dist/checks/workflows/enterprise.d.ts +10 -0
  666. package/dist/checks/workflows/enterprise.d.ts.map +1 -0
  667. package/dist/checks/workflows/enterprise.js +359 -0
  668. package/dist/checks/workflows/enterprise.js.map +1 -0
  669. package/dist/checks/workflows/images.d.ts +6 -0
  670. package/dist/checks/workflows/images.d.ts.map +1 -0
  671. package/dist/checks/workflows/images.js +58 -0
  672. package/dist/checks/workflows/images.js.map +1 -0
  673. package/dist/checks/workflows/naming.d.ts +19 -0
  674. package/dist/checks/workflows/naming.d.ts.map +1 -0
  675. package/dist/checks/workflows/naming.js +42 -0
  676. package/dist/checks/workflows/naming.js.map +1 -0
  677. package/dist/checks/workflows/performance.d.ts +8 -0
  678. package/dist/checks/workflows/performance.d.ts.map +1 -0
  679. package/dist/checks/workflows/performance.js +77 -0
  680. package/dist/checks/workflows/performance.js.map +1 -0
  681. package/dist/checks/workflows/pre-deploy.d.ts +6 -0
  682. package/dist/checks/workflows/pre-deploy.d.ts.map +1 -0
  683. package/dist/checks/workflows/pre-deploy.js +41 -0
  684. package/dist/checks/workflows/pre-deploy.js.map +1 -0
  685. package/dist/checks/workflows/security.d.ts +8 -0
  686. package/dist/checks/workflows/security.d.ts.map +1 -0
  687. package/dist/checks/workflows/security.js +71 -0
  688. package/dist/checks/workflows/security.js.map +1 -0
  689. package/dist/checks/workflows/supercatch.d.ts +8 -0
  690. package/dist/checks/workflows/supercatch.d.ts.map +1 -0
  691. package/dist/checks/workflows/supercatch.js +127 -0
  692. package/dist/checks/workflows/supercatch.js.map +1 -0
  693. package/dist/checks/workflows/ui-quality.d.ts +9 -0
  694. package/dist/checks/workflows/ui-quality.d.ts.map +1 -0
  695. package/dist/checks/workflows/ui-quality.js +264 -0
  696. package/dist/checks/workflows/ui-quality.js.map +1 -0
  697. package/dist/checks/workflows/ui-uniformity.d.ts +18 -0
  698. package/dist/checks/workflows/ui-uniformity.d.ts.map +1 -0
  699. package/dist/checks/workflows/ui-uniformity.js +265 -0
  700. package/dist/checks/workflows/ui-uniformity.js.map +1 -0
  701. package/dist/checks/workflows/vercel.d.ts +16 -0
  702. package/dist/checks/workflows/vercel.d.ts.map +1 -0
  703. package/dist/checks/workflows/vercel.js +173 -0
  704. package/dist/checks/workflows/vercel.js.map +1 -0
  705. package/dist/utils/validation-helpers.d.ts +43 -0
  706. package/dist/utils/validation-helpers.d.ts.map +1 -0
  707. package/dist/utils/validation-helpers.js +370 -0
  708. package/dist/utils/validation-helpers.js.map +1 -0
  709. package/package.json +1 -1
@@ -0,0 +1,2688 @@
1
+ #!/usr/bin/env tsx
2
+ "use strict";
3
+ /**
4
+ * All Workflow - Comprehensive validation using CONSOLIDATED MODULES ONLY
5
+ *
6
+ * This replaces the old system of workflows + additional checks + standalone checks.
7
+ * All validation now goes through consolidated modules in scripts/active/preflights/consolidated/.
8
+ *
9
+ * Consolidated Modules (10 categories):
10
+ * 1. imports.ts - Import validation, hook imports, consistency
11
+ * 2. quality.ts - Code quality, linting, file size
12
+ * 3. security.ts - API routes, XSS prevention, external links
13
+ * 4. database.ts - Schema validation, Prisma checks
14
+ * 5. ui-components.ts - Component library, button-link pattern
15
+ * 6. ui-spacing.ts - Layout, spacing, design tokens
16
+ * 7. ui-navigation.ts - Sidebars, breadcrumbs, footers, navigation layout
17
+ * 8. ui-patterns.ts - Category chips, consistent patterns
18
+ * 9. performance.ts - Bundle size, image optimization, lazy loading
19
+ * 10. business.ts - DRAFT status, cache-first, critical workflows
20
+ *
21
+ * Coverage Map (6 previously-mentioned checks):
22
+ * - Import Validation (missing hook imports) → imports.ts
23
+ * - Category Chips (non-standard labels) → ui-patterns.ts
24
+ * - Navigation Layout (missing sidebars/breadcrumbs/footers) → ui-navigation.ts
25
+ * - Button Link Pattern (incorrect asChild usage) → ui-components.ts
26
+ * - Image Optimization (missing width/height) → performance.ts
27
+ * - XSS Prevention (dangerouslySetInnerHTML) → security.ts
28
+ *
29
+ * Used by: pnpm build (via preflight:all)
30
+ */
31
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ var desc = Object.getOwnPropertyDescriptor(m, k);
34
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
35
+ desc = { enumerable: true, get: function() { return m[k]; } };
36
+ }
37
+ Object.defineProperty(o, k2, desc);
38
+ }) : (function(o, m, k, k2) {
39
+ if (k2 === undefined) k2 = k;
40
+ o[k2] = m[k];
41
+ }));
42
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
43
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
44
+ }) : function(o, v) {
45
+ o["default"] = v;
46
+ });
47
+ var __importStar = (this && this.__importStar) || (function () {
48
+ var ownKeys = function(o) {
49
+ ownKeys = Object.getOwnPropertyNames || function (o) {
50
+ var ar = [];
51
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
52
+ return ar;
53
+ };
54
+ return ownKeys(o);
55
+ };
56
+ return function (mod) {
57
+ if (mod && mod.__esModule) return mod;
58
+ var result = {};
59
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
60
+ __setModuleDefault(result, mod);
61
+ return result;
62
+ };
63
+ })();
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ const child_process_1 = require("child_process");
66
+ const dotenv_1 = require("dotenv");
67
+ const fs = __importStar(require("fs"));
68
+ const os = __importStar(require("os"));
69
+ const path = __importStar(require("path"));
70
+ const console_chars_1 = require("../../utils/console-chars");
71
+ const universal_progress_reporter_1 = require("../system/universal-progress-reporter");
72
+ function escapeRegExp(input) {
73
+ return input.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
74
+ }
75
+ function parseFilterRegex() {
76
+ const args = process.argv.slice(2);
77
+ const idx = args.indexOf("--filter");
78
+ if (idx === -1)
79
+ return null;
80
+ const raw = args[idx + 1] ?? "";
81
+ if (!raw)
82
+ return { raw: "", regex: /$a/ };
83
+ try {
84
+ return { raw, regex: new RegExp(raw, "i") };
85
+ }
86
+ catch {
87
+ return { raw, regex: new RegExp(escapeRegExp(raw), "i") };
88
+ }
89
+ }
90
+ function parseIntArg(value) {
91
+ if (!value)
92
+ return undefined;
93
+ const n = Number.parseInt(value, 10);
94
+ return Number.isFinite(n) ? n : undefined;
95
+ }
96
+ function parseBool(value) {
97
+ if (!value)
98
+ return undefined;
99
+ const v = value.trim().toLowerCase();
100
+ if (["1", "true", "yes", "y", "on"].includes(v))
101
+ return true;
102
+ if (["0", "false", "no", "n", "off"].includes(v))
103
+ return false;
104
+ return undefined;
105
+ }
106
+ function escapeXml(value) {
107
+ return String(value)
108
+ .replace(/&/g, "&amp;")
109
+ .replace(/</g, "&lt;")
110
+ .replace(/>/g, "&gt;")
111
+ .replace(/\"/g, "&quot;")
112
+ .replace(/'/g, "&apos;");
113
+ }
114
+ function parseRunnerOptions() {
115
+ const args = process.argv.slice(2);
116
+ const timeoutIdx = args.indexOf("--timeout-ms");
117
+ const cliTimeoutMs = timeoutIdx !== -1 ? parseIntArg(args[timeoutIdx + 1]) : undefined;
118
+ const envTimeoutMs = parseIntArg(process.env.PREFLIGHT_TIMEOUT_MS);
119
+ const failFast = args.includes("--fail-fast") || parseBool(process.env.PREFLIGHT_FAIL_FAST) === true;
120
+ const junitIdx = args.indexOf("--junit");
121
+ const junitPath = junitIdx !== -1 ? args[junitIdx + 1] : process.env.PREFLIGHT_JUNIT;
122
+ const sarifIdx = args.indexOf("--sarif");
123
+ const sarifPath = sarifIdx !== -1 ? args[sarifIdx + 1] : process.env.PREFLIGHT_SARIF;
124
+ return {
125
+ timeoutMs: cliTimeoutMs ?? envTimeoutMs,
126
+ failFast,
127
+ junitPath,
128
+ sarifPath,
129
+ };
130
+ }
131
+ function makeOutputSnippet(opts) {
132
+ const parts = [];
133
+ const outLines = opts.stdoutLines ?? [];
134
+ const outTotal = opts.stdoutTotal ?? outLines.length;
135
+ if (outLines.length > 0) {
136
+ parts.push("--- stdout ---");
137
+ parts.push(...outLines);
138
+ if (outTotal > outLines.length)
139
+ parts.push(`... +${outTotal - outLines.length} more stdout lines`);
140
+ }
141
+ const errLines = opts.stderrLines ?? [];
142
+ const errTotal = opts.stderrTotal ?? errLines.length;
143
+ if (errLines.length > 0) {
144
+ parts.push("--- stderr ---");
145
+ parts.push(...errLines);
146
+ if (errTotal > errLines.length)
147
+ parts.push(`... +${errTotal - errLines.length} more stderr lines`);
148
+ }
149
+ const text = parts.join("\n").trim();
150
+ if (!text)
151
+ return "";
152
+ // Keep SARIF payload reasonably small.
153
+ return text.length <= 8000 ? text : text.slice(-8000);
154
+ }
155
+ function safeFileToken(name) {
156
+ return String(name ?? "check")
157
+ .trim()
158
+ .replace(/[^a-zA-Z0-9._-]+/g, "_")
159
+ .slice(0, 80);
160
+ }
161
+ function createFindingsPath(name) {
162
+ const dir = path.join(process.cwd(), "test-results", "preflight-findings");
163
+ try {
164
+ if (!fs.existsSync(dir))
165
+ fs.mkdirSync(dir, { recursive: true });
166
+ }
167
+ catch {
168
+ // ignore
169
+ }
170
+ const file = `${safeFileToken(name)}-${Date.now()}-${Math.random().toString(16).slice(2)}.json`;
171
+ const abs = path.join(dir, file);
172
+ try {
173
+ if (fs.existsSync(abs))
174
+ fs.unlinkSync(abs);
175
+ }
176
+ catch {
177
+ // ignore
178
+ }
179
+ return abs;
180
+ }
181
+ function ensureDir(relDir) {
182
+ const abs = path.join(process.cwd(), relDir);
183
+ if (!fs.existsSync(abs))
184
+ fs.mkdirSync(abs, { recursive: true });
185
+ }
186
+ function writeJson(relPath, data) {
187
+ ensureDir(path.dirname(relPath));
188
+ fs.writeFileSync(path.join(process.cwd(), relPath), JSON.stringify(data, null, 2) + "\n", "utf8");
189
+ }
190
+ function writeText(relPath, data) {
191
+ ensureDir(path.dirname(relPath));
192
+ fs.writeFileSync(path.join(process.cwd(), relPath), data, "utf8");
193
+ }
194
+ function normalizeSarifUri(file) {
195
+ const raw = String(file ?? "").trim();
196
+ if (!raw)
197
+ return raw;
198
+ // Normalize slashes first so later checks behave consistently.
199
+ const normalized = raw.replace(/\\/g, "/");
200
+ const cwd = process.cwd().replace(/\\/g, "/");
201
+ // Prefer repo-relative paths for GitHub Code Scanning.
202
+ // If the path is absolute and inside the repo, convert to a relative URI.
203
+ if (normalized.startsWith(cwd + "/")) {
204
+ return normalized.slice(cwd.length + 1);
205
+ }
206
+ // If it's an absolute path outside the repo, keep it as-is.
207
+ // If it's already relative, keep it.
208
+ return normalized;
209
+ }
210
+ function toJUnitXml(report, totalDurationSec) {
211
+ const suiteName = "preflight:all";
212
+ const tests = report.records.length;
213
+ const failures = report.records.filter((r) => r.kind === "failed").length;
214
+ const skipped = report.records.filter((r) => r.kind === "skipped" || r.kind === "warning").length;
215
+ const cases = report.records.map((r) => {
216
+ const tcTime = r.durationSec.toFixed(3);
217
+ const classname = r.group;
218
+ const name = r.name;
219
+ if (r.kind === "skipped") {
220
+ return ` <testcase classname="${escapeXml(classname)}" name="${escapeXml(name)}" time="${tcTime}">\n <skipped message="skipped" />\n </testcase>`;
221
+ }
222
+ if (r.kind === "warning") {
223
+ // Non-blocking warnings should not fail the test run.
224
+ return ` <testcase classname="${escapeXml(classname)}" name="${escapeXml(name)}" time="${tcTime}">\n <skipped message="warning" />\n </testcase>`;
225
+ }
226
+ if (r.kind === "passed") {
227
+ return ` <testcase classname="${escapeXml(classname)}" name="${escapeXml(name)}" time="${tcTime}" />`;
228
+ }
229
+ const msg = r.timedOut ? `Timed out (exit 124)` : `Failed (exit ${r.exitCode ?? 1})`;
230
+ return ` <testcase classname="${escapeXml(classname)}" name="${escapeXml(name)}" time="${tcTime}">\n <failure message="${escapeXml(msg)}" />\n </testcase>`;
231
+ });
232
+ return `<?xml version="1.0" encoding="UTF-8"?>\n<testsuite name="${escapeXml(suiteName)}" tests="${tests}" failures="${failures}" errors="0" skipped="${skipped}" time="${totalDurationSec.toFixed(3)}" timestamp="${escapeXml(report.createdAtIso)}">\n${cases.join("\n")}\n</testsuite>\n`;
233
+ }
234
+ function toSarif(report) {
235
+ const relevant = report.records.filter((r) => r.kind === "failed" || r.kind === "warning");
236
+ const rulesById = new Map();
237
+ const ensureRule = (id, name, level, props) => {
238
+ if (rulesById.has(id))
239
+ return;
240
+ rulesById.set(id, {
241
+ id,
242
+ name,
243
+ shortDescription: { text: name },
244
+ defaultConfiguration: { level },
245
+ properties: props,
246
+ });
247
+ };
248
+ for (const r of relevant) {
249
+ const baseId = `${r.group}:${r.name}`;
250
+ const level = r.blocking ? "error" : "warning";
251
+ ensureRule(baseId, `[${r.group}] ${r.name}`, level, {
252
+ group: r.group,
253
+ blocking: r.blocking,
254
+ kind: "preflight-step",
255
+ });
256
+ const findings = Array.isArray(r.findings) ? r.findings : [];
257
+ for (const f of findings.slice(0, 200)) {
258
+ const code = f.code ? String(f.code) : "";
259
+ if (!code)
260
+ continue;
261
+ const rid = `${baseId}:${code}`;
262
+ ensureRule(rid, `[${r.group}] ${r.name} — ${code}`, level, {
263
+ group: r.group,
264
+ blocking: r.blocking,
265
+ kind: "preflight-finding",
266
+ stepId: baseId,
267
+ findingCode: code,
268
+ });
269
+ }
270
+ }
271
+ const rules = Array.from(rulesById.values());
272
+ const results = [];
273
+ for (const r of relevant) {
274
+ const id = `${r.group}:${r.name}`;
275
+ const defaultLevel = r.blocking ? "error" : "warning";
276
+ const base = r.timedOut
277
+ ? `[${r.group}] ${r.name} timed out.`
278
+ : `[${r.group}] ${r.name} ${r.kind === "warning" ? "warning" : "failed"}.`;
279
+ const snippet = (r.outputSnippet ?? "").trim();
280
+ const findings = Array.isArray(r.findings) ? r.findings : [];
281
+ if (findings.length > 0) {
282
+ for (const f of findings.slice(0, 200)) {
283
+ const rid = f.code ? `${id}:${String(f.code)}` : id;
284
+ const loc = f.file
285
+ ? {
286
+ physicalLocation: {
287
+ artifactLocation: { uri: normalizeSarifUri(f.file) },
288
+ region: {
289
+ startLine: f.startLine,
290
+ startColumn: f.startColumn,
291
+ endLine: f.endLine,
292
+ endColumn: f.endColumn,
293
+ },
294
+ },
295
+ }
296
+ : undefined;
297
+ results.push({
298
+ ruleId: rid,
299
+ level: f.level ?? defaultLevel,
300
+ message: {
301
+ text: `${base}${f.message ? `\n\n${f.message}` : ""}${snippet ? `\n\n${snippet}` : ""}`,
302
+ },
303
+ locations: loc ? [loc] : undefined,
304
+ properties: {
305
+ stepId: id,
306
+ group: r.group,
307
+ blocking: r.blocking,
308
+ timedOut: Boolean(r.timedOut),
309
+ exitCode: r.exitCode,
310
+ pathOrCmd: r.pathOrCmd,
311
+ outputSnippet: snippet || undefined,
312
+ findingCode: f.code,
313
+ },
314
+ });
315
+ }
316
+ continue;
317
+ }
318
+ const text = snippet ? `${base}\n\n${snippet}` : base;
319
+ results.push({
320
+ ruleId: id,
321
+ level: defaultLevel,
322
+ message: { text },
323
+ properties: {
324
+ group: r.group,
325
+ blocking: r.blocking,
326
+ timedOut: Boolean(r.timedOut),
327
+ exitCode: r.exitCode,
328
+ pathOrCmd: r.pathOrCmd,
329
+ outputSnippet: snippet || undefined,
330
+ },
331
+ });
332
+ }
333
+ return {
334
+ $schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
335
+ version: "2.1.0",
336
+ runs: [
337
+ {
338
+ tool: { driver: { name: "SuperCatch Preflight (all workflow)", rules } },
339
+ results,
340
+ },
341
+ ],
342
+ };
343
+ }
344
+ function readJsonIfExists(relPath) {
345
+ const abs = path.join(process.cwd(), relPath);
346
+ if (!fs.existsSync(abs))
347
+ return undefined;
348
+ try {
349
+ return JSON.parse(fs.readFileSync(abs, "utf8"));
350
+ }
351
+ catch {
352
+ return undefined;
353
+ }
354
+ }
355
+ function toNumberDurationSec(durationSec) {
356
+ const n = Number(durationSec);
357
+ return Number.isFinite(n) ? n : 0;
358
+ }
359
+ function baselineKey(r) {
360
+ // Use stable IDs so renaming the display name doesn't lose baseline history.
361
+ return `${r.group}:${r.pathOrCmd}`;
362
+ }
363
+ function buildChildEnv(extra) {
364
+ // Node 24+ can emit noisy MODULE_TYPELESS warnings when executing TS/ESM via loaders.
365
+ // Silence by default for preflight child processes to keep output readable.
366
+ // Opt-out: set PREFLIGHT_NODE_WARNINGS=1.
367
+ if (process.env.PREFLIGHT_NODE_WARNINGS === "1") {
368
+ return { ...process.env, ...(extra ?? {}) };
369
+ }
370
+ if (process.env.NODE_NO_WARNINGS) {
371
+ return { ...process.env, ...(extra ?? {}) };
372
+ }
373
+ return { ...process.env, NODE_NO_WARNINGS: "1", ...(extra ?? {}) };
374
+ }
375
+ function readFindingsFile(absPath) {
376
+ try {
377
+ if (!absPath)
378
+ return [];
379
+ if (!fs.existsSync(absPath))
380
+ return [];
381
+ const raw = fs.readFileSync(absPath, "utf8");
382
+ if (!raw.trim())
383
+ return [];
384
+ const parsed = JSON.parse(raw);
385
+ const items = Array.isArray(parsed)
386
+ ? parsed
387
+ : Array.isArray(parsed?.findings)
388
+ ? parsed.findings
389
+ : [];
390
+ if (!Array.isArray(items))
391
+ return [];
392
+ return items
393
+ .map((f) => {
394
+ const file = f.file ?? f.path;
395
+ const range = f.range ?? f.location ?? undefined;
396
+ const startLine = Number(range?.startLine ?? range?.line ?? f.line);
397
+ const startColumn = Number(range?.startColumn ?? range?.col ?? f.column);
398
+ const endLine = Number(range?.endLine ?? startLine);
399
+ const endColumn = Number(range?.endColumn ?? startColumn);
400
+ const severity = String(f.severity ?? "error").toLowerCase();
401
+ const level = severity === "warning" ? "warning" : "error";
402
+ const message = String(f.message ?? f.text ?? "").trim();
403
+ return {
404
+ message,
405
+ level,
406
+ file: file ? String(file).replace(/\\/g, "/") : undefined,
407
+ startLine: Number.isFinite(startLine) && startLine > 0 ? startLine : undefined,
408
+ startColumn: Number.isFinite(startColumn) && startColumn > 0 ? startColumn : undefined,
409
+ endLine: Number.isFinite(endLine) && endLine > 0 ? endLine : undefined,
410
+ endColumn: Number.isFinite(endColumn) && endColumn > 0 ? endColumn : undefined,
411
+ code: f.code ? String(f.code) : undefined,
412
+ };
413
+ })
414
+ .filter((x) => x.message);
415
+ }
416
+ catch {
417
+ return [];
418
+ }
419
+ }
420
+ function defaultConcurrency() {
421
+ // Keep defaults conservative to avoid pegging CPU during local dev.
422
+ // Override via PREFLIGHT_CONCURRENCY / PREFLIGHT_BLOCKING_CONCURRENCY / PREFLIGHT_SEO_CONCURRENCY.
423
+ return Math.max(1, Math.min(os.cpus().length, 4));
424
+ }
425
+ function parseConcurrency(envVarName, fallback = defaultConcurrency()) {
426
+ const raw = process.env[envVarName];
427
+ const n = raw ? Number(raw) : NaN;
428
+ if (Number.isFinite(n) && n > 0)
429
+ return Math.floor(n);
430
+ return fallback;
431
+ }
432
+ async function runShellCommand(cmd, opts) {
433
+ const start = Date.now();
434
+ return await new Promise((resolve) => {
435
+ const extraEnv = opts.findingsPath
436
+ ? { PREFLIGHT_FINDINGS_PATH: opts.findingsPath, PREFLIGHT_FINDINGS_FILE: opts.findingsPath }
437
+ : undefined;
438
+ const child = (0, child_process_1.spawn)(cmd, {
439
+ shell: true,
440
+ stdio: ["ignore", "pipe", "pipe"],
441
+ env: buildChildEnv(extraEnv),
442
+ });
443
+ let timedOut = false;
444
+ let timeoutHandle;
445
+ const killProcessTree = (pid) => {
446
+ if (!pid)
447
+ return;
448
+ if (process.platform === "win32") {
449
+ const killer = (0, child_process_1.spawn)("taskkill", ["/pid", String(pid), "/t", "/f"], {
450
+ stdio: "ignore",
451
+ windowsHide: true,
452
+ });
453
+ killer.on("error", () => { });
454
+ return;
455
+ }
456
+ try {
457
+ process.kill(-pid, "SIGKILL");
458
+ return;
459
+ }
460
+ catch {
461
+ // ignore
462
+ }
463
+ try {
464
+ process.kill(pid, "SIGKILL");
465
+ }
466
+ catch {
467
+ // ignore
468
+ }
469
+ };
470
+ if (typeof opts.timeoutMs === "number" &&
471
+ Number.isFinite(opts.timeoutMs) &&
472
+ opts.timeoutMs > 0) {
473
+ timeoutHandle = setTimeout(() => {
474
+ timedOut = true;
475
+ killProcessTree(child.pid);
476
+ }, opts.timeoutMs);
477
+ timeoutHandle.unref?.();
478
+ }
479
+ const stdoutLines = [];
480
+ const stderrLines = [];
481
+ let stdoutTotal = 0;
482
+ let stderrTotal = 0;
483
+ let stdoutBuf = "";
484
+ let stderrBuf = "";
485
+ const consume = (chunk, state) => {
486
+ state.buf += chunk.toString("utf8");
487
+ const parts = state.buf.split(/\r?\n/);
488
+ state.buf = parts.pop() ?? "";
489
+ for (const line of parts) {
490
+ if (!line)
491
+ continue;
492
+ state.total += 1;
493
+ // Keep the *last* N lines so we surface the actual failure context.
494
+ if (state.max > 0) {
495
+ if (state.lines.length >= state.max)
496
+ state.lines.shift();
497
+ state.lines.push(line);
498
+ }
499
+ }
500
+ };
501
+ child.stdout?.on("data", (chunk) => {
502
+ const s = {
503
+ buf: stdoutBuf,
504
+ lines: stdoutLines,
505
+ total: stdoutTotal,
506
+ max: opts.maxStdoutLines,
507
+ };
508
+ consume(chunk, s);
509
+ stdoutBuf = s.buf;
510
+ stdoutTotal = s.total;
511
+ });
512
+ child.stderr?.on("data", (chunk) => {
513
+ const s = {
514
+ buf: stderrBuf,
515
+ lines: stderrLines,
516
+ total: stderrTotal,
517
+ max: opts.maxStderrLines,
518
+ };
519
+ consume(chunk, s);
520
+ stderrBuf = s.buf;
521
+ stderrTotal = s.total;
522
+ });
523
+ child.on("close", (code) => {
524
+ if (timeoutHandle)
525
+ clearTimeout(timeoutHandle);
526
+ const flushLine = (buf, state) => {
527
+ const trimmed = buf.trim();
528
+ if (!trimmed)
529
+ return state;
530
+ state.total += 1;
531
+ if (state.lines.length < state.max)
532
+ state.lines.push(trimmed);
533
+ return state;
534
+ };
535
+ ({ total: stdoutTotal } = flushLine(stdoutBuf, {
536
+ lines: stdoutLines,
537
+ total: stdoutTotal,
538
+ max: opts.maxStdoutLines,
539
+ }));
540
+ ({ total: stderrTotal } = flushLine(stderrBuf, {
541
+ lines: stderrLines,
542
+ total: stderrTotal,
543
+ max: opts.maxStderrLines,
544
+ }));
545
+ const durationSec = ((Date.now() - start) / 1000).toFixed(1);
546
+ const findings = readFindingsFile(opts.findingsPath);
547
+ resolve({
548
+ exitCode: timedOut ? 124 : (code ?? 1),
549
+ durationSec,
550
+ stdoutLines,
551
+ stdoutTotal,
552
+ stderrLines,
553
+ stderrTotal,
554
+ timedOut,
555
+ findings,
556
+ });
557
+ });
558
+ });
559
+ }
560
+ async function mapWithConcurrency(items, limit, fn) {
561
+ const results = new Array(items.length);
562
+ let idx = 0;
563
+ const workers = Array.from({ length: Math.min(limit, items.length) }, async () => {
564
+ while (idx < items.length) {
565
+ const i = idx;
566
+ idx += 1;
567
+ if (i >= items.length) {
568
+ return;
569
+ }
570
+ results[i] = await fn(items[i]);
571
+ }
572
+ });
573
+ await Promise.all(workers);
574
+ return results;
575
+ }
576
+ const IS_CI_OR_VERCEL = process.env.CI === "1" ||
577
+ process.env.CI === "true" ||
578
+ process.env.VERCEL === "1" ||
579
+ process.env.VERCEL === "true";
580
+ const CONSOLIDATED_MODULES = [
581
+ // Runtime safety checks (blocking)
582
+ {
583
+ name: "No process.env in client code",
584
+ path: "scripts/active/preflights/runtime/client-process-env-usage.ts",
585
+ blocking: true,
586
+ description: "Prevent Next.js 16 client-runtime crashes from process.env usage in client components/hooks",
587
+ },
588
+ {
589
+ name: "JSON.parse Safety",
590
+ path: "scripts/active/preflights/runtime/json-parse-safety.ts",
591
+ blocking: true,
592
+ description: "Block: JSON.parse(request.text()) must be guarded to prevent runtime crashes",
593
+ },
594
+ {
595
+ name: "publicEnv import required",
596
+ path: "scripts/active/preflights/runtime/missing-public-env-import.ts",
597
+ blocking: true,
598
+ description: "Prevent runtime ReferenceError by requiring publicEnv import when used in client code",
599
+ },
600
+ {
601
+ name: "Unsafe process stdio writes",
602
+ path: "scripts/active/preflights/runtime/process-stdio-usage.ts",
603
+ blocking: true,
604
+ description: "Prevent client-runtime crashes from process.stdout/stderr.write usage in shared code",
605
+ },
606
+ {
607
+ name: "Client Runtime Errors",
608
+ path: "scripts/active/preflights/runtime/client-runtime-errors.ts",
609
+ blocking: true,
610
+ description: "Detect unhandled Promise rejections and unsafe property access that cause runtime crashes",
611
+ },
612
+ {
613
+ name: "Runtime GTM Installation",
614
+ path: "scripts/active/preflights/runtime/gtm-installation.ts",
615
+ blocking: true,
616
+ description: "Ensure Google Tag Manager is installed (script + noscript) and gated by public env flags",
617
+ },
618
+ {
619
+ name: "Dev Error Monitoring",
620
+ path: "scripts/active/preflights/runtime/dev-error-monitoring-system.ts",
621
+ blocking: true,
622
+ description: "Enforce dev-only runtime error logging wiring: DevErrorBoundary -> /api/dev/errors -> runtime-errors.json -> /dev/errors dashboard",
623
+ },
624
+ {
625
+ name: "Server${chars.arrow}Client Decimal",
626
+ path: "scripts/active/preflights/runtime/server-client-decimal.ts",
627
+ blocking: true,
628
+ description: 'Prevent "Decimal objects are not supported" runtime error when passing Prisma data to Client Components',
629
+ },
630
+ {
631
+ name: "Runtime (Consolidated)",
632
+ path: "scripts/active/preflights/consolidated/runtime.ts",
633
+ blocking: true,
634
+ description: "Consolidated runtime checks: env usage, GTM, node deprecations, tailwind runtime, decimal safety",
635
+ },
636
+ // Environment hygiene (blocking)
637
+ {
638
+ name: "Env file hygiene",
639
+ path: "scripts/active/preflights/security/no-tracked-env-files.ts",
640
+ blocking: true,
641
+ description: "Warn on tracked .env.* files; block on high-risk tracked files like .env/.env.local",
642
+ },
643
+ {
644
+ name: "Env value leakage",
645
+ path: "scripts/active/preflights/security/env-value-leakage.ts",
646
+ blocking: true,
647
+ description: "Block: secret-looking env values outside .env files; warn on suspicious assignments",
648
+ },
649
+ {
650
+ name: "Env duplicates",
651
+ path: "scripts/active/preflights/environment/env-duplicates.ts",
652
+ blocking: true,
653
+ description: "Block: legacy/duplicate env var names (e.g., GOOGLE_ID vs GOOGLE_CLIENT_ID)",
654
+ },
655
+ {
656
+ name: "Production Config",
657
+ path: "scripts/active/preflights/deployment/production-config.ts",
658
+ blocking: IS_CI_OR_VERCEL,
659
+ description: "Validate production environment variables, security headers, and monitoring setup",
660
+ },
661
+ {
662
+ name: "Vercel Function Config",
663
+ path: "scripts/active/preflights/deployment/check-vercel-function-config.mjs",
664
+ blocking: true,
665
+ description: "Block: Long-running functions must have timeout bailout, AI operations must check VERCEL env",
666
+ },
667
+ // Next.js build compatibility (blocking)
668
+ {
669
+ name: "Dynamic Route Exports",
670
+ path: "scripts/active/preflights/nextjs/dynamic-route-exports.ts",
671
+ blocking: true,
672
+ description: "Block: export const dynamic incompatible with cacheComponents: true",
673
+ },
674
+ {
675
+ name: "Metadata API Placement",
676
+ path: "scripts/active/preflights/nextjs/metadata-api-placement.ts",
677
+ blocking: true,
678
+ description: "Block: generateSitemaps() in route handlers causes '__metadata_id__' vs '[id]' slug conflict",
679
+ },
680
+ {
681
+ name: "No ignoreBuildErrors",
682
+ path: "scripts/active/preflights/nextjs/ignore-build-errors.ts",
683
+ blocking: true,
684
+ description: "Block: ignoreBuildErrors must never be true - causes runtime errors from missed type checks",
685
+ },
686
+ {
687
+ name: "Essential Files",
688
+ path: "scripts/active/preflights/nextjs/essential-files-validation.ts",
689
+ blocking: true,
690
+ description: "Validate critical files exist: error pages (404, 500, error.tsx), layout, loading, config",
691
+ },
692
+ // Hardened checks (CRITICAL - iron-clad rules that block deployment)
693
+ {
694
+ name: "Hardened Checks",
695
+ path: "scripts/active/preflights/consolidated/hardened-checks.ts",
696
+ blocking: true,
697
+ description: "DRAFT status, CVA enforcement, async error handling, secrets, hooks, promises, type safety",
698
+ },
699
+ // Core checks
700
+ // IMPORTANT: Lint validation catches missing imports, unused vars, and code quality issues that cause runtime errors.
701
+ {
702
+ name: "Lint Validation",
703
+ path: "scripts/active/preflights/specialized/lint-validation.ts",
704
+ blocking: true,
705
+ description: "ESLint validation - catches missing imports and code quality issues",
706
+ },
707
+ // IMPORTANT: Prevents lint:fix from removing React type imports (HTMLAttributes, ChangeEvent, etc.)
708
+ // Also recognizes React.X namespace access as valid when React is imported as default.
709
+ {
710
+ name: "Critical Type Imports",
711
+ path: "scripts/active/preflights/quality/critical-type-imports.ts",
712
+ blocking: true,
713
+ description: "Validates React/CVA type imports aren't removed by ESLint unused-imports rule",
714
+ },
715
+ // NOTE: Detects React.X namespace usage and recommends direct type imports
716
+ // Non-blocking warning - existing code allowed, prefer direct imports for new code
717
+ {
718
+ name: "React Namespace Import",
719
+ path: "scripts/active/preflights/quality/react-namespace-import.ts",
720
+ blocking: false,
721
+ description: "Warns about React.X namespace usage (prefer direct type imports)",
722
+ },
723
+ // IMPORTANT: Catches duplicate JSX attributes (e.g., two className props)
724
+ // This commonly happens when ESLint auto-fix adds attributes that already exist
725
+ {
726
+ name: "Duplicate JSX Attributes",
727
+ path: "scripts/active/preflights/quality/duplicate-jsx-attributes.ts",
728
+ blocking: true,
729
+ description: "Detects JSX elements with duplicate attributes (TS17001)",
730
+ },
731
+ // IMPORTANT: Next build is configured to skip type validation, so we must block in CI/Vercel.
732
+ {
733
+ name: "TypeScript",
734
+ path: "scripts/active/preflights/consolidated/typescript.ts",
735
+ blocking: IS_CI_OR_VERCEL,
736
+ description: IS_CI_OR_VERCEL
737
+ ? "TypeScript reference/type check (blocking in CI/Vercel)"
738
+ : "TypeScript reference/type check (non-blocking warning)",
739
+ },
740
+ {
741
+ name: "Imports",
742
+ path: "scripts/active/preflights/consolidated/imports.ts",
743
+ blocking: true,
744
+ description: "Import validation, hook imports, source consistency",
745
+ },
746
+ {
747
+ name: "Enterprise Baseline",
748
+ path: "scripts/active/preflights/consolidated/enterprise-baseline.ts",
749
+ blocking: false,
750
+ description: "Secrets, raw <img>, missing loading/error/not-found, API zod/try-catch, cookie flags, large assets/JSON",
751
+ },
752
+ {
753
+ name: "Component Imports",
754
+ path: "scripts/active/preflights/component-imports.ts",
755
+ blocking: true,
756
+ description: "Enforce @/components/ui usage (no direct @supercatch/ui or MUI imports)",
757
+ },
758
+ {
759
+ name: "Primitive Enforcement",
760
+ path: "scripts/active/preflights/architecture/primitive-component-enforcement.ts",
761
+ blocking: true,
762
+ description: "Block duplicate primitive definitions outside packages/ui and components/ui",
763
+ },
764
+ {
765
+ name: "File Naming",
766
+ path: "scripts/active/preflights/file-naming-conventions.ts",
767
+ blocking: true,
768
+ description: "PascalCase components, kebab-case lib, camelCase hooks",
769
+ },
770
+ {
771
+ name: "File Hygiene",
772
+ path: "scripts/active/preflights/file-hygiene-validation.ts",
773
+ blocking: true,
774
+ description: "Block version suffixes (-v2), temp markers (-old, -new, -wip), route segment drift",
775
+ },
776
+ {
777
+ name: "Root File Hygiene",
778
+ path: "scripts/active/preflights/code-hygiene/root-file-hygiene.ts",
779
+ blocking: true,
780
+ description: "Block orphaned fix-*/cleanup-*/debug-*/check-*/test-* scripts in project root",
781
+ },
782
+ {
783
+ name: "Security",
784
+ path: "scripts/active/preflights/consolidated/security.ts",
785
+ blocking: true,
786
+ description: "API routes, XSS prevention, external links",
787
+ },
788
+ {
789
+ name: "Open Redirect Prevention",
790
+ path: "scripts/active/preflights/security/open-redirect-prevention.ts",
791
+ blocking: true,
792
+ description: "Block: redirect()/router navigation must not use user-controlled callbackUrl/returnTo without validation",
793
+ },
794
+ {
795
+ name: "Database",
796
+ path: "scripts/active/preflights/consolidated/database.ts",
797
+ blocking: true,
798
+ description: "Schema validation, Prisma checks",
799
+ },
800
+ {
801
+ name: "Prisma Field Names",
802
+ path: "scripts/active/preflights/prisma-field-validation.js",
803
+ blocking: true,
804
+ description: "Validate Prisma field names match schema (catches cardName vs name, etc.)",
805
+ },
806
+ {
807
+ name: "Prisma Over-Fetching",
808
+ path: "scripts/active/preflights/database/prisma-overfetch-detection.ts",
809
+ blocking: true,
810
+ description: "Detect queries without select clause on large tables (prevents SELECT *)",
811
+ },
812
+ {
813
+ name: "Unused Schema",
814
+ path: "scripts/active/preflights/database/unused-schema-detection.ts --strict",
815
+ blocking: true,
816
+ description: "Detect unused Prisma models/fields not referenced in codebase",
817
+ },
818
+ {
819
+ name: "Schema Best Practices",
820
+ path: "scripts/active/preflights/database/schema-best-practices.ts",
821
+ blocking: false,
822
+ description: "Validate schema has timestamps, FK indexes, and reasonable model sizes",
823
+ },
824
+ {
825
+ name: "TCG Seed Validation",
826
+ path: "scripts/active/preflights/database/tcg-seed-validation.ts",
827
+ blocking: true,
828
+ description: "Validate TCG card seed data has required fields for clickable products",
829
+ },
830
+ {
831
+ name: "Email Templates",
832
+ path: "scripts/active/preflights/email/email-template-validation.ts",
833
+ blocking: true,
834
+ description: "Validate local email templates: required types exist, naming conventions, no DB queries",
835
+ },
836
+ {
837
+ name: "Email Templates (DB)",
838
+ path: "scripts/active/preflights/email/email-template-db-verification.ts",
839
+ blocking: !IS_CI_OR_VERCEL,
840
+ description: "Verify v2 email templates are seeded in DB + wrapped correctly (skips in CI/Vercel if DATABASE_URL missing)",
841
+ },
842
+ {
843
+ name: "Email Flows",
844
+ path: "scripts/active/preflights/email/email-flow-validation.ts",
845
+ blocking: true,
846
+ description: "Validate email-based auth flows: password reset, team invitation, email verification have working routes",
847
+ },
848
+ {
849
+ name: "Dependency Health",
850
+ path: "scripts/active/preflights/dependencies/dependency-health-monitor.ts",
851
+ blocking: false,
852
+ description: "Dependency specifier risks + pnpm lockfile multi-version signals",
853
+ },
854
+ {
855
+ name: "Serverless Compatibility",
856
+ path: "scripts/active/preflights/dependencies/check-serverless-compatibility.mjs",
857
+ blocking: false,
858
+ description: "Warn: detect packages and patterns with known serverless issues (native modules, workers, filesystem)",
859
+ },
860
+ {
861
+ name: "Weekly Stable Updates",
862
+ path: "scripts/active/preflights/dependencies/weekly-stable-updates.ts",
863
+ blocking: true,
864
+ description: "Once-per-week stable dependency freshness check (skips if last success < interval)",
865
+ },
866
+ {
867
+ name: "Store Order Numbers",
868
+ path: "scripts/active/preflights/store-order-numbers.ts",
869
+ blocking: true,
870
+ description: "Store-scoped order number validation",
871
+ },
872
+ {
873
+ name: "Business",
874
+ path: "scripts/active/preflights/consolidated/business.ts",
875
+ blocking: false,
876
+ description: "DRAFT status, cache-first, critical workflows",
877
+ },
878
+ {
879
+ name: "Recognition Pipeline",
880
+ path: "scripts/active/preflights/ai/recognition-pipeline-validation.ts",
881
+ blocking: true,
882
+ description: "Cache-first pattern, enhancement integration, cost protection, error handling",
883
+ },
884
+ {
885
+ name: "Price Display Validation",
886
+ path: "scripts/active/preflights/business/price-display-validation.ts",
887
+ blocking: true,
888
+ description: "Block: UI must not format currency with $${amount.toFixed(2)}; use formatCurrency()",
889
+ },
890
+ {
891
+ name: "Regression Hygiene",
892
+ path: "scripts/active/preflights/consolidated/regression-hygiene.ts",
893
+ blocking: true,
894
+ description: "Static validation: regression test organization, skips/only, and domain coverage",
895
+ },
896
+ {
897
+ name: "Testing (Consolidated)",
898
+ path: "scripts/active/preflights/consolidated/testing.ts",
899
+ blocking: true,
900
+ description: "Consolidated testing checks: regression requirements, coverage, flake/timeout patterns",
901
+ },
902
+ // E2E Testing (CONSOLIDATED - replaces 15+ individual E2E preflights)
903
+ {
904
+ name: "E2E Validation",
905
+ path: "scripts/active/preflights/consolidated/e2e-validation.ts",
906
+ blocking: true,
907
+ description: "CONSOLIDATED: best practices, outcome validation, flake patterns, timeouts, performance, organization",
908
+ },
909
+ {
910
+ name: "E2E Regression Coverage",
911
+ path: "scripts/active/preflights/consolidated/e2e-regression-coverage.ts",
912
+ blocking: true,
913
+ description: "Static validation: required E2E regression specs exist (mobile basics) and are not skipped",
914
+ },
915
+ {
916
+ name: "E2E Checks (Consolidated)",
917
+ path: "scripts/active/preflights/consolidated/e2e-checks.ts",
918
+ blocking: true,
919
+ description: "Consolidated E2E checks: interaction coverage, performance patterns, redundancy scan, config validation",
920
+ },
921
+ {
922
+ name: "Integration E2E Depth",
923
+ path: "scripts/active/preflights/testing/integration-e2e-depth.ts",
924
+ blocking: true,
925
+ description: "Block: integration regression specs must have an in-app connect-flow E2E (not just API connectivity checks)",
926
+ },
927
+ {
928
+ name: "E2E Interaction Scan",
929
+ path: "scripts/active/preflights/e2e/e2e-interaction-coverage-scan.ts --actions",
930
+ blocking: true,
931
+ description: "Scan for interactive elements and ensure they are covered by E2E tests",
932
+ },
933
+ // Testing coverage enforcement (static / fast)
934
+ {
935
+ name: "Coverage Gap Analysis",
936
+ path: "scripts/active/preflights/coverage-gap-analysis.ts",
937
+ blocking: true,
938
+ description: "Static coverage contract: every app page has likely E2E coverage; dynamic routes have example URLs; critical routes cannot be smoke-only/low-signal-only",
939
+ },
940
+ {
941
+ name: "Playwright Feature Coverage Gaps",
942
+ path: "scripts/active/preflights/testing/playwright-feature-coverage-gaps.ts --warn",
943
+ blocking: false,
944
+ description: "Proactively discovers missing E2E test scenarios by scanning source code for APIs, actions, forms and comparing against test coverage",
945
+ },
946
+ {
947
+ name: "Action Regression Coverage",
948
+ path: "scripts/active/preflights/testing/action-regression.ts",
949
+ blocking: true,
950
+ description: "Enforce: every app/actions/* has a corresponding regression/E2E test",
951
+ },
952
+ {
953
+ name: "Data Entry Requires Regression",
954
+ path: "scripts/active/preflights/testing/data-entry-regression-required.ts",
955
+ blocking: true,
956
+ description: "Enforce: data-entry UI changes require regression test changes in the diff",
957
+ },
958
+ {
959
+ name: "Test Patterns",
960
+ path: "scripts/active/preflights/testing/test-patterns.ts",
961
+ blocking: true,
962
+ description: "Validate test naming/placement and Playwright hook signatures",
963
+ },
964
+ {
965
+ name: "Decimal Serialization",
966
+ path: "scripts/active/preflights/specialized/decimal-serialization.ts --warn",
967
+ blocking: false,
968
+ description: "Check Decimal type serialization to prevent precision loss",
969
+ },
970
+ {
971
+ name: "ID Format Validation",
972
+ path: "scripts/active/preflights/specialized/database-id-format.js --warn",
973
+ blocking: false,
974
+ description: "Validate ID format standards (no numeric IDs, proper typing)",
975
+ },
976
+ {
977
+ name: "AI Code Quality",
978
+ path: "scripts/active/preflights/ai/code-quality-ai.ts",
979
+ blocking: false,
980
+ description: "AI-powered detection of complexity, race conditions, and security issues",
981
+ },
982
+ {
983
+ name: "Runtime Performance Regression",
984
+ path: "scripts/active/preflights/performance/runtime-regression.ts",
985
+ blocking: true,
986
+ description: "Monitor bundle size, Core Web Vitals, and performance regressions",
987
+ },
988
+ {
989
+ name: "Core Web Vitals Budget",
990
+ path: "scripts/active/preflights/performance/core-web-vitals.ts",
991
+ blocking: IS_CI_OR_VERCEL,
992
+ description: "Enforce Core Web Vitals performance budgets (LCP, FID, CLS) and Lighthouse scores",
993
+ },
994
+ {
995
+ name: "Preflight Performance Optimizer",
996
+ path: "scripts/active/preflights/system/preflight-performance-optimizer.ts",
997
+ blocking: false,
998
+ description: "Optimize preflight execution through caching and smart dependency analysis",
999
+ },
1000
+ {
1001
+ name: "Preflight Concurrency Support",
1002
+ path: "scripts/active/preflights/system/preflight-concurrency-support.ts",
1003
+ blocking: false,
1004
+ description: "Validate all consolidated preflights support PREFLIGHT_CONCURRENCY env var",
1005
+ },
1006
+ {
1007
+ name: "Preflight Reporting Standards",
1008
+ path: "scripts/active/preflights/system/preflight-reporting-standards.ts",
1009
+ blocking: false,
1010
+ description: "Warn: consistent reporting UI and progress across all preflights",
1011
+ },
1012
+ {
1013
+ name: "Preflight Redundancy",
1014
+ path: "scripts/active/preflights/system/preflight-redundancy-detection.ts",
1015
+ blocking: true,
1016
+ description: "Detect redundant preflights: duplicate patterns, error codes, high overlap",
1017
+ },
1018
+ {
1019
+ name: "Lint-Preflight Consistency",
1020
+ path: "scripts/active/preflights/system/lint-preflight-consistency.ts",
1021
+ blocking: true,
1022
+ description: "Detect contradictions between ESLint config and preflight rules",
1023
+ },
1024
+ {
1025
+ name: "Orphaned Preflights",
1026
+ path: "scripts/active/preflights/system/find-orphaned-preflights.ts",
1027
+ blocking: true,
1028
+ description: "Detect orphaned preflights not used in any workflow - blocks if any found",
1029
+ },
1030
+ {
1031
+ name: "Preflight Organization",
1032
+ path: "scripts/active/preflights/system/preflight-organization.ts",
1033
+ blocking: true,
1034
+ description: "Ensure all preflights are referenced and categorized (UI/UX, Security, Business, DB/Data, Performance, Build/Runtime, Testing)",
1035
+ },
1036
+ {
1037
+ name: "Orphaned Scripts (warn)",
1038
+ path: "scripts/active/preflights/system/orphaned-scripts-detection.ts",
1039
+ blocking: false,
1040
+ description: "Warn: detect unreferenced scripts in scripts/active/ that may need archiving",
1041
+ },
1042
+ {
1043
+ name: "Orphaned Pages",
1044
+ path: "scripts/active/preflights/architecture/orphaned-pages-detection.ts --warn",
1045
+ blocking: false,
1046
+ description: "Detect pages not linked from navigation - warns if orphaned pages found",
1047
+ },
1048
+ {
1049
+ name: "Styling Standards",
1050
+ path: "scripts/active/preflights/ui/styling-standards.ts",
1051
+ blocking: false,
1052
+ description: "Tailwind + CVA architecture, MUI emulation detection",
1053
+ },
1054
+ {
1055
+ name: "SX Prop Deprecation",
1056
+ path: "scripts/active/preflights/consolidated/sx-prop-deprecation.ts --blocking",
1057
+ blocking: true,
1058
+ description: "No sx prop allowed - use Tailwind className",
1059
+ },
1060
+ {
1061
+ name: "Architecture",
1062
+ path: "scripts/active/preflights/architecture/component-architecture.ts",
1063
+ blocking: true,
1064
+ description: "Component organization, no duplicates, no root sprawl",
1065
+ },
1066
+ {
1067
+ name: "Shared Components",
1068
+ path: "scripts/active/preflights/specialized/shared-components-migration.ts",
1069
+ blocking: true,
1070
+ description: "Detect regressions: duplicates and bypassing shared components/utilities",
1071
+ },
1072
+ {
1073
+ name: "Shared Utility Gaps",
1074
+ path: "scripts/active/preflights/code-quality/shared-utility-gaps.ts",
1075
+ blocking: false,
1076
+ description: "Detect native confirm(), inline price/date formatting, inline error display",
1077
+ },
1078
+ {
1079
+ name: "Unified Components",
1080
+ path: "scripts/active/preflights/unified-components-check.js",
1081
+ blocking: false,
1082
+ description: "Detect duplicate component patterns (sidebars, cards, tables, filters)",
1083
+ },
1084
+ {
1085
+ name: "Shared Component Drift",
1086
+ path: "scripts/active/preflights/shared-component-drift.js",
1087
+ blocking: false,
1088
+ description: "Detect UI inconsistencies across shared components (FilterBar, SearchInput, etc.)",
1089
+ },
1090
+ {
1091
+ name: "Consolidation Opportunities",
1092
+ path: "scripts/active/preflights/architecture/component-consolidation-opportunities.ts",
1093
+ blocking: true,
1094
+ description: "Detect patterns that should use shared components (blocks on anti-patterns)",
1095
+ },
1096
+ // UI checks (blocking)
1097
+ // NOTE: button-consistency.ts was removed - functionality consolidated elsewhere
1098
+ // {
1099
+ // name: "Button Consistency",
1100
+ // path: "scripts/active/preflights/ui/button-consistency.ts",
1101
+ // blocking: true,
1102
+ // description: "Use AnimatedButton for user-facing buttons, no mixed usage",
1103
+ // },
1104
+ {
1105
+ name: "UI Uniformity",
1106
+ path: "scripts/active/preflights/governance/check-ui-uniformity.ts",
1107
+ blocking: true,
1108
+ description: "Detect non-uniform action buttons (should use AdminActions)",
1109
+ },
1110
+ {
1111
+ name: "UI Checks (Consolidated)",
1112
+ path: "scripts/active/preflights/consolidated/ui-checks.ts",
1113
+ blocking: false, // Changed to non-blocking - many pre-existing issues need incremental fixes
1114
+ description: "Consolidated UI checks: accessibility, spacing, chips, headers, cards, images, skeletons, typography",
1115
+ },
1116
+ {
1117
+ name: "Filter UI Patterns",
1118
+ path: "scripts/active/preflights/ui/filter-ui-patterns.js",
1119
+ blocking: true,
1120
+ description: "Enforces consistent filter/search layout and UnifiedEmptyState",
1121
+ },
1122
+ {
1123
+ name: "UI Components",
1124
+ path: "scripts/active/preflights/consolidated/ui-components.ts",
1125
+ blocking: true,
1126
+ description: "Component library, button-link pattern",
1127
+ },
1128
+ {
1129
+ name: "JS Responsive Visibility",
1130
+ path: "scripts/active/preflights/ui/js-responsive-visibility.ts",
1131
+ blocking: true,
1132
+ description: "Block JS state-based responsive visibility (useState + matchMedia + return null) - use CSS classes instead",
1133
+ },
1134
+ {
1135
+ name: "Dead Action Detector",
1136
+ path: "scripts/active/preflights/ui/dead-action-detector.ts",
1137
+ blocking: false,
1138
+ description: "Detect UI buttons/actions with no onClick handler or empty placeholder handlers",
1139
+ },
1140
+ {
1141
+ name: "Notification Feedback",
1142
+ path: "scripts/active/preflights/ui/notification-feedback-check.ts",
1143
+ blocking: false,
1144
+ description: "Async operations must have toast feedback (useStatus), inline alerts for form validation only",
1145
+ },
1146
+ {
1147
+ name: "UI Navigation",
1148
+ path: "scripts/active/preflights/consolidated/ui-navigation.ts",
1149
+ blocking: true,
1150
+ description: "Sidebars, breadcrumbs, footers, navigation layout",
1151
+ },
1152
+ {
1153
+ name: "Breadcrumb Consistency",
1154
+ path: "scripts/active/preflights/ui/breadcrumb-consistency.ts",
1155
+ blocking: false,
1156
+ description: "Breadcrumb positioning consistency across pages",
1157
+ },
1158
+ {
1159
+ name: "UI Patterns",
1160
+ path: "scripts/active/preflights/consolidated/ui-patterns.ts",
1161
+ blocking: false,
1162
+ description: "Category chips, consistent patterns",
1163
+ },
1164
+ {
1165
+ name: "UI Spacing",
1166
+ path: "scripts/active/preflights/consolidated/ui-spacing.ts",
1167
+ blocking: false,
1168
+ description: "Layout, spacing, design tokens",
1169
+ },
1170
+ {
1171
+ name: "UI Spacing Standards",
1172
+ path: "scripts/active/preflights/consolidated/ui-spacing-standards.ts",
1173
+ blocking: true,
1174
+ description: "Card container gap-4, page header spacing-3, layout spacing chain",
1175
+ },
1176
+ // NOTE: button-after-grid-spacing.ts was removed - functionality consolidated elsewhere
1177
+ // {
1178
+ // name: "Button After Grid Spacing",
1179
+ // path: "scripts/active/preflights/ui/button-after-grid-spacing.ts",
1180
+ // blocking: true,
1181
+ // description: "Buttons/action containers after grids must have mt-6 spacing",
1182
+ // },
1183
+ {
1184
+ name: "CSS Grid Gap",
1185
+ path: "scripts/active/preflights/ui/css-grid-gap-check.ts",
1186
+ blocking: true,
1187
+ description: "CSS grid layouts must have gap property to prevent form fields without spacing",
1188
+ },
1189
+ {
1190
+ name: "Form Control Layout",
1191
+ path: "scripts/active/preflights/ui/form-control-layout-check.ts",
1192
+ blocking: true,
1193
+ description: "FormControlLabel must not have className=block (breaks toggle layout), siblings need Stack wrapper",
1194
+ },
1195
+ {
1196
+ name: "Form Field Consistency",
1197
+ path: "scripts/active/preflights/ui/form-field-consistency.ts",
1198
+ blocking: true,
1199
+ description: "Ensure consistent form field styling: TextField with slotProps={{ inputLabel: { shrink: true } }} for embedded labels",
1200
+ },
1201
+ // NOTE: formfield-placeholder-overlap.js was removed - functionality consolidated elsewhere
1202
+ // {
1203
+ // name: "FormField Placeholder Overlap",
1204
+ // path: "scripts/active/preflights/ui/formfield-placeholder-overlap.js",
1205
+ // blocking: true,
1206
+ // description: "FormField with placeholder causes label overlap - use TextField directly",
1207
+ // },
1208
+ {
1209
+ name: "Flex Icon-Text Gap",
1210
+ path: "scripts/active/preflights/ui/flex-icon-text-gap.ts",
1211
+ blocking: false,
1212
+ description: "Flex containers with icon + text or stat rows must have gap property",
1213
+ },
1214
+ {
1215
+ name: "Margin in Gap Container",
1216
+ path: "scripts/active/preflights/ui/margin-in-gap-container.ts",
1217
+ blocking: false, // Changed to non-blocking - 72 violations need gradual cleanup
1218
+ description: "IRON-CLAD: No margin classes on children inside Stack/flex-gap containers",
1219
+ },
1220
+ {
1221
+ name: "Dashboard UI",
1222
+ path: "scripts/active/preflights/ui/dashboard-ui.ts",
1223
+ blocking: true,
1224
+ description: "IRON-CLAD: No margin on layout children + all content must be in Card (consolidated)",
1225
+ },
1226
+ {
1227
+ name: "Dashboard Section Patterns",
1228
+ path: "scripts/active/preflights/ui/dashboard-section-patterns.ts",
1229
+ blocking: true,
1230
+ description: "IRON-CLAD: Enforce Card > CardContent(p-0) > Box(px-4 pt-3 pb-0) + Divider pattern, shadow on nested boxes, gap-4 in card grids",
1231
+ },
1232
+ {
1233
+ name: "Page Layout Spacing",
1234
+ path: "scripts/active/preflights/ui/page-layout-spacing.ts",
1235
+ blocking: true,
1236
+ description: "IRON-CLAD: Uniform 12px spacing in layout chain (breadcrumbs → content → header)",
1237
+ },
1238
+ {
1239
+ name: "Doubled Padding Detection",
1240
+ path: "scripts/active/preflights/ui/doubled-padding-check.ts",
1241
+ blocking: true,
1242
+ description: "Detect doubled padding: nested pt-X classes AND inline style paddingTop + child pt-X",
1243
+ },
1244
+ {
1245
+ name: "Label-Description Spacing",
1246
+ path: "scripts/active/preflights/ui/label-description-spacing.ts",
1247
+ blocking: true,
1248
+ description: "Detect negative margins pulling labels too close to description text",
1249
+ },
1250
+ {
1251
+ name: "Header Actions Detection",
1252
+ path: "scripts/active/preflights/ui/header-actions-detection.js",
1253
+ blocking: true,
1254
+ description: "UnifiedHeader actions should only contain buttons/badges, not toggles/text",
1255
+ },
1256
+ {
1257
+ name: "Header Action Text Color",
1258
+ path: "scripts/active/preflights/ui/header-action-text-color.ts",
1259
+ blocking: true,
1260
+ description: "UnifiedHeader PageHeader actions must have white text override for buttons on blue gradient background",
1261
+ },
1262
+ {
1263
+ name: "UI Accessibility",
1264
+ path: "scripts/active/preflights/consolidated/ui-accessibility.ts",
1265
+ blocking: true,
1266
+ description: "WCAG checks: labels, duplicate labels, ARIA, focus, touch",
1267
+ },
1268
+ {
1269
+ name: "Accessibility Critical",
1270
+ path: "scripts/active/preflights/ui/accessibility-critical.ts",
1271
+ blocking: true,
1272
+ description: "Critical a11y: alt text, ARIA labels, text-foreground on colored backgrounds",
1273
+ },
1274
+ {
1275
+ name: "Tailwind Contrast",
1276
+ path: "scripts/active/preflights/ui/tailwind-contrast-check.ts",
1277
+ blocking: true,
1278
+ description: "WCAG contrast: text-muted-foreground on colored backgrounds",
1279
+ },
1280
+ {
1281
+ name: "UI Loading Skeletons",
1282
+ path: "scripts/active/preflights/consolidated/ui-loading-skeletons.ts",
1283
+ blocking: true,
1284
+ description: "Route-level loading.tsx must use skeletons (no spinners)",
1285
+ },
1286
+ {
1287
+ name: "Skeleton Size Consistency",
1288
+ path: "scripts/active/preflights/ui/skeleton-size-consistency.ts",
1289
+ blocking: false,
1290
+ description: "Skeleton dimensions must match actual component dimensions to prevent layout shift",
1291
+ },
1292
+ {
1293
+ name: "UI Forms",
1294
+ path: "scripts/active/preflights/consolidated/ui-forms.ts",
1295
+ blocking: false,
1296
+ description: "Form field validation, spacing, sizing, padding",
1297
+ },
1298
+ {
1299
+ name: "UI Tokens",
1300
+ path: "scripts/active/preflights/consolidated/ui-tokens.ts",
1301
+ blocking: false,
1302
+ description: "Token enforcement (colors, spacing, z-index, shadows, animation)",
1303
+ },
1304
+ {
1305
+ name: "UI Style Validation",
1306
+ path: "scripts/active/preflights/consolidated/ui-style-validation.ts",
1307
+ blocking: false,
1308
+ description: "Invalid DOM props, Tailwind enforcement, style conflicts",
1309
+ },
1310
+ // UI Layout is intentionally non-blocking here until the codebase is fully compliant
1311
+ {
1312
+ name: "UI Layout",
1313
+ path: "scripts/active/preflights/consolidated/ui-layout.ts",
1314
+ blocking: false,
1315
+ description: "Page templates, centering, header spacing, excessive spacing",
1316
+ },
1317
+ {
1318
+ name: "UI Advanced Spacing",
1319
+ path: "scripts/active/preflights/consolidated/ui-advanced-spacing.ts",
1320
+ blocking: false,
1321
+ description: "Tables, dialogs, tabs, empty/loading states spacing patterns",
1322
+ },
1323
+ {
1324
+ name: "UI Typography",
1325
+ path: "scripts/active/preflights/consolidated/ui-typography.ts",
1326
+ blocking: false,
1327
+ description: "Typography hierarchy and consistency",
1328
+ },
1329
+ {
1330
+ name: "UI Responsive",
1331
+ path: "scripts/active/preflights/consolidated/ui-responsive.ts",
1332
+ blocking: false,
1333
+ description: "Responsive layout and breakpoint consistency",
1334
+ },
1335
+ {
1336
+ name: "UI Media",
1337
+ path: "scripts/active/preflights/consolidated/ui-media.ts",
1338
+ blocking: false,
1339
+ description: "Images/media usage and responsive behavior",
1340
+ },
1341
+ {
1342
+ name: "UI Loading State Skeletons",
1343
+ path: "scripts/active/preflights/consolidated/ui-loading-state-skeletons.ts",
1344
+ blocking: false,
1345
+ description: "Warn when page-level spinners are used for loading states",
1346
+ },
1347
+ // Organization checks (CSS is blocking due to global reset danger)
1348
+ {
1349
+ name: "CSS Organization",
1350
+ path: "scripts/active/preflights/consolidated/css-organization.ts",
1351
+ blocking: true,
1352
+ description: "CSS architecture, dangerous global resets detection",
1353
+ },
1354
+ {
1355
+ name: "CSS Runtime",
1356
+ path: "scripts/active/preflights/consolidated/css-runtime-validation.ts",
1357
+ blocking: true,
1358
+ description: "CSS runtime validation, Tailwind override detection",
1359
+ },
1360
+ {
1361
+ name: "CSS Variables",
1362
+ path: "scripts/active/preflights/consolidated/css-variable-validation.ts",
1363
+ blocking: true,
1364
+ description: "CSS variable typos and undefined variables",
1365
+ },
1366
+ {
1367
+ name: "Tailwind Classes",
1368
+ path: "scripts/active/preflights/consolidated/tailwind-class-validation.ts",
1369
+ blocking: true,
1370
+ description: "Invalid Tailwind class names and typos",
1371
+ },
1372
+ {
1373
+ name: "CSS Advanced",
1374
+ path: "scripts/active/preflights/consolidated/css-advanced-validation.ts",
1375
+ blocking: false,
1376
+ description: "Z-index, colors, breakpoints, animations, specificity",
1377
+ },
1378
+ {
1379
+ name: "Dark Mode",
1380
+ path: "scripts/active/preflights/consolidated/dark-mode-consistency.ts",
1381
+ blocking: false,
1382
+ description: "Dark mode variant consistency",
1383
+ },
1384
+ {
1385
+ name: "Inline Style Conflicts",
1386
+ path: "scripts/active/preflights/consolidated/inline-style-conflicts.ts",
1387
+ blocking: false,
1388
+ description: "Tailwind vs inline style conflicts in TSX",
1389
+ },
1390
+ {
1391
+ name: "UI Consistency Extended",
1392
+ path: "scripts/active/preflights/consolidated/ui-consistency-extended.ts",
1393
+ blocking: false,
1394
+ description: "Icon sizes, button sizes, loading states, shadows",
1395
+ },
1396
+ {
1397
+ name: "UI Consistency Advanced",
1398
+ path: "scripts/active/preflights/consolidated/ui-consistency-advanced.ts",
1399
+ blocking: true,
1400
+ description: "Tooltips, modals, pagination, avatars, badges, dividers, transitions, overflow",
1401
+ },
1402
+ {
1403
+ name: "UI Motion Accessibility",
1404
+ path: "scripts/active/preflights/consolidated/ui-motion-accessibility.ts",
1405
+ blocking: true,
1406
+ description: "WCAG motion/accessibility: reduced motion support and safe animation patterns",
1407
+ },
1408
+ {
1409
+ name: "UI Microcopy Consistency",
1410
+ path: "scripts/active/preflights/consolidated/ui-microcopy-consistency.ts",
1411
+ blocking: true,
1412
+ description: "Blocking: UX microcopy standards (Close/Cancel/Delete/Remove/etc)",
1413
+ },
1414
+ {
1415
+ name: "UI Interactive States",
1416
+ path: "scripts/active/preflights/consolidated/ui-interactive-states.ts",
1417
+ blocking: true,
1418
+ description: "Blocking: hover/active/focus/disabled state consistency",
1419
+ },
1420
+ {
1421
+ name: "Product Image Animations",
1422
+ path: "scripts/active/preflights/ui/product-image-animations.ts",
1423
+ blocking: true,
1424
+ description: "Blocking: product cards/images must not use hover animations",
1425
+ },
1426
+ {
1427
+ name: "UI Consistency Comprehensive",
1428
+ path: "scripts/active/preflights/consolidated/ui-consistency-comprehensive.ts",
1429
+ blocking: true,
1430
+ description: "Card elevation, inputs, animations, z-index, breakpoints, colors, fonts, borders",
1431
+ },
1432
+ {
1433
+ name: "Lib Organization",
1434
+ path: "scripts/active/preflights/consolidated/lib-organization.ts",
1435
+ blocking: false,
1436
+ description: "Lib directory structure, barrel exports",
1437
+ },
1438
+ // UX checks (non-blocking)
1439
+ {
1440
+ name: "Homepage UX",
1441
+ path: "scripts/active/preflights/consolidated/homepage-ux.ts",
1442
+ blocking: false,
1443
+ description: "Search bar, pagination, loading states",
1444
+ },
1445
+ // UI Standards Enforcement (blocking)
1446
+ {
1447
+ name: "UI Standards",
1448
+ path: "scripts/active/preflights/consolidated/ui-standards-enforcement.ts",
1449
+ blocking: true,
1450
+ description: "Card shadows, typography, button sizes, icon sizes, alert spacing, form density",
1451
+ },
1452
+ // Quality checks (non-blocking) - includes duplicate logic & type safety
1453
+ {
1454
+ name: "Quality",
1455
+ path: "scripts/active/preflights/consolidated/quality.ts",
1456
+ blocking: false,
1457
+ description: "Code quality, linting, file size, duplicate logic, type safety",
1458
+ },
1459
+ {
1460
+ name: "Performance",
1461
+ path: "scripts/active/preflights/consolidated/performance.ts",
1462
+ blocking: false,
1463
+ description: "Bundle size, image optimization, lazy loading, N+1 queries",
1464
+ },
1465
+ {
1466
+ name: "Script Performance",
1467
+ path: "scripts/active/preflights/consolidated/script-performance.ts",
1468
+ blocking: false,
1469
+ description: "Warn when heavy scripts lack parallelism (e.g., --workers) or default to low concurrency",
1470
+ },
1471
+ // Framework-specific checks
1472
+ {
1473
+ name: "Turbopack Enforcement",
1474
+ path: "scripts/active/preflights/framework/turbopack-enforcement.ts",
1475
+ blocking: true,
1476
+ description: "Ensure dev/build use Turbopack (--turbo) for 10x faster HMR",
1477
+ },
1478
+ {
1479
+ name: "React",
1480
+ path: "scripts/active/preflights/consolidated/react.ts",
1481
+ blocking: false,
1482
+ description: "React patterns, hooks usage",
1483
+ },
1484
+ {
1485
+ name: "React Best Practices",
1486
+ path: "scripts/active/preflights/react/component-best-practices.ts",
1487
+ blocking: false,
1488
+ description: "Duplicate JSX attributes, inline objects, missing keys, component size",
1489
+ },
1490
+ {
1491
+ name: "Next.js",
1492
+ path: "scripts/active/preflights/consolidated/nextjs.ts",
1493
+ blocking: false,
1494
+ description: "Next.js patterns, routing",
1495
+ },
1496
+ {
1497
+ name: "Next.js Image",
1498
+ path: "scripts/active/preflights/nextjs/nextjs-image-validation.ts",
1499
+ blocking: false,
1500
+ description: 'Image aspect ratio, LCP optimization, loading="eager"',
1501
+ },
1502
+ // Additional checks
1503
+ {
1504
+ name: "Images",
1505
+ path: "scripts/active/preflights/consolidated/images.ts",
1506
+ blocking: false,
1507
+ description: "Image optimization, width/height, priority prop",
1508
+ },
1509
+ {
1510
+ name: "Code Quality",
1511
+ path: "scripts/active/preflights/consolidated/code-quality.ts",
1512
+ blocking: false,
1513
+ description: "ESLint, strict mode",
1514
+ },
1515
+ {
1516
+ name: "Unicode Console Compatibility",
1517
+ path: "scripts/active/preflights/code-hygiene/unicode-console-compatibility.ts",
1518
+ blocking: false,
1519
+ description: "Detect Unicode chars that break on Windows CMD (█░▓▒)",
1520
+ },
1521
+ {
1522
+ name: "UI Cleanup",
1523
+ path: "scripts/active/preflights/consolidated/ui-cleanup.ts",
1524
+ blocking: false,
1525
+ description: "MUI overrides, scrollbar consistency, semantic HTML",
1526
+ },
1527
+ // Shipping integration
1528
+ {
1529
+ name: "Shipping Integration",
1530
+ path: "scripts/active/preflights/shipping-integration-validation.ts",
1531
+ blocking: true,
1532
+ description: "Shipping rules wired to checkout, all types handled",
1533
+ },
1534
+ // Hardcoded options detection
1535
+ {
1536
+ name: "Hardcoded Options",
1537
+ path: "scripts/active/preflights/hardcoded-options-validation.js",
1538
+ blocking: true,
1539
+ description: "Detect hardcoded category/status arrays that should use constants",
1540
+ },
1541
+ // Store profile normalization
1542
+ {
1543
+ name: "Store Specialties Normalization",
1544
+ path: "scripts/active/preflights/specialized/store-specialties-normalization.ts",
1545
+ blocking: true,
1546
+ description: "Prevent drift: specialties constants must be canonical (normalized) values",
1547
+ },
1548
+ // Code hygiene checks
1549
+ {
1550
+ name: "Console Chars Sync",
1551
+ path: "scripts/active/preflights/code-hygiene/console-chars-sync.ts",
1552
+ blocking: false, // Non-blocking - JS shim sync is nice-to-have, not critical
1553
+ description: "Ensure console-chars TS/JS files stay in sync",
1554
+ },
1555
+ {
1556
+ name: "Empty Catch Blocks",
1557
+ path: "scripts/active/preflights/code-hygiene/empty-catch-detection.ts",
1558
+ blocking: true,
1559
+ description: "Detect empty catch blocks that silently swallow errors",
1560
+ },
1561
+ {
1562
+ name: "API Error Handling",
1563
+ path: "scripts/active/preflights/code-hygiene/api-error-handling.ts",
1564
+ blocking: false,
1565
+ description: "Ensure API routes have proper try-catch error handling",
1566
+ },
1567
+ {
1568
+ name: "Log Level Misuse",
1569
+ path: "scripts/active/preflights/code-hygiene/log-level-misuse.ts",
1570
+ blocking: true,
1571
+ description: "Detect logger.warn used for info/debug messages",
1572
+ },
1573
+ {
1574
+ name: "Missing Logger Import",
1575
+ path: "scripts/active/preflights/code-hygiene/missing-logger-import.ts",
1576
+ blocking: true,
1577
+ description: "Detect files using logger without importing it",
1578
+ },
1579
+ {
1580
+ name: "Console.log Detection",
1581
+ path: "scripts/active/preflights/code-hygiene/console-log-detection.ts --warning",
1582
+ blocking: false,
1583
+ description: "Detect console.log statements in production code",
1584
+ },
1585
+ {
1586
+ name: "Log Message Casing",
1587
+ path: "scripts/active/preflights/specialized/log-message-casing.mjs",
1588
+ blocking: false,
1589
+ description: "Consistent Title Case in console.log messages (no ALL_CAPS enums)",
1590
+ },
1591
+ {
1592
+ name: "Any Type Detection",
1593
+ path: "scripts/active/preflights/code-hygiene/any-type-detection.ts --warning",
1594
+ blocking: false,
1595
+ description: "Detect any type usage that bypasses TypeScript safety",
1596
+ },
1597
+ {
1598
+ name: "Dead Code Detection",
1599
+ path: "scripts/active/preflights/code-hygiene/dead-code-detection.ts",
1600
+ blocking: true,
1601
+ description: "Detect unused variables and parameters (noUnusedLocals/noUnusedParameters)",
1602
+ },
1603
+ {
1604
+ name: "Comment Hygiene",
1605
+ path: "scripts/active/preflights/code-hygiene/comment-hygiene.ts",
1606
+ blocking: true,
1607
+ description: "Detect commented-out code and excessive comment ratios (>30%)",
1608
+ },
1609
+ {
1610
+ name: "Decorative Separators",
1611
+ path: "scripts/active/preflights/code-hygiene/decorative-separators.ts",
1612
+ blocking: true,
1613
+ description: "Detect wasteful decorative separators (===, ---, box-drawing chars)",
1614
+ },
1615
+ {
1616
+ name: "Broken Template Literals",
1617
+ path: "scripts/active/preflights/code-hygiene/broken-template-literals.ts",
1618
+ blocking: true,
1619
+ description: "Detect template literal syntax in regular strings that never resolve",
1620
+ },
1621
+ {
1622
+ name: "Dead CSS Detection",
1623
+ path: "scripts/active/preflights/css/dead-css-detection.ts",
1624
+ blocking: false,
1625
+ description: "Detects unused CSS classes and variables that bloat bundles",
1626
+ },
1627
+ {
1628
+ name: "TODO Tracking",
1629
+ path: "scripts/active/preflights/code-hygiene/todo-tracking.ts",
1630
+ blocking: false,
1631
+ description: "Track TODO/FIXME comments for visibility",
1632
+ },
1633
+ {
1634
+ name: "No Console in Production",
1635
+ path: "scripts/active/preflights/code-quality/no-console-production.ts",
1636
+ blocking: true,
1637
+ description: "Block console.log statements in production code paths",
1638
+ },
1639
+ {
1640
+ name: "Magic Number Detection",
1641
+ path: "scripts/active/preflights/code-quality/magic-number-detection.ts",
1642
+ blocking: false,
1643
+ description: "Detect hardcoded magic numbers that should be named constants",
1644
+ },
1645
+ {
1646
+ name: "Feature Flag Hygiene",
1647
+ path: "scripts/active/preflights/code-quality/feature-flag-hygiene.ts",
1648
+ blocking: false,
1649
+ description: "Detect stale feature flags and tech debt accumulation",
1650
+ },
1651
+ // Business logic validation (CRITICAL - prevents financial/inventory bugs)
1652
+ {
1653
+ name: "Price Calculation Safety",
1654
+ path: "scripts/active/preflights/business/price-calculation-validation.ts",
1655
+ blocking: true,
1656
+ description: "Detect floating point arithmetic on prices (use Decimal.js)",
1657
+ },
1658
+ {
1659
+ name: "Currency Precision",
1660
+ path: "scripts/active/preflights/business/currency-precision.ts",
1661
+ blocking: true,
1662
+ description: "Validate monetary calculations use proper precision",
1663
+ },
1664
+ {
1665
+ name: "Order State Machine",
1666
+ path: "scripts/active/preflights/business/order-state-machine-validation.ts",
1667
+ blocking: false,
1668
+ description: "Validate order status transitions follow state machine",
1669
+ },
1670
+ {
1671
+ name: "Inventory Atomicity",
1672
+ path: "scripts/active/preflights/business/inventory-atomicity-validation.ts",
1673
+ blocking: true,
1674
+ description: "Detect race conditions in inventory operations",
1675
+ },
1676
+ // Security validation (CRITICAL - prevents security vulnerabilities)
1677
+ {
1678
+ name: "Rate Limiting",
1679
+ path: "scripts/active/preflights/security/rate-limiting-validation.ts",
1680
+ blocking: true,
1681
+ description: "Ensure auth endpoints have rate limiting",
1682
+ },
1683
+ {
1684
+ name: "Webhook Security",
1685
+ path: "scripts/active/preflights/security/webhook-security-validation.ts",
1686
+ blocking: true,
1687
+ description: "Validate webhook signature verification",
1688
+ },
1689
+ {
1690
+ name: "Path Traversal",
1691
+ path: "scripts/active/preflights/security/path-traversal-prevention.ts",
1692
+ blocking: true,
1693
+ description: "Prevent file path traversal attacks",
1694
+ },
1695
+ {
1696
+ name: "SQL Injection",
1697
+ path: "scripts/active/preflights/security/sql-injection-prevention.ts",
1698
+ blocking: true,
1699
+ description: "Detect SQL injection vulnerabilities in raw queries",
1700
+ },
1701
+ {
1702
+ name: "Unvalidated Route Params",
1703
+ path: "scripts/active/preflights/security/unvalidated-route-params.ts",
1704
+ blocking: true,
1705
+ description: "Detect route params used without validation (SQL injection risk)",
1706
+ },
1707
+ {
1708
+ name: "Sensitive Data",
1709
+ path: "scripts/active/preflights/security/sensitive-data-exposure.ts",
1710
+ blocking: true,
1711
+ description: "Prevent sensitive data exposure in API responses",
1712
+ },
1713
+ {
1714
+ name: "Security SLA Enforcement",
1715
+ path: "scripts/active/preflights/security/security-sla-enforcement.ts",
1716
+ blocking: true,
1717
+ description: "Enforce patching SLAs: critical 24h, high 7d, moderate 30d",
1718
+ },
1719
+ {
1720
+ name: "CSRF Protection",
1721
+ path: "scripts/active/preflights/security/csrf-protection.ts",
1722
+ blocking: false,
1723
+ description: "Validate CSRF protection on state-changing routes",
1724
+ },
1725
+ {
1726
+ name: "Session Update Safety",
1727
+ path: "scripts/active/preflights/auth/session-update-safety.ts",
1728
+ blocking: true,
1729
+ description: "Prevent login redirects from unsafe update() calls, idle refresh patterns, render-path updates",
1730
+ },
1731
+ {
1732
+ name: "Auth Page Redirects",
1733
+ path: "scripts/active/preflights/auth/authenticated-redirect.ts",
1734
+ blocking: true,
1735
+ description: "Ensure login/register pages redirect authenticated users away (UX best practice)",
1736
+ },
1737
+ {
1738
+ name: "Store Access Delegation",
1739
+ path: "scripts/active/preflights/auth/store-access-delegation.ts",
1740
+ blocking: true,
1741
+ description: "Ensure store access checks include delegated access (team membership), not just ownership. Catches getUserStore() usage and missing hasStoreAccess checks.",
1742
+ },
1743
+ {
1744
+ name: "Session Provider Wrapper",
1745
+ path: "scripts/active/preflights/auth/session-provider-wrapper.ts",
1746
+ blocking: true,
1747
+ description: "Ensure useSession() is in SessionProvider tree, detect deprecated getSession(), conditional providers, missing 'use client'",
1748
+ },
1749
+ // Database integrity
1750
+ {
1751
+ name: "Transaction Integrity",
1752
+ path: "scripts/active/preflights/database/transaction-integrity.ts",
1753
+ blocking: true,
1754
+ description: "Ensure multi-table operations use transactions",
1755
+ },
1756
+ {
1757
+ name: "Migration Reversibility",
1758
+ path: "scripts/active/preflights/database/migration-reversibility.ts",
1759
+ blocking: true,
1760
+ description: "Ensure DB migrations have reversible down scripts",
1761
+ },
1762
+ {
1763
+ name: "Migration Integrity",
1764
+ path: "scripts/active/preflights/database/migration-integrity.ts",
1765
+ blocking: true,
1766
+ description: "Validate migration files exist, aren't modified after apply, no orphaned records",
1767
+ },
1768
+ {
1769
+ name: "Prisma Upsert Safety",
1770
+ path: "scripts/active/preflights/database/prisma-upsert-safety.ts",
1771
+ blocking: true,
1772
+ description: "Detect unsafe upsert patterns that cause duplicate records (fallback IDs, temp_ prefixes)",
1773
+ },
1774
+ {
1775
+ name: "Soft Delete Consistency",
1776
+ path: "scripts/active/preflights/database/soft-delete-consistency.ts",
1777
+ blocking: false,
1778
+ description: "Ensure queries filter soft-deleted records",
1779
+ },
1780
+ // Business logic validation
1781
+ {
1782
+ name: "Idempotency Keys",
1783
+ path: "scripts/active/preflights/business/idempotency-key-validation.ts",
1784
+ blocking: true,
1785
+ description: "Ensure critical operations have idempotency protection",
1786
+ },
1787
+ {
1788
+ name: "Timezone Handling",
1789
+ path: "scripts/active/preflights/business/timezone-handling.ts",
1790
+ blocking: false,
1791
+ description: "Detect timezone handling issues",
1792
+ },
1793
+ // API validation
1794
+ {
1795
+ name: "Pagination Validation",
1796
+ path: "scripts/active/preflights/api/pagination-validation.ts --warning",
1797
+ blocking: false,
1798
+ description: "Validate pagination parameter handling",
1799
+ },
1800
+ {
1801
+ name: "API Response Consistency",
1802
+ path: "scripts/active/preflights/api/response-consistency.ts",
1803
+ blocking: true,
1804
+ description: "Ensure consistent API response patterns",
1805
+ },
1806
+ {
1807
+ name: "API Response Schema",
1808
+ path: "scripts/active/preflights/api/response-schema-validation.ts",
1809
+ blocking: true,
1810
+ description: "Validate API responses have consistent schema (no raw primitives/arrays)",
1811
+ },
1812
+ {
1813
+ name: "Variant Switching Integrity",
1814
+ path: "scripts/active/preflights/api/variant-switching-integrity.ts",
1815
+ blocking: true,
1816
+ description: "Ensure variant switching feature maintains required components (API variants, types, card props)",
1817
+ },
1818
+ // React validation
1819
+ {
1820
+ name: "Memory Leak Detection",
1821
+ path: "scripts/active/preflights/react/memory-leak-detection.ts",
1822
+ blocking: true,
1823
+ description: "Detect memory leaks in React components",
1824
+ },
1825
+ {
1826
+ name: "Memory Leak Patterns",
1827
+ path: "scripts/active/preflights/react/memory-leak-patterns.ts",
1828
+ blocking: true,
1829
+ description: "Comprehensive memory leak detection: closures, subscriptions, timers",
1830
+ },
1831
+ {
1832
+ name: "Error Boundary Coverage",
1833
+ path: "scripts/active/preflights/react/error-boundary-coverage.ts",
1834
+ blocking: false,
1835
+ description: "Ensure all routes/pages have error boundaries",
1836
+ },
1837
+ // AI recognition validation
1838
+ {
1839
+ name: "Series/Subset Hierarchy",
1840
+ path: "scripts/active/preflights/ai/series-subset-hierarchy.ts",
1841
+ blocking: true,
1842
+ description: "Ensure AI correctly distinguishes series (product line) from subset (insert sets)",
1843
+ },
1844
+ // Drift prevention checks (NEW - prevent architectural drift)
1845
+ {
1846
+ name: "State Management Patterns",
1847
+ path: "scripts/active/preflights/drift-prevention/state-management-patterns.ts",
1848
+ blocking: true,
1849
+ description: "Prevent React state management drift: memory leaks, stale closures, mutations",
1850
+ },
1851
+ {
1852
+ name: "API Contract Consistency",
1853
+ path: "scripts/active/preflights/drift-prevention/api-contract-consistency.ts",
1854
+ blocking: true,
1855
+ description: "Prevent API route drift: missing auth, error handling, validation patterns",
1856
+ },
1857
+ {
1858
+ name: "Component Prop Consistency",
1859
+ path: "scripts/active/preflights/drift-prevention/component-prop-consistency.ts",
1860
+ blocking: false,
1861
+ description: "Prevent component API drift: prop naming, types, required props",
1862
+ },
1863
+ {
1864
+ name: "Database Query Patterns",
1865
+ path: "scripts/active/preflights/drift-prevention/database-query-patterns.ts",
1866
+ blocking: true,
1867
+ description: "Prevent database drift: N+1 queries, missing transactions, SQL injection",
1868
+ },
1869
+ {
1870
+ name: "Design System Consistency",
1871
+ path: "scripts/active/preflights/drift-prevention/design-system-consistency.ts",
1872
+ blocking: false,
1873
+ description: "Prevent design drift: hardcoded values, inconsistent variants, accessibility",
1874
+ },
1875
+ {
1876
+ name: "Size Convention Consistency",
1877
+ path: "scripts/active/preflights/drift-prevention/size-convention-consistency.ts",
1878
+ blocking: true,
1879
+ description: "Enforce consistent size prop conventions: xs/sm/md vs small/medium/large",
1880
+ },
1881
+ {
1882
+ name: "Performance Regression Detection",
1883
+ path: "scripts/active/preflights/drift-prevention/performance-regression-detection.ts",
1884
+ blocking: false,
1885
+ description: "Prevent performance drift: bundle size, memory leaks, blocking operations",
1886
+ },
1887
+ {
1888
+ name: "Breaking Change Detection",
1889
+ path: "scripts/active/preflights/drift-prevention/breaking-change-detection.ts",
1890
+ blocking: true,
1891
+ description: "Detect breaking changes in exports, props, schemas before release",
1892
+ },
1893
+ // File organization validation
1894
+ {
1895
+ name: "File Organization",
1896
+ path: "scripts/active/preflights/organization/file-organization-validation.ts",
1897
+ blocking: true,
1898
+ description: "E2E test structure, markdown files, docs organization",
1899
+ },
1900
+ {
1901
+ name: "Preflight TypeScript",
1902
+ path: "scripts/active/preflights/organization/preflight-typescript-validation.ts",
1903
+ blocking: false,
1904
+ description: "Type-check preflight implementation (warning-only until clean)",
1905
+ },
1906
+ {
1907
+ name: "Preflight System",
1908
+ path: "scripts/active/preflights/organization/preflight-system-validation.ts",
1909
+ blocking: true,
1910
+ description: "Validate preflight workflow references + prevent duplicate runs",
1911
+ },
1912
+ {
1913
+ name: "Preflight Progress Consistency",
1914
+ path: "scripts/active/preflights/organization/preflight-progress-consistency.ts",
1915
+ blocking: true,
1916
+ description: "Ensure all workflows use consistent real-time progress indicators",
1917
+ },
1918
+ {
1919
+ name: "Agent Steering",
1920
+ path: "scripts/active/preflights/organization/agent-steering-validation.ts",
1921
+ blocking: true,
1922
+ description: "Validate agent steering naming + stale references (Kiro + GitHub Copilot)",
1923
+ },
1924
+ {
1925
+ name: "Route Structure",
1926
+ path: "scripts/active/preflights/organization/route-structure-validation.ts",
1927
+ blocking: true,
1928
+ description: "Route aliases are re-exports, no duplicate implementations",
1929
+ },
1930
+ {
1931
+ name: "File Cleanup",
1932
+ path: "scripts/active/preflights/organization/file-cleanup-validation.ts",
1933
+ blocking: true,
1934
+ description: "Temporary files, old backups, empty directories, build artifacts",
1935
+ },
1936
+ {
1937
+ name: "Steering Bloat Prevention",
1938
+ path: "scripts/active/preflights/organization/steering-bloat-prevention.ts",
1939
+ blocking: true,
1940
+ description: "Prevent token-heavy patterns in steering files (ASCII art, verbose code, wrong inclusion)",
1941
+ },
1942
+ {
1943
+ name: "NPM Script Bloat Prevention",
1944
+ path: "scripts/active/preflights/organization/npm-script-bloat-prevention.ts",
1945
+ blocking: true,
1946
+ description: "Prevent package.json script bloat (max 200 scripts, consolidation opportunities)",
1947
+ },
1948
+ {
1949
+ name: "API Route Naming",
1950
+ path: "scripts/active/preflights/organization/api-route-naming-validation.ts",
1951
+ blocking: true,
1952
+ description: "Enforce actor namespace + pluralization (forbid /api/seller*, require /api/store; scans code + docs)",
1953
+ },
1954
+ {
1955
+ name: "Store vs Seller Route Naming",
1956
+ path: "scripts/active/preflights/governance/store-seller-route-names.ts",
1957
+ blocking: true,
1958
+ description: "Prevent drift: /store/* is canonical workspace; block introducing new /seller/* routes/links",
1959
+ },
1960
+ {
1961
+ name: "CODEOWNERS Coverage",
1962
+ path: "scripts/active/preflights/governance/codeowners-coverage.ts",
1963
+ blocking: true,
1964
+ description: "Ensure all critical files have designated code owners",
1965
+ },
1966
+ // Data integrity validation
1967
+ {
1968
+ name: "Cart Data Integrity",
1969
+ path: "scripts/active/preflights/data-integrity/cart-data-integrity.ts",
1970
+ blocking: true,
1971
+ description: "Validate cart state management, price calculations, and data flow patterns",
1972
+ },
1973
+ {
1974
+ name: "Notification Template Alignment",
1975
+ path: "scripts/active/preflights/data-integrity/notification-template-alignment.ts",
1976
+ blocking: false,
1977
+ description: "Validate seller/buyer notification preferences align with email templates",
1978
+ },
1979
+ // Framework compatibility (future-proofing)
1980
+ {
1981
+ name: "Node 25 Compatibility (warn)",
1982
+ path: "scripts/active/preflights/runtime/node25-compatibility.ts --mode=warn",
1983
+ blocking: false,
1984
+ description: "Warn: dependencies with engines.node ranges that appear to exclude Node 25",
1985
+ },
1986
+ {
1987
+ name: "Next.js 16+ Compatibility",
1988
+ path: "scripts/active/preflights/nextjs/nextjs16-compatibility.ts",
1989
+ blocking: true,
1990
+ description: "Async request APIs, deprecated patterns, React Compiler readiness",
1991
+ },
1992
+ {
1993
+ name: "Static Generation Conflicts",
1994
+ path: "scripts/active/preflights/nextjs/static-generation-check.ts",
1995
+ blocking: true,
1996
+ description: "Detect pages using generateStaticParams with headers()/cookies() - causes Vercel build failures",
1997
+ },
1998
+ {
1999
+ name: "Prisma 7+ Compatibility",
2000
+ path: "scripts/active/preflights/prisma/prisma7-compatibility.ts",
2001
+ blocking: true,
2002
+ description: "Null syntax, driver adapters, raw query safety, transaction patterns",
2003
+ },
2004
+ {
2005
+ name: "React 19+ Compatibility",
2006
+ path: "scripts/active/preflights/react/react19-compatibility.ts",
2007
+ blocking: true,
2008
+ description: "forwardRef deprecation, useActionState, Context.Provider, propTypes",
2009
+ },
2010
+ {
2011
+ name: "Zod 4+ Compatibility",
2012
+ path: "scripts/active/preflights/zod/zod4-compatibility.ts",
2013
+ blocking: true,
2014
+ description: "Error customization, errorMap→error, format/flatten deprecated",
2015
+ },
2016
+ {
2017
+ name: "TanStack Query v5+ Compatibility",
2018
+ path: "scripts/active/preflights/tanstack/tanstack-query-compatibility.ts",
2019
+ blocking: true,
2020
+ description: "Single object params, isPending, gcTime, removed callbacks",
2021
+ },
2022
+ {
2023
+ name: "Tailwind CSS v4+ Compatibility",
2024
+ path: "scripts/active/preflights/tailwind/tailwind4-compatibility.ts",
2025
+ blocking: true,
2026
+ description: "CSS-first config, @import, @theme directive, ESM only",
2027
+ },
2028
+ {
2029
+ name: "Node Deprecations (warn)",
2030
+ path: "scripts/active/preflights/runtime/node-deprecations.ts",
2031
+ blocking: false,
2032
+ description: "Warn: detect known Node deprecation sources (e.g., Next.js url.parse DEP0169)",
2033
+ },
2034
+ // Quality & i18n validation
2035
+ {
2036
+ name: "i18n Hardcoded Strings",
2037
+ path: "scripts/active/preflights/quality/i18n-hardcoded-strings.ts",
2038
+ blocking: false,
2039
+ description: "Detect hardcoded user-facing strings that should be internationalized",
2040
+ },
2041
+ {
2042
+ name: "Docs-Code Sync",
2043
+ path: "scripts/active/preflights/quality/docs-code-sync.ts",
2044
+ blocking: false,
2045
+ description: "Validate API documentation matches implementation",
2046
+ },
2047
+ // Testing validation
2048
+ {
2049
+ name: "Test Flakiness Score",
2050
+ path: "scripts/active/preflights/testing/test-flakiness-score.ts",
2051
+ blocking: false,
2052
+ description: "Track and quarantine consistently flaky tests",
2053
+ },
2054
+ // Deployment validation
2055
+ {
2056
+ name: "Rollback Compatibility",
2057
+ path: "scripts/active/preflights/deployment/rollback-compatibility.ts",
2058
+ blocking: false,
2059
+ description: "Ensure code can gracefully degrade on rollback",
2060
+ },
2061
+ // Performance budgets
2062
+ {
2063
+ name: "Mobile Performance Budget",
2064
+ path: "scripts/active/preflights/performance/mobile-performance-budget.ts",
2065
+ blocking: false,
2066
+ description: "Separate performance budgets for mobile/slow networks",
2067
+ },
2068
+ // Platform Integrations
2069
+ {
2070
+ name: "Platform Feed Integrity",
2071
+ path: "scripts/active/preflights/integrations/platform-feed-integrity.ts",
2072
+ blocking: true,
2073
+ description: "Validate Amazon/eBay/TCGPlayer feed services, DB schema, email templates, UI components",
2074
+ },
2075
+ ];
2076
+ // SEO checks (standalone scripts, run separately)
2077
+ const SEO_CHECKS = [
2078
+ {
2079
+ name: "Hardcoded URLs",
2080
+ cmd: "node scripts/active/preflights/seo/hardcoded-urls.js",
2081
+ blocking: true,
2082
+ },
2083
+ {
2084
+ name: "Category FAQ Schema",
2085
+ cmd: "node scripts/active/preflights/seo/category-faq-schema-validation.js",
2086
+ blocking: true,
2087
+ },
2088
+ {
2089
+ name: "Missing Metadata",
2090
+ cmd: "tsx scripts/active/preflights/seo/missing-metadata.ts",
2091
+ blocking: false,
2092
+ },
2093
+ ];
2094
+ // MAIN EXECUTION
2095
+ async function main() {
2096
+ const reporter = (0, universal_progress_reporter_1.createUniversalProgressReporter)(path.basename(__filename, ".ts"));
2097
+ const runnerOpts = parseRunnerOptions();
2098
+ let stopScheduling = false;
2099
+ // Preflights are executed via Node/tsx and do NOT automatically load Next.js .env files.
2100
+ // Load local dotenv early so PREFLIGHT_* environment variables can be set in .env.local.
2101
+ // This is a no-op if the files don't exist.
2102
+ process.env.DOTENV_CONFIG_QUIET ??= "true";
2103
+ (0, dotenv_1.config)({ path: ".env" });
2104
+ (0, dotenv_1.config)({ path: ".env.local" });
2105
+ console.log(`${console_chars_1.emoji.search} Running ALL Preflights (Consolidated Modules Only)`);
2106
+ console.log((0, console_chars_1.createDivider)(70, "heavy"));
2107
+ console.log("");
2108
+ console.log(`${console_chars_1.emoji.package} Using consolidated modules from scripts/active/preflights/consolidated/`);
2109
+ console.log(" No standalone checks - all validation through consolidated modules");
2110
+ console.log("");
2111
+ const filter = parseFilterRegex();
2112
+ if (filter) {
2113
+ console.log(`${console_chars_1.emoji.magnifier} Filter enabled: ${filter.raw}`);
2114
+ console.log("");
2115
+ }
2116
+ let failed = 0;
2117
+ let passed = 0;
2118
+ let skipped = 0;
2119
+ let warnings = 0;
2120
+ const startTime = Date.now();
2121
+ const records = [];
2122
+ const blockingModules = [];
2123
+ const nonBlockingModules = [];
2124
+ CONSOLIDATED_MODULES.forEach((mod) => {
2125
+ if (mod.blocking) {
2126
+ blockingModules.push(mod);
2127
+ }
2128
+ else {
2129
+ nonBlockingModules.push(mod);
2130
+ }
2131
+ });
2132
+ if (filter) {
2133
+ const matchesModule = (m) => filter.regex.test(m.name) || filter.regex.test(m.path);
2134
+ blockingModules.splice(0, blockingModules.length, ...blockingModules.filter(matchesModule));
2135
+ nonBlockingModules.splice(0, nonBlockingModules.length, ...nonBlockingModules.filter(matchesModule));
2136
+ }
2137
+ // Run blocking modules first
2138
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2139
+ console.log(`${console_chars_1.emoji.stop} BLOCKING CHECKS (must pass for build)`);
2140
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2141
+ const blockingConcurrency = parseConcurrency("PREFLIGHT_BLOCKING_CONCURRENCY", parseConcurrency("PREFLIGHT_CONCURRENCY", defaultConcurrency()));
2142
+ console.log(`Blocking concurrency: ${blockingConcurrency} (set PREFLIGHT_BLOCKING_CONCURRENCY to override)`);
2143
+ // Track in-progress checks for real-time status updates
2144
+ const inProgressBlocking = new Set();
2145
+ let completedBlocking = 0;
2146
+ const updateBlockingProgress = () => {
2147
+ const running = Array.from(inProgressBlocking);
2148
+ if (running.length > 0) {
2149
+ const progress = `[${completedBlocking}/${blockingModules.length}]`;
2150
+ const runningList = running.length <= 3
2151
+ ? running.join(", ")
2152
+ : `${running.slice(0, 3).join(", ")} +${running.length - 3} more`;
2153
+ process.stdout.write(`\r${console_chars_1.emoji.hourglass} ${progress} Running: ${runningList}`.padEnd(100) + "\r");
2154
+ }
2155
+ };
2156
+ const blockingResults = await mapWithConcurrency(blockingModules, blockingConcurrency, async (mod) => {
2157
+ if (runnerOpts.failFast && stopScheduling) {
2158
+ completedBlocking++;
2159
+ return { kind: "skipped" };
2160
+ }
2161
+ const moduleFile = mod.path.split(" ")[0];
2162
+ if (!fs.existsSync(moduleFile)) {
2163
+ completedBlocking++;
2164
+ return { kind: "skipped" };
2165
+ }
2166
+ // Show this check as in-progress
2167
+ inProgressBlocking.add(mod.name);
2168
+ updateBlockingProgress();
2169
+ const res = await runShellCommand(`tsx ${mod.path}`, {
2170
+ maxStdoutLines: 30,
2171
+ maxStderrLines: 10,
2172
+ timeoutMs: runnerOpts.timeoutMs,
2173
+ findingsPath: createFindingsPath(`blocking-${mod.name}`),
2174
+ });
2175
+ // Remove from in-progress and update counter
2176
+ inProgressBlocking.delete(mod.name);
2177
+ completedBlocking++;
2178
+ updateBlockingProgress();
2179
+ if (runnerOpts.failFast && (res.timedOut || res.exitCode !== 0)) {
2180
+ stopScheduling = true;
2181
+ }
2182
+ return {
2183
+ kind: res.exitCode === 0 ? "passed" : "failed",
2184
+ durationSec: res.durationSec,
2185
+ stdoutLines: res.stdoutLines,
2186
+ stdoutTotal: res.stdoutTotal,
2187
+ stderrLines: res.stderrLines,
2188
+ stderrTotal: res.stderrTotal,
2189
+ exitCode: res.exitCode,
2190
+ timedOut: res.timedOut,
2191
+ findings: res.findings,
2192
+ };
2193
+ });
2194
+ // Clear the progress line before printing results
2195
+ process.stdout.write("\r" + " ".repeat(100) + "\r");
2196
+ for (let i = 0; i < blockingModules.length; i += 1) {
2197
+ const mod = blockingModules[i];
2198
+ const result = blockingResults[i];
2199
+ if (result.kind === "skipped") {
2200
+ console.log(`${console_chars_1.emoji.skip} ${mod.name.padEnd(20)} (skipped - file not found)`);
2201
+ skipped++;
2202
+ records.push({
2203
+ name: mod.name,
2204
+ group: "blocking",
2205
+ blocking: true,
2206
+ pathOrCmd: mod.path,
2207
+ kind: "skipped",
2208
+ durationSec: 0,
2209
+ exitCode: 0,
2210
+ });
2211
+ continue;
2212
+ }
2213
+ if (result.kind === "passed") {
2214
+ console.log(`${console_chars_1.emoji.success} ${mod.name.padEnd(20)} ${result.durationSec}s`);
2215
+ passed++;
2216
+ records.push({
2217
+ name: mod.name,
2218
+ group: "blocking",
2219
+ blocking: true,
2220
+ pathOrCmd: mod.path,
2221
+ kind: "passed",
2222
+ durationSec: toNumberDurationSec(result.durationSec),
2223
+ stdoutTotal: result.stdoutTotal,
2224
+ stderrTotal: result.stderrTotal,
2225
+ exitCode: 0,
2226
+ });
2227
+ continue;
2228
+ }
2229
+ console.log(`${console_chars_1.emoji.error} ${mod.name.padEnd(20)} FAILED`);
2230
+ result.stdoutLines.forEach((line) => console.log(` ${line}`));
2231
+ if (result.stdoutTotal > result.stdoutLines.length) {
2232
+ console.log(` ... +${result.stdoutTotal - result.stdoutLines.length} more lines`);
2233
+ }
2234
+ result.stderrLines.forEach((line) => console.log(` ${line}`));
2235
+ if (result.stderrTotal > result.stderrLines.length) {
2236
+ console.log(` ... +${result.stderrTotal - result.stderrLines.length} more lines`);
2237
+ }
2238
+ failed++;
2239
+ records.push({
2240
+ name: mod.name,
2241
+ group: "blocking",
2242
+ blocking: true,
2243
+ pathOrCmd: mod.path,
2244
+ kind: "failed",
2245
+ durationSec: toNumberDurationSec(result.durationSec),
2246
+ stdoutTotal: result.stdoutTotal,
2247
+ stderrTotal: result.stderrTotal,
2248
+ timedOut: result.timedOut,
2249
+ exitCode: result.exitCode,
2250
+ outputSnippet: makeOutputSnippet({
2251
+ stdoutLines: result.stdoutLines,
2252
+ stdoutTotal: result.stdoutTotal,
2253
+ stderrLines: result.stderrLines,
2254
+ stderrTotal: result.stderrTotal,
2255
+ }),
2256
+ findings: result.findings,
2257
+ });
2258
+ }
2259
+ // Run SEO checks (blocking)
2260
+ console.log("\n" + (0, console_chars_1.createDivider)(70, "double"));
2261
+ console.log(`${console_chars_1.emoji.stop} SEO CHECKS (blocking)`);
2262
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2263
+ const seoChecks = filter
2264
+ ? SEO_CHECKS.filter((c) => filter.regex.test(c.name) || filter.regex.test(c.cmd))
2265
+ : SEO_CHECKS;
2266
+ const seoConcurrency = parseConcurrency("PREFLIGHT_SEO_CONCURRENCY", Math.min(seoChecks.length, parseConcurrency("PREFLIGHT_CONCURRENCY", defaultConcurrency())));
2267
+ console.log(`SEO concurrency: ${seoConcurrency} (set PREFLIGHT_SEO_CONCURRENCY to override)`);
2268
+ // Track in-progress SEO checks for real-time status updates
2269
+ const inProgressSeo = new Set();
2270
+ let completedSeo = 0;
2271
+ const updateSeoProgress = () => {
2272
+ const running = Array.from(inProgressSeo);
2273
+ if (running.length > 0) {
2274
+ const progress = `[${completedSeo}/${seoChecks.length}]`;
2275
+ const runningList = running.join(", ");
2276
+ process.stdout.write(`\r${console_chars_1.emoji.hourglass} ${progress} Running: ${runningList}`.padEnd(100) + "\r");
2277
+ }
2278
+ };
2279
+ const seoResults = await mapWithConcurrency(seoChecks, seoConcurrency, async (check) => {
2280
+ if (runnerOpts.failFast && stopScheduling) {
2281
+ return { kind: "skipped", durationSec: "0.0", exitCode: 0, timedOut: false };
2282
+ }
2283
+ // Show this check as in-progress
2284
+ inProgressSeo.add(check.name);
2285
+ updateSeoProgress();
2286
+ const res = await runShellCommand(check.cmd, {
2287
+ maxStdoutLines: 20,
2288
+ maxStderrLines: 10,
2289
+ timeoutMs: runnerOpts.timeoutMs,
2290
+ findingsPath: createFindingsPath(`seo-${check.name}`),
2291
+ });
2292
+ // Remove from in-progress and update counter
2293
+ inProgressSeo.delete(check.name);
2294
+ completedSeo++;
2295
+ updateSeoProgress();
2296
+ if (runnerOpts.failFast && check.blocking && (res.timedOut || res.exitCode !== 0)) {
2297
+ stopScheduling = true;
2298
+ }
2299
+ if (res.exitCode === 0) {
2300
+ return { kind: "passed", durationSec: res.durationSec, exitCode: 0, timedOut: false };
2301
+ }
2302
+ return {
2303
+ kind: check.blocking ? "failed" : "warning",
2304
+ durationSec: res.durationSec,
2305
+ stdoutLines: res.stdoutLines,
2306
+ stdoutTotal: res.stdoutTotal,
2307
+ stderrLines: res.stderrLines,
2308
+ stderrTotal: res.stderrTotal,
2309
+ exitCode: res.exitCode,
2310
+ timedOut: res.timedOut,
2311
+ findings: res.findings,
2312
+ };
2313
+ });
2314
+ // Clear the progress line before printing results
2315
+ process.stdout.write("\r" + " ".repeat(100) + "\r");
2316
+ for (let i = 0; i < seoChecks.length; i += 1) {
2317
+ const check = seoChecks[i];
2318
+ const result = seoResults[i];
2319
+ if (result.kind === "skipped") {
2320
+ console.log(`${console_chars_1.emoji.skip} ${check.name.padEnd(20)} (skipped - fail-fast)`);
2321
+ skipped++;
2322
+ records.push({
2323
+ name: check.name,
2324
+ group: "seo",
2325
+ blocking: check.blocking,
2326
+ pathOrCmd: check.cmd,
2327
+ kind: "skipped",
2328
+ durationSec: 0,
2329
+ exitCode: 0,
2330
+ });
2331
+ continue;
2332
+ }
2333
+ if (result.kind === "passed") {
2334
+ console.log(`${console_chars_1.emoji.success} ${check.name.padEnd(20)} ${result.durationSec}s`);
2335
+ passed++;
2336
+ records.push({
2337
+ name: check.name,
2338
+ group: "seo",
2339
+ blocking: check.blocking,
2340
+ pathOrCmd: check.cmd,
2341
+ kind: "passed",
2342
+ durationSec: toNumberDurationSec(result.durationSec),
2343
+ exitCode: result.exitCode,
2344
+ timedOut: result.timedOut,
2345
+ });
2346
+ continue;
2347
+ }
2348
+ if (result.kind === "warning") {
2349
+ console.log(`${console_chars_1.emoji.warning} ${check.name.padEnd(20)} (warnings)`);
2350
+ warnings++;
2351
+ records.push({
2352
+ name: check.name,
2353
+ group: "seo",
2354
+ blocking: check.blocking,
2355
+ pathOrCmd: check.cmd,
2356
+ kind: "warning",
2357
+ durationSec: toNumberDurationSec(result.durationSec),
2358
+ stdoutTotal: result.stdoutTotal,
2359
+ stderrTotal: result.stderrTotal,
2360
+ exitCode: result.exitCode,
2361
+ timedOut: result.timedOut,
2362
+ outputSnippet: makeOutputSnippet({
2363
+ stdoutLines: result.stdoutLines,
2364
+ stdoutTotal: result.stdoutTotal,
2365
+ stderrLines: result.stderrLines,
2366
+ stderrTotal: result.stderrTotal,
2367
+ }),
2368
+ findings: result.findings,
2369
+ });
2370
+ continue;
2371
+ }
2372
+ console.log(`${console_chars_1.emoji.error} ${check.name.padEnd(20)} FAILED`);
2373
+ result.stdoutLines.forEach((line) => console.log(` ${line}`));
2374
+ if (result.stdoutTotal > result.stdoutLines.length) {
2375
+ console.log(` ... +${result.stdoutTotal - result.stdoutLines.length} more lines`);
2376
+ }
2377
+ result.stderrLines.forEach((line) => console.log(` ${line}`));
2378
+ if (result.stderrTotal > result.stderrLines.length) {
2379
+ console.log(` ... +${result.stderrTotal - result.stderrLines.length} more lines`);
2380
+ }
2381
+ failed++;
2382
+ records.push({
2383
+ name: check.name,
2384
+ group: "seo",
2385
+ blocking: check.blocking,
2386
+ pathOrCmd: check.cmd,
2387
+ kind: "failed",
2388
+ durationSec: toNumberDurationSec(result.durationSec),
2389
+ stdoutTotal: result.stdoutTotal,
2390
+ stderrTotal: result.stderrTotal,
2391
+ exitCode: result.exitCode,
2392
+ timedOut: result.timedOut,
2393
+ outputSnippet: makeOutputSnippet({
2394
+ stdoutLines: result.stdoutLines,
2395
+ stdoutTotal: result.stdoutTotal,
2396
+ stderrLines: result.stderrLines,
2397
+ stderrTotal: result.stderrTotal,
2398
+ }),
2399
+ findings: result.findings,
2400
+ });
2401
+ }
2402
+ // Run non-blocking modules
2403
+ console.log("\n" + (0, console_chars_1.createDivider)(70, "double"));
2404
+ console.log(`${console_chars_1.emoji.warning} NON-BLOCKING CHECKS (warnings only)`);
2405
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2406
+ function toLineInfo(lines, total, max) {
2407
+ if (total <= max)
2408
+ return { lines };
2409
+ return { lines, suffix: `... +${total - max} more lines` };
2410
+ }
2411
+ const nonBlockingConcurrency = parseConcurrency("PREFLIGHT_CONCURRENCY", defaultConcurrency());
2412
+ console.log(`Concurrency: ${nonBlockingConcurrency} (set PREFLIGHT_CONCURRENCY to override)`);
2413
+ // Track in-progress checks for real-time status updates
2414
+ const inProgressChecks = new Set();
2415
+ let completedNonBlocking = 0;
2416
+ const updateProgressStatus = () => {
2417
+ const running = Array.from(inProgressChecks);
2418
+ if (running.length > 0) {
2419
+ const progress = `[${completedNonBlocking}/${nonBlockingModules.length}]`;
2420
+ const runningList = running.length <= 3
2421
+ ? running.join(", ")
2422
+ : `${running.slice(0, 3).join(", ")} +${running.length - 3} more`;
2423
+ process.stdout.write(`\r${console_chars_1.emoji.hourglass} ${progress} Running: ${runningList}`.padEnd(100) + "\r");
2424
+ }
2425
+ };
2426
+ const nonBlockingResults = await mapWithConcurrency(nonBlockingModules, nonBlockingConcurrency, async (mod) => {
2427
+ if (runnerOpts.failFast && stopScheduling) {
2428
+ completedNonBlocking++;
2429
+ return { kind: "skipped", durationSec: "0.0", exitCode: 0, timedOut: false };
2430
+ }
2431
+ const moduleFile = mod.path.split(" ")[0];
2432
+ if (!fs.existsSync(moduleFile)) {
2433
+ completedNonBlocking++;
2434
+ return { kind: "skipped", durationSec: "0.0", exitCode: 0, timedOut: false };
2435
+ }
2436
+ // Show this check as in-progress
2437
+ inProgressChecks.add(mod.name);
2438
+ updateProgressStatus();
2439
+ const res = await runShellCommand(`tsx ${mod.path}`, {
2440
+ maxStdoutLines: 20,
2441
+ maxStderrLines: 10,
2442
+ timeoutMs: runnerOpts.timeoutMs,
2443
+ findingsPath: createFindingsPath(`non-blocking-${mod.name}`),
2444
+ });
2445
+ // Remove from in-progress and update counter
2446
+ inProgressChecks.delete(mod.name);
2447
+ completedNonBlocking++;
2448
+ updateProgressStatus();
2449
+ const kind = res.exitCode === 0 ? "passed" : "warning";
2450
+ return {
2451
+ kind,
2452
+ durationSec: res.durationSec,
2453
+ stdoutLines: res.stdoutLines,
2454
+ stdoutTotal: res.stdoutTotal,
2455
+ stderrLines: res.stderrLines,
2456
+ stderrTotal: res.stderrTotal,
2457
+ exitCode: res.exitCode,
2458
+ timedOut: res.timedOut,
2459
+ findings: res.findings,
2460
+ };
2461
+ });
2462
+ // Clear the progress line before printing results
2463
+ process.stdout.write("\r" + " ".repeat(100) + "\r");
2464
+ for (let i = 0; i < nonBlockingModules.length; i += 1) {
2465
+ const mod = nonBlockingModules[i];
2466
+ const result = nonBlockingResults[i];
2467
+ if (result.kind === "skipped") {
2468
+ console.log(`${console_chars_1.emoji.skip} ${mod.name.padEnd(20)} (skipped - file not found)`);
2469
+ skipped++;
2470
+ records.push({
2471
+ name: mod.name,
2472
+ group: "non-blocking",
2473
+ blocking: false,
2474
+ pathOrCmd: mod.path,
2475
+ kind: "skipped",
2476
+ durationSec: 0,
2477
+ exitCode: 0,
2478
+ });
2479
+ continue;
2480
+ }
2481
+ if (result.kind === "passed") {
2482
+ console.log(`${console_chars_1.emoji.success} ${mod.name.padEnd(20)} ${result.durationSec}s`);
2483
+ passed++;
2484
+ records.push({
2485
+ name: mod.name,
2486
+ group: "non-blocking",
2487
+ blocking: false,
2488
+ pathOrCmd: mod.path,
2489
+ kind: "passed",
2490
+ durationSec: toNumberDurationSec(result.durationSec),
2491
+ stdoutTotal: result.stdoutTotal,
2492
+ stderrTotal: result.stderrTotal,
2493
+ exitCode: 0,
2494
+ });
2495
+ continue;
2496
+ }
2497
+ console.log(`${console_chars_1.emoji.warning} ${mod.name.padEnd(20)} (warnings)`);
2498
+ warnings++;
2499
+ records.push({
2500
+ name: mod.name,
2501
+ group: "non-blocking",
2502
+ blocking: false,
2503
+ pathOrCmd: mod.path,
2504
+ kind: "warning",
2505
+ durationSec: toNumberDurationSec(result.durationSec),
2506
+ stdoutTotal: result.stdoutTotal,
2507
+ stderrTotal: result.stderrTotal,
2508
+ exitCode: result.exitCode,
2509
+ timedOut: result.timedOut,
2510
+ outputSnippet: makeOutputSnippet({
2511
+ stdoutLines: result.stdoutLines,
2512
+ stdoutTotal: result.stdoutTotal,
2513
+ stderrLines: result.stderrLines,
2514
+ stderrTotal: result.stderrTotal,
2515
+ }),
2516
+ findings: result.findings,
2517
+ });
2518
+ const outInfo = toLineInfo(result.stdoutLines, result.stdoutTotal, 20);
2519
+ outInfo.lines.forEach((line) => console.log(` ${line}`));
2520
+ if (outInfo.suffix)
2521
+ console.log(` ${outInfo.suffix}`);
2522
+ const errInfo = toLineInfo(result.stderrLines, result.stderrTotal, 10);
2523
+ errInfo.lines.forEach((line) => console.log(` ${line}`));
2524
+ if (errInfo.suffix)
2525
+ console.log(` ${errInfo.suffix}`);
2526
+ }
2527
+ // Summary
2528
+ const totalDuration = ((Date.now() - startTime) / 1000).toFixed(1);
2529
+ const total = CONSOLIDATED_MODULES.length + SEO_CHECKS.length;
2530
+ console.log("\n" + (0, console_chars_1.createDivider)(70, "double"));
2531
+ console.log(`${console_chars_1.emoji.chart} PREFLIGHT RESULTS (Consolidated Modules + SEO)`);
2532
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2533
+ console.log(` ${console_chars_1.emoji.success} Passed: ${passed}/${total - skipped} modules`);
2534
+ console.log(` ${console_chars_1.emoji.error} Failed: ${failed} (blocking)`);
2535
+ console.log(` ${console_chars_1.emoji.warning} Warnings: ${warnings} (non-blocking)`);
2536
+ console.log(` ${console_chars_1.emoji.skip} Skipped: ${skipped} (not found)`);
2537
+ console.log(` ${console_chars_1.emoji.clock} Time: ${totalDuration}s`);
2538
+ console.log((0, console_chars_1.createDivider)(70, "double"));
2539
+ // MACHINE-READABLE REPORT + PERFORMANCE BASELINE (non-blocking)
2540
+ const reportDir = "reports/preflight";
2541
+ const reportPath = `${reportDir}/preflight-results.json`;
2542
+ const lastRunPath = `${reportDir}/last-run.json`;
2543
+ const baselinePath = `${reportDir}/baseline.json`;
2544
+ const report = {
2545
+ version: 1,
2546
+ createdAtIso: new Date().toISOString(),
2547
+ node: process.version,
2548
+ platform: process.platform,
2549
+ arch: process.arch,
2550
+ concurrency: {
2551
+ blocking: blockingConcurrency,
2552
+ nonBlocking: nonBlockingConcurrency,
2553
+ seo: seoConcurrency,
2554
+ },
2555
+ totals: { passed, failed, warnings, skipped },
2556
+ timedOut: records.some((r) => r.timedOut || r.exitCode === 124),
2557
+ records,
2558
+ };
2559
+ if (runnerOpts.junitPath) {
2560
+ try {
2561
+ const xml = toJUnitXml(report, Number(totalDuration));
2562
+ writeText(runnerOpts.junitPath, xml);
2563
+ console.log(`\n${console_chars_1.emoji.testTube} Wrote JUnit report: ${runnerOpts.junitPath}`);
2564
+ }
2565
+ catch {
2566
+ console.log(`\n${console_chars_1.emoji.warning} Could not write JUnit report: ${runnerOpts.junitPath}`);
2567
+ }
2568
+ }
2569
+ if (runnerOpts.sarifPath) {
2570
+ try {
2571
+ const sarif = toSarif(report);
2572
+ writeText(runnerOpts.sarifPath, JSON.stringify(sarif, null, process.env.CI ? 0 : 2) + "\n");
2573
+ console.log(`${console_chars_1.emoji.memo} Wrote SARIF report: ${runnerOpts.sarifPath}`);
2574
+ }
2575
+ catch {
2576
+ console.log(`${console_chars_1.emoji.warning} Could not write SARIF report: ${runnerOpts.sarifPath}`);
2577
+ }
2578
+ }
2579
+ if (records.some((r) => r.exitCode === 124 || r.timedOut)) {
2580
+ console.log(`\n${console_chars_1.emoji.hourglass} BUILD TIMED OUT - One or more steps exceeded timeout`);
2581
+ process.exit(124);
2582
+ }
2583
+ try {
2584
+ writeJson(reportPath, report);
2585
+ writeJson(lastRunPath, report);
2586
+ console.log(`\n${console_chars_1.emoji.memo} Wrote report: ${reportPath}`);
2587
+ }
2588
+ catch {
2589
+ console.log(`\n${console_chars_1.emoji.warning} Could not write report: ${reportPath}`);
2590
+ }
2591
+ const baselineWarnPct = Number(process.env.PREFLIGHT_BASELINE_WARN_PCT ?? "50");
2592
+ const baselineWarnAbsSec = Number(process.env.PREFLIGHT_BASELINE_WARN_ABS_SEC ?? "2");
2593
+ const baseline = readJsonIfExists(baselinePath);
2594
+ if (process.env.PREFLIGHT_BASELINE_UPDATE === "1") {
2595
+ const durationsSecByKey = {};
2596
+ for (const r of records) {
2597
+ if (r.kind === "skipped")
2598
+ continue;
2599
+ durationsSecByKey[baselineKey(r)] = r.durationSec;
2600
+ }
2601
+ const nextBaseline = {
2602
+ version: 1,
2603
+ updatedAtIso: new Date().toISOString(),
2604
+ node: process.version,
2605
+ durationsSecByKey,
2606
+ };
2607
+ try {
2608
+ writeJson(baselinePath, nextBaseline);
2609
+ console.log(`${console_chars_1.emoji.memo} Updated baseline: ${baselinePath}`);
2610
+ }
2611
+ catch {
2612
+ console.log(`${console_chars_1.emoji.warning} Could not update baseline: ${baselinePath}`);
2613
+ }
2614
+ }
2615
+ else if (baseline?.durationsSecByKey) {
2616
+ const regressions = [];
2617
+ for (const r of records) {
2618
+ if (r.kind === "skipped")
2619
+ continue;
2620
+ const key = baselineKey(r);
2621
+ const prev = baseline.durationsSecByKey[key];
2622
+ if (typeof prev !== "number" || !Number.isFinite(prev) || prev <= 0)
2623
+ continue;
2624
+ const absDelta = r.durationSec - prev;
2625
+ const pctDelta = (absDelta / prev) * 100;
2626
+ if (absDelta >= baselineWarnAbsSec && pctDelta >= baselineWarnPct) {
2627
+ regressions.push({ name: r.name, prev, now: r.durationSec });
2628
+ }
2629
+ }
2630
+ if (regressions.length > 0) {
2631
+ console.log(`\n${console_chars_1.emoji.clock} PREFLIGHT PERFORMANCE REGRESSIONS (warning)`);
2632
+ console.log(` Threshold: +${baselineWarnAbsSec}s AND +${baselineWarnPct}%`);
2633
+ regressions
2634
+ .sort((a, b) => b.now - b.prev - (a.now - a.prev))
2635
+ .slice(0, 12)
2636
+ .forEach((r) => {
2637
+ const delta = (r.now - r.prev).toFixed(1);
2638
+ const pct = (((r.now - r.prev) / r.prev) * 100).toFixed(0);
2639
+ console.log(` - ${r.name}: ${r.prev.toFixed(1)}s ${console_chars_1.chars.arrow} ${r.now.toFixed(1)}s (+${delta}s, +${pct}%)`);
2640
+ });
2641
+ if (regressions.length > 12)
2642
+ console.log(` ... +${regressions.length - 12} more`);
2643
+ console.log(` Baseline: ${baselinePath} (set PREFLIGHT_BASELINE_UPDATE=1 to update)`);
2644
+ }
2645
+ }
2646
+ else {
2647
+ console.log(`\n${console_chars_1.emoji.info} No baseline found at ${baselinePath} (set PREFLIGHT_BASELINE_UPDATE=1 to create)`);
2648
+ }
2649
+ if (failed > 0) {
2650
+ console.log(`\n${console_chars_1.emoji.error} BUILD BLOCKED - Fix blocking errors before proceeding`);
2651
+ console.log("");
2652
+ console.log("Consolidated modules with errors:");
2653
+ console.log(" Run individual modules: pnpm tsx scripts/active/preflights/consolidated/<module>.ts");
2654
+ console.log("");
2655
+ process.exit(1);
2656
+ }
2657
+ if (warnings > 0) {
2658
+ console.log(`\n${console_chars_1.emoji.warning} BUILD PASSED (with warnings)`);
2659
+ }
2660
+ else {
2661
+ console.log(`\n${console_chars_1.emoji.success} ALL PREFLIGHTS PASSED`);
2662
+ }
2663
+ console.log("");
2664
+ console.log("Coverage (14 key checks via consolidated modules):");
2665
+ console.log(` ${console_chars_1.chars.check} Import Validation ${console_chars_1.chars.arrow} imports.ts`);
2666
+ console.log(` ${console_chars_1.chars.check} Category Chips ${console_chars_1.chars.arrow} ui-patterns.ts`);
2667
+ console.log(` ${console_chars_1.chars.check} Navigation Layout ${console_chars_1.chars.arrow} ui-navigation.ts`);
2668
+ console.log(` ${console_chars_1.chars.check} Button Link Pattern ${console_chars_1.chars.arrow} ui-components.ts`);
2669
+ console.log(` ${console_chars_1.chars.check} Image Optimization ${console_chars_1.chars.arrow} performance.ts + images.ts`);
2670
+ console.log(` ${console_chars_1.chars.check} XSS Prevention ${console_chars_1.chars.arrow} security.ts`);
2671
+ console.log(` ${console_chars_1.chars.check} Duplicate Logic ${console_chars_1.chars.arrow} quality.ts (data fetching patterns)`);
2672
+ console.log(` ${console_chars_1.chars.check} TypeScript Type Safety ${console_chars_1.chars.arrow} quality.ts (any cast detection)`);
2673
+ console.log(` ${console_chars_1.chars.check} N+1 Query Detection ${console_chars_1.chars.arrow} performance.ts (database efficiency)`);
2674
+ console.log(` ${console_chars_1.chars.check} Homepage UX ${console_chars_1.chars.arrow} homepage-ux.ts (search, pagination)`);
2675
+ console.log(` ${console_chars_1.chars.check} CSS Organization ${console_chars_1.chars.arrow} css-organization.ts (modular CSS)`);
2676
+ console.log(` ${console_chars_1.chars.check} LCP Image Priority ${console_chars_1.chars.arrow} performance.ts (above-fold images)`);
2677
+ console.log(` ${console_chars_1.chars.check} Styling Standards ${console_chars_1.chars.arrow} styling-standards.ts (Tailwind + CVA)`);
2678
+ console.log(` ${console_chars_1.chars.check} Component Architecture ${console_chars_1.chars.arrow} architecture/component-architecture.ts`);
2679
+ console.log(` ${console_chars_1.chars.check} Hardcoded URLs ${console_chars_1.chars.arrow} seo/hardcoded-urls.js (SITE_URL usage)`);
2680
+ console.log(` ${console_chars_1.chars.check} Category FAQ Schema ${console_chars_1.chars.arrow} seo/category-faq-schema-validation.js`);
2681
+ console.log("");
2682
+ process.exit(0);
2683
+ }
2684
+ main().catch((err) => {
2685
+ console.error(err);
2686
+ process.exit(1);
2687
+ });
2688
+ //# sourceMappingURL=all.js.map