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,151 @@
1
+ /**
2
+ * Directory Structure Detector - Directory pattern detection
3
+ *
4
+ * Detects feature-based vs layer-based organization
5
+ * and consistent directory patterns.
6
+ *
7
+ * @requirements 7.2 - THE Structural_Detector SHALL detect directory structure patterns (feature-based vs layer-based)
8
+ */
9
+ import type { Violation, QuickFix, Language } from 'driftdetect-core';
10
+ import { StructuralDetector, type DetectionContext, type DetectionResult } from '../base/index.js';
11
+ /**
12
+ * Types of directory organization patterns
13
+ */
14
+ export type DirectoryOrganization = 'feature-based' | 'layer-based' | 'hybrid' | 'unknown';
15
+ /**
16
+ * Common layer-based directory names
17
+ */
18
+ export declare const LAYER_DIRECTORIES: readonly ["controllers", "services", "models", "repositories", "handlers", "middleware", "utils", "helpers", "lib", "config", "types", "interfaces", "constants", "validators", "schemas", "routes", "api", "views", "templates", "assets", "styles", "hooks", "store", "reducers", "actions", "selectors", "sagas", "thunks", "providers", "contexts"];
19
+ /**
20
+ * Common feature-based directory indicators
21
+ */
22
+ export declare const FEATURE_DIRECTORIES: readonly ["features", "modules", "domains", "pages", "screens", "components", "apps", "packages"];
23
+ /**
24
+ * Information about a directory in the project
25
+ */
26
+ export interface DirectoryInfo {
27
+ /** Directory path (relative to project root) */
28
+ path: string;
29
+ /** Directory name (last segment) */
30
+ name: string;
31
+ /** Depth from project root */
32
+ depth: number;
33
+ /** Number of files directly in this directory */
34
+ fileCount: number;
35
+ /** Child directories */
36
+ children: string[];
37
+ /** Whether this appears to be a layer directory */
38
+ isLayerDirectory: boolean;
39
+ /** Whether this appears to be a feature container */
40
+ isFeatureContainer: boolean;
41
+ }
42
+ /**
43
+ * Analysis of directory structure patterns
44
+ */
45
+ export interface DirectoryStructureAnalysis {
46
+ /** Detected organization type */
47
+ organization: DirectoryOrganization;
48
+ /** Confidence in the detection (0-1) */
49
+ confidence: number;
50
+ /** Layer directories found */
51
+ layerDirectories: DirectoryInfo[];
52
+ /** Feature directories found */
53
+ featureDirectories: DirectoryInfo[];
54
+ /** Directories that don't fit the dominant pattern */
55
+ inconsistentDirectories: DirectoryInfo[];
56
+ /** Total directories analyzed */
57
+ totalDirectories: number;
58
+ /** Depth statistics */
59
+ depthStats: {
60
+ maxDepth: number;
61
+ avgDepth: number;
62
+ };
63
+ }
64
+ /**
65
+ * Pattern for consistent directory naming
66
+ */
67
+ export interface DirectoryPattern {
68
+ /** Pattern name */
69
+ name: string;
70
+ /** Directories matching this pattern */
71
+ directories: string[];
72
+ /** Count of matches */
73
+ count: number;
74
+ /** Depth at which this pattern appears */
75
+ depth: number;
76
+ }
77
+ /**
78
+ * Extract unique directories from file paths
79
+ */
80
+ export declare function extractDirectories(files: string[]): Map<string, DirectoryInfo>;
81
+ /**
82
+ * Check if a directory name matches layer-based patterns
83
+ */
84
+ export declare function isLayerDirectory(name: string): boolean;
85
+ /**
86
+ * Check if a directory name indicates a feature container
87
+ */
88
+ export declare function isFeatureContainer(name: string): boolean;
89
+ /**
90
+ * Detect if a directory structure follows feature-based organization
91
+ * Feature-based: /features/auth/components, /features/auth/services
92
+ */
93
+ export declare function detectFeatureBasedStructure(directories: Map<string, DirectoryInfo>): DirectoryInfo[];
94
+ /**
95
+ * Detect if a directory structure follows layer-based organization
96
+ * Layer-based: /controllers, /services, /models at root or src level
97
+ */
98
+ export declare function detectLayerBasedStructure(directories: Map<string, DirectoryInfo>): DirectoryInfo[];
99
+ /**
100
+ * Analyze directory structure and determine organization type
101
+ */
102
+ export declare function analyzeDirectoryStructure(files: string[]): DirectoryStructureAnalysis;
103
+ /**
104
+ * Detect consistent directory naming patterns
105
+ */
106
+ export declare function detectDirectoryPatterns(files: string[]): DirectoryPattern[];
107
+ /**
108
+ * Detector for directory structure patterns
109
+ *
110
+ * Identifies whether a project uses feature-based, layer-based, or hybrid
111
+ * directory organization and detects inconsistencies.
112
+ *
113
+ * @requirements 7.2 - THE Structural_Detector SHALL detect directory structure patterns
114
+ */
115
+ export declare class DirectoryStructureDetector extends StructuralDetector {
116
+ readonly id = "structural/directory-structure";
117
+ readonly category: "structural";
118
+ readonly subcategory = "directory-organization";
119
+ readonly name = "Directory Structure Detector";
120
+ readonly description = "Detects directory organization patterns (feature-based vs layer-based) and identifies inconsistencies";
121
+ readonly supportedLanguages: Language[];
122
+ /**
123
+ * Detect directory structure patterns in the project
124
+ */
125
+ detect(context: DetectionContext): Promise<DetectionResult>;
126
+ /**
127
+ * Generate a quick fix for directory structure violations
128
+ */
129
+ generateQuickFix(violation: Violation): QuickFix | null;
130
+ /**
131
+ * Create a pattern match for the detected organization type
132
+ */
133
+ private createOrganizationPattern;
134
+ /**
135
+ * Create a pattern match for a consistent directory naming pattern
136
+ */
137
+ private createDirectoryPattern;
138
+ /**
139
+ * Create a violation for an inconsistent directory
140
+ */
141
+ private createInconsistencyViolation;
142
+ /**
143
+ * Check if the current file's directory follows the project's organization pattern
144
+ */
145
+ private checkFileDirectoryConsistency;
146
+ }
147
+ /**
148
+ * Create a new DirectoryStructureDetector instance
149
+ */
150
+ export declare function createDirectoryStructureDetector(): DirectoryStructureDetector;
151
+ //# sourceMappingURL=directory-structure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-structure.d.ts","sourceRoot":"","sources":["../../src/structural/directory-structure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAgB,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAS,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAMnG;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,iBAAiB,yVA+BpB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB,mGAStB,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,S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G;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,GAAG,aAAa,EAAE,CAWlG;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,0BAA0B,CAuErF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,gBAAgB,EAAE,CA6B3E;AAMD;;;;;;;GAOG;AACH,qBAAa,0BAA2B,SAAQ,kBAAkB;IAChE,QAAQ,CAAC,EAAE,oCAAoC;IAC/C,QAAQ,CAAC,QAAQ,EAAG,YAAY,CAAU;IAC1C,QAAQ,CAAC,WAAW,4BAA4B;IAChD,QAAQ,CAAC,IAAI,kCAAkC;IAC/C,QAAQ,CAAC,WAAW,2GAA2G;IAC/H,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,EAAE,CASrC;IAEF;;OAEG;IACG,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAuCjE;;OAEG;IACH,gBAAgB,CAAC,SAAS,EAAE,SAAS,GAAG,QAAQ,GAAG,IAAI;IAoBvD;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAYjC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAc9B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IA6CpC;;OAEG;IACH,OAAO,CAAC,6BAA6B;CAsDtC;AAMD;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,0BAA0B,CAE7E"}
@@ -0,0 +1,457 @@
1
+ /**
2
+ * Directory Structure Detector - Directory pattern detection
3
+ *
4
+ * Detects feature-based vs layer-based organization
5
+ * and consistent directory patterns.
6
+ *
7
+ * @requirements 7.2 - THE Structural_Detector SHALL detect directory structure patterns (feature-based vs layer-based)
8
+ */
9
+ import { StructuralDetector } from '../base/index.js';
10
+ /**
11
+ * Common layer-based directory names
12
+ */
13
+ export const LAYER_DIRECTORIES = [
14
+ 'controllers',
15
+ 'services',
16
+ 'models',
17
+ 'repositories',
18
+ 'handlers',
19
+ 'middleware',
20
+ 'utils',
21
+ 'helpers',
22
+ 'lib',
23
+ 'config',
24
+ 'types',
25
+ 'interfaces',
26
+ 'constants',
27
+ 'validators',
28
+ 'schemas',
29
+ 'routes',
30
+ 'api',
31
+ 'views',
32
+ 'templates',
33
+ 'assets',
34
+ 'styles',
35
+ 'hooks',
36
+ 'store',
37
+ 'reducers',
38
+ 'actions',
39
+ 'selectors',
40
+ 'sagas',
41
+ 'thunks',
42
+ 'providers',
43
+ 'contexts',
44
+ ];
45
+ /**
46
+ * Common feature-based directory indicators
47
+ */
48
+ export const FEATURE_DIRECTORIES = [
49
+ 'features',
50
+ 'modules',
51
+ 'domains',
52
+ 'pages',
53
+ 'screens',
54
+ 'components',
55
+ 'apps',
56
+ 'packages',
57
+ ];
58
+ // ============================================================================
59
+ // Helper Functions
60
+ // ============================================================================
61
+ /**
62
+ * Extract unique directories from file paths
63
+ */
64
+ export function extractDirectories(files) {
65
+ const directories = new Map();
66
+ for (const file of files) {
67
+ const normalizedPath = file.replace(/\\/g, '/');
68
+ const segments = normalizedPath.split('/').filter(s => s.length > 0);
69
+ // Build directory paths from segments (excluding the file itself)
70
+ let currentPath = '';
71
+ for (let i = 0; i < segments.length - 1; i++) {
72
+ const segment = segments[i];
73
+ currentPath = currentPath ? `${currentPath}/${segment}` : segment;
74
+ if (!directories.has(currentPath)) {
75
+ directories.set(currentPath, {
76
+ path: currentPath,
77
+ name: segment,
78
+ depth: i + 1,
79
+ fileCount: 0,
80
+ children: [],
81
+ isLayerDirectory: isLayerDirectory(segment),
82
+ isFeatureContainer: isFeatureContainer(segment),
83
+ });
84
+ }
85
+ }
86
+ // Count files in the immediate parent directory
87
+ const parentPath = segments.slice(0, -1).join('/');
88
+ if (parentPath && directories.has(parentPath)) {
89
+ directories.get(parentPath).fileCount++;
90
+ }
91
+ }
92
+ // Build parent-child relationships
93
+ for (const [path, info] of directories) {
94
+ const parentPath = path.split('/').slice(0, -1).join('/');
95
+ if (parentPath && directories.has(parentPath)) {
96
+ directories.get(parentPath).children.push(info.name);
97
+ }
98
+ }
99
+ return directories;
100
+ }
101
+ /**
102
+ * Check if a directory name matches layer-based patterns
103
+ */
104
+ export function isLayerDirectory(name) {
105
+ const lowerName = name.toLowerCase();
106
+ return LAYER_DIRECTORIES.some(layer => lowerName === layer ||
107
+ lowerName === `${layer}s` || // plural form
108
+ lowerName.endsWith(layer));
109
+ }
110
+ /**
111
+ * Check if a directory name indicates a feature container
112
+ */
113
+ export function isFeatureContainer(name) {
114
+ const lowerName = name.toLowerCase();
115
+ return FEATURE_DIRECTORIES.some(feature => lowerName === feature ||
116
+ lowerName === `${feature}s`);
117
+ }
118
+ /**
119
+ * Detect if a directory structure follows feature-based organization
120
+ * Feature-based: /features/auth/components, /features/auth/services
121
+ */
122
+ export function detectFeatureBasedStructure(directories) {
123
+ const featureDirectories = [];
124
+ for (const [path, info] of directories) {
125
+ // Check if this is a feature container with multiple feature subdirectories
126
+ if (info.isFeatureContainer && info.children.length > 0) {
127
+ featureDirectories.push(info);
128
+ continue;
129
+ }
130
+ // Check if parent is a feature container and this has layer-like children
131
+ const parentPath = path.split('/').slice(0, -1).join('/');
132
+ const parent = directories.get(parentPath);
133
+ if (parent?.isFeatureContainer) {
134
+ // This is likely a feature directory (e.g., /features/auth)
135
+ const hasLayerChildren = info.children.some(child => isLayerDirectory(child));
136
+ if (hasLayerChildren || info.fileCount > 0) {
137
+ featureDirectories.push(info);
138
+ }
139
+ }
140
+ }
141
+ return featureDirectories;
142
+ }
143
+ /**
144
+ * Detect if a directory structure follows layer-based organization
145
+ * Layer-based: /controllers, /services, /models at root or src level
146
+ */
147
+ export function detectLayerBasedStructure(directories) {
148
+ const layerDirectories = [];
149
+ for (const [, info] of directories) {
150
+ // Layer directories typically appear at depth 1-2 (root or src level)
151
+ if (info.isLayerDirectory && info.depth <= 3) {
152
+ layerDirectories.push(info);
153
+ }
154
+ }
155
+ return layerDirectories;
156
+ }
157
+ /**
158
+ * Analyze directory structure and determine organization type
159
+ */
160
+ export function analyzeDirectoryStructure(files) {
161
+ const directories = extractDirectories(files);
162
+ if (directories.size === 0) {
163
+ return {
164
+ organization: 'unknown',
165
+ confidence: 0,
166
+ layerDirectories: [],
167
+ featureDirectories: [],
168
+ inconsistentDirectories: [],
169
+ totalDirectories: 0,
170
+ depthStats: { maxDepth: 0, avgDepth: 0 },
171
+ };
172
+ }
173
+ const layerDirectories = detectLayerBasedStructure(directories);
174
+ const featureDirectories = detectFeatureBasedStructure(directories);
175
+ // Calculate depth statistics
176
+ const depths = Array.from(directories.values()).map(d => d.depth);
177
+ const maxDepth = Math.max(...depths);
178
+ const avgDepth = depths.reduce((a, b) => a + b, 0) / depths.length;
179
+ // Determine organization type based on what we found
180
+ let organization;
181
+ let confidence;
182
+ const inconsistentDirectories = [];
183
+ const layerScore = layerDirectories.length;
184
+ const featureScore = featureDirectories.length;
185
+ const totalSignificant = layerScore + featureScore;
186
+ if (totalSignificant === 0) {
187
+ organization = 'unknown';
188
+ confidence = 0.3;
189
+ }
190
+ else if (featureScore > 0 && layerScore > 0) {
191
+ // Both patterns present - could be hybrid or inconsistent
192
+ const featureRatio = featureScore / totalSignificant;
193
+ const layerRatio = layerScore / totalSignificant;
194
+ if (featureRatio > 0.7) {
195
+ organization = 'feature-based';
196
+ confidence = featureRatio;
197
+ // Layer directories in a feature-based project might be inconsistent
198
+ inconsistentDirectories.push(...layerDirectories.filter(d => d.depth <= 2));
199
+ }
200
+ else if (layerRatio > 0.7) {
201
+ organization = 'layer-based';
202
+ confidence = layerRatio;
203
+ // Feature directories in a layer-based project might be inconsistent
204
+ inconsistentDirectories.push(...featureDirectories);
205
+ }
206
+ else {
207
+ organization = 'hybrid';
208
+ confidence = 0.6; // Hybrid patterns have moderate confidence
209
+ }
210
+ }
211
+ else if (featureScore > 0) {
212
+ organization = 'feature-based';
213
+ confidence = Math.min(0.5 + (featureScore * 0.1), 0.95);
214
+ }
215
+ else {
216
+ organization = 'layer-based';
217
+ confidence = Math.min(0.5 + (layerScore * 0.1), 0.95);
218
+ }
219
+ return {
220
+ organization,
221
+ confidence,
222
+ layerDirectories,
223
+ featureDirectories,
224
+ inconsistentDirectories,
225
+ totalDirectories: directories.size,
226
+ depthStats: { maxDepth, avgDepth },
227
+ };
228
+ }
229
+ /**
230
+ * Detect consistent directory naming patterns
231
+ */
232
+ export function detectDirectoryPatterns(files) {
233
+ const directories = extractDirectories(files);
234
+ const patternCounts = new Map();
235
+ for (const [path, info] of directories) {
236
+ // Group by directory name (normalized)
237
+ const normalizedName = info.name.toLowerCase();
238
+ if (!patternCounts.has(normalizedName)) {
239
+ patternCounts.set(normalizedName, { dirs: [], depth: info.depth });
240
+ }
241
+ patternCounts.get(normalizedName).dirs.push(path);
242
+ }
243
+ // Convert to patterns, filtering out single occurrences
244
+ const patterns = [];
245
+ for (const [name, data] of patternCounts) {
246
+ if (data.dirs.length > 1) {
247
+ patterns.push({
248
+ name,
249
+ directories: data.dirs,
250
+ count: data.dirs.length,
251
+ depth: data.depth,
252
+ });
253
+ }
254
+ }
255
+ // Sort by count descending
256
+ return patterns.sort((a, b) => b.count - a.count);
257
+ }
258
+ // ============================================================================
259
+ // Directory Structure Detector Class
260
+ // ============================================================================
261
+ /**
262
+ * Detector for directory structure patterns
263
+ *
264
+ * Identifies whether a project uses feature-based, layer-based, or hybrid
265
+ * directory organization and detects inconsistencies.
266
+ *
267
+ * @requirements 7.2 - THE Structural_Detector SHALL detect directory structure patterns
268
+ */
269
+ export class DirectoryStructureDetector extends StructuralDetector {
270
+ id = 'structural/directory-structure';
271
+ category = 'structural';
272
+ subcategory = 'directory-organization';
273
+ name = 'Directory Structure Detector';
274
+ description = 'Detects directory organization patterns (feature-based vs layer-based) and identifies inconsistencies';
275
+ supportedLanguages = [
276
+ 'typescript',
277
+ 'javascript',
278
+ 'python',
279
+ 'css',
280
+ 'scss',
281
+ 'json',
282
+ 'yaml',
283
+ 'markdown',
284
+ ];
285
+ /**
286
+ * Detect directory structure patterns in the project
287
+ */
288
+ async detect(context) {
289
+ const patterns = [];
290
+ const violations = [];
291
+ // Analyze the entire project's directory structure
292
+ const analysis = analyzeDirectoryStructure(context.projectContext.files);
293
+ // Create pattern match for the detected organization
294
+ if (analysis.organization !== 'unknown') {
295
+ patterns.push(this.createOrganizationPattern(context.file, analysis));
296
+ }
297
+ // Create patterns for consistent directory naming
298
+ const directoryPatterns = detectDirectoryPatterns(context.projectContext.files);
299
+ for (const pattern of directoryPatterns.slice(0, 5)) { // Top 5 patterns
300
+ patterns.push(this.createDirectoryPattern(context.file, pattern, analysis));
301
+ }
302
+ // Generate violations for inconsistent directories
303
+ for (const inconsistent of analysis.inconsistentDirectories) {
304
+ const violation = this.createInconsistencyViolation(context.file, inconsistent, analysis.organization);
305
+ if (violation) {
306
+ violations.push(violation);
307
+ }
308
+ }
309
+ // Check if current file's directory follows the pattern
310
+ const fileViolation = this.checkFileDirectoryConsistency(context.file, analysis);
311
+ if (fileViolation) {
312
+ violations.push(fileViolation);
313
+ }
314
+ return this.createResult(patterns, violations, analysis.confidence);
315
+ }
316
+ /**
317
+ * Generate a quick fix for directory structure violations
318
+ */
319
+ generateQuickFix(violation) {
320
+ // Directory structure violations typically require manual refactoring
321
+ // We can suggest the fix but not automatically apply it
322
+ if (violation.patternId === 'structural/directory-structure-inconsistency') {
323
+ return {
324
+ title: 'Reorganize directory structure',
325
+ kind: 'refactor',
326
+ edit: {
327
+ changes: {},
328
+ documentChanges: [],
329
+ },
330
+ isPreferred: false,
331
+ confidence: 0.5,
332
+ preview: `Consider reorganizing to follow the ${violation.expected} pattern`,
333
+ };
334
+ }
335
+ return null;
336
+ }
337
+ /**
338
+ * Create a pattern match for the detected organization type
339
+ */
340
+ createOrganizationPattern(file, analysis) {
341
+ return {
342
+ patternId: `directory-structure-${analysis.organization}`,
343
+ location: { file, line: 1, column: 1 },
344
+ confidence: analysis.confidence,
345
+ isOutlier: false,
346
+ };
347
+ }
348
+ /**
349
+ * Create a pattern match for a consistent directory naming pattern
350
+ */
351
+ createDirectoryPattern(file, pattern, analysis) {
352
+ const confidence = Math.min(pattern.count / analysis.totalDirectories + 0.3, 0.95);
353
+ return {
354
+ patternId: `directory-pattern-${pattern.name}`,
355
+ location: { file, line: 1, column: 1 },
356
+ confidence,
357
+ isOutlier: false,
358
+ };
359
+ }
360
+ /**
361
+ * Create a violation for an inconsistent directory
362
+ */
363
+ createInconsistencyViolation(file, inconsistent, dominantOrganization) {
364
+ // Only report if the file is in or near the inconsistent directory
365
+ if (!file.includes(inconsistent.path)) {
366
+ return null;
367
+ }
368
+ const range = {
369
+ start: { line: 1, character: 1 },
370
+ end: { line: 1, character: 1 },
371
+ };
372
+ let message;
373
+ let expected;
374
+ let actual;
375
+ if (dominantOrganization === 'feature-based') {
376
+ message = `Directory '${inconsistent.path}' uses layer-based organization but project uses feature-based. Consider moving to a feature directory.`;
377
+ expected = 'feature-based organization (e.g., /features/auth/services/)';
378
+ actual = `layer-based directory at root level (/${inconsistent.name}/)`;
379
+ }
380
+ else {
381
+ message = `Directory '${inconsistent.path}' appears to be a feature directory but project uses layer-based organization.`;
382
+ expected = 'layer-based organization (e.g., /services/, /controllers/)';
383
+ actual = `feature-based directory (/${inconsistent.name}/)`;
384
+ }
385
+ return {
386
+ id: `directory-structure-${inconsistent.path.replace(/[^a-zA-Z0-9]/g, '-')}`,
387
+ patternId: 'structural/directory-structure-inconsistency',
388
+ severity: 'info',
389
+ file,
390
+ range,
391
+ message,
392
+ expected,
393
+ actual,
394
+ aiExplainAvailable: true,
395
+ aiFixAvailable: false,
396
+ firstSeen: new Date(),
397
+ occurrences: 1,
398
+ };
399
+ }
400
+ /**
401
+ * Check if the current file's directory follows the project's organization pattern
402
+ */
403
+ checkFileDirectoryConsistency(file, analysis) {
404
+ if (analysis.organization === 'unknown' || analysis.organization === 'hybrid') {
405
+ return null;
406
+ }
407
+ const normalizedPath = file.replace(/\\/g, '/');
408
+ const segments = normalizedPath.split('/').filter(s => s.length > 0);
409
+ // Skip files at root level
410
+ if (segments.length <= 1) {
411
+ return null;
412
+ }
413
+ // Check if file is in a directory that matches the expected pattern
414
+ const directoryName = segments[segments.length - 2];
415
+ if (!directoryName) {
416
+ return null;
417
+ }
418
+ const isInLayerDir = isLayerDirectory(directoryName);
419
+ const isInFeatureDir = segments.some(s => isFeatureContainer(s));
420
+ // Feature-based project but file is in a root-level layer directory
421
+ if (analysis.organization === 'feature-based' && isInLayerDir && !isInFeatureDir) {
422
+ // Only flag if it's at a shallow depth (root-level layer dirs)
423
+ const depth = segments.length - 1;
424
+ if (depth <= 2) {
425
+ const range = {
426
+ start: { line: 1, character: 1 },
427
+ end: { line: 1, character: 1 },
428
+ };
429
+ return {
430
+ id: `directory-structure-file-${file.replace(/[^a-zA-Z0-9]/g, '-')}`,
431
+ patternId: 'structural/directory-structure-file-location',
432
+ severity: 'info',
433
+ file,
434
+ range,
435
+ message: `File is in a layer-based directory '${directoryName}' but project uses feature-based organization. Consider organizing by feature.`,
436
+ expected: 'File in feature directory (e.g., /features/[feature-name]/)',
437
+ actual: `File in layer directory (/${directoryName}/)`,
438
+ aiExplainAvailable: true,
439
+ aiFixAvailable: false,
440
+ firstSeen: new Date(),
441
+ occurrences: 1,
442
+ };
443
+ }
444
+ }
445
+ return null;
446
+ }
447
+ }
448
+ // ============================================================================
449
+ // Factory Function
450
+ // ============================================================================
451
+ /**
452
+ * Create a new DirectoryStructureDetector instance
453
+ */
454
+ export function createDirectoryStructureDetector() {
455
+ return new DirectoryStructureDetector();
456
+ }
457
+ //# sourceMappingURL=directory-structure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory-structure.js","sourceRoot":"","sources":["../../src/structural/directory-structure.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,kBAAkB,EAA+C,MAAM,kBAAkB,CAAC;AAWnG;;GAEG;AACH,MAAM,CAA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