@vizzly-testing/cli 0.3.2 → 0.5.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 +50 -28
- package/dist/cli.js +34 -30
- package/dist/client/index.js +1 -1
- package/dist/commands/run.js +38 -11
- package/dist/commands/tdd.js +30 -18
- package/dist/commands/upload.js +56 -5
- package/dist/server/handlers/api-handler.js +83 -0
- package/dist/server/handlers/tdd-handler.js +138 -0
- package/dist/server/http-server.js +132 -0
- package/dist/services/api-service.js +22 -2
- package/dist/services/server-manager.js +45 -29
- package/dist/services/test-runner.js +66 -69
- package/dist/services/uploader.js +11 -4
- package/dist/types/commands/run.d.ts +4 -1
- package/dist/types/commands/tdd.d.ts +5 -1
- package/dist/types/sdk/index.d.ts +6 -6
- package/dist/types/server/handlers/api-handler.d.ts +49 -0
- package/dist/types/server/handlers/tdd-handler.d.ts +85 -0
- package/dist/types/server/http-server.d.ts +5 -0
- package/dist/types/services/api-service.d.ts +1 -0
- package/dist/types/services/server-manager.d.ts +148 -3
- package/dist/types/services/test-runner.d.ts +1 -0
- package/dist/types/services/uploader.d.ts +2 -1
- package/dist/types/utils/ci-env.d.ts +55 -0
- package/dist/types/utils/config-helpers.d.ts +1 -1
- package/dist/types/utils/console-ui.d.ts +1 -1
- package/dist/types/utils/git.d.ts +12 -0
- package/dist/utils/ci-env.js +293 -0
- package/dist/utils/console-ui.js +4 -14
- package/dist/utils/git.js +38 -0
- package/docs/api-reference.md +17 -5
- package/docs/getting-started.md +1 -1
- package/docs/tdd-mode.md +9 -9
- package/docs/test-integration.md +9 -17
- package/docs/upload-command.md +7 -0
- package/package.json +4 -5
- package/dist/screenshot-wrapper.js +0 -68
- package/dist/server/index.js +0 -522
- package/dist/services/service-utils.js +0 -171
- package/dist/types/index.js +0 -153
- package/dist/types/screenshot-wrapper.d.ts +0 -27
- package/dist/types/server/index.d.ts +0 -38
- package/dist/types/services/service-utils.d.ts +0 -45
- package/dist/types/types/index.d.ts +0 -373
- package/dist/types/utils/diagnostics.d.ts +0 -69
- package/dist/types/utils/error-messages.d.ts +0 -42
- package/dist/types/utils/framework-detector.d.ts +0 -5
- package/dist/types/utils/help.d.ts +0 -11
- package/dist/types/utils/image-comparison.d.ts +0 -42
- package/dist/types/utils/package.d.ts +0 -1
- package/dist/types/utils/project-detection.d.ts +0 -19
- package/dist/types/utils/ui-helpers.d.ts +0 -23
- package/dist/utils/diagnostics.js +0 -184
- package/dist/utils/error-messages.js +0 -34
- package/dist/utils/framework-detector.js +0 -40
- package/dist/utils/help.js +0 -66
- package/dist/utils/image-comparison.js +0 -172
- package/dist/utils/package.js +0 -9
- package/dist/utils/project-detection.js +0 -145
- package/dist/utils/ui-helpers.js +0 -86
package/dist/utils/ui-helpers.js
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Color and styling utilities for Ink components
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Check if colors should be used
|
|
7
|
-
*/
|
|
8
|
-
export function shouldUseColors(flags = {}) {
|
|
9
|
-
return !flags.noColor && !process.env.NO_COLOR && process.stdout.isTTY && process.env.TERM !== 'dumb';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Get color for text based on type and color support
|
|
14
|
-
*/
|
|
15
|
-
export function getColor(type, flags = {}) {
|
|
16
|
-
if (!shouldUseColors(flags)) {
|
|
17
|
-
return undefined; // No color
|
|
18
|
-
}
|
|
19
|
-
const colors = {
|
|
20
|
-
success: 'green',
|
|
21
|
-
error: 'red',
|
|
22
|
-
warning: 'yellow',
|
|
23
|
-
info: 'blue',
|
|
24
|
-
progress: 'cyan',
|
|
25
|
-
dim: 'gray'
|
|
26
|
-
};
|
|
27
|
-
return colors[type];
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get status icon with fallback for no-color mode
|
|
32
|
-
*/
|
|
33
|
-
export function getStatusIcon(status, flags = {}) {
|
|
34
|
-
if (shouldUseColors(flags)) {
|
|
35
|
-
// Colored emoji icons
|
|
36
|
-
const icons = {
|
|
37
|
-
success: '✅',
|
|
38
|
-
error: '❌',
|
|
39
|
-
warning: '⚠️',
|
|
40
|
-
progress: '🔄',
|
|
41
|
-
uploading: '📤',
|
|
42
|
-
waiting: '⏳',
|
|
43
|
-
running: '🧪',
|
|
44
|
-
starting: '🚀'
|
|
45
|
-
};
|
|
46
|
-
return icons[status] || '•';
|
|
47
|
-
} else {
|
|
48
|
-
// Text-only fallback
|
|
49
|
-
const icons = {
|
|
50
|
-
success: '[OK]',
|
|
51
|
-
error: '[ERR]',
|
|
52
|
-
warning: '[WARN]',
|
|
53
|
-
progress: '[...]',
|
|
54
|
-
uploading: '[UP]',
|
|
55
|
-
waiting: '[WAIT]',
|
|
56
|
-
running: '[RUN]',
|
|
57
|
-
starting: '[START]'
|
|
58
|
-
};
|
|
59
|
-
return icons[status] || '[•]';
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Responsive layout helper
|
|
65
|
-
*/
|
|
66
|
-
export function getLayout(columns = process.stdout.columns || 80) {
|
|
67
|
-
if (columns < 60) {
|
|
68
|
-
return {
|
|
69
|
-
type: 'compact',
|
|
70
|
-
showDetails: false,
|
|
71
|
-
maxWidth: columns - 4
|
|
72
|
-
};
|
|
73
|
-
} else if (columns < 100) {
|
|
74
|
-
return {
|
|
75
|
-
type: 'normal',
|
|
76
|
-
showDetails: true,
|
|
77
|
-
maxWidth: columns - 8
|
|
78
|
-
};
|
|
79
|
-
} else {
|
|
80
|
-
return {
|
|
81
|
-
type: 'wide',
|
|
82
|
-
showDetails: true,
|
|
83
|
-
maxWidth: Math.min(columns - 16, 120)
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
}
|