@vizzly-testing/cli 0.15.1 → 0.16.1
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/dist/client/index.js +21 -4
- package/dist/reporter/reporter-bundle.css +1 -1
- package/dist/reporter/reporter-bundle.iife.js +11 -11
- package/dist/sdk/index.js +6 -6
- package/dist/services/api-service.js +42 -0
- package/dist/services/tdd-service.js +189 -6
- package/dist/services/test-runner.js +0 -8
- package/dist/services/uploader.js +1 -1
- package/dist/types/client.d.ts +88 -0
- package/dist/types/config.d.ts +29 -0
- package/dist/types/index.d.ts +426 -9
- package/dist/types/sdk.d.ts +146 -0
- package/dist/utils/config-helpers.js +2 -2
- package/docs/tdd-mode.md +34 -0
- package/package.json +21 -4
- package/dist/types/cli.d.ts +0 -2
- package/dist/types/client/index.d.ts +0 -80
- package/dist/types/commands/doctor.d.ts +0 -11
- package/dist/types/commands/finalize.d.ts +0 -13
- package/dist/types/commands/init.d.ts +0 -32
- package/dist/types/commands/login.d.ts +0 -11
- package/dist/types/commands/logout.d.ts +0 -11
- package/dist/types/commands/project.d.ts +0 -28
- package/dist/types/commands/run.d.ts +0 -16
- package/dist/types/commands/status.d.ts +0 -13
- package/dist/types/commands/tdd-daemon.d.ts +0 -24
- package/dist/types/commands/tdd.d.ts +0 -17
- package/dist/types/commands/upload.d.ts +0 -13
- package/dist/types/commands/whoami.d.ts +0 -11
- package/dist/types/errors/vizzly-error.d.ts +0 -75
- package/dist/types/plugin-loader.d.ts +0 -7
- package/dist/types/reporter/src/api/client.d.ts +0 -178
- package/dist/types/reporter/src/components/app-router.d.ts +0 -1
- package/dist/types/reporter/src/components/code-block.d.ts +0 -4
- package/dist/types/reporter/src/components/comparison/comparison-actions.d.ts +0 -5
- package/dist/types/reporter/src/components/comparison/comparison-card.d.ts +0 -7
- package/dist/types/reporter/src/components/comparison/comparison-group.d.ts +0 -10
- package/dist/types/reporter/src/components/comparison/comparison-list.d.ts +0 -6
- package/dist/types/reporter/src/components/comparison/comparison-modes/onion-skin-mode.d.ts +0 -10
- package/dist/types/reporter/src/components/comparison/comparison-modes/overlay-mode.d.ts +0 -11
- package/dist/types/reporter/src/components/comparison/comparison-modes/shared/base-comparison-mode.d.ts +0 -14
- package/dist/types/reporter/src/components/comparison/comparison-modes/shared/image-renderer.d.ts +0 -30
- package/dist/types/reporter/src/components/comparison/comparison-modes/toggle-view.d.ts +0 -8
- package/dist/types/reporter/src/components/comparison/comparison-viewer.d.ts +0 -8
- package/dist/types/reporter/src/components/comparison/fullscreen-viewer.d.ts +0 -13
- package/dist/types/reporter/src/components/comparison/screenshot-display.d.ts +0 -16
- package/dist/types/reporter/src/components/comparison/screenshot-list.d.ts +0 -9
- package/dist/types/reporter/src/components/comparison/variant-selector.d.ts +0 -9
- package/dist/types/reporter/src/components/comparison/view-mode-selector.d.ts +0 -4
- package/dist/types/reporter/src/components/dashboard/dashboard-filters.d.ts +0 -16
- package/dist/types/reporter/src/components/design-system/alert.d.ts +0 -9
- package/dist/types/reporter/src/components/design-system/badge.d.ts +0 -17
- package/dist/types/reporter/src/components/design-system/button.d.ts +0 -19
- package/dist/types/reporter/src/components/design-system/card.d.ts +0 -31
- package/dist/types/reporter/src/components/design-system/empty-state.d.ts +0 -13
- package/dist/types/reporter/src/components/design-system/form-controls.d.ts +0 -44
- package/dist/types/reporter/src/components/design-system/health-ring.d.ts +0 -7
- package/dist/types/reporter/src/components/design-system/index.d.ts +0 -11
- package/dist/types/reporter/src/components/design-system/modal.d.ts +0 -10
- package/dist/types/reporter/src/components/design-system/skeleton.d.ts +0 -19
- package/dist/types/reporter/src/components/design-system/spinner.d.ts +0 -10
- package/dist/types/reporter/src/components/design-system/tabs.d.ts +0 -13
- package/dist/types/reporter/src/components/layout/header.d.ts +0 -5
- package/dist/types/reporter/src/components/layout/index.d.ts +0 -2
- package/dist/types/reporter/src/components/layout/layout.d.ts +0 -6
- package/dist/types/reporter/src/components/ui/smart-image.d.ts +0 -7
- package/dist/types/reporter/src/components/ui/toast.d.ts +0 -4
- package/dist/types/reporter/src/components/views/builds-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/comparison-detail-view.d.ts +0 -5
- package/dist/types/reporter/src/components/views/comparisons-view.d.ts +0 -5
- package/dist/types/reporter/src/components/views/projects-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/settings-view.d.ts +0 -1
- package/dist/types/reporter/src/components/views/stats-view.d.ts +0 -1
- package/dist/types/reporter/src/components/waiting-for-screenshots.d.ts +0 -1
- package/dist/types/reporter/src/hooks/queries/use-auth-queries.d.ts +0 -15
- package/dist/types/reporter/src/hooks/queries/use-cloud-queries.d.ts +0 -6
- package/dist/types/reporter/src/hooks/queries/use-config-queries.d.ts +0 -6
- package/dist/types/reporter/src/hooks/queries/use-tdd-queries.d.ts +0 -9
- package/dist/types/reporter/src/hooks/use-comparison-filters.d.ts +0 -20
- package/dist/types/reporter/src/hooks/use-image-loader.d.ts +0 -1
- package/dist/types/reporter/src/lib/query-client.d.ts +0 -2
- package/dist/types/reporter/src/lib/query-keys.d.ts +0 -13
- package/dist/types/reporter/src/main.d.ts +0 -1
- package/dist/types/reporter/src/services/api-client.d.ts +0 -11
- package/dist/types/reporter/src/utils/comparison-helpers.d.ts +0 -16
- package/dist/types/reporter/src/utils/constants.d.ts +0 -37
- package/dist/types/reporter/vite.config.d.ts +0 -2
- package/dist/types/reporter/vite.dev.config.d.ts +0 -2
- package/dist/types/sdk/index.d.ts +0 -110
- package/dist/types/server/handlers/api-handler.d.ts +0 -88
- package/dist/types/server/handlers/tdd-handler.d.ts +0 -162
- package/dist/types/server/http-server.d.ts +0 -6
- package/dist/types/server/middleware/cors.d.ts +0 -11
- package/dist/types/server/middleware/json-parser.d.ts +0 -10
- package/dist/types/server/middleware/response.d.ts +0 -50
- package/dist/types/server/routers/assets.d.ts +0 -6
- package/dist/types/server/routers/auth.d.ts +0 -9
- package/dist/types/server/routers/baseline.d.ts +0 -13
- package/dist/types/server/routers/cloud-proxy.d.ts +0 -11
- package/dist/types/server/routers/config.d.ts +0 -9
- package/dist/types/server/routers/dashboard.d.ts +0 -6
- package/dist/types/server/routers/health.d.ts +0 -11
- package/dist/types/server/routers/projects.d.ts +0 -9
- package/dist/types/server/routers/screenshot.d.ts +0 -11
- package/dist/types/services/api-service.d.ts +0 -100
- package/dist/types/services/auth-service.d.ts +0 -59
- package/dist/types/services/build-manager.d.ts +0 -69
- package/dist/types/services/config-service.d.ts +0 -97
- package/dist/types/services/html-report-generator.d.ts +0 -52
- package/dist/types/services/index.d.ts +0 -7
- package/dist/types/services/project-service.d.ts +0 -105
- package/dist/types/services/report-generator/viewer.d.ts +0 -0
- package/dist/types/services/screenshot-server.d.ts +0 -10
- package/dist/types/services/server-manager.d.ts +0 -269
- package/dist/types/services/static-report-generator.d.ts +0 -25
- package/dist/types/services/tdd-service.d.ts +0 -95
- package/dist/types/services/test-runner.d.ts +0 -31
- package/dist/types/services/uploader.d.ts +0 -36
- package/dist/types/utils/browser.d.ts +0 -6
- package/dist/types/utils/build-history.d.ts +0 -16
- package/dist/types/utils/ci-env.d.ts +0 -55
- package/dist/types/utils/colors.d.ts +0 -12
- package/dist/types/utils/config-helpers.d.ts +0 -6
- package/dist/types/utils/config-loader.d.ts +0 -25
- package/dist/types/utils/config-schema.d.ts +0 -51
- package/dist/types/utils/environment-config.d.ts +0 -59
- package/dist/types/utils/environment.d.ts +0 -36
- package/dist/types/utils/fetch-utils.d.ts +0 -1
- package/dist/types/utils/file-helpers.d.ts +0 -18
- package/dist/types/utils/git.d.ts +0 -56
- package/dist/types/utils/global-config.d.ts +0 -84
- package/dist/types/utils/image-input-detector.d.ts +0 -71
- package/dist/types/utils/output.d.ts +0 -84
- package/dist/types/utils/package-info.d.ts +0 -15
- package/dist/types/utils/security.d.ts +0 -30
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module image-input-detector
|
|
3
|
-
* @description Utilities for detecting whether a string is a base64 image or a file path
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Check if a string is valid base64 encoded data
|
|
7
|
-
*
|
|
8
|
-
* Base64 strings consist only of:
|
|
9
|
-
* - A-Z, a-z, 0-9, +, /
|
|
10
|
-
* - Optional padding with = at the end
|
|
11
|
-
* - Must be in groups of 4 characters (with optional 2-3 char group at end with padding)
|
|
12
|
-
*
|
|
13
|
-
* @param {string} str - String to check
|
|
14
|
-
* @returns {boolean} True if the string appears to be valid base64
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* isBase64('ZmFrZS1wbmctZGF0YQ==') // true
|
|
18
|
-
* isBase64('./screenshot.png') // false
|
|
19
|
-
* isBase64('/absolute/path.png') // false
|
|
20
|
-
*/
|
|
21
|
-
export function isBase64(str: string): boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a string looks like a file path
|
|
24
|
-
*
|
|
25
|
-
* Detects common file path patterns across platforms:
|
|
26
|
-
* - Relative paths: ./file.png, ../file.png, subdirectory/file.png
|
|
27
|
-
* - Absolute Unix paths: /absolute/path/file.png
|
|
28
|
-
* - Absolute Windows paths: C:\path\file.png, C:/path/file.png
|
|
29
|
-
* - File URIs: file:///path/to/file.png
|
|
30
|
-
* - Paths with common image extensions
|
|
31
|
-
*
|
|
32
|
-
* Note: This is heuristic-based and doesn't check file existence
|
|
33
|
-
*
|
|
34
|
-
* @param {string} str - String to check
|
|
35
|
-
* @returns {boolean} True if the string looks like a file path
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* looksLikeFilePath('./screenshot.png') // true
|
|
39
|
-
* looksLikeFilePath('/abs/path/file.png') // true
|
|
40
|
-
* looksLikeFilePath('C:\\Windows\\file.png') // true
|
|
41
|
-
* looksLikeFilePath('ZmFrZS1wbmctZGF0YQ==') // false
|
|
42
|
-
*/
|
|
43
|
-
export function looksLikeFilePath(str: string): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Detect the type of image input
|
|
46
|
-
*
|
|
47
|
-
* Determines whether a string input is:
|
|
48
|
-
* - 'base64': Base64 encoded image data
|
|
49
|
-
* - 'file-path': A file path (relative or absolute)
|
|
50
|
-
* - 'unknown': Cannot determine (ambiguous or invalid)
|
|
51
|
-
*
|
|
52
|
-
* Strategy:
|
|
53
|
-
* 1. First check if it's valid base64 (can contain / which might look like paths)
|
|
54
|
-
* 2. Then check if it looks like a file path (more specific patterns)
|
|
55
|
-
* 3. Otherwise return 'unknown'
|
|
56
|
-
*
|
|
57
|
-
* This order prevents base64 strings (which can contain /) from being
|
|
58
|
-
* misidentified as file paths. Base64 validation is stricter and should
|
|
59
|
-
* be checked first.
|
|
60
|
-
*
|
|
61
|
-
* @param {string} str - String to detect
|
|
62
|
-
* @returns {'base64' | 'file-path' | 'unknown'} Detected input type
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* detectImageInputType('./screenshot.png') // 'file-path'
|
|
66
|
-
* detectImageInputType('ZmFrZS1wbmctZGF0YQ==') // 'base64'
|
|
67
|
-
* detectImageInputType('data:image/png;base64,iVBOR...') // 'base64'
|
|
68
|
-
* detectImageInputType('C:\\path\\image.png') // 'file-path'
|
|
69
|
-
* detectImageInputType('invalid!!!') // 'unknown'
|
|
70
|
-
*/
|
|
71
|
-
export function detectImageInputType(str: string): "base64" | "file-path" | "unknown";
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Configure output settings
|
|
3
|
-
* Call this once at CLI startup with global options
|
|
4
|
-
*/
|
|
5
|
-
export function configure(options?: {}): void;
|
|
6
|
-
/**
|
|
7
|
-
* Show command header (e.g., "vizzly · tdd · local")
|
|
8
|
-
* Only shows once per command execution
|
|
9
|
-
*/
|
|
10
|
-
export function header(command: any, mode?: any): void;
|
|
11
|
-
/**
|
|
12
|
-
* Get current colors instance (for custom formatting)
|
|
13
|
-
*/
|
|
14
|
-
export function getColors(): {
|
|
15
|
-
success: any;
|
|
16
|
-
error: any;
|
|
17
|
-
warning: any;
|
|
18
|
-
info: any;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Show a success message
|
|
22
|
-
*/
|
|
23
|
-
export function success(message: any, data?: {}): void;
|
|
24
|
-
/**
|
|
25
|
-
* Show final result summary (e.g., "✓ 5 screenshots · 234ms")
|
|
26
|
-
*/
|
|
27
|
-
export function result(message: any): void;
|
|
28
|
-
/**
|
|
29
|
-
* Show an info message
|
|
30
|
-
*/
|
|
31
|
-
export function info(message: any, data?: {}): void;
|
|
32
|
-
/**
|
|
33
|
-
* Show a warning message (goes to stderr)
|
|
34
|
-
*/
|
|
35
|
-
export function warn(message: any, data?: {}): void;
|
|
36
|
-
/**
|
|
37
|
-
* Show an error message (goes to stderr)
|
|
38
|
-
* Does NOT exit - caller decides whether to exit
|
|
39
|
-
*/
|
|
40
|
-
export function error(message: any, err?: any, data?: {}): void;
|
|
41
|
-
/**
|
|
42
|
-
* Print a blank line for spacing
|
|
43
|
-
*/
|
|
44
|
-
export function blank(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Print raw text without any formatting
|
|
47
|
-
*/
|
|
48
|
-
export function print(text: any): void;
|
|
49
|
-
/**
|
|
50
|
-
* Print raw text to stderr
|
|
51
|
-
*/
|
|
52
|
-
export function printErr(text: any): void;
|
|
53
|
-
/**
|
|
54
|
-
* Output structured data
|
|
55
|
-
*/
|
|
56
|
-
export function data(obj: any): void;
|
|
57
|
-
/**
|
|
58
|
-
* Start a spinner with message
|
|
59
|
-
*/
|
|
60
|
-
export function startSpinner(message: any): void;
|
|
61
|
-
/**
|
|
62
|
-
* Update spinner message
|
|
63
|
-
*/
|
|
64
|
-
export function updateSpinner(message: any, current?: number, total?: number): void;
|
|
65
|
-
/**
|
|
66
|
-
* Stop the spinner
|
|
67
|
-
*/
|
|
68
|
-
export function stopSpinner(): void;
|
|
69
|
-
/**
|
|
70
|
-
* Show progress update
|
|
71
|
-
*/
|
|
72
|
-
export function progress(message: any, current?: number, total?: number): void;
|
|
73
|
-
/**
|
|
74
|
-
* Log debug message with component prefix (only shown in verbose mode)
|
|
75
|
-
*
|
|
76
|
-
* @param {string} component - Component name (e.g., 'server', 'config', 'build')
|
|
77
|
-
* @param {string} message - Debug message
|
|
78
|
-
* @param {Object} data - Optional data object to display inline
|
|
79
|
-
*/
|
|
80
|
-
export function debug(component: string, message: string, data?: any): void;
|
|
81
|
-
/**
|
|
82
|
-
* Clean up (stop spinner, flush logs)
|
|
83
|
-
*/
|
|
84
|
-
export function cleanup(): void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Get package.json information
|
|
3
|
-
* @returns {Object} Package.json data
|
|
4
|
-
*/
|
|
5
|
-
export function getPackageInfo(): any;
|
|
6
|
-
/**
|
|
7
|
-
* Get package version
|
|
8
|
-
* @returns {string} Package version
|
|
9
|
-
*/
|
|
10
|
-
export function getPackageVersion(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Get package name
|
|
13
|
-
* @returns {string} Package name
|
|
14
|
-
*/
|
|
15
|
-
export function getPackageName(): string;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sanitizes a screenshot name to prevent path traversal and ensure safe file naming
|
|
3
|
-
* @param {string} name - Original screenshot name
|
|
4
|
-
* @param {number} maxLength - Maximum allowed length (default: 255)
|
|
5
|
-
* @param {boolean} allowSlashes - Whether to allow forward slashes (for browser version strings)
|
|
6
|
-
* @returns {string} Sanitized screenshot name
|
|
7
|
-
*/
|
|
8
|
-
export function sanitizeScreenshotName(name: string, maxLength?: number, allowSlashes?: boolean): string;
|
|
9
|
-
/**
|
|
10
|
-
* Validates that a path stays within the allowed working directory bounds
|
|
11
|
-
* @param {string} targetPath - Path to validate
|
|
12
|
-
* @param {string} workingDir - Working directory that serves as the security boundary
|
|
13
|
-
* @returns {string} Resolved and normalized path if valid
|
|
14
|
-
* @throws {Error} If path is invalid or outside bounds
|
|
15
|
-
*/
|
|
16
|
-
export function validatePathSecurity(targetPath: string, workingDir: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Safely constructs a path within the working directory
|
|
19
|
-
* @param {string} workingDir - Base working directory
|
|
20
|
-
* @param {...string} pathSegments - Path segments to join
|
|
21
|
-
* @returns {string} Safely constructed path
|
|
22
|
-
* @throws {Error} If resulting path would be outside working directory
|
|
23
|
-
*/
|
|
24
|
-
export function safePath(workingDir: string, ...pathSegments: string[]): string;
|
|
25
|
-
/**
|
|
26
|
-
* Validates screenshot properties object for safe values
|
|
27
|
-
* @param {Object} properties - Properties to validate
|
|
28
|
-
* @returns {Object} Validated properties object
|
|
29
|
-
*/
|
|
30
|
-
export function validateScreenshotProperties(properties?: any): any;
|