driftdetect 0.9.31 → 0.9.33

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 (279) hide show
  1. package/dist/bin/drift.js +1 -1
  2. package/dist/bin/drift.js.map +1 -1
  3. package/dist/commands/approve.d.ts.map +1 -1
  4. package/dist/commands/approve.js +5 -4
  5. package/dist/commands/approve.js.map +1 -1
  6. package/dist/commands/audit.d.ts.map +1 -1
  7. package/dist/commands/audit.js +5 -3
  8. package/dist/commands/audit.js.map +1 -1
  9. package/dist/commands/boundaries.d.ts.map +1 -1
  10. package/dist/commands/boundaries.js +1 -1
  11. package/dist/commands/boundaries.js.map +1 -1
  12. package/dist/commands/callgraph.d.ts.map +1 -1
  13. package/dist/commands/callgraph.js +7 -4
  14. package/dist/commands/callgraph.js.map +1 -1
  15. package/dist/commands/check.d.ts.map +1 -1
  16. package/dist/commands/check.js +11 -7
  17. package/dist/commands/check.js.map +1 -1
  18. package/dist/commands/constants.d.ts.map +1 -1
  19. package/dist/commands/constants.js +1 -1
  20. package/dist/commands/constants.js.map +1 -1
  21. package/dist/commands/constraints.d.ts.map +1 -1
  22. package/dist/commands/constraints.js +7 -4
  23. package/dist/commands/constraints.js.map +1 -1
  24. package/dist/commands/context.d.ts.map +1 -1
  25. package/dist/commands/context.js +1 -1
  26. package/dist/commands/context.js.map +1 -1
  27. package/dist/commands/coupling.d.ts.map +1 -1
  28. package/dist/commands/coupling.js +25 -14
  29. package/dist/commands/coupling.js.map +1 -1
  30. package/dist/commands/cpp.d.ts.map +1 -1
  31. package/dist/commands/cpp.js +3 -3
  32. package/dist/commands/cpp.js.map +1 -1
  33. package/dist/commands/dashboard.d.ts.map +1 -1
  34. package/dist/commands/dashboard.js +1 -1
  35. package/dist/commands/dashboard.js.map +1 -1
  36. package/dist/commands/decisions.d.ts.map +1 -1
  37. package/dist/commands/decisions.js +7 -4
  38. package/dist/commands/decisions.js.map +1 -1
  39. package/dist/commands/dna/export.d.ts.map +1 -1
  40. package/dist/commands/dna/export.js +1 -1
  41. package/dist/commands/dna/export.js.map +1 -1
  42. package/dist/commands/dna/gene.d.ts.map +1 -1
  43. package/dist/commands/dna/gene.js +1 -1
  44. package/dist/commands/dna/gene.js.map +1 -1
  45. package/dist/commands/dna/index.d.ts.map +1 -1
  46. package/dist/commands/dna/index.js +3 -3
  47. package/dist/commands/dna/index.js.map +1 -1
  48. package/dist/commands/dna/mutations.d.ts.map +1 -1
  49. package/dist/commands/dna/mutations.js +17 -9
  50. package/dist/commands/dna/mutations.js.map +1 -1
  51. package/dist/commands/dna/playbook.d.ts.map +1 -1
  52. package/dist/commands/dna/playbook.js +1 -1
  53. package/dist/commands/dna/playbook.js.map +1 -1
  54. package/dist/commands/dna/scan.d.ts.map +1 -1
  55. package/dist/commands/dna/scan.js +7 -4
  56. package/dist/commands/dna/scan.js.map +1 -1
  57. package/dist/commands/dna/status.d.ts.map +1 -1
  58. package/dist/commands/dna/status.js +9 -5
  59. package/dist/commands/dna/status.js.map +1 -1
  60. package/dist/commands/env.d.ts.map +1 -1
  61. package/dist/commands/env.js +1 -1
  62. package/dist/commands/env.js.map +1 -1
  63. package/dist/commands/error-handling.d.ts.map +1 -1
  64. package/dist/commands/error-handling.js +13 -7
  65. package/dist/commands/error-handling.js.map +1 -1
  66. package/dist/commands/export.d.ts.map +1 -1
  67. package/dist/commands/export.js +1 -1
  68. package/dist/commands/export.js.map +1 -1
  69. package/dist/commands/files.d.ts.map +1 -1
  70. package/dist/commands/files.js +1 -1
  71. package/dist/commands/files.js.map +1 -1
  72. package/dist/commands/gate.d.ts.map +1 -1
  73. package/dist/commands/gate.js +4 -3
  74. package/dist/commands/gate.js.map +1 -1
  75. package/dist/commands/go.d.ts.map +1 -1
  76. package/dist/commands/go.js +1 -1
  77. package/dist/commands/go.js.map +1 -1
  78. package/dist/commands/ignore.d.ts.map +1 -1
  79. package/dist/commands/ignore.js +4 -3
  80. package/dist/commands/ignore.js.map +1 -1
  81. package/dist/commands/init.d.ts.map +1 -1
  82. package/dist/commands/init.js +3 -3
  83. package/dist/commands/init.js.map +1 -1
  84. package/dist/commands/java.d.ts.map +1 -1
  85. package/dist/commands/java.js +1 -1
  86. package/dist/commands/java.js.map +1 -1
  87. package/dist/commands/license.d.ts.map +1 -1
  88. package/dist/commands/license.js +3 -2
  89. package/dist/commands/license.js.map +1 -1
  90. package/dist/commands/migrate-storage.d.ts.map +1 -1
  91. package/dist/commands/migrate-storage.js +8 -6
  92. package/dist/commands/migrate-storage.js.map +1 -1
  93. package/dist/commands/next-steps.d.ts.map +1 -1
  94. package/dist/commands/next-steps.js +15 -9
  95. package/dist/commands/next-steps.js.map +1 -1
  96. package/dist/commands/parser.d.ts.map +1 -1
  97. package/dist/commands/parser.js +9 -5
  98. package/dist/commands/parser.js.map +1 -1
  99. package/dist/commands/php.d.ts.map +1 -1
  100. package/dist/commands/php.js +1 -1
  101. package/dist/commands/php.js.map +1 -1
  102. package/dist/commands/projects.d.ts.map +1 -1
  103. package/dist/commands/projects.js +16 -9
  104. package/dist/commands/projects.js.map +1 -1
  105. package/dist/commands/py.d.ts.map +1 -1
  106. package/dist/commands/py.js +1 -1
  107. package/dist/commands/py.js.map +1 -1
  108. package/dist/commands/report.d.ts.map +1 -1
  109. package/dist/commands/report.js +3 -3
  110. package/dist/commands/report.js.map +1 -1
  111. package/dist/commands/rust.d.ts.map +1 -1
  112. package/dist/commands/rust.js +1 -1
  113. package/dist/commands/rust.js.map +1 -1
  114. package/dist/commands/scan.d.ts.map +1 -1
  115. package/dist/commands/scan.js +39 -22
  116. package/dist/commands/scan.js.map +1 -1
  117. package/dist/commands/simulate.d.ts.map +1 -1
  118. package/dist/commands/simulate.js +1 -1
  119. package/dist/commands/simulate.js.map +1 -1
  120. package/dist/commands/skills.d.ts.map +1 -1
  121. package/dist/commands/skills.js +22 -14
  122. package/dist/commands/skills.js.map +1 -1
  123. package/dist/commands/status.d.ts.map +1 -1
  124. package/dist/commands/status.js +1 -1
  125. package/dist/commands/status.js.map +1 -1
  126. package/dist/commands/telemetry.d.ts.map +1 -1
  127. package/dist/commands/telemetry.js +3 -3
  128. package/dist/commands/telemetry.js.map +1 -1
  129. package/dist/commands/test-topology.d.ts.map +1 -1
  130. package/dist/commands/test-topology.js +19 -10
  131. package/dist/commands/test-topology.js.map +1 -1
  132. package/dist/commands/trends.d.ts.map +1 -1
  133. package/dist/commands/trends.js +1 -1
  134. package/dist/commands/trends.js.map +1 -1
  135. package/dist/commands/troubleshoot.d.ts.map +1 -1
  136. package/dist/commands/troubleshoot.js +9 -5
  137. package/dist/commands/troubleshoot.js.map +1 -1
  138. package/dist/commands/ts.d.ts.map +1 -1
  139. package/dist/commands/ts.js +1 -1
  140. package/dist/commands/ts.js.map +1 -1
  141. package/dist/commands/watch.d.ts.map +1 -1
  142. package/dist/commands/watch.js +23 -13
  143. package/dist/commands/watch.js.map +1 -1
  144. package/dist/commands/where.d.ts.map +1 -1
  145. package/dist/commands/where.js +3 -2
  146. package/dist/commands/where.js.map +1 -1
  147. package/dist/commands/wpf.d.ts.map +1 -1
  148. package/dist/commands/wpf.js +1 -1
  149. package/dist/commands/wpf.js.map +1 -1
  150. package/dist/commands/wrappers.d.ts.map +1 -1
  151. package/dist/commands/wrappers.js +4 -4
  152. package/dist/commands/wrappers.js.map +1 -1
  153. package/dist/git/hooks.js +1 -1
  154. package/dist/git/hooks.js.map +1 -1
  155. package/dist/reporters/github-reporter.js +8 -4
  156. package/dist/reporters/github-reporter.js.map +1 -1
  157. package/dist/reporters/gitlab-reporter.d.ts.map +1 -1
  158. package/dist/reporters/gitlab-reporter.js.map +1 -1
  159. package/dist/reporters/text-reporter.d.ts.map +1 -1
  160. package/dist/reporters/text-reporter.js.map +1 -1
  161. package/dist/services/boundary-scanner.d.ts.map +1 -1
  162. package/dist/services/boundary-scanner.js +24 -12
  163. package/dist/services/boundary-scanner.js.map +1 -1
  164. package/dist/services/contract-scanner.d.ts +1 -1
  165. package/dist/services/contract-scanner.d.ts.map +1 -1
  166. package/dist/services/contract-scanner.js +3 -2
  167. package/dist/services/contract-scanner.js.map +1 -1
  168. package/dist/services/scanner-service.d.ts.map +1 -1
  169. package/dist/services/scanner-service.js +90 -53
  170. package/dist/services/scanner-service.js.map +1 -1
  171. package/dist/ui/progress.d.ts.map +1 -1
  172. package/dist/ui/progress.js +1 -1
  173. package/dist/ui/progress.js.map +1 -1
  174. package/dist/ui/prompts.d.ts.map +1 -1
  175. package/dist/ui/prompts.js.map +1 -1
  176. package/dist/ui/spinner.js +1 -1
  177. package/dist/ui/spinner.js.map +1 -1
  178. package/dist/ui/table.d.ts.map +1 -1
  179. package/dist/ui/table.js +1 -1
  180. package/dist/ui/table.js.map +1 -1
  181. package/dist/workers/detector-worker.d.ts.map +1 -1
  182. package/dist/workers/detector-worker.js +12 -6
  183. package/dist/workers/detector-worker.js.map +1 -1
  184. package/package.json +1 -1
  185. package/dist/bin/drift.d.ts +0 -11
  186. package/dist/commands/approve.d.ts +0 -28
  187. package/dist/commands/audit.d.ts +0 -29
  188. package/dist/commands/boundaries.d.ts +0 -20
  189. package/dist/commands/callgraph.d.ts +0 -24
  190. package/dist/commands/check.d.ts +0 -41
  191. package/dist/commands/constants.d.ts +0 -35
  192. package/dist/commands/constraints.d.ts +0 -17
  193. package/dist/commands/context.d.ts +0 -19
  194. package/dist/commands/coupling.d.ts +0 -17
  195. package/dist/commands/cpp.d.ts +0 -22
  196. package/dist/commands/dashboard.d.ts +0 -16
  197. package/dist/commands/decisions.d.ts +0 -19
  198. package/dist/commands/dna/export.d.ts +0 -6
  199. package/dist/commands/dna/gene.d.ts +0 -6
  200. package/dist/commands/dna/index.d.ts +0 -8
  201. package/dist/commands/dna/mutations.d.ts +0 -6
  202. package/dist/commands/dna/playbook.d.ts +0 -6
  203. package/dist/commands/dna/scan.d.ts +0 -6
  204. package/dist/commands/dna/status.d.ts +0 -6
  205. package/dist/commands/env.d.ts +0 -23
  206. package/dist/commands/error-handling.d.ts +0 -15
  207. package/dist/commands/export.d.ts +0 -16
  208. package/dist/commands/files.d.ts +0 -15
  209. package/dist/commands/gate.d.ts +0 -33
  210. package/dist/commands/go.d.ts +0 -21
  211. package/dist/commands/ignore.d.ts +0 -20
  212. package/dist/commands/index.d.ts +0 -50
  213. package/dist/commands/index.js +0 -68
  214. package/dist/commands/index.js.map +0 -1
  215. package/dist/commands/init.d.ts +0 -19
  216. package/dist/commands/java.d.ts +0 -15
  217. package/dist/commands/license.d.ts +0 -12
  218. package/dist/commands/migrate-storage.d.ts +0 -23
  219. package/dist/commands/next-steps.d.ts +0 -15
  220. package/dist/commands/parser.d.ts +0 -20
  221. package/dist/commands/php.d.ts +0 -15
  222. package/dist/commands/projects.d.ts +0 -17
  223. package/dist/commands/py.d.ts +0 -15
  224. package/dist/commands/report.d.ts +0 -22
  225. package/dist/commands/rust.d.ts +0 -21
  226. package/dist/commands/scan.d.ts +0 -45
  227. package/dist/commands/simulate.d.ts +0 -17
  228. package/dist/commands/skills.d.ts +0 -16
  229. package/dist/commands/status.d.ts +0 -20
  230. package/dist/commands/telemetry.d.ts +0 -9
  231. package/dist/commands/test-topology.d.ts +0 -15
  232. package/dist/commands/trends.d.ts +0 -12
  233. package/dist/commands/troubleshoot.d.ts +0 -14
  234. package/dist/commands/ts.d.ts +0 -21
  235. package/dist/commands/watch.d.ts +0 -13
  236. package/dist/commands/where.d.ts +0 -15
  237. package/dist/commands/wpf.d.ts +0 -21
  238. package/dist/commands/wrappers.d.ts +0 -16
  239. package/dist/git/hooks.d.ts +0 -108
  240. package/dist/git/index.d.ts +0 -6
  241. package/dist/git/index.d.ts.map +0 -1
  242. package/dist/git/index.js +0 -6
  243. package/dist/git/index.js.map +0 -1
  244. package/dist/git/staged-files.d.ts +0 -41
  245. package/dist/git/staged-files.d.ts.map +0 -1
  246. package/dist/git/staged-files.js +0 -118
  247. package/dist/git/staged-files.js.map +0 -1
  248. package/dist/index.d.ts +0 -17
  249. package/dist/index.js +0 -24
  250. package/dist/index.js.map +0 -1
  251. package/dist/reporters/github-reporter.d.ts +0 -13
  252. package/dist/reporters/gitlab-reporter.d.ts +0 -16
  253. package/dist/reporters/index.d.ts +0 -9
  254. package/dist/reporters/index.js +0 -9
  255. package/dist/reporters/index.js.map +0 -1
  256. package/dist/reporters/json-reporter.d.ts +0 -13
  257. package/dist/reporters/json-reporter.js +0 -44
  258. package/dist/reporters/json-reporter.js.map +0 -1
  259. package/dist/reporters/text-reporter.d.ts +0 -13
  260. package/dist/reporters/types.d.ts +0 -42
  261. package/dist/reporters/types.js +0 -5
  262. package/dist/reporters/types.js.map +0 -1
  263. package/dist/services/boundary-scanner.d.ts +0 -22
  264. package/dist/services/pattern-service-factory.d.ts +0 -37
  265. package/dist/services/pattern-service-factory.js +0 -41
  266. package/dist/services/pattern-service-factory.js.map +0 -1
  267. package/dist/services/scanner-service.d.ts +0 -237
  268. package/dist/types/index.d.ts +0 -24
  269. package/dist/types/index.d.ts.map +0 -1
  270. package/dist/types/index.js +0 -5
  271. package/dist/types/index.js.map +0 -1
  272. package/dist/ui/index.d.ts +0 -11
  273. package/dist/ui/index.js +0 -15
  274. package/dist/ui/index.js.map +0 -1
  275. package/dist/ui/progress.d.ts +0 -115
  276. package/dist/ui/prompts.d.ts +0 -91
  277. package/dist/ui/spinner.d.ts +0 -109
  278. package/dist/ui/table.d.ts +0 -118
  279. package/dist/workers/detector-worker.d.ts +0 -125
@@ -1,115 +0,0 @@
1
- /**
2
- * Progress - Progress bars for scanning
3
- *
4
- * Provides progress bars for long-running operations like scanning.
5
- *
6
- * @requirements 29.1
7
- */
8
- import { SingleBar } from 'cli-progress';
9
- /**
10
- * Progress bar configuration options
11
- */
12
- export interface ProgressOptions {
13
- /** Total number of items */
14
- total: number;
15
- /** Format string for the progress bar */
16
- format?: string;
17
- /** Whether to show ETA */
18
- showEta?: boolean;
19
- /** Whether to show percentage */
20
- showPercentage?: boolean;
21
- /** Whether to show value/total */
22
- showValue?: boolean;
23
- /** Whether progress is enabled (false in CI mode) */
24
- enabled?: boolean;
25
- /** Clear the bar on complete */
26
- clearOnComplete?: boolean;
27
- /** Hide cursor during progress */
28
- hideCursor?: boolean;
29
- }
30
- /**
31
- * Progress bar wrapper for consistent CLI feedback
32
- */
33
- export declare class Progress {
34
- private bar;
35
- private enabled;
36
- private currentValue;
37
- constructor(options: ProgressOptions);
38
- /**
39
- * Update progress with current value
40
- */
41
- update(value: number, payload?: Record<string, string | number>): this;
42
- /**
43
- * Increment progress by amount
44
- */
45
- increment(amount?: number, payload?: Record<string, string | number>): this;
46
- /**
47
- * Set the current task description
48
- */
49
- task(description: string): this;
50
- /**
51
- * Set the total value
52
- */
53
- setTotal(total: number): this;
54
- /**
55
- * Stop the progress bar
56
- */
57
- stop(): this;
58
- /**
59
- * Get current value
60
- */
61
- get value(): number;
62
- }
63
- /**
64
- * Multi-progress bar for parallel operations
65
- */
66
- export declare class MultiProgress {
67
- private multiBar;
68
- private bars;
69
- private enabled;
70
- constructor(enabled?: boolean);
71
- /**
72
- * Create a new progress bar
73
- */
74
- create(name: string, total: number): SingleBar | null;
75
- /**
76
- * Update a specific bar
77
- */
78
- update(name: string, value: number, payload?: Record<string, string | number>): this;
79
- /**
80
- * Increment a specific bar
81
- */
82
- increment(name: string, amount?: number, payload?: Record<string, string | number>): this;
83
- /**
84
- * Remove a specific bar
85
- */
86
- remove(name: string): this;
87
- /**
88
- * Stop all progress bars
89
- */
90
- stop(): this;
91
- }
92
- /**
93
- * Create a progress bar for scanning operations
94
- */
95
- export declare function createScanProgress(totalFiles: number): Progress;
96
- /**
97
- * Create a progress bar for analysis operations
98
- */
99
- export declare function createAnalysisProgress(totalItems: number): Progress;
100
- /**
101
- * Create a progress bar for pattern detection
102
- */
103
- export declare function createDetectionProgress(totalDetectors: number): Progress;
104
- /**
105
- * Run an operation with progress tracking
106
- */
107
- export declare function withProgress<T>(items: T[], operation: (item: T, index: number) => Promise<void>, options?: {
108
- format?: string;
109
- getTaskName?: (item: T) => string;
110
- }): Promise<void>;
111
- /**
112
- * Simple percentage display for CI mode
113
- */
114
- export declare function logProgress(current: number, total: number, message?: string): void;
115
- //# sourceMappingURL=progress.d.ts.map
@@ -1,91 +0,0 @@
1
- /**
2
- * Prompts - Interactive prompts with Inquirer
3
- *
4
- * Provides interactive prompts for user input during CLI operations.
5
- *
6
- * @requirements 29.8
7
- */
8
- import type { Severity } from 'driftdetect-core';
9
- /**
10
- * Pattern approval choice
11
- */
12
- export interface PatternChoice {
13
- /** Pattern ID */
14
- id: string;
15
- /** Pattern name */
16
- name: string;
17
- /** Pattern category */
18
- category: string;
19
- /** Confidence score */
20
- confidence: number;
21
- }
22
- /**
23
- * Prompt for confirmation
24
- */
25
- export declare function confirmPrompt(message: string, defaultValue?: boolean): Promise<boolean>;
26
- /**
27
- * Prompt for text input
28
- */
29
- export declare function inputPrompt(message: string, defaultValue?: string): Promise<string>;
30
- /**
31
- * Prompt to select from a list of options
32
- */
33
- export declare function selectPrompt<T extends string>(message: string, choices: Array<{
34
- value: T;
35
- name: string;
36
- description?: string;
37
- }>): Promise<T>;
38
- /**
39
- * Prompt to select multiple items from a list
40
- */
41
- export declare function multiSelectPrompt<T extends string>(message: string, choices: Array<{
42
- value: T;
43
- name: string;
44
- checked?: boolean;
45
- }>): Promise<T[]>;
46
- /**
47
- * Prompt for pattern approval action
48
- */
49
- export type PatternAction = 'approve' | 'ignore' | 'skip' | 'variant';
50
- export declare function promptPatternAction(pattern: PatternChoice): Promise<PatternAction>;
51
- /**
52
- * Prompt for multiple pattern approvals
53
- */
54
- export declare function promptBatchPatternApproval(patterns: PatternChoice[]): Promise<string[]>;
55
- /**
56
- * Prompt for severity selection
57
- */
58
- export declare function promptSeverity(message?: string): Promise<Severity>;
59
- /**
60
- * Prompt for variant reason
61
- */
62
- export declare function promptVariantReason(): Promise<string>;
63
- /**
64
- * Prompt for variant scope
65
- */
66
- export type VariantScope = 'global' | 'directory' | 'file';
67
- export declare function promptVariantScope(): Promise<VariantScope>;
68
- /**
69
- * Prompt for initialization options
70
- */
71
- export interface InitPromptResult {
72
- /** Whether to scan immediately */
73
- scanNow: boolean;
74
- /** Whether to auto-approve high confidence patterns */
75
- autoApprove: boolean;
76
- }
77
- export declare function promptInitOptions(): Promise<InitPromptResult>;
78
- /**
79
- * Prompt for ignore reason
80
- */
81
- export declare function promptIgnoreReason(): Promise<string>;
82
- /**
83
- * Prompt for report format selection
84
- */
85
- export type ReportFormat = 'text' | 'json' | 'github' | 'gitlab';
86
- export declare function promptReportFormat(): Promise<ReportFormat>;
87
- /**
88
- * Prompt for category selection
89
- */
90
- export declare function promptCategorySelection(categories: string[]): Promise<string[]>;
91
- //# sourceMappingURL=prompts.d.ts.map
@@ -1,109 +0,0 @@
1
- /**
2
- * Spinner - Progress spinners
3
- *
4
- * Provides animated spinners for long-running operations.
5
- *
6
- * @requirements 29.1
7
- */
8
- /**
9
- * Spinner configuration options
10
- */
11
- export interface SpinnerOptions {
12
- /** Spinner text */
13
- text?: string;
14
- /** Spinner color */
15
- color?: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray';
16
- /** Whether to show spinner (false in CI mode) */
17
- enabled?: boolean;
18
- }
19
- /**
20
- * Spinner wrapper for consistent CLI feedback
21
- */
22
- export declare class Spinner {
23
- private spinner;
24
- private enabled;
25
- constructor(options?: SpinnerOptions);
26
- /**
27
- * Start the spinner with optional text
28
- */
29
- start(text?: string): this;
30
- /**
31
- * Stop the spinner with a success message
32
- */
33
- succeed(text?: string): this;
34
- /**
35
- * Stop the spinner with a failure message
36
- */
37
- fail(text?: string): this;
38
- /**
39
- * Stop the spinner with a warning message
40
- */
41
- warn(text?: string): this;
42
- /**
43
- * Stop the spinner with an info message
44
- */
45
- info(text?: string): this;
46
- /**
47
- * Stop the spinner without a status symbol
48
- */
49
- stop(): this;
50
- /**
51
- * Update the spinner text
52
- */
53
- text(text: string): this;
54
- /**
55
- * Update the spinner color
56
- */
57
- color(color: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'): this;
58
- /**
59
- * Check if spinner is currently spinning
60
- */
61
- get isSpinning(): boolean;
62
- }
63
- /**
64
- * Create a new spinner instance
65
- */
66
- export declare function createSpinner(textOrOptions?: string | SpinnerOptions): Spinner;
67
- /**
68
- * Run an async operation with a spinner
69
- */
70
- export declare function withSpinner<T>(text: string, operation: () => Promise<T>, options?: {
71
- successText?: string | ((result: T) => string);
72
- failText?: string | ((error: Error) => string);
73
- }): Promise<T>;
74
- /**
75
- * Pre-configured spinners for common operations
76
- */
77
- export declare const spinners: {
78
- /**
79
- * Spinner for scanning operations
80
- */
81
- scanning(text?: string): Spinner;
82
- /**
83
- * Spinner for analysis operations
84
- */
85
- analyzing(text?: string): Spinner;
86
- /**
87
- * Spinner for loading operations
88
- */
89
- loading(text?: string): Spinner;
90
- /**
91
- * Spinner for saving operations
92
- */
93
- saving(text?: string): Spinner;
94
- /**
95
- * Spinner for checking operations
96
- */
97
- checking(text?: string): Spinner;
98
- };
99
- /**
100
- * Status indicators for non-spinner output
101
- */
102
- export declare const status: {
103
- success(message: string): void;
104
- error(message: string): void;
105
- warning(message: string): void;
106
- info(message: string): void;
107
- pending(message: string): void;
108
- };
109
- //# sourceMappingURL=spinner.d.ts.map
@@ -1,118 +0,0 @@
1
- /**
2
- * Table - Table formatting for output
3
- *
4
- * Provides formatted table output for CLI results.
5
- *
6
- * @requirements 29.1
7
- */
8
- import Table from 'cli-table3';
9
- import type { Severity } from 'driftdetect-core';
10
- /**
11
- * Table style presets
12
- */
13
- export type TableStyle = 'default' | 'compact' | 'borderless' | 'minimal';
14
- /**
15
- * Table configuration options
16
- */
17
- export interface TableOptions {
18
- /** Table headers */
19
- head?: string[];
20
- /** Column widths */
21
- colWidths?: number[];
22
- /** Column alignments */
23
- colAligns?: Array<'left' | 'center' | 'right'>;
24
- /** Table style preset */
25
- style?: TableStyle;
26
- /** Word wrap long content */
27
- wordWrap?: boolean;
28
- }
29
- /**
30
- * Create a formatted table
31
- */
32
- export declare function createTable(options?: TableOptions): Table.Table;
33
- /**
34
- * Format a severity value with color
35
- */
36
- export declare function formatSeverity(severity: Severity): string;
37
- /**
38
- * Format a confidence score with color
39
- */
40
- export declare function formatConfidence(confidence: number): string;
41
- /**
42
- * Format a count with color based on value
43
- */
44
- export declare function formatCount(count: number, threshold?: number): string;
45
- /**
46
- * Format a file path (truncate if too long)
47
- */
48
- export declare function formatPath(path: string, maxLength?: number): string;
49
- /**
50
- * Pattern table row data
51
- */
52
- export interface PatternRow {
53
- id: string;
54
- name: string;
55
- category: string;
56
- confidence: number;
57
- locations: number;
58
- outliers: number;
59
- }
60
- /**
61
- * Create a patterns table
62
- */
63
- export declare function createPatternsTable(patterns: PatternRow[]): string;
64
- /**
65
- * Violation table row data
66
- */
67
- export interface ViolationRow {
68
- severity: Severity;
69
- file: string;
70
- line: number;
71
- message: string;
72
- pattern: string;
73
- }
74
- /**
75
- * Create a violations table
76
- */
77
- export declare function createViolationsTable(violations: ViolationRow[]): string;
78
- /**
79
- * Summary table row data
80
- */
81
- export interface SummaryRow {
82
- label: string;
83
- value: string | number;
84
- }
85
- /**
86
- * Create a summary table
87
- */
88
- export declare function createSummaryTable(rows: SummaryRow[]): string;
89
- /**
90
- * Status summary data
91
- */
92
- export interface StatusSummary {
93
- totalPatterns: number;
94
- approvedPatterns: number;
95
- discoveredPatterns: number;
96
- ignoredPatterns: number;
97
- totalViolations: number;
98
- errors: number;
99
- warnings: number;
100
- }
101
- /**
102
- * Create a status summary table
103
- */
104
- export declare function createStatusTable(summary: StatusSummary): string;
105
- /**
106
- * Category breakdown data
107
- */
108
- export interface CategoryBreakdown {
109
- category: string;
110
- patterns: number;
111
- violations: number;
112
- coverage: number;
113
- }
114
- /**
115
- * Create a category breakdown table
116
- */
117
- export declare function createCategoryTable(categories: CategoryBreakdown[]): string;
118
- //# sourceMappingURL=table.d.ts.map
@@ -1,125 +0,0 @@
1
- /**
2
- * Detector Worker - Worker thread for running pattern detectors
3
- *
4
- * This worker runs in a separate thread and handles:
5
- * - Loading and running detectors on file content
6
- * - Tree-sitter AST parsing
7
- * - Pattern matching and violation detection
8
- *
9
- * @requirements 2.6 - Parallel file processing with worker threads
10
- */
11
- /**
12
- * Warmup task - preloads detectors without processing files
13
- */
14
- export interface WarmupTask {
15
- type: 'warmup';
16
- categories?: string[] | undefined;
17
- criticalOnly?: boolean | undefined;
18
- }
19
- /**
20
- * Warmup result
21
- */
22
- export interface WarmupResult {
23
- type: 'warmup';
24
- detectorsLoaded: number;
25
- duration: number;
26
- }
27
- /**
28
- * Task input for detector worker
29
- */
30
- export interface DetectorWorkerTask {
31
- /** Task type - 'scan' for file processing, 'warmup' for preloading */
32
- type?: 'scan' | undefined;
33
- /** Relative path to the file */
34
- file: string;
35
- /** Root directory */
36
- rootDir: string;
37
- /** Project files list (for context) */
38
- projectFiles: string[];
39
- /** Project config */
40
- projectConfig: Record<string, unknown>;
41
- /** Detector IDs to run (empty = all) */
42
- detectorIds?: string[] | undefined;
43
- /** Categories to filter by */
44
- categories?: string[] | undefined;
45
- /** Only run critical detectors */
46
- criticalOnly?: boolean | undefined;
47
- }
48
- /**
49
- * Pattern match from detector
50
- *
51
- * Enhanced to preserve all metadata from detectors including:
52
- * - Full location range (endLine/endColumn)
53
- * - Outlier information (isOutlier, outlierReason)
54
- * - Matched text for context
55
- * - Custom detector metadata
56
- */
57
- export interface WorkerPatternMatch {
58
- patternId: string;
59
- detectorId: string;
60
- detectorName: string;
61
- detectorDescription: string;
62
- category: string;
63
- subcategory: string;
64
- confidence: number;
65
- location: {
66
- file: string;
67
- line: number;
68
- column: number;
69
- /** End line for full range highlighting */
70
- endLine?: number;
71
- /** End column for full range highlighting */
72
- endColumn?: number;
73
- };
74
- /** Whether this match deviates from the established pattern */
75
- isOutlier?: boolean;
76
- /** Explanation for why this is an outlier */
77
- outlierReason?: string;
78
- /** The actual text that was matched */
79
- matchedText?: string;
80
- /** Custom metadata from the detector (auth types, route info, etc.) */
81
- metadata?: Record<string, unknown>;
82
- }
83
- /**
84
- * Violation from detector
85
- */
86
- export interface WorkerViolation {
87
- patternId: string;
88
- detectorId: string;
89
- category: string;
90
- severity: 'error' | 'warning' | 'info' | 'hint';
91
- file: string;
92
- line: number;
93
- column: number;
94
- message: string;
95
- explanation?: string | undefined;
96
- suggestedFix?: string | undefined;
97
- }
98
- /**
99
- * Result from detector worker
100
- */
101
- export interface DetectorWorkerResult {
102
- /** File that was processed */
103
- file: string;
104
- /** Detected language */
105
- language: string | null;
106
- /** Pattern matches found */
107
- patterns: WorkerPatternMatch[];
108
- /** Violations found */
109
- violations: WorkerViolation[];
110
- /** Number of detectors that ran */
111
- detectorsRan: number;
112
- /** Number of detectors skipped */
113
- detectorsSkipped: number;
114
- /** Processing duration in milliseconds */
115
- duration: number;
116
- /** Error message if processing failed */
117
- error?: string | undefined;
118
- }
119
- /**
120
- * Process a single file with detectors
121
- *
122
- * This is the main export that Piscina will call for each task.
123
- */
124
- export default function processFile(task: DetectorWorkerTask | WarmupTask): Promise<DetectorWorkerResult | WarmupResult>;
125
- //# sourceMappingURL=detector-worker.d.ts.map