driftdetect-detectors 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (509) hide show
  1. package/dist/accessibility/alt-text.d.ts +63 -0
  2. package/dist/accessibility/alt-text.d.ts.map +1 -0
  3. package/dist/accessibility/alt-text.js +100 -0
  4. package/dist/accessibility/alt-text.js.map +1 -0
  5. package/dist/accessibility/aria-roles.d.ts +65 -0
  6. package/dist/accessibility/aria-roles.d.ts.map +1 -0
  7. package/dist/accessibility/aria-roles.js +87 -0
  8. package/dist/accessibility/aria-roles.js.map +1 -0
  9. package/dist/accessibility/focus-management.d.ts +62 -0
  10. package/dist/accessibility/focus-management.d.ts.map +1 -0
  11. package/dist/accessibility/focus-management.js +88 -0
  12. package/dist/accessibility/focus-management.js.map +1 -0
  13. package/dist/accessibility/heading-hierarchy.d.ts +66 -0
  14. package/dist/accessibility/heading-hierarchy.d.ts.map +1 -0
  15. package/dist/accessibility/heading-hierarchy.js +94 -0
  16. package/dist/accessibility/heading-hierarchy.js.map +1 -0
  17. package/dist/accessibility/index.d.ts +25 -0
  18. package/dist/accessibility/index.d.ts.map +1 -0
  19. package/dist/accessibility/index.js +21 -0
  20. package/dist/accessibility/index.js.map +1 -0
  21. package/dist/accessibility/keyboard-nav.d.ts +63 -0
  22. package/dist/accessibility/keyboard-nav.d.ts.map +1 -0
  23. package/dist/accessibility/keyboard-nav.js +86 -0
  24. package/dist/accessibility/keyboard-nav.js.map +1 -0
  25. package/dist/accessibility/semantic-html.d.ts +76 -0
  26. package/dist/accessibility/semantic-html.d.ts.map +1 -0
  27. package/dist/accessibility/semantic-html.js +204 -0
  28. package/dist/accessibility/semantic-html.js.map +1 -0
  29. package/dist/api/client-patterns.d.ts +121 -0
  30. package/dist/api/client-patterns.d.ts.map +1 -0
  31. package/dist/api/client-patterns.js +478 -0
  32. package/dist/api/client-patterns.js.map +1 -0
  33. package/dist/api/error-format.d.ts +140 -0
  34. package/dist/api/error-format.d.ts.map +1 -0
  35. package/dist/api/error-format.js +614 -0
  36. package/dist/api/error-format.js.map +1 -0
  37. package/dist/api/http-methods.d.ts +255 -0
  38. package/dist/api/http-methods.d.ts.map +1 -0
  39. package/dist/api/http-methods.js +890 -0
  40. package/dist/api/http-methods.js.map +1 -0
  41. package/dist/api/index.d.ts +16 -0
  42. package/dist/api/index.d.ts.map +1 -0
  43. package/dist/api/index.js +37 -0
  44. package/dist/api/index.js.map +1 -0
  45. package/dist/api/pagination.d.ts +133 -0
  46. package/dist/api/pagination.d.ts.map +1 -0
  47. package/dist/api/pagination.js +521 -0
  48. package/dist/api/pagination.js.map +1 -0
  49. package/dist/api/response-envelope.d.ts +261 -0
  50. package/dist/api/response-envelope.d.ts.map +1 -0
  51. package/dist/api/response-envelope.js +1050 -0
  52. package/dist/api/response-envelope.js.map +1 -0
  53. package/dist/api/retry-patterns.d.ts +117 -0
  54. package/dist/api/retry-patterns.d.ts.map +1 -0
  55. package/dist/api/retry-patterns.js +480 -0
  56. package/dist/api/retry-patterns.js.map +1 -0
  57. package/dist/api/route-structure.d.ts +128 -0
  58. package/dist/api/route-structure.d.ts.map +1 -0
  59. package/dist/api/route-structure.js +738 -0
  60. package/dist/api/route-structure.js.map +1 -0
  61. package/dist/auth/audit-logging.d.ts +80 -0
  62. package/dist/auth/audit-logging.d.ts.map +1 -0
  63. package/dist/auth/audit-logging.js +370 -0
  64. package/dist/auth/audit-logging.js.map +1 -0
  65. package/dist/auth/index.d.ts +33 -0
  66. package/dist/auth/index.d.ts.map +1 -0
  67. package/dist/auth/index.js +49 -0
  68. package/dist/auth/index.js.map +1 -0
  69. package/dist/auth/middleware-usage.d.ts +65 -0
  70. package/dist/auth/middleware-usage.d.ts.map +1 -0
  71. package/dist/auth/middleware-usage.js +192 -0
  72. package/dist/auth/middleware-usage.js.map +1 -0
  73. package/dist/auth/permission-checks.d.ts +60 -0
  74. package/dist/auth/permission-checks.d.ts.map +1 -0
  75. package/dist/auth/permission-checks.js +159 -0
  76. package/dist/auth/permission-checks.js.map +1 -0
  77. package/dist/auth/rbac-patterns.d.ts +68 -0
  78. package/dist/auth/rbac-patterns.d.ts.map +1 -0
  79. package/dist/auth/rbac-patterns.js +143 -0
  80. package/dist/auth/rbac-patterns.js.map +1 -0
  81. package/dist/auth/resource-ownership.d.ts +77 -0
  82. package/dist/auth/resource-ownership.d.ts.map +1 -0
  83. package/dist/auth/resource-ownership.js +324 -0
  84. package/dist/auth/resource-ownership.js.map +1 -0
  85. package/dist/auth/token-handling.d.ts +64 -0
  86. package/dist/auth/token-handling.d.ts.map +1 -0
  87. package/dist/auth/token-handling.js +151 -0
  88. package/dist/auth/token-handling.js.map +1 -0
  89. package/dist/base/ast-detector.d.ts +421 -0
  90. package/dist/base/ast-detector.d.ts.map +1 -0
  91. package/dist/base/ast-detector.js +699 -0
  92. package/dist/base/ast-detector.js.map +1 -0
  93. package/dist/base/base-detector.d.ts +366 -0
  94. package/dist/base/base-detector.d.ts.map +1 -0
  95. package/dist/base/base-detector.js +170 -0
  96. package/dist/base/base-detector.js.map +1 -0
  97. package/dist/base/index.d.ts +12 -0
  98. package/dist/base/index.d.ts.map +1 -0
  99. package/dist/base/index.js +17 -0
  100. package/dist/base/index.js.map +1 -0
  101. package/dist/base/regex-detector.d.ts +421 -0
  102. package/dist/base/regex-detector.d.ts.map +1 -0
  103. package/dist/base/regex-detector.js +537 -0
  104. package/dist/base/regex-detector.js.map +1 -0
  105. package/dist/base/structural-detector.d.ts +424 -0
  106. package/dist/base/structural-detector.d.ts.map +1 -0
  107. package/dist/base/structural-detector.js +731 -0
  108. package/dist/base/structural-detector.js.map +1 -0
  109. package/dist/base/types.d.ts +53 -0
  110. package/dist/base/types.d.ts.map +1 -0
  111. package/dist/base/types.js +5 -0
  112. package/dist/base/types.js.map +1 -0
  113. package/dist/components/component-structure.d.ts +163 -0
  114. package/dist/components/component-structure.d.ts.map +1 -0
  115. package/dist/components/component-structure.js +500 -0
  116. package/dist/components/component-structure.js.map +1 -0
  117. package/dist/components/composition.d.ts +287 -0
  118. package/dist/components/composition.d.ts.map +1 -0
  119. package/dist/components/composition.js +1123 -0
  120. package/dist/components/composition.js.map +1 -0
  121. package/dist/components/duplicate-detection.d.ts +251 -0
  122. package/dist/components/duplicate-detection.d.ts.map +1 -0
  123. package/dist/components/duplicate-detection.js +804 -0
  124. package/dist/components/duplicate-detection.js.map +1 -0
  125. package/dist/components/index.d.ts +16 -0
  126. package/dist/components/index.d.ts.map +1 -0
  127. package/dist/components/index.js +51 -0
  128. package/dist/components/index.js.map +1 -0
  129. package/dist/components/near-duplicate.d.ts +402 -0
  130. package/dist/components/near-duplicate.d.ts.map +1 -0
  131. package/dist/components/near-duplicate.js +1090 -0
  132. package/dist/components/near-duplicate.js.map +1 -0
  133. package/dist/components/props-patterns.d.ts +194 -0
  134. package/dist/components/props-patterns.d.ts.map +1 -0
  135. package/dist/components/props-patterns.js +795 -0
  136. package/dist/components/props-patterns.js.map +1 -0
  137. package/dist/components/ref-forwarding.d.ts +250 -0
  138. package/dist/components/ref-forwarding.d.ts.map +1 -0
  139. package/dist/components/ref-forwarding.js +832 -0
  140. package/dist/components/ref-forwarding.js.map +1 -0
  141. package/dist/components/state-patterns.d.ts +291 -0
  142. package/dist/components/state-patterns.d.ts.map +1 -0
  143. package/dist/components/state-patterns.js +970 -0
  144. package/dist/components/state-patterns.js.map +1 -0
  145. package/dist/config/config-validation.d.ts +74 -0
  146. package/dist/config/config-validation.d.ts.map +1 -0
  147. package/dist/config/config-validation.js +446 -0
  148. package/dist/config/config-validation.js.map +1 -0
  149. package/dist/config/default-values.d.ts +72 -0
  150. package/dist/config/default-values.d.ts.map +1 -0
  151. package/dist/config/default-values.js +386 -0
  152. package/dist/config/default-values.js.map +1 -0
  153. package/dist/config/env-naming.d.ts +73 -0
  154. package/dist/config/env-naming.d.ts.map +1 -0
  155. package/dist/config/env-naming.js +429 -0
  156. package/dist/config/env-naming.js.map +1 -0
  157. package/dist/config/environment-detection.d.ts +72 -0
  158. package/dist/config/environment-detection.d.ts.map +1 -0
  159. package/dist/config/environment-detection.js +400 -0
  160. package/dist/config/environment-detection.js.map +1 -0
  161. package/dist/config/feature-flags.d.ts +72 -0
  162. package/dist/config/feature-flags.d.ts.map +1 -0
  163. package/dist/config/feature-flags.js +384 -0
  164. package/dist/config/feature-flags.js.map +1 -0
  165. package/dist/config/index.d.ts +27 -0
  166. package/dist/config/index.d.ts.map +1 -0
  167. package/dist/config/index.js +43 -0
  168. package/dist/config/index.js.map +1 -0
  169. package/dist/config/required-optional.d.ts +71 -0
  170. package/dist/config/required-optional.d.ts.map +1 -0
  171. package/dist/config/required-optional.js +344 -0
  172. package/dist/config/required-optional.js.map +1 -0
  173. package/dist/data-access/connection-pooling.d.ts +63 -0
  174. package/dist/data-access/connection-pooling.d.ts.map +1 -0
  175. package/dist/data-access/connection-pooling.js +297 -0
  176. package/dist/data-access/connection-pooling.js.map +1 -0
  177. package/dist/data-access/dto-patterns.d.ts +64 -0
  178. package/dist/data-access/dto-patterns.d.ts.map +1 -0
  179. package/dist/data-access/dto-patterns.js +291 -0
  180. package/dist/data-access/dto-patterns.js.map +1 -0
  181. package/dist/data-access/index.d.ts +31 -0
  182. package/dist/data-access/index.d.ts.map +1 -0
  183. package/dist/data-access/index.js +49 -0
  184. package/dist/data-access/index.js.map +1 -0
  185. package/dist/data-access/n-plus-one.d.ts +60 -0
  186. package/dist/data-access/n-plus-one.d.ts.map +1 -0
  187. package/dist/data-access/n-plus-one.js +264 -0
  188. package/dist/data-access/n-plus-one.js.map +1 -0
  189. package/dist/data-access/query-patterns.d.ts +64 -0
  190. package/dist/data-access/query-patterns.d.ts.map +1 -0
  191. package/dist/data-access/query-patterns.js +314 -0
  192. package/dist/data-access/query-patterns.js.map +1 -0
  193. package/dist/data-access/repository-pattern.d.ts +62 -0
  194. package/dist/data-access/repository-pattern.d.ts.map +1 -0
  195. package/dist/data-access/repository-pattern.js +257 -0
  196. package/dist/data-access/repository-pattern.js.map +1 -0
  197. package/dist/data-access/transaction-patterns.d.ts +61 -0
  198. package/dist/data-access/transaction-patterns.d.ts.map +1 -0
  199. package/dist/data-access/transaction-patterns.js +277 -0
  200. package/dist/data-access/transaction-patterns.js.map +1 -0
  201. package/dist/data-access/validation-patterns.d.ts +62 -0
  202. package/dist/data-access/validation-patterns.d.ts.map +1 -0
  203. package/dist/data-access/validation-patterns.js +301 -0
  204. package/dist/data-access/validation-patterns.js.map +1 -0
  205. package/dist/documentation/deprecation.d.ts +62 -0
  206. package/dist/documentation/deprecation.d.ts.map +1 -0
  207. package/dist/documentation/deprecation.js +83 -0
  208. package/dist/documentation/deprecation.js.map +1 -0
  209. package/dist/documentation/example-code.d.ts +64 -0
  210. package/dist/documentation/example-code.d.ts.map +1 -0
  211. package/dist/documentation/example-code.js +79 -0
  212. package/dist/documentation/example-code.js.map +1 -0
  213. package/dist/documentation/index.d.ts +22 -0
  214. package/dist/documentation/index.d.ts.map +1 -0
  215. package/dist/documentation/index.js +19 -0
  216. package/dist/documentation/index.js.map +1 -0
  217. package/dist/documentation/jsdoc-patterns.d.ts +72 -0
  218. package/dist/documentation/jsdoc-patterns.d.ts.map +1 -0
  219. package/dist/documentation/jsdoc-patterns.js +92 -0
  220. package/dist/documentation/jsdoc-patterns.js.map +1 -0
  221. package/dist/documentation/readme-structure.d.ts +67 -0
  222. package/dist/documentation/readme-structure.d.ts.map +1 -0
  223. package/dist/documentation/readme-structure.js +76 -0
  224. package/dist/documentation/readme-structure.js.map +1 -0
  225. package/dist/documentation/todo-patterns.d.ts +67 -0
  226. package/dist/documentation/todo-patterns.d.ts.map +1 -0
  227. package/dist/documentation/todo-patterns.js +73 -0
  228. package/dist/documentation/todo-patterns.js.map +1 -0
  229. package/dist/errors/async-errors.d.ts +72 -0
  230. package/dist/errors/async-errors.d.ts.map +1 -0
  231. package/dist/errors/async-errors.js +214 -0
  232. package/dist/errors/async-errors.js.map +1 -0
  233. package/dist/errors/circuit-breaker.d.ts +53 -0
  234. package/dist/errors/circuit-breaker.d.ts.map +1 -0
  235. package/dist/errors/circuit-breaker.js +241 -0
  236. package/dist/errors/circuit-breaker.js.map +1 -0
  237. package/dist/errors/error-codes.d.ts +73 -0
  238. package/dist/errors/error-codes.d.ts.map +1 -0
  239. package/dist/errors/error-codes.js +211 -0
  240. package/dist/errors/error-codes.js.map +1 -0
  241. package/dist/errors/error-logging.d.ts +73 -0
  242. package/dist/errors/error-logging.d.ts.map +1 -0
  243. package/dist/errors/error-logging.js +256 -0
  244. package/dist/errors/error-logging.js.map +1 -0
  245. package/dist/errors/error-propagation.d.ts +73 -0
  246. package/dist/errors/error-propagation.d.ts.map +1 -0
  247. package/dist/errors/error-propagation.js +244 -0
  248. package/dist/errors/error-propagation.js.map +1 -0
  249. package/dist/errors/exception-hierarchy.d.ts +75 -0
  250. package/dist/errors/exception-hierarchy.d.ts.map +1 -0
  251. package/dist/errors/exception-hierarchy.js +259 -0
  252. package/dist/errors/exception-hierarchy.js.map +1 -0
  253. package/dist/errors/index.d.ts +31 -0
  254. package/dist/errors/index.d.ts.map +1 -0
  255. package/dist/errors/index.js +49 -0
  256. package/dist/errors/index.js.map +1 -0
  257. package/dist/errors/try-catch-placement.d.ts +73 -0
  258. package/dist/errors/try-catch-placement.d.ts.map +1 -0
  259. package/dist/errors/try-catch-placement.js +214 -0
  260. package/dist/errors/try-catch-placement.js.map +1 -0
  261. package/dist/index.d.ts +221 -0
  262. package/dist/index.d.ts.map +1 -0
  263. package/dist/index.js +245 -0
  264. package/dist/index.js.map +1 -0
  265. package/dist/logging/context-fields.d.ts +48 -0
  266. package/dist/logging/context-fields.d.ts.map +1 -0
  267. package/dist/logging/context-fields.js +160 -0
  268. package/dist/logging/context-fields.js.map +1 -0
  269. package/dist/logging/correlation-ids.d.ts +44 -0
  270. package/dist/logging/correlation-ids.d.ts.map +1 -0
  271. package/dist/logging/correlation-ids.js +144 -0
  272. package/dist/logging/correlation-ids.js.map +1 -0
  273. package/dist/logging/health-checks.d.ts +45 -0
  274. package/dist/logging/health-checks.d.ts.map +1 -0
  275. package/dist/logging/health-checks.js +165 -0
  276. package/dist/logging/health-checks.js.map +1 -0
  277. package/dist/logging/index.d.ts +31 -0
  278. package/dist/logging/index.d.ts.map +1 -0
  279. package/dist/logging/index.js +49 -0
  280. package/dist/logging/index.js.map +1 -0
  281. package/dist/logging/log-levels.d.ts +46 -0
  282. package/dist/logging/log-levels.d.ts.map +1 -0
  283. package/dist/logging/log-levels.js +178 -0
  284. package/dist/logging/log-levels.js.map +1 -0
  285. package/dist/logging/metric-naming.d.ts +46 -0
  286. package/dist/logging/metric-naming.d.ts.map +1 -0
  287. package/dist/logging/metric-naming.js +157 -0
  288. package/dist/logging/metric-naming.js.map +1 -0
  289. package/dist/logging/pii-redaction.d.ts +44 -0
  290. package/dist/logging/pii-redaction.d.ts.map +1 -0
  291. package/dist/logging/pii-redaction.js +166 -0
  292. package/dist/logging/pii-redaction.js.map +1 -0
  293. package/dist/logging/structured-format.d.ts +53 -0
  294. package/dist/logging/structured-format.d.ts.map +1 -0
  295. package/dist/logging/structured-format.js +235 -0
  296. package/dist/logging/structured-format.js.map +1 -0
  297. package/dist/performance/bundle-size.d.ts +79 -0
  298. package/dist/performance/bundle-size.d.ts.map +1 -0
  299. package/dist/performance/bundle-size.js +276 -0
  300. package/dist/performance/bundle-size.js.map +1 -0
  301. package/dist/performance/caching-patterns.d.ts +78 -0
  302. package/dist/performance/caching-patterns.d.ts.map +1 -0
  303. package/dist/performance/caching-patterns.js +257 -0
  304. package/dist/performance/caching-patterns.js.map +1 -0
  305. package/dist/performance/code-splitting.d.ts +86 -0
  306. package/dist/performance/code-splitting.d.ts.map +1 -0
  307. package/dist/performance/code-splitting.js +447 -0
  308. package/dist/performance/code-splitting.js.map +1 -0
  309. package/dist/performance/debounce-throttle.d.ts +75 -0
  310. package/dist/performance/debounce-throttle.d.ts.map +1 -0
  311. package/dist/performance/debounce-throttle.js +232 -0
  312. package/dist/performance/debounce-throttle.js.map +1 -0
  313. package/dist/performance/index.d.ts +28 -0
  314. package/dist/performance/index.d.ts.map +1 -0
  315. package/dist/performance/index.js +39 -0
  316. package/dist/performance/index.js.map +1 -0
  317. package/dist/performance/lazy-loading.d.ts +75 -0
  318. package/dist/performance/lazy-loading.d.ts.map +1 -0
  319. package/dist/performance/lazy-loading.js +233 -0
  320. package/dist/performance/lazy-loading.js.map +1 -0
  321. package/dist/performance/memoization.d.ts +75 -0
  322. package/dist/performance/memoization.d.ts.map +1 -0
  323. package/dist/performance/memoization.js +251 -0
  324. package/dist/performance/memoization.js.map +1 -0
  325. package/dist/registry/detector-registry.d.ts +266 -0
  326. package/dist/registry/detector-registry.d.ts.map +1 -0
  327. package/dist/registry/detector-registry.js +526 -0
  328. package/dist/registry/detector-registry.js.map +1 -0
  329. package/dist/registry/index.d.ts +10 -0
  330. package/dist/registry/index.d.ts.map +1 -0
  331. package/dist/registry/index.js +10 -0
  332. package/dist/registry/index.js.map +1 -0
  333. package/dist/registry/loader.d.ts +232 -0
  334. package/dist/registry/loader.d.ts.map +1 -0
  335. package/dist/registry/loader.js +419 -0
  336. package/dist/registry/loader.js.map +1 -0
  337. package/dist/registry/types.d.ts +111 -0
  338. package/dist/registry/types.d.ts.map +1 -0
  339. package/dist/registry/types.js +19 -0
  340. package/dist/registry/types.js.map +1 -0
  341. package/dist/security/csp-headers.d.ts +78 -0
  342. package/dist/security/csp-headers.d.ts.map +1 -0
  343. package/dist/security/csp-headers.js +401 -0
  344. package/dist/security/csp-headers.js.map +1 -0
  345. package/dist/security/csrf-protection.d.ts +72 -0
  346. package/dist/security/csrf-protection.d.ts.map +1 -0
  347. package/dist/security/csrf-protection.js +344 -0
  348. package/dist/security/csrf-protection.js.map +1 -0
  349. package/dist/security/index.d.ts +30 -0
  350. package/dist/security/index.d.ts.map +1 -0
  351. package/dist/security/index.js +48 -0
  352. package/dist/security/index.js.map +1 -0
  353. package/dist/security/input-sanitization.d.ts +74 -0
  354. package/dist/security/input-sanitization.d.ts.map +1 -0
  355. package/dist/security/input-sanitization.js +373 -0
  356. package/dist/security/input-sanitization.js.map +1 -0
  357. package/dist/security/rate-limiting.d.ts +81 -0
  358. package/dist/security/rate-limiting.d.ts.map +1 -0
  359. package/dist/security/rate-limiting.js +535 -0
  360. package/dist/security/rate-limiting.js.map +1 -0
  361. package/dist/security/secret-management.d.ts +83 -0
  362. package/dist/security/secret-management.d.ts.map +1 -0
  363. package/dist/security/secret-management.js +547 -0
  364. package/dist/security/secret-management.js.map +1 -0
  365. package/dist/security/sql-injection.d.ts +76 -0
  366. package/dist/security/sql-injection.d.ts.map +1 -0
  367. package/dist/security/sql-injection.js +383 -0
  368. package/dist/security/sql-injection.js.map +1 -0
  369. package/dist/security/xss-prevention.d.ts +80 -0
  370. package/dist/security/xss-prevention.d.ts.map +1 -0
  371. package/dist/security/xss-prevention.js +416 -0
  372. package/dist/security/xss-prevention.js.map +1 -0
  373. package/dist/structural/barrel-exports.d.ts +178 -0
  374. package/dist/structural/barrel-exports.d.ts.map +1 -0
  375. package/dist/structural/barrel-exports.js +553 -0
  376. package/dist/structural/barrel-exports.js.map +1 -0
  377. package/dist/structural/circular-deps.d.ts +140 -0
  378. package/dist/structural/circular-deps.d.ts.map +1 -0
  379. package/dist/structural/circular-deps.js +422 -0
  380. package/dist/structural/circular-deps.js.map +1 -0
  381. package/dist/structural/co-location.d.ts +202 -0
  382. package/dist/structural/co-location.d.ts.map +1 -0
  383. package/dist/structural/co-location.js +640 -0
  384. package/dist/structural/co-location.js.map +1 -0
  385. package/dist/structural/directory-structure.d.ts +151 -0
  386. package/dist/structural/directory-structure.d.ts.map +1 -0
  387. package/dist/structural/directory-structure.js +457 -0
  388. package/dist/structural/directory-structure.js.map +1 -0
  389. package/dist/structural/file-naming.d.ts +61 -0
  390. package/dist/structural/file-naming.d.ts.map +1 -0
  391. package/dist/structural/file-naming.js +231 -0
  392. package/dist/structural/file-naming.js.map +1 -0
  393. package/dist/structural/import-ordering.d.ts +212 -0
  394. package/dist/structural/import-ordering.d.ts.map +1 -0
  395. package/dist/structural/import-ordering.js +821 -0
  396. package/dist/structural/import-ordering.js.map +1 -0
  397. package/dist/structural/index.d.ts +23 -0
  398. package/dist/structural/index.d.ts.map +1 -0
  399. package/dist/structural/index.js +26 -0
  400. package/dist/structural/index.js.map +1 -0
  401. package/dist/structural/module-boundaries.d.ts +164 -0
  402. package/dist/structural/module-boundaries.d.ts.map +1 -0
  403. package/dist/structural/module-boundaries.js +616 -0
  404. package/dist/structural/module-boundaries.js.map +1 -0
  405. package/dist/structural/package-boundaries.d.ts +182 -0
  406. package/dist/structural/package-boundaries.d.ts.map +1 -0
  407. package/dist/structural/package-boundaries.js +602 -0
  408. package/dist/structural/package-boundaries.js.map +1 -0
  409. package/dist/styling/class-naming.d.ts +263 -0
  410. package/dist/styling/class-naming.d.ts.map +1 -0
  411. package/dist/styling/class-naming.js +892 -0
  412. package/dist/styling/class-naming.js.map +1 -0
  413. package/dist/styling/color-usage.d.ts +213 -0
  414. package/dist/styling/color-usage.d.ts.map +1 -0
  415. package/dist/styling/color-usage.js +732 -0
  416. package/dist/styling/color-usage.js.map +1 -0
  417. package/dist/styling/design-tokens.d.ts +212 -0
  418. package/dist/styling/design-tokens.d.ts.map +1 -0
  419. package/dist/styling/design-tokens.js +748 -0
  420. package/dist/styling/design-tokens.js.map +1 -0
  421. package/dist/styling/index.d.ts +16 -0
  422. package/dist/styling/index.d.ts.map +1 -0
  423. package/dist/styling/index.js +56 -0
  424. package/dist/styling/index.js.map +1 -0
  425. package/dist/styling/responsive.d.ts +304 -0
  426. package/dist/styling/responsive.d.ts.map +1 -0
  427. package/dist/styling/responsive.js +888 -0
  428. package/dist/styling/responsive.js.map +1 -0
  429. package/dist/styling/spacing-scale.d.ts +248 -0
  430. package/dist/styling/spacing-scale.d.ts.map +1 -0
  431. package/dist/styling/spacing-scale.js +865 -0
  432. package/dist/styling/spacing-scale.js.map +1 -0
  433. package/dist/styling/tailwind-patterns.d.ts +305 -0
  434. package/dist/styling/tailwind-patterns.d.ts.map +1 -0
  435. package/dist/styling/tailwind-patterns.js +1181 -0
  436. package/dist/styling/tailwind-patterns.js.map +1 -0
  437. package/dist/styling/typography.d.ts +281 -0
  438. package/dist/styling/typography.d.ts.map +1 -0
  439. package/dist/styling/typography.js +1004 -0
  440. package/dist/styling/typography.js.map +1 -0
  441. package/dist/styling/z-index-scale.d.ts +270 -0
  442. package/dist/styling/z-index-scale.d.ts.map +1 -0
  443. package/dist/styling/z-index-scale.js +714 -0
  444. package/dist/styling/z-index-scale.js.map +1 -0
  445. package/dist/testing/co-location.d.ts +42 -0
  446. package/dist/testing/co-location.d.ts.map +1 -0
  447. package/dist/testing/co-location.js +134 -0
  448. package/dist/testing/co-location.js.map +1 -0
  449. package/dist/testing/describe-naming.d.ts +47 -0
  450. package/dist/testing/describe-naming.d.ts.map +1 -0
  451. package/dist/testing/describe-naming.js +150 -0
  452. package/dist/testing/describe-naming.js.map +1 -0
  453. package/dist/testing/file-naming.d.ts +44 -0
  454. package/dist/testing/file-naming.d.ts.map +1 -0
  455. package/dist/testing/file-naming.js +131 -0
  456. package/dist/testing/file-naming.js.map +1 -0
  457. package/dist/testing/fixture-patterns.d.ts +52 -0
  458. package/dist/testing/fixture-patterns.d.ts.map +1 -0
  459. package/dist/testing/fixture-patterns.js +228 -0
  460. package/dist/testing/fixture-patterns.js.map +1 -0
  461. package/dist/testing/index.d.ts +31 -0
  462. package/dist/testing/index.d.ts.map +1 -0
  463. package/dist/testing/index.js +49 -0
  464. package/dist/testing/index.js.map +1 -0
  465. package/dist/testing/mock-patterns.d.ts +53 -0
  466. package/dist/testing/mock-patterns.d.ts.map +1 -0
  467. package/dist/testing/mock-patterns.js +264 -0
  468. package/dist/testing/mock-patterns.js.map +1 -0
  469. package/dist/testing/setup-teardown.d.ts +55 -0
  470. package/dist/testing/setup-teardown.d.ts.map +1 -0
  471. package/dist/testing/setup-teardown.js +262 -0
  472. package/dist/testing/setup-teardown.js.map +1 -0
  473. package/dist/testing/test-structure.d.ts +51 -0
  474. package/dist/testing/test-structure.d.ts.map +1 -0
  475. package/dist/testing/test-structure.js +225 -0
  476. package/dist/testing/test-structure.js.map +1 -0
  477. package/dist/types/any-usage.d.ts +99 -0
  478. package/dist/types/any-usage.d.ts.map +1 -0
  479. package/dist/types/any-usage.js +641 -0
  480. package/dist/types/any-usage.js.map +1 -0
  481. package/dist/types/file-location.d.ts +76 -0
  482. package/dist/types/file-location.d.ts.map +1 -0
  483. package/dist/types/file-location.js +395 -0
  484. package/dist/types/file-location.js.map +1 -0
  485. package/dist/types/generic-patterns.d.ts +97 -0
  486. package/dist/types/generic-patterns.d.ts.map +1 -0
  487. package/dist/types/generic-patterns.js +615 -0
  488. package/dist/types/generic-patterns.js.map +1 -0
  489. package/dist/types/index.d.ts +31 -0
  490. package/dist/types/index.d.ts.map +1 -0
  491. package/dist/types/index.js +43 -0
  492. package/dist/types/index.js.map +1 -0
  493. package/dist/types/interface-vs-type.d.ts +81 -0
  494. package/dist/types/interface-vs-type.d.ts.map +1 -0
  495. package/dist/types/interface-vs-type.js +440 -0
  496. package/dist/types/interface-vs-type.js.map +1 -0
  497. package/dist/types/naming-conventions.d.ts +84 -0
  498. package/dist/types/naming-conventions.d.ts.map +1 -0
  499. package/dist/types/naming-conventions.js +455 -0
  500. package/dist/types/naming-conventions.js.map +1 -0
  501. package/dist/types/type-assertions.d.ts +98 -0
  502. package/dist/types/type-assertions.d.ts.map +1 -0
  503. package/dist/types/type-assertions.js +639 -0
  504. package/dist/types/type-assertions.js.map +1 -0
  505. package/dist/types/utility-types.d.ts +110 -0
  506. package/dist/types/utility-types.d.ts.map +1 -0
  507. package/dist/types/utility-types.js +547 -0
  508. package/dist/types/utility-types.js.map +1 -0
  509. package/package.json +44 -0
@@ -0,0 +1,614 @@
1
+ /**
2
+ * Error Format Detector - Error response format pattern detection
3
+ *
4
+ * Detects error response format patterns including:
5
+ * - Standard error format ({ error: { message, code, details } })
6
+ * - HTTP Problem Details (RFC 7807) ({ type, title, status, detail, instance })
7
+ * - JSON:API error format ({ errors: [{ status, title, detail, source }] })
8
+ * - GraphQL error format ({ errors: [{ message, locations, path, extensions }] })
9
+ * - Custom error formats with code/message patterns
10
+ * - Error inheritance patterns (AppError, HttpError, etc.)
11
+ *
12
+ * Flags violations:
13
+ * - Inconsistent error format across endpoints
14
+ * - Missing required error fields (message, code)
15
+ * - Mixing different error formats
16
+ * - Raw error strings instead of structured errors
17
+ * - Missing error codes for categorization
18
+ * - Inconsistent error code naming conventions
19
+ *
20
+ * @requirements 10.4 - THE API_Detector SHALL detect error response format consistency
21
+ */
22
+ import { RegexDetector } from '../base/index.js';
23
+ // ============================================================================
24
+ // Constants
25
+ // ============================================================================
26
+ /** Standard error fields */
27
+ export const STANDARD_ERROR_FIELDS = {
28
+ message: ['message', 'msg', 'errorMessage', 'description'],
29
+ code: ['code', 'errorCode', 'error_code', 'statusCode', 'status_code'],
30
+ details: ['details', 'detail', 'data', 'metadata', 'context', 'info'],
31
+ stack: ['stack', 'stackTrace', 'trace'],
32
+ };
33
+ /** RFC 7807 Problem Details fields */
34
+ export const PROBLEM_DETAILS_FIELDS = ['type', 'title', 'status', 'detail', 'instance'];
35
+ /** JSON:API error fields */
36
+ export const JSON_API_ERROR_FIELDS = ['status', 'title', 'detail', 'source', 'code', 'meta', 'links'];
37
+ /** GraphQL error fields */
38
+ export const GRAPHQL_ERROR_FIELDS = ['message', 'locations', 'path', 'extensions'];
39
+ /** Common error code patterns */
40
+ export const ERROR_CODE_PATTERNS = {
41
+ screaming_snake: /^[A-Z][A-Z0-9_]*$/,
42
+ camelCase: /^[a-z][a-zA-Z0-9]*$/,
43
+ kebab: /^[a-z][a-z0-9-]*$/,
44
+ dotted: /^[a-z][a-z0-9.]*$/,
45
+ prefixed: /^(ERR_|ERROR_|E_)[A-Z0-9_]+$/,
46
+ };
47
+ /** Common error class names */
48
+ export const ERROR_CLASS_PATTERNS = [
49
+ /class\s+(\w*Error)\s+extends\s+(?:Error|AppError|BaseError|HttpError|CustomError)/g,
50
+ /class\s+(\w*Exception)\s+extends/g,
51
+ ];
52
+ /** Error response patterns */
53
+ export const ERROR_RESPONSE_PATTERNS = [
54
+ /\{\s*error\s*:\s*\{([^}]+)\}\s*\}/gi,
55
+ /\{\s*errors\s*:\s*\[([^\]]+)\]\s*\}/gi,
56
+ /\{\s*error\s*:\s*["'`]([^"'`]+)["'`]\s*\}/gi,
57
+ /\{\s*message\s*:\s*["'`]([^"'`]+)["'`]\s*,?\s*(?:code|status)/gi,
58
+ ];
59
+ /** Error throw patterns */
60
+ export const ERROR_THROW_PATTERNS = [
61
+ /throw\s+new\s+(\w+Error)\s*\(/gi,
62
+ /throw\s+new\s+Error\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/gi,
63
+ /throw\s+(\w+)\s*;/gi,
64
+ /throw\s+\{([^}]+)\}/gi,
65
+ ];
66
+ /** Error catch patterns */
67
+ export const ERROR_CATCH_PATTERNS = [
68
+ /catch\s*\(\s*(\w+)(?:\s*:\s*\w+)?\s*\)\s*\{/gi,
69
+ /\.catch\s*\(\s*(?:\(\s*)?(\w+)(?:\s*:\s*\w+)?(?:\s*\))?\s*=>/gi,
70
+ ];
71
+ /** File patterns to exclude */
72
+ export const EXCLUDED_FILE_PATTERNS = [
73
+ /\.test\.[jt]sx?$/,
74
+ /\.spec\.[jt]sx?$/,
75
+ /\.stories\.[jt]sx?$/,
76
+ /\.d\.ts$/,
77
+ /node_modules\//,
78
+ /\.mock\.[jt]sx?$/,
79
+ ];
80
+ // ============================================================================
81
+ // Helper Functions
82
+ // ============================================================================
83
+ /** Check if a file should be excluded from detection */
84
+ export function shouldExcludeFile(filePath) {
85
+ return EXCLUDED_FILE_PATTERNS.some(pattern => pattern.test(filePath));
86
+ }
87
+ /** Check if position is inside a comment */
88
+ function isInsideComment(content, index) {
89
+ const beforeIndex = content.slice(0, index);
90
+ const lastNewline = beforeIndex.lastIndexOf('\n');
91
+ const currentLine = beforeIndex.slice(lastNewline + 1);
92
+ if (currentLine.includes('//')) {
93
+ const commentStart = currentLine.indexOf('//');
94
+ const positionInLine = index - lastNewline - 1;
95
+ if (positionInLine > commentStart)
96
+ return true;
97
+ }
98
+ const lastBlockCommentStart = beforeIndex.lastIndexOf('/*');
99
+ const lastBlockCommentEnd = beforeIndex.lastIndexOf('*/');
100
+ if (lastBlockCommentStart > lastBlockCommentEnd)
101
+ return true;
102
+ return false;
103
+ }
104
+ /** Get line and column from index */
105
+ function getPositionFromIndex(content, index) {
106
+ const beforeMatch = content.slice(0, index);
107
+ const lineNumber = beforeMatch.split('\n').length;
108
+ const lastNewline = beforeMatch.lastIndexOf('\n');
109
+ const column = index - lastNewline;
110
+ return { line: lineNumber, column };
111
+ }
112
+ /** Extract field names from an object literal string */
113
+ export function extractFieldNames(objectContent) {
114
+ const fields = [];
115
+ const fieldPattern = /([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g;
116
+ let match;
117
+ while ((match = fieldPattern.exec(objectContent)) !== null) {
118
+ if (match[1])
119
+ fields.push(match[1]);
120
+ }
121
+ return fields;
122
+ }
123
+ /** Detect the error format from fields */
124
+ export function detectErrorFormat(fields) {
125
+ const lowerFields = fields.map(f => f.toLowerCase());
126
+ // Check for Problem Details (RFC 7807)
127
+ const problemDetailsMatches = PROBLEM_DETAILS_FIELDS.filter(f => lowerFields.includes(f.toLowerCase()));
128
+ if (problemDetailsMatches.length >= 3)
129
+ return 'problem-details';
130
+ // Check for JSON:API error format
131
+ const jsonApiMatches = JSON_API_ERROR_FIELDS.filter(f => lowerFields.includes(f.toLowerCase()));
132
+ if (jsonApiMatches.length >= 3 && (lowerFields.includes('source') || lowerFields.includes('meta'))) {
133
+ return 'json-api';
134
+ }
135
+ // Check for GraphQL error format
136
+ const graphqlMatches = GRAPHQL_ERROR_FIELDS.filter(f => lowerFields.includes(f.toLowerCase()));
137
+ if (graphqlMatches.length >= 2 && (lowerFields.includes('locations') || lowerFields.includes('path'))) {
138
+ return 'graphql';
139
+ }
140
+ // Check for standard error format
141
+ const hasMessage = STANDARD_ERROR_FIELDS.message.some(f => lowerFields.includes(f.toLowerCase()));
142
+ const hasCode = STANDARD_ERROR_FIELDS.code.some(f => lowerFields.includes(f.toLowerCase()));
143
+ const hasDetails = STANDARD_ERROR_FIELDS.details.some(f => lowerFields.includes(f.toLowerCase()));
144
+ if ((hasMessage && hasCode) || (hasMessage && hasDetails) || (hasCode && hasDetails)) {
145
+ return 'standard';
146
+ }
147
+ // Simple format (just message or error string)
148
+ if (hasMessage && fields.length <= 2)
149
+ return 'simple';
150
+ // Custom format
151
+ if (fields.length >= 2)
152
+ return 'custom';
153
+ return 'simple';
154
+ }
155
+ /** Detect error code naming convention */
156
+ export function detectErrorCodeConvention(code) {
157
+ for (const [convention, pattern] of Object.entries(ERROR_CODE_PATTERNS)) {
158
+ if (pattern.test(code))
159
+ return convention;
160
+ }
161
+ return null;
162
+ }
163
+ /** Check if a string looks like an error code */
164
+ export function isErrorCode(value) {
165
+ if (value.length < 3 || value.length > 50)
166
+ return false;
167
+ return Object.values(ERROR_CODE_PATTERNS).some(pattern => pattern.test(value));
168
+ }
169
+ // ============================================================================
170
+ // Detection Functions
171
+ // ============================================================================
172
+ /** Detect error object patterns */
173
+ export function detectErrorObjects(content, file) {
174
+ const results = [];
175
+ const lines = content.split('\n');
176
+ for (const pattern of ERROR_RESPONSE_PATTERNS) {
177
+ const regex = new RegExp(pattern.source, pattern.flags);
178
+ let match;
179
+ while ((match = regex.exec(content)) !== null) {
180
+ if (isInsideComment(content, match.index))
181
+ continue;
182
+ const { line, column } = getPositionFromIndex(content, match.index);
183
+ const objectContent = match[1] || match[0];
184
+ const fields = extractFieldNames(objectContent);
185
+ const format = detectErrorFormat(fields);
186
+ // Extract error code if present
187
+ const codeMatch = objectContent.match(/code\s*:\s*["'`]([^"'`]+)["'`]/i);
188
+ const errorCode = codeMatch?.[1];
189
+ results.push({
190
+ type: match[0].includes('errors') ? 'error-array' : 'error-object',
191
+ format,
192
+ file,
193
+ line,
194
+ column,
195
+ matchedText: match[0],
196
+ fields,
197
+ errorCode,
198
+ context: lines[line - 1] || '',
199
+ });
200
+ }
201
+ }
202
+ return results;
203
+ }
204
+ /** Detect error class definitions */
205
+ export function detectErrorClasses(content, file) {
206
+ const results = [];
207
+ const lines = content.split('\n');
208
+ for (const pattern of ERROR_CLASS_PATTERNS) {
209
+ const regex = new RegExp(pattern.source, pattern.flags);
210
+ let match;
211
+ while ((match = regex.exec(content)) !== null) {
212
+ if (isInsideComment(content, match.index))
213
+ continue;
214
+ const { line, column } = getPositionFromIndex(content, match.index);
215
+ const className = match[1];
216
+ // Find class body to extract fields
217
+ const classStart = match.index;
218
+ let braceCount = 0;
219
+ let classEnd = classStart;
220
+ let foundBrace = false;
221
+ for (let i = classStart; i < content.length && i < classStart + 2000; i++) {
222
+ if (content[i] === '{') {
223
+ braceCount++;
224
+ foundBrace = true;
225
+ }
226
+ if (content[i] === '}') {
227
+ braceCount--;
228
+ if (foundBrace && braceCount === 0) {
229
+ classEnd = i + 1;
230
+ break;
231
+ }
232
+ }
233
+ }
234
+ const classBody = content.slice(classStart, classEnd);
235
+ const fields = extractFieldNames(classBody);
236
+ results.push({
237
+ type: 'error-class',
238
+ format: 'standard',
239
+ file,
240
+ line,
241
+ column,
242
+ matchedText: match[0],
243
+ fields,
244
+ errorClass: className,
245
+ context: lines[line - 1] || '',
246
+ });
247
+ }
248
+ }
249
+ return results;
250
+ }
251
+ /** Detect error throw patterns */
252
+ export function detectErrorThrows(content, file) {
253
+ const results = [];
254
+ const lines = content.split('\n');
255
+ for (const pattern of ERROR_THROW_PATTERNS) {
256
+ const regex = new RegExp(pattern.source, pattern.flags);
257
+ let match;
258
+ while ((match = regex.exec(content)) !== null) {
259
+ if (isInsideComment(content, match.index))
260
+ continue;
261
+ const { line, column } = getPositionFromIndex(content, match.index);
262
+ const errorClass = match[1];
263
+ const isGenericError = errorClass === 'Error' || match[0].includes('new Error(');
264
+ results.push({
265
+ type: 'error-throw',
266
+ format: isGenericError ? 'simple' : 'standard',
267
+ file,
268
+ line,
269
+ column,
270
+ matchedText: match[0],
271
+ errorClass: isGenericError ? 'Error' : errorClass,
272
+ context: lines[line - 1] || '',
273
+ });
274
+ }
275
+ }
276
+ return results;
277
+ }
278
+ /** Detect error response patterns in API handlers */
279
+ export function detectErrorResponses(content, file) {
280
+ const results = [];
281
+ const lines = content.split('\n');
282
+ // Patterns for error responses in API handlers
283
+ const apiErrorPatterns = [
284
+ /res\.status\s*\(\s*[45]\d{2}\s*\)\s*\.json\s*\(\s*\{([^}]+)\}/gi,
285
+ /Response\.json\s*\(\s*\{([^}]+)\}\s*,\s*\{\s*status\s*:\s*[45]\d{2}/gi,
286
+ /NextResponse\.json\s*\(\s*\{([^}]+)\}\s*,\s*\{\s*status\s*:\s*[45]\d{2}/gi,
287
+ /return\s+new\s+Response\s*\([^,]+,\s*\{\s*status\s*:\s*[45]\d{2}/gi,
288
+ ];
289
+ for (const pattern of apiErrorPatterns) {
290
+ const regex = new RegExp(pattern.source, pattern.flags);
291
+ let match;
292
+ while ((match = regex.exec(content)) !== null) {
293
+ if (isInsideComment(content, match.index))
294
+ continue;
295
+ const { line, column } = getPositionFromIndex(content, match.index);
296
+ const objectContent = match[1] || match[0];
297
+ const fields = extractFieldNames(objectContent);
298
+ const format = detectErrorFormat(fields);
299
+ const codeMatch = objectContent.match(/code\s*:\s*["'`]([^"'`]+)["'`]/i);
300
+ results.push({
301
+ type: 'error-response',
302
+ format,
303
+ file,
304
+ line,
305
+ column,
306
+ matchedText: match[0],
307
+ fields,
308
+ errorCode: codeMatch?.[1],
309
+ context: lines[line - 1] || '',
310
+ });
311
+ }
312
+ }
313
+ return results;
314
+ }
315
+ // ============================================================================
316
+ // Violation Detection Functions
317
+ // ============================================================================
318
+ /** Detect inconsistent error format violations */
319
+ export function detectInconsistentFormatViolations(patterns, file) {
320
+ const violations = [];
321
+ const formatCounts = {
322
+ 'standard': 0, 'problem-details': 0, 'json-api': 0,
323
+ 'graphql': 0, 'simple': 0, 'custom': 0,
324
+ };
325
+ for (const pattern of patterns) {
326
+ formatCounts[pattern.format]++;
327
+ }
328
+ // Find dominant format (excluding simple)
329
+ let dominantFormat = null;
330
+ let maxCount = 0;
331
+ for (const [format, count] of Object.entries(formatCounts)) {
332
+ if (format !== 'simple' && count > maxCount) {
333
+ maxCount = count;
334
+ dominantFormat = format;
335
+ }
336
+ }
337
+ // Flag patterns that don't match dominant format
338
+ if (dominantFormat && maxCount >= 2) {
339
+ for (const pattern of patterns) {
340
+ if (pattern.format !== dominantFormat && pattern.format !== 'simple') {
341
+ violations.push({
342
+ type: 'mixed-formats',
343
+ file,
344
+ line: pattern.line,
345
+ column: pattern.column,
346
+ endLine: pattern.line,
347
+ endColumn: pattern.column + pattern.matchedText.length,
348
+ value: pattern.format,
349
+ issue: `Error uses ${pattern.format} format but project predominantly uses ${dominantFormat}`,
350
+ suggestedFix: `Convert to ${dominantFormat} format for consistency`,
351
+ lineContent: pattern.context || '',
352
+ });
353
+ }
354
+ }
355
+ }
356
+ return violations;
357
+ }
358
+ /** Detect missing required field violations */
359
+ export function detectMissingFieldViolations(patterns, file) {
360
+ const violations = [];
361
+ for (const pattern of patterns) {
362
+ if (pattern.type !== 'error-object' && pattern.type !== 'error-response')
363
+ continue;
364
+ const fields = pattern.fields || [];
365
+ const lowerFields = fields.map(f => f.toLowerCase());
366
+ // Check for missing message
367
+ const hasMessage = STANDARD_ERROR_FIELDS.message.some(f => lowerFields.includes(f.toLowerCase()));
368
+ if (!hasMessage && pattern.format !== 'simple') {
369
+ violations.push({
370
+ type: 'missing-message',
371
+ file,
372
+ line: pattern.line,
373
+ column: pattern.column,
374
+ endLine: pattern.line,
375
+ endColumn: pattern.column + pattern.matchedText.length,
376
+ value: pattern.matchedText,
377
+ issue: 'Error object is missing a message field',
378
+ suggestedFix: 'Add a "message" field to describe the error',
379
+ lineContent: pattern.context || '',
380
+ });
381
+ }
382
+ // Check for missing code in standard format
383
+ if (pattern.format === 'standard') {
384
+ const hasCode = STANDARD_ERROR_FIELDS.code.some(f => lowerFields.includes(f.toLowerCase()));
385
+ if (!hasCode) {
386
+ violations.push({
387
+ type: 'missing-code',
388
+ file,
389
+ line: pattern.line,
390
+ column: pattern.column,
391
+ endLine: pattern.line,
392
+ endColumn: pattern.column + pattern.matchedText.length,
393
+ value: pattern.matchedText,
394
+ issue: 'Error object is missing a code field for categorization',
395
+ suggestedFix: 'Add a "code" field (e.g., "VALIDATION_ERROR")',
396
+ lineContent: pattern.context || '',
397
+ });
398
+ }
399
+ }
400
+ }
401
+ return violations;
402
+ }
403
+ /** Detect raw error string violations */
404
+ export function detectRawErrorStringViolations(content, file) {
405
+ const violations = [];
406
+ const lines = content.split('\n');
407
+ // Patterns for raw error strings
408
+ const rawErrorPatterns = [
409
+ /res\.status\s*\(\s*[45]\d{2}\s*\)\s*\.send\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/gi,
410
+ /res\.status\s*\(\s*[45]\d{2}\s*\)\s*\.json\s*\(\s*["'`]([^"'`]+)["'`]\s*\)/gi,
411
+ /Response\.json\s*\(\s*["'`]([^"'`]+)["'`]\s*,\s*\{\s*status\s*:\s*[45]\d{2}/gi,
412
+ ];
413
+ for (const pattern of rawErrorPatterns) {
414
+ const regex = new RegExp(pattern.source, pattern.flags);
415
+ let match;
416
+ while ((match = regex.exec(content)) !== null) {
417
+ if (isInsideComment(content, match.index))
418
+ continue;
419
+ const { line, column } = getPositionFromIndex(content, match.index);
420
+ violations.push({
421
+ type: 'raw-error-string',
422
+ file,
423
+ line,
424
+ column,
425
+ endLine: line,
426
+ endColumn: column + match[0].length,
427
+ value: match[0],
428
+ issue: 'Raw error string instead of structured error object',
429
+ suggestedFix: 'Use structured error: { error: { message: "...", code: "..." } }',
430
+ lineContent: lines[line - 1] || '',
431
+ });
432
+ }
433
+ }
434
+ return violations;
435
+ }
436
+ /** Detect generic Error usage violations */
437
+ export function detectGenericErrorViolations(patterns, file) {
438
+ const violations = [];
439
+ // Check if file has custom error classes
440
+ const hasCustomErrors = patterns.some(p => p.type === 'error-class' ||
441
+ (p.type === 'error-throw' && p.errorClass !== 'Error'));
442
+ if (hasCustomErrors) {
443
+ for (const pattern of patterns) {
444
+ if (pattern.type === 'error-throw' && pattern.errorClass === 'Error') {
445
+ violations.push({
446
+ type: 'generic-error',
447
+ file,
448
+ line: pattern.line,
449
+ column: pattern.column,
450
+ endLine: pattern.line,
451
+ endColumn: pattern.column + pattern.matchedText.length,
452
+ value: pattern.matchedText,
453
+ issue: 'Using generic Error instead of custom error class',
454
+ suggestedFix: 'Use a custom error class (e.g., AppError, ValidationError)',
455
+ lineContent: pattern.context || '',
456
+ });
457
+ }
458
+ }
459
+ }
460
+ return violations;
461
+ }
462
+ /** Detect inconsistent error code naming violations */
463
+ export function detectInconsistentCodeViolations(patterns, file) {
464
+ const violations = [];
465
+ const codeConventions = {};
466
+ const codesWithConventions = [];
467
+ // Collect error codes and their conventions
468
+ for (const pattern of patterns) {
469
+ if (pattern.errorCode) {
470
+ const convention = detectErrorCodeConvention(pattern.errorCode);
471
+ if (convention) {
472
+ codeConventions[convention] = (codeConventions[convention] || 0) + 1;
473
+ codesWithConventions.push({ pattern, convention });
474
+ }
475
+ }
476
+ }
477
+ // Find dominant convention
478
+ let dominantConvention = null;
479
+ let maxCount = 0;
480
+ for (const [convention, count] of Object.entries(codeConventions)) {
481
+ if (count > maxCount) {
482
+ maxCount = count;
483
+ dominantConvention = convention;
484
+ }
485
+ }
486
+ // Flag codes that don't match dominant convention
487
+ if (dominantConvention && maxCount >= 2) {
488
+ for (const { pattern, convention } of codesWithConventions) {
489
+ if (convention !== dominantConvention) {
490
+ violations.push({
491
+ type: 'inconsistent-codes',
492
+ file,
493
+ line: pattern.line,
494
+ column: pattern.column,
495
+ endLine: pattern.line,
496
+ endColumn: pattern.column + pattern.matchedText.length,
497
+ value: pattern.errorCode || '',
498
+ issue: `Error code uses ${convention} but project uses ${dominantConvention}`,
499
+ suggestedFix: `Convert to ${dominantConvention} convention`,
500
+ lineContent: pattern.context || '',
501
+ });
502
+ }
503
+ }
504
+ }
505
+ return violations;
506
+ }
507
+ // ============================================================================
508
+ // Main Analysis Function
509
+ // ============================================================================
510
+ /** Analyze error format patterns in file content */
511
+ export function analyzeErrorFormat(content, file) {
512
+ if (shouldExcludeFile(file)) {
513
+ return {
514
+ errorPatterns: [],
515
+ violations: [],
516
+ dominantFormat: null,
517
+ usesConsistentFormat: true,
518
+ errorCodes: [],
519
+ errorClasses: [],
520
+ patternAdherenceConfidence: 1.0,
521
+ };
522
+ }
523
+ // Detect all patterns
524
+ const errorObjects = detectErrorObjects(content, file);
525
+ const errorClasses = detectErrorClasses(content, file);
526
+ const errorThrows = detectErrorThrows(content, file);
527
+ const errorResponses = detectErrorResponses(content, file);
528
+ const allPatterns = [...errorObjects, ...errorClasses, ...errorThrows, ...errorResponses];
529
+ // Detect violations
530
+ const formatViolations = detectInconsistentFormatViolations(allPatterns, file);
531
+ const fieldViolations = detectMissingFieldViolations(allPatterns, file);
532
+ const rawStringViolations = detectRawErrorStringViolations(content, file);
533
+ const genericErrorViolations = detectGenericErrorViolations(allPatterns, file);
534
+ const codeViolations = detectInconsistentCodeViolations(allPatterns, file);
535
+ const allViolations = [
536
+ ...formatViolations,
537
+ ...fieldViolations,
538
+ ...rawStringViolations,
539
+ ...genericErrorViolations,
540
+ ...codeViolations,
541
+ ];
542
+ // Determine dominant format
543
+ const formatCounts = {
544
+ 'standard': 0, 'problem-details': 0, 'json-api': 0,
545
+ 'graphql': 0, 'simple': 0, 'custom': 0,
546
+ };
547
+ for (const pattern of allPatterns) {
548
+ formatCounts[pattern.format]++;
549
+ }
550
+ let dominantFormat = null;
551
+ let maxCount = 0;
552
+ for (const [format, count] of Object.entries(formatCounts)) {
553
+ if (count > maxCount) {
554
+ maxCount = count;
555
+ dominantFormat = format;
556
+ }
557
+ }
558
+ // Collect error codes and classes
559
+ const errorCodeSet = new Set();
560
+ const errorClassSet = new Set();
561
+ for (const pattern of allPatterns) {
562
+ if (pattern.errorCode)
563
+ errorCodeSet.add(pattern.errorCode);
564
+ if (pattern.errorClass)
565
+ errorClassSet.add(pattern.errorClass);
566
+ }
567
+ // Calculate confidence
568
+ const totalPatterns = allPatterns.length;
569
+ const violationCount = allViolations.length;
570
+ const confidence = totalPatterns > 0
571
+ ? Math.max(0, 1 - (violationCount / totalPatterns) * 0.2)
572
+ : 1.0;
573
+ // Check consistency
574
+ const nonSimpleFormats = Object.entries(formatCounts)
575
+ .filter(([format, count]) => format !== 'simple' && count > 0);
576
+ const usesConsistentFormat = nonSimpleFormats.length <= 1;
577
+ return {
578
+ errorPatterns: allPatterns,
579
+ violations: allViolations,
580
+ dominantFormat,
581
+ usesConsistentFormat,
582
+ errorCodes: Array.from(errorCodeSet),
583
+ errorClasses: Array.from(errorClassSet),
584
+ patternAdherenceConfidence: confidence,
585
+ };
586
+ }
587
+ // ============================================================================
588
+ // Detector Class
589
+ // ============================================================================
590
+ /** Error Format Detector - Detects error response format patterns */
591
+ export class ErrorFormatDetector extends RegexDetector {
592
+ id = 'api/error-format';
593
+ name = 'Error Format Detector';
594
+ description = 'Detects error response format patterns and consistency';
595
+ category = 'api';
596
+ subcategory = 'errors';
597
+ supportedLanguages = ['typescript', 'javascript', 'python'];
598
+ async detect(context) {
599
+ const { content, file } = context;
600
+ if (shouldExcludeFile(file)) {
601
+ return this.createEmptyResult();
602
+ }
603
+ const analysis = analyzeErrorFormat(content, file);
604
+ return this.createResult([], [], analysis.patternAdherenceConfidence);
605
+ }
606
+ generateQuickFix() {
607
+ return null;
608
+ }
609
+ }
610
+ /** Create a new ErrorFormatDetector instance */
611
+ export function createErrorFormatDetector() {
612
+ return new ErrorFormatDetector();
613
+ }
614
+ //# sourceMappingURL=error-format.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-format.js","sourceRoot":"","sources":["../../src/api/error-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;G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