@scrymore/scry-sbcov 0.2.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.
- package/README.md +410 -0
- package/bin/scry-sbcov.js +3 -0
- package/dist/analyzers/git-analyzer.d.ts +49 -0
- package/dist/analyzers/git-analyzer.d.ts.map +1 -0
- package/dist/analyzers/git-analyzer.js +265 -0
- package/dist/analyzers/git-analyzer.js.map +1 -0
- package/dist/cli/config.d.ts +12 -0
- package/dist/cli/config.d.ts.map +1 -0
- package/dist/cli/config.js +197 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +164 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/analyzer.d.ts +19 -0
- package/dist/core/analyzer.d.ts.map +1 -0
- package/dist/core/analyzer.js +117 -0
- package/dist/core/analyzer.js.map +1 -0
- package/dist/core/coverage-calculator.d.ts +38 -0
- package/dist/core/coverage-calculator.d.ts.map +1 -0
- package/dist/core/coverage-calculator.js +335 -0
- package/dist/core/coverage-calculator.js.map +1 -0
- package/dist/core/report-generator.d.ts +10 -0
- package/dist/core/report-generator.d.ts.map +1 -0
- package/dist/core/report-generator.js +477 -0
- package/dist/core/report-generator.js.map +1 -0
- package/dist/core/story-executor.d.ts +22 -0
- package/dist/core/story-executor.d.ts.map +1 -0
- package/dist/core/story-executor.js +379 -0
- package/dist/core/story-executor.js.map +1 -0
- package/dist/detectors/component-detector.d.ts +15 -0
- package/dist/detectors/component-detector.d.ts.map +1 -0
- package/dist/detectors/component-detector.js +632 -0
- package/dist/detectors/component-detector.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/story-parser.d.ts +18 -0
- package/dist/parsers/story-parser.d.ts.map +1 -0
- package/dist/parsers/story-parser.js +353 -0
- package/dist/parsers/story-parser.js.map +1 -0
- package/dist/types/index.d.ts +502 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +6 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* scry-sbcov Type Definitions
|
|
3
|
+
* Comprehensive TypeScript interfaces for Storybook story coverage analysis
|
|
4
|
+
*/
|
|
5
|
+
export interface StoryCoverageReport {
|
|
6
|
+
/** Schema version for forward compatibility */
|
|
7
|
+
version: '1.0.0';
|
|
8
|
+
/** ISO timestamp when report was generated */
|
|
9
|
+
generatedAt: string;
|
|
10
|
+
/** Git context for the analysis */
|
|
11
|
+
git: GitContext;
|
|
12
|
+
/** Configuration used for this analysis */
|
|
13
|
+
config: AnalysisConfig;
|
|
14
|
+
/** High-level coverage metrics */
|
|
15
|
+
summary: CoverageSummary;
|
|
16
|
+
/** New code analysis (SonarQube-style) */
|
|
17
|
+
newCode: NewCodeAnalysis;
|
|
18
|
+
/** Runtime execution results (if tests were run) */
|
|
19
|
+
execution: ExecutionResults | null;
|
|
20
|
+
/** Per-component coverage details */
|
|
21
|
+
components: ComponentCoverage[];
|
|
22
|
+
/** Actionable list of missing scenarios */
|
|
23
|
+
missingScenarios: MissingScenario[];
|
|
24
|
+
/** Components with no stories at all */
|
|
25
|
+
uncoveredComponents: UncoveredComponent[];
|
|
26
|
+
/** Quality gate results */
|
|
27
|
+
qualityGate: QualityGateResult;
|
|
28
|
+
}
|
|
29
|
+
export interface GitContext {
|
|
30
|
+
/** Current commit SHA */
|
|
31
|
+
commitSha: string;
|
|
32
|
+
/** Current branch name */
|
|
33
|
+
branch: string;
|
|
34
|
+
/** Base reference for new code comparison */
|
|
35
|
+
baseBranch: string | null;
|
|
36
|
+
/** Base commit SHA if comparing branches */
|
|
37
|
+
baseCommitSha: string | null;
|
|
38
|
+
}
|
|
39
|
+
export interface AnalysisConfig {
|
|
40
|
+
/** Glob patterns for component files */
|
|
41
|
+
include: string[];
|
|
42
|
+
/** Glob patterns to exclude */
|
|
43
|
+
exclude: string[];
|
|
44
|
+
/** Story file patterns */
|
|
45
|
+
storyPatterns: string[];
|
|
46
|
+
/** Whether new code analysis was enabled */
|
|
47
|
+
newCodeAnalysis: boolean;
|
|
48
|
+
/** Base branch for comparison */
|
|
49
|
+
baseBranch: string | null;
|
|
50
|
+
/** Thresholds used for quality gates */
|
|
51
|
+
thresholds: ThresholdConfig;
|
|
52
|
+
}
|
|
53
|
+
export interface ThresholdConfig {
|
|
54
|
+
componentCoverage: number;
|
|
55
|
+
propCoverage: number;
|
|
56
|
+
variantCoverage: number;
|
|
57
|
+
newCodeCoverage: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ScryConfig {
|
|
60
|
+
/** Component detection patterns */
|
|
61
|
+
include: string[];
|
|
62
|
+
exclude: string[];
|
|
63
|
+
/** Story file patterns */
|
|
64
|
+
storyPatterns: string[];
|
|
65
|
+
/** Git analysis settings */
|
|
66
|
+
baseBranch: string;
|
|
67
|
+
enableGitAnalysis: boolean;
|
|
68
|
+
/** Story execution settings */
|
|
69
|
+
execute: boolean;
|
|
70
|
+
storybookUrl: string;
|
|
71
|
+
storybookStaticDir: string | null;
|
|
72
|
+
executionTimeout: number;
|
|
73
|
+
/** Quality gate thresholds */
|
|
74
|
+
thresholds: ThresholdConfig;
|
|
75
|
+
/** Output configuration */
|
|
76
|
+
outputPath: string | null;
|
|
77
|
+
/** Scenario detection patterns */
|
|
78
|
+
scenarioPatterns: Record<string, string[]>;
|
|
79
|
+
/** Manual component-to-story mapping overrides */
|
|
80
|
+
componentStoryMapping: Record<string, string>;
|
|
81
|
+
}
|
|
82
|
+
export interface CoverageSummary {
|
|
83
|
+
/** Total React components detected */
|
|
84
|
+
totalComponents: number;
|
|
85
|
+
/** Components with at least one story */
|
|
86
|
+
componentsWithStories: number;
|
|
87
|
+
/** Components with zero stories */
|
|
88
|
+
componentsWithoutStories: number;
|
|
89
|
+
/** Total story files found */
|
|
90
|
+
totalStoryFiles: number;
|
|
91
|
+
/** Total individual stories (exports) */
|
|
92
|
+
totalStories: number;
|
|
93
|
+
/** Aggregate coverage percentages */
|
|
94
|
+
metrics: CoverageMetrics;
|
|
95
|
+
/** Execution health summary */
|
|
96
|
+
health: HealthSummary;
|
|
97
|
+
}
|
|
98
|
+
export interface CoverageMetrics {
|
|
99
|
+
/** % of components with at least one story */
|
|
100
|
+
componentCoverage: number;
|
|
101
|
+
/** % of props that have at least one story exercising them */
|
|
102
|
+
propCoverage: number;
|
|
103
|
+
/** % of enumerable prop variants covered (e.g., 2/3 button sizes) */
|
|
104
|
+
variantCoverage: number;
|
|
105
|
+
/** % of detected scenarios covered (loading, error, empty states, etc.) */
|
|
106
|
+
scenarioCoverage: number;
|
|
107
|
+
}
|
|
108
|
+
export interface HealthSummary {
|
|
109
|
+
status: 'healthy' | 'degraded' | 'broken' | 'not_executed';
|
|
110
|
+
passingStories: number;
|
|
111
|
+
failingStories: number;
|
|
112
|
+
passRate: number;
|
|
113
|
+
}
|
|
114
|
+
export interface NewCodeAnalysis {
|
|
115
|
+
/** Whether new code analysis was performed */
|
|
116
|
+
enabled: boolean;
|
|
117
|
+
/** Reference point description (branch name, commit, or date) */
|
|
118
|
+
since: string;
|
|
119
|
+
/** Metrics for newly added components */
|
|
120
|
+
newComponents: {
|
|
121
|
+
total: number;
|
|
122
|
+
withStories: number;
|
|
123
|
+
withoutStories: number;
|
|
124
|
+
coverage: number;
|
|
125
|
+
};
|
|
126
|
+
/** Metrics for modified existing components */
|
|
127
|
+
modifiedComponents: {
|
|
128
|
+
total: number;
|
|
129
|
+
newPropsAdded: number;
|
|
130
|
+
newPropsCovered: number;
|
|
131
|
+
coverage: number;
|
|
132
|
+
};
|
|
133
|
+
/** List of new component paths for easy filtering */
|
|
134
|
+
newComponentPaths: string[];
|
|
135
|
+
/** List of modified component paths */
|
|
136
|
+
modifiedComponentPaths: string[];
|
|
137
|
+
}
|
|
138
|
+
export interface ExecutionResults {
|
|
139
|
+
/** Whether execution tests were run */
|
|
140
|
+
executed: boolean;
|
|
141
|
+
/** Execution timestamp */
|
|
142
|
+
executedAt: string;
|
|
143
|
+
/** Overall execution summary */
|
|
144
|
+
summary: {
|
|
145
|
+
total: number;
|
|
146
|
+
passed: number;
|
|
147
|
+
failed: number;
|
|
148
|
+
skipped: number;
|
|
149
|
+
duration: number;
|
|
150
|
+
};
|
|
151
|
+
/** Per-story execution results */
|
|
152
|
+
stories: StoryExecutionResult[];
|
|
153
|
+
/** Only the failures for quick access */
|
|
154
|
+
failures: StoryFailure[];
|
|
155
|
+
/** Regression analysis comparing to baseline */
|
|
156
|
+
regression: RegressionAnalysis;
|
|
157
|
+
}
|
|
158
|
+
export interface StoryExecutionResult {
|
|
159
|
+
/** Story ID (e.g., "button--primary") */
|
|
160
|
+
storyId: string;
|
|
161
|
+
/** Component name */
|
|
162
|
+
componentName: string;
|
|
163
|
+
/** Story export name */
|
|
164
|
+
storyName: string;
|
|
165
|
+
/** Execution status */
|
|
166
|
+
status: 'passed' | 'failed' | 'skipped' | 'timeout';
|
|
167
|
+
/** Duration in ms */
|
|
168
|
+
duration: number;
|
|
169
|
+
/** Failure details (if failed) */
|
|
170
|
+
failure: StoryFailure | null;
|
|
171
|
+
/** Warnings (console.warn, deprecations) */
|
|
172
|
+
warnings: string[];
|
|
173
|
+
/** Whether story has a play function */
|
|
174
|
+
hasPlayFunction: boolean;
|
|
175
|
+
/** Play function result (if applicable) */
|
|
176
|
+
playFunctionStatus: 'passed' | 'failed' | 'none';
|
|
177
|
+
}
|
|
178
|
+
export interface StoryFailure {
|
|
179
|
+
/** Story ID */
|
|
180
|
+
storyId: string;
|
|
181
|
+
/** Component name */
|
|
182
|
+
componentName: string;
|
|
183
|
+
/** Story name */
|
|
184
|
+
storyName: string;
|
|
185
|
+
/** Type of failure */
|
|
186
|
+
failureType: StoryFailureType;
|
|
187
|
+
/** Error message */
|
|
188
|
+
message: string;
|
|
189
|
+
/** Stack trace (if available) */
|
|
190
|
+
stack: string | null;
|
|
191
|
+
/** Screenshot path (if captured) */
|
|
192
|
+
screenshotPath: string | null;
|
|
193
|
+
/** Console errors captured during render */
|
|
194
|
+
consoleErrors: string[];
|
|
195
|
+
/** Whether this is a new failure (not in baseline) */
|
|
196
|
+
isNewFailure: boolean;
|
|
197
|
+
/** File path to story */
|
|
198
|
+
storyFilePath: string;
|
|
199
|
+
/** Direct link to story in Storybook */
|
|
200
|
+
storybookUrl: string | null;
|
|
201
|
+
}
|
|
202
|
+
export type StoryFailureType = 'render_error' | 'play_function' | 'timeout' | 'console_error' | 'missing_component' | 'invalid_args' | 'accessibility' | 'network_error';
|
|
203
|
+
export interface RegressionAnalysis {
|
|
204
|
+
/** Whether baseline comparison was performed */
|
|
205
|
+
enabled: boolean;
|
|
206
|
+
/** Baseline reference (commit, file path, or "previous run") */
|
|
207
|
+
baselineRef: string | null;
|
|
208
|
+
/** New failures not in baseline */
|
|
209
|
+
newFailures: StoryFailure[];
|
|
210
|
+
/** Failures that were fixed since baseline */
|
|
211
|
+
fixedFailures: string[];
|
|
212
|
+
/** Failures that persist from baseline */
|
|
213
|
+
persistingFailures: string[];
|
|
214
|
+
/** Net change in failure count */
|
|
215
|
+
failureDelta: number;
|
|
216
|
+
}
|
|
217
|
+
export interface ComponentCoverage {
|
|
218
|
+
/** Absolute path to component file */
|
|
219
|
+
filePath: string;
|
|
220
|
+
/** Relative path from project root */
|
|
221
|
+
relativePath: string;
|
|
222
|
+
/** Exported component name */
|
|
223
|
+
componentName: string;
|
|
224
|
+
/** Component type detected */
|
|
225
|
+
componentType: ComponentType;
|
|
226
|
+
/** Path to corresponding story file (null if none) */
|
|
227
|
+
storyFile: string | null;
|
|
228
|
+
/** Whether any stories exist */
|
|
229
|
+
hasStories: boolean;
|
|
230
|
+
/** Number of stories covering this component */
|
|
231
|
+
storyCount: number;
|
|
232
|
+
/** Names of stories covering this component */
|
|
233
|
+
storyNames: string[];
|
|
234
|
+
/** Detailed prop coverage */
|
|
235
|
+
props: PropCoverage[];
|
|
236
|
+
/** Detected scenarios (loading, error, empty, etc.) */
|
|
237
|
+
scenarios: ScenarioCoverage[];
|
|
238
|
+
/** Aggregate metrics for this component */
|
|
239
|
+
coverage: {
|
|
240
|
+
propCoverage: number;
|
|
241
|
+
variantCoverage: number;
|
|
242
|
+
scenarioCoverage: number;
|
|
243
|
+
overallScore: number;
|
|
244
|
+
};
|
|
245
|
+
/** Execution health for this component's stories */
|
|
246
|
+
health: {
|
|
247
|
+
totalStories: number;
|
|
248
|
+
passing: number;
|
|
249
|
+
failing: number;
|
|
250
|
+
skipped: number;
|
|
251
|
+
status: 'healthy' | 'degraded' | 'broken' | 'unknown';
|
|
252
|
+
};
|
|
253
|
+
/** New code metadata */
|
|
254
|
+
changeStatus: ChangeStatus;
|
|
255
|
+
}
|
|
256
|
+
export type ComponentType = 'function' | 'class' | 'forwardRef' | 'memo' | 'hoc';
|
|
257
|
+
export interface ChangeStatus {
|
|
258
|
+
status: 'new' | 'modified' | 'unchanged';
|
|
259
|
+
linesAdded: number;
|
|
260
|
+
linesModified: number;
|
|
261
|
+
newProps: string[];
|
|
262
|
+
}
|
|
263
|
+
export interface PropCoverage {
|
|
264
|
+
/** Prop name */
|
|
265
|
+
name: string;
|
|
266
|
+
/** TypeScript type as string */
|
|
267
|
+
type: string;
|
|
268
|
+
/** Whether prop is required */
|
|
269
|
+
required: boolean;
|
|
270
|
+
/** Whether prop has a default value */
|
|
271
|
+
hasDefault: boolean;
|
|
272
|
+
/** Default value if detectable */
|
|
273
|
+
defaultValue: unknown | null;
|
|
274
|
+
/** JSDoc description if present */
|
|
275
|
+
description: string | null;
|
|
276
|
+
/** Whether this prop is exercised in any story */
|
|
277
|
+
isCovered: boolean;
|
|
278
|
+
/** Stories that explicitly set this prop */
|
|
279
|
+
coveredBy: string[];
|
|
280
|
+
/** For enumerable types (unions, booleans), variant details */
|
|
281
|
+
variants: VariantCoverage | null;
|
|
282
|
+
/** Whether this prop was added in new code */
|
|
283
|
+
isNew: boolean;
|
|
284
|
+
}
|
|
285
|
+
export interface VariantCoverage {
|
|
286
|
+
/** Type of enumerable: union literals, boolean, enum */
|
|
287
|
+
type: 'union' | 'boolean' | 'enum';
|
|
288
|
+
/** Total possible values */
|
|
289
|
+
totalVariants: number;
|
|
290
|
+
/** Number of variants with story coverage */
|
|
291
|
+
coveredVariants: number;
|
|
292
|
+
/** Coverage percentage for this prop's variants */
|
|
293
|
+
coverage: number;
|
|
294
|
+
/** Individual variant coverage */
|
|
295
|
+
values: VariantValue[];
|
|
296
|
+
}
|
|
297
|
+
export interface VariantValue {
|
|
298
|
+
/** The variant value (e.g., "primary", "true", "loading") */
|
|
299
|
+
value: string;
|
|
300
|
+
/** Whether this value is covered by a story */
|
|
301
|
+
isCovered: boolean;
|
|
302
|
+
/** Stories that use this specific value */
|
|
303
|
+
coveredBy: string[];
|
|
304
|
+
}
|
|
305
|
+
export interface ScenarioCoverage {
|
|
306
|
+
/** Scenario identifier */
|
|
307
|
+
id: string;
|
|
308
|
+
/** Human-readable scenario name */
|
|
309
|
+
name: string;
|
|
310
|
+
/** How scenario was detected */
|
|
311
|
+
detectedBy: 'prop_name' | 'conditional_render' | 'type_analysis' | 'convention';
|
|
312
|
+
/** The prop(s) that control this scenario */
|
|
313
|
+
controllingProps: string[];
|
|
314
|
+
/** Whether a story covers this scenario */
|
|
315
|
+
isCovered: boolean;
|
|
316
|
+
/** Story name that covers this (if any) */
|
|
317
|
+
coveredBy: string | null;
|
|
318
|
+
/** Priority for coverage */
|
|
319
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
320
|
+
}
|
|
321
|
+
export interface MissingScenario {
|
|
322
|
+
/** Component this scenario belongs to */
|
|
323
|
+
componentName: string;
|
|
324
|
+
/** Component file path */
|
|
325
|
+
componentPath: string;
|
|
326
|
+
/** Human-readable description of what's missing */
|
|
327
|
+
description: string;
|
|
328
|
+
/** Why this scenario should be covered */
|
|
329
|
+
reason: MissingScenarioReason;
|
|
330
|
+
/** Priority for adding coverage */
|
|
331
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
332
|
+
/** Prop values that would create this scenario */
|
|
333
|
+
suggestedArgs: Record<string, unknown>;
|
|
334
|
+
/** Suggested story export name */
|
|
335
|
+
suggestedStoryName: string;
|
|
336
|
+
/** Whether this affects new code */
|
|
337
|
+
affectsNewCode: boolean;
|
|
338
|
+
}
|
|
339
|
+
export type MissingScenarioReason = 'no_stories' | 'uncovered_variant' | 'uncovered_state' | 'uncovered_combination' | 'new_prop_uncovered' | 'required_prop_uncovered' | 'conditional_branch';
|
|
340
|
+
export interface UncoveredComponent {
|
|
341
|
+
/** Component name */
|
|
342
|
+
componentName: string;
|
|
343
|
+
/** File path */
|
|
344
|
+
filePath: string;
|
|
345
|
+
/** Relative path */
|
|
346
|
+
relativePath: string;
|
|
347
|
+
/** Component type */
|
|
348
|
+
componentType: ComponentType;
|
|
349
|
+
/** Number of props */
|
|
350
|
+
propCount: number;
|
|
351
|
+
/** Number of required props */
|
|
352
|
+
requiredPropCount: number;
|
|
353
|
+
/** Detected scenarios that need coverage */
|
|
354
|
+
detectedScenarios: string[];
|
|
355
|
+
/** Whether this is a new component */
|
|
356
|
+
isNew: boolean;
|
|
357
|
+
/** Expected story file location */
|
|
358
|
+
expectedStoryPath: string;
|
|
359
|
+
/** Estimated effort to add stories */
|
|
360
|
+
complexity: 'low' | 'medium' | 'high';
|
|
361
|
+
}
|
|
362
|
+
export interface QualityGateResult {
|
|
363
|
+
/** Whether all checks passed */
|
|
364
|
+
passed: boolean;
|
|
365
|
+
/** Individual check results */
|
|
366
|
+
checks: QualityCheck[];
|
|
367
|
+
}
|
|
368
|
+
export interface QualityCheck {
|
|
369
|
+
/** Check name */
|
|
370
|
+
name: string;
|
|
371
|
+
/** Threshold value */
|
|
372
|
+
threshold: number;
|
|
373
|
+
/** Actual value */
|
|
374
|
+
actual: number;
|
|
375
|
+
/** Whether this check passed */
|
|
376
|
+
passed: boolean;
|
|
377
|
+
/** Human-readable message */
|
|
378
|
+
message: string;
|
|
379
|
+
}
|
|
380
|
+
export interface DetectedComponent {
|
|
381
|
+
filePath: string;
|
|
382
|
+
relativePath: string;
|
|
383
|
+
componentName: string;
|
|
384
|
+
componentType: ComponentType;
|
|
385
|
+
exportType: 'default' | 'named';
|
|
386
|
+
props: DetectedProp[];
|
|
387
|
+
scenarios: DetectedScenario[];
|
|
388
|
+
}
|
|
389
|
+
export interface DetectedProp {
|
|
390
|
+
name: string;
|
|
391
|
+
type: string;
|
|
392
|
+
required: boolean;
|
|
393
|
+
hasDefault: boolean;
|
|
394
|
+
defaultValue: unknown | null;
|
|
395
|
+
description: string | null;
|
|
396
|
+
variants: PropVariant | null;
|
|
397
|
+
}
|
|
398
|
+
export interface PropVariant {
|
|
399
|
+
type: 'union' | 'boolean' | 'enum';
|
|
400
|
+
values: string[];
|
|
401
|
+
}
|
|
402
|
+
export interface DetectedScenario {
|
|
403
|
+
id: string;
|
|
404
|
+
name: string;
|
|
405
|
+
detectedBy: 'prop_name' | 'conditional_render' | 'type_analysis';
|
|
406
|
+
controllingProps: string[];
|
|
407
|
+
priority: 'critical' | 'high' | 'medium' | 'low';
|
|
408
|
+
}
|
|
409
|
+
export interface ParsedStoryFile {
|
|
410
|
+
filePath: string;
|
|
411
|
+
relativePath: string;
|
|
412
|
+
meta: {
|
|
413
|
+
title: string | null;
|
|
414
|
+
componentName: string | null;
|
|
415
|
+
componentPath: string | null;
|
|
416
|
+
};
|
|
417
|
+
stories: ParsedStory[];
|
|
418
|
+
}
|
|
419
|
+
export interface ParsedStory {
|
|
420
|
+
exportName: string;
|
|
421
|
+
storyName: string;
|
|
422
|
+
storyId: string;
|
|
423
|
+
args: Record<string, unknown>;
|
|
424
|
+
argTypes: Record<string, unknown>;
|
|
425
|
+
hasPlayFunction: boolean;
|
|
426
|
+
tags: string[];
|
|
427
|
+
}
|
|
428
|
+
export interface GitAnalysis {
|
|
429
|
+
enabled: boolean;
|
|
430
|
+
baseBranch: string;
|
|
431
|
+
baseCommitSha: string;
|
|
432
|
+
currentCommitSha: string;
|
|
433
|
+
currentBranch: string;
|
|
434
|
+
changedFiles: ChangedFile[];
|
|
435
|
+
}
|
|
436
|
+
export interface ChangedFile {
|
|
437
|
+
filePath: string;
|
|
438
|
+
status: 'new' | 'modified' | 'renamed' | 'deleted';
|
|
439
|
+
addedLines: number[];
|
|
440
|
+
deletedLines: number[];
|
|
441
|
+
previousPath?: string;
|
|
442
|
+
}
|
|
443
|
+
export interface CoverageResult {
|
|
444
|
+
component: DetectedComponent;
|
|
445
|
+
storyFile: ParsedStoryFile | null;
|
|
446
|
+
stories: ParsedStory[];
|
|
447
|
+
propCoverage: PropCoverageDetail[];
|
|
448
|
+
scenarioCoverage: ScenarioCoverageDetail[];
|
|
449
|
+
metrics: {
|
|
450
|
+
propCoverage: number;
|
|
451
|
+
variantCoverage: number;
|
|
452
|
+
scenarioCoverage: number;
|
|
453
|
+
overallScore: number;
|
|
454
|
+
};
|
|
455
|
+
changeStatus: ChangeStatus;
|
|
456
|
+
}
|
|
457
|
+
export interface PropCoverageDetail {
|
|
458
|
+
prop: DetectedProp;
|
|
459
|
+
isCovered: boolean;
|
|
460
|
+
coveredBy: string[];
|
|
461
|
+
variantCoverage: VariantCoverageDetail | null;
|
|
462
|
+
}
|
|
463
|
+
export interface VariantCoverageDetail {
|
|
464
|
+
totalVariants: number;
|
|
465
|
+
coveredVariants: number;
|
|
466
|
+
coverage: number;
|
|
467
|
+
values: {
|
|
468
|
+
value: string;
|
|
469
|
+
isCovered: boolean;
|
|
470
|
+
coveredBy: string[];
|
|
471
|
+
}[];
|
|
472
|
+
}
|
|
473
|
+
export interface ScenarioCoverageDetail {
|
|
474
|
+
scenario: DetectedScenario;
|
|
475
|
+
isCovered: boolean;
|
|
476
|
+
coveredBy: string | null;
|
|
477
|
+
}
|
|
478
|
+
export interface ExecutionConfig {
|
|
479
|
+
storybookUrl?: string;
|
|
480
|
+
staticDir?: string;
|
|
481
|
+
timeout?: number;
|
|
482
|
+
browsers?: ('chromium' | 'firefox' | 'webkit')[];
|
|
483
|
+
screenshotOnFailure?: boolean;
|
|
484
|
+
screenshotDir?: string;
|
|
485
|
+
}
|
|
486
|
+
export interface CliOptions {
|
|
487
|
+
config?: string;
|
|
488
|
+
output?: string;
|
|
489
|
+
include?: string;
|
|
490
|
+
exclude?: string;
|
|
491
|
+
stories?: string;
|
|
492
|
+
base?: string;
|
|
493
|
+
noGit?: boolean;
|
|
494
|
+
execute?: boolean;
|
|
495
|
+
storybookUrl?: string;
|
|
496
|
+
storybookStatic?: string;
|
|
497
|
+
ci?: boolean;
|
|
498
|
+
thresholdComponent?: number;
|
|
499
|
+
thresholdNewCode?: number;
|
|
500
|
+
verbose?: boolean;
|
|
501
|
+
}
|
|
502
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,OAAO,EAAE,OAAO,CAAC;IAEjB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB,mCAAmC;IACnC,GAAG,EAAE,UAAU,CAAC;IAEhB,2CAA2C;IAC3C,MAAM,EAAE,cAAc,CAAC;IAEvB,kCAAkC;IAClC,OAAO,EAAE,eAAe,CAAC;IAEzB,0CAA0C;IAC1C,OAAO,EAAE,eAAe,CAAC;IAEzB,oDAAoD;IACpD,SAAS,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEnC,qCAAqC;IACrC,UAAU,EAAE,iBAAiB,EAAE,CAAC;IAEhC,2CAA2C;IAC3C,gBAAgB,EAAE,eAAe,EAAE,CAAC;IAEpC,wCAAwC;IACxC,mBAAmB,EAAE,kBAAkB,EAAE,CAAC;IAE1C,2BAA2B;IAC3B,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAMD,M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AC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@scrymore/scry-sbcov",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Storybook story coverage analyzer for React component libraries",
|
|
5
|
+
"bin": {
|
|
6
|
+
"scry-sbcov": "./bin/scry-sbcov.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18.0.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"dev": "tsc --watch",
|
|
17
|
+
"test": "vitest",
|
|
18
|
+
"test:coverage": "vitest --coverage",
|
|
19
|
+
"test:run": "vitest run",
|
|
20
|
+
"lint": "eslint src/",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"prepublishOnly": "npm run build",
|
|
23
|
+
"changeset": "changeset",
|
|
24
|
+
"version": "changeset version",
|
|
25
|
+
"release": "changeset publish"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"storybook",
|
|
29
|
+
"coverage",
|
|
30
|
+
"react",
|
|
31
|
+
"testing",
|
|
32
|
+
"ci",
|
|
33
|
+
"quality-gate",
|
|
34
|
+
"scry",
|
|
35
|
+
"scrymore"
|
|
36
|
+
],
|
|
37
|
+
"author": "Scrymore",
|
|
38
|
+
"license": "MIT",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/epinnock/scry-sbcov.git"
|
|
42
|
+
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"registry": "https://registry.npmjs.org/"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@storybook/csf-tools": "^8.0.0",
|
|
49
|
+
"chalk": "^5.3.0",
|
|
50
|
+
"commander": "^12.0.0",
|
|
51
|
+
"glob": "^10.3.0",
|
|
52
|
+
"parse-diff": "^0.11.1",
|
|
53
|
+
"simple-git": "^3.22.0",
|
|
54
|
+
"ts-morph": "^22.0.0"
|
|
55
|
+
},
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@changesets/changelog-github": "^0.5.2",
|
|
58
|
+
"@changesets/cli": "^2.29.8",
|
|
59
|
+
"@types/node": "^20.0.0",
|
|
60
|
+
"@types/react": "^19.2.7",
|
|
61
|
+
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
62
|
+
"@typescript-eslint/parser": "^6.0.0",
|
|
63
|
+
"@vitest/coverage-v8": "^1.2.0",
|
|
64
|
+
"eslint": "^8.56.0",
|
|
65
|
+
"react": "^19.2.3",
|
|
66
|
+
"typescript": "^5.3.0",
|
|
67
|
+
"vitest": "^1.2.0"
|
|
68
|
+
},
|
|
69
|
+
"optionalDependencies": {
|
|
70
|
+
"playwright": "^1.41.0"
|
|
71
|
+
},
|
|
72
|
+
"peerDependencies": {
|
|
73
|
+
"typescript": ">=4.7.0"
|
|
74
|
+
},
|
|
75
|
+
"files": [
|
|
76
|
+
"dist",
|
|
77
|
+
"bin"
|
|
78
|
+
]
|
|
79
|
+
}
|