@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.
Files changed (135) hide show
  1. package/dist/client/index.js +21 -4
  2. package/dist/reporter/reporter-bundle.css +1 -1
  3. package/dist/reporter/reporter-bundle.iife.js +11 -11
  4. package/dist/sdk/index.js +6 -6
  5. package/dist/services/api-service.js +42 -0
  6. package/dist/services/tdd-service.js +189 -6
  7. package/dist/services/test-runner.js +0 -8
  8. package/dist/services/uploader.js +1 -1
  9. package/dist/types/client.d.ts +88 -0
  10. package/dist/types/config.d.ts +29 -0
  11. package/dist/types/index.d.ts +426 -9
  12. package/dist/types/sdk.d.ts +146 -0
  13. package/dist/utils/config-helpers.js +2 -2
  14. package/docs/tdd-mode.md +34 -0
  15. package/package.json +21 -4
  16. package/dist/types/cli.d.ts +0 -2
  17. package/dist/types/client/index.d.ts +0 -80
  18. package/dist/types/commands/doctor.d.ts +0 -11
  19. package/dist/types/commands/finalize.d.ts +0 -13
  20. package/dist/types/commands/init.d.ts +0 -32
  21. package/dist/types/commands/login.d.ts +0 -11
  22. package/dist/types/commands/logout.d.ts +0 -11
  23. package/dist/types/commands/project.d.ts +0 -28
  24. package/dist/types/commands/run.d.ts +0 -16
  25. package/dist/types/commands/status.d.ts +0 -13
  26. package/dist/types/commands/tdd-daemon.d.ts +0 -24
  27. package/dist/types/commands/tdd.d.ts +0 -17
  28. package/dist/types/commands/upload.d.ts +0 -13
  29. package/dist/types/commands/whoami.d.ts +0 -11
  30. package/dist/types/errors/vizzly-error.d.ts +0 -75
  31. package/dist/types/plugin-loader.d.ts +0 -7
  32. package/dist/types/reporter/src/api/client.d.ts +0 -178
  33. package/dist/types/reporter/src/components/app-router.d.ts +0 -1
  34. package/dist/types/reporter/src/components/code-block.d.ts +0 -4
  35. package/dist/types/reporter/src/components/comparison/comparison-actions.d.ts +0 -5
  36. package/dist/types/reporter/src/components/comparison/comparison-card.d.ts +0 -7
  37. package/dist/types/reporter/src/components/comparison/comparison-group.d.ts +0 -10
  38. package/dist/types/reporter/src/components/comparison/comparison-list.d.ts +0 -6
  39. package/dist/types/reporter/src/components/comparison/comparison-modes/onion-skin-mode.d.ts +0 -10
  40. package/dist/types/reporter/src/components/comparison/comparison-modes/overlay-mode.d.ts +0 -11
  41. package/dist/types/reporter/src/components/comparison/comparison-modes/shared/base-comparison-mode.d.ts +0 -14
  42. package/dist/types/reporter/src/components/comparison/comparison-modes/shared/image-renderer.d.ts +0 -30
  43. package/dist/types/reporter/src/components/comparison/comparison-modes/toggle-view.d.ts +0 -8
  44. package/dist/types/reporter/src/components/comparison/comparison-viewer.d.ts +0 -8
  45. package/dist/types/reporter/src/components/comparison/fullscreen-viewer.d.ts +0 -13
  46. package/dist/types/reporter/src/components/comparison/screenshot-display.d.ts +0 -16
  47. package/dist/types/reporter/src/components/comparison/screenshot-list.d.ts +0 -9
  48. package/dist/types/reporter/src/components/comparison/variant-selector.d.ts +0 -9
  49. package/dist/types/reporter/src/components/comparison/view-mode-selector.d.ts +0 -4
  50. package/dist/types/reporter/src/components/dashboard/dashboard-filters.d.ts +0 -16
  51. package/dist/types/reporter/src/components/design-system/alert.d.ts +0 -9
  52. package/dist/types/reporter/src/components/design-system/badge.d.ts +0 -17
  53. package/dist/types/reporter/src/components/design-system/button.d.ts +0 -19
  54. package/dist/types/reporter/src/components/design-system/card.d.ts +0 -31
  55. package/dist/types/reporter/src/components/design-system/empty-state.d.ts +0 -13
  56. package/dist/types/reporter/src/components/design-system/form-controls.d.ts +0 -44
  57. package/dist/types/reporter/src/components/design-system/health-ring.d.ts +0 -7
  58. package/dist/types/reporter/src/components/design-system/index.d.ts +0 -11
  59. package/dist/types/reporter/src/components/design-system/modal.d.ts +0 -10
  60. package/dist/types/reporter/src/components/design-system/skeleton.d.ts +0 -19
  61. package/dist/types/reporter/src/components/design-system/spinner.d.ts +0 -10
  62. package/dist/types/reporter/src/components/design-system/tabs.d.ts +0 -13
  63. package/dist/types/reporter/src/components/layout/header.d.ts +0 -5
  64. package/dist/types/reporter/src/components/layout/index.d.ts +0 -2
  65. package/dist/types/reporter/src/components/layout/layout.d.ts +0 -6
  66. package/dist/types/reporter/src/components/ui/smart-image.d.ts +0 -7
  67. package/dist/types/reporter/src/components/ui/toast.d.ts +0 -4
  68. package/dist/types/reporter/src/components/views/builds-view.d.ts +0 -1
  69. package/dist/types/reporter/src/components/views/comparison-detail-view.d.ts +0 -5
  70. package/dist/types/reporter/src/components/views/comparisons-view.d.ts +0 -5
  71. package/dist/types/reporter/src/components/views/projects-view.d.ts +0 -1
  72. package/dist/types/reporter/src/components/views/settings-view.d.ts +0 -1
  73. package/dist/types/reporter/src/components/views/stats-view.d.ts +0 -1
  74. package/dist/types/reporter/src/components/waiting-for-screenshots.d.ts +0 -1
  75. package/dist/types/reporter/src/hooks/queries/use-auth-queries.d.ts +0 -15
  76. package/dist/types/reporter/src/hooks/queries/use-cloud-queries.d.ts +0 -6
  77. package/dist/types/reporter/src/hooks/queries/use-config-queries.d.ts +0 -6
  78. package/dist/types/reporter/src/hooks/queries/use-tdd-queries.d.ts +0 -9
  79. package/dist/types/reporter/src/hooks/use-comparison-filters.d.ts +0 -20
  80. package/dist/types/reporter/src/hooks/use-image-loader.d.ts +0 -1
  81. package/dist/types/reporter/src/lib/query-client.d.ts +0 -2
  82. package/dist/types/reporter/src/lib/query-keys.d.ts +0 -13
  83. package/dist/types/reporter/src/main.d.ts +0 -1
  84. package/dist/types/reporter/src/services/api-client.d.ts +0 -11
  85. package/dist/types/reporter/src/utils/comparison-helpers.d.ts +0 -16
  86. package/dist/types/reporter/src/utils/constants.d.ts +0 -37
  87. package/dist/types/reporter/vite.config.d.ts +0 -2
  88. package/dist/types/reporter/vite.dev.config.d.ts +0 -2
  89. package/dist/types/sdk/index.d.ts +0 -110
  90. package/dist/types/server/handlers/api-handler.d.ts +0 -88
  91. package/dist/types/server/handlers/tdd-handler.d.ts +0 -162
  92. package/dist/types/server/http-server.d.ts +0 -6
  93. package/dist/types/server/middleware/cors.d.ts +0 -11
  94. package/dist/types/server/middleware/json-parser.d.ts +0 -10
  95. package/dist/types/server/middleware/response.d.ts +0 -50
  96. package/dist/types/server/routers/assets.d.ts +0 -6
  97. package/dist/types/server/routers/auth.d.ts +0 -9
  98. package/dist/types/server/routers/baseline.d.ts +0 -13
  99. package/dist/types/server/routers/cloud-proxy.d.ts +0 -11
  100. package/dist/types/server/routers/config.d.ts +0 -9
  101. package/dist/types/server/routers/dashboard.d.ts +0 -6
  102. package/dist/types/server/routers/health.d.ts +0 -11
  103. package/dist/types/server/routers/projects.d.ts +0 -9
  104. package/dist/types/server/routers/screenshot.d.ts +0 -11
  105. package/dist/types/services/api-service.d.ts +0 -100
  106. package/dist/types/services/auth-service.d.ts +0 -59
  107. package/dist/types/services/build-manager.d.ts +0 -69
  108. package/dist/types/services/config-service.d.ts +0 -97
  109. package/dist/types/services/html-report-generator.d.ts +0 -52
  110. package/dist/types/services/index.d.ts +0 -7
  111. package/dist/types/services/project-service.d.ts +0 -105
  112. package/dist/types/services/report-generator/viewer.d.ts +0 -0
  113. package/dist/types/services/screenshot-server.d.ts +0 -10
  114. package/dist/types/services/server-manager.d.ts +0 -269
  115. package/dist/types/services/static-report-generator.d.ts +0 -25
  116. package/dist/types/services/tdd-service.d.ts +0 -95
  117. package/dist/types/services/test-runner.d.ts +0 -31
  118. package/dist/types/services/uploader.d.ts +0 -36
  119. package/dist/types/utils/browser.d.ts +0 -6
  120. package/dist/types/utils/build-history.d.ts +0 -16
  121. package/dist/types/utils/ci-env.d.ts +0 -55
  122. package/dist/types/utils/colors.d.ts +0 -12
  123. package/dist/types/utils/config-helpers.d.ts +0 -6
  124. package/dist/types/utils/config-loader.d.ts +0 -25
  125. package/dist/types/utils/config-schema.d.ts +0 -51
  126. package/dist/types/utils/environment-config.d.ts +0 -59
  127. package/dist/types/utils/environment.d.ts +0 -36
  128. package/dist/types/utils/fetch-utils.d.ts +0 -1
  129. package/dist/types/utils/file-helpers.d.ts +0 -18
  130. package/dist/types/utils/git.d.ts +0 -56
  131. package/dist/types/utils/global-config.d.ts +0 -84
  132. package/dist/types/utils/image-input-detector.d.ts +0 -71
  133. package/dist/types/utils/output.d.ts +0 -84
  134. package/dist/types/utils/package-info.d.ts +0 -15
  135. package/dist/types/utils/security.d.ts +0 -30
@@ -1,59 +0,0 @@
1
- /**
2
- * AuthService class for CLI authentication
3
- */
4
- export class AuthService {
5
- constructor(options?: {});
6
- baseUrl: any;
7
- userAgent: string;
8
- /**
9
- * Make an unauthenticated API request
10
- * @param {string} endpoint - API endpoint
11
- * @param {Object} options - Fetch options
12
- * @returns {Promise<Object>} Response data
13
- */
14
- request(endpoint: string, options?: any): Promise<any>;
15
- /**
16
- * Make an authenticated API request
17
- * @param {string} endpoint - API endpoint
18
- * @param {Object} options - Fetch options
19
- * @returns {Promise<Object>} Response data
20
- */
21
- authenticatedRequest(endpoint: string, options?: any): Promise<any>;
22
- /**
23
- * Initiate OAuth device flow
24
- * @returns {Promise<Object>} Device code, user code, verification URL
25
- */
26
- initiateDeviceFlow(): Promise<any>;
27
- /**
28
- * Poll for device authorization
29
- * @param {string} deviceCode - Device code from initiate
30
- * @returns {Promise<Object>} Token data or pending status
31
- */
32
- pollDeviceAuthorization(deviceCode: string): Promise<any>;
33
- /**
34
- * Complete device flow and save tokens
35
- * @param {Object} tokenData - Token response from poll
36
- * @returns {Promise<Object>} Token data with user info
37
- */
38
- completeDeviceFlow(tokenData: any): Promise<any>;
39
- /**
40
- * Refresh access token using refresh token
41
- * @returns {Promise<Object>} New tokens
42
- */
43
- refresh(): Promise<any>;
44
- /**
45
- * Logout and revoke tokens
46
- * @returns {Promise<void>}
47
- */
48
- logout(): Promise<void>;
49
- /**
50
- * Get current user information
51
- * @returns {Promise<Object>} User and organization data
52
- */
53
- whoami(): Promise<any>;
54
- /**
55
- * Check if user is authenticated
56
- * @returns {Promise<boolean>} True if authenticated
57
- */
58
- isAuthenticated(): Promise<boolean>;
59
- }
@@ -1,69 +0,0 @@
1
- /**
2
- * Generate unique build ID for local build management only.
3
- * Note: The API generates its own UUIDs for actual builds - this local ID
4
- * is only used for CLI internal tracking and is not sent to the API.
5
- * @returns {string} Build ID
6
- */
7
- export function generateBuildId(): string;
8
- /**
9
- * Create build object
10
- * @param {Object} buildOptions - Build configuration
11
- * @returns {Object} Build object
12
- */
13
- export function createBuildObject(buildOptions: any): any;
14
- /**
15
- * Update build with new status and data
16
- * @param {Object} build - Current build
17
- * @param {string} status - New status
18
- * @param {Object} updates - Additional updates
19
- * @returns {Object} Updated build
20
- */
21
- export function updateBuild(build: any, status: string, updates?: any): any;
22
- /**
23
- * Add screenshot to build
24
- * @param {Object} build - Current build
25
- * @param {Object} screenshot - Screenshot data
26
- * @returns {Object} Updated build
27
- */
28
- export function addScreenshotToBuild(build: any, screenshot: any): any;
29
- /**
30
- * Finalize build with result
31
- * @param {Object} build - Current build
32
- * @param {Object} result - Build result
33
- * @returns {Object} Finalized build
34
- */
35
- export function finalizeBuildObject(build: any, result?: any): any;
36
- /**
37
- * Create queued build item
38
- * @param {Object} buildOptions - Build options
39
- * @returns {Object} Queued build item
40
- */
41
- export function createQueuedBuild(buildOptions: any): any;
42
- /**
43
- * Validate build options
44
- * @param {Object} buildOptions - Build options to validate
45
- * @returns {Object} Validation result
46
- */
47
- export function validateBuildOptions(buildOptions: any): any;
48
- export class BuildManager {
49
- constructor(config: any);
50
- config: any;
51
- currentBuild: any;
52
- buildQueue: any[];
53
- createBuild(buildOptions: any): Promise<any>;
54
- updateBuildStatus(buildId: any, status: any, updates?: {}): Promise<any>;
55
- addScreenshot(buildId: any, screenshot: any): Promise<any>;
56
- finalizeBuild(buildId: any, result?: {}): Promise<any>;
57
- getCurrentBuild(): any;
58
- queueBuild(buildOptions: any): void;
59
- clear(): Promise<void>;
60
- processNextBuild(): Promise<any>;
61
- getQueueStatus(): {
62
- length: number;
63
- items: {
64
- name: any;
65
- branch: any;
66
- queuedAt: any;
67
- }[];
68
- };
69
- }
@@ -1,97 +0,0 @@
1
- /**
2
- * ConfigService for reading and writing configuration
3
- */
4
- export class ConfigService {
5
- constructor(config: any, options?: {});
6
- config: any;
7
- projectRoot: any;
8
- explorer: import("cosmiconfig").PublicExplorerSync;
9
- /**
10
- * Get configuration with source information
11
- * @param {string} scope - 'project', 'global', or 'merged'
12
- * @returns {Promise<Object>} Config object with metadata
13
- */
14
- getConfig(scope?: string): Promise<any>;
15
- /**
16
- * Get project-level config from vizzly.config.js or similar
17
- * @private
18
- * @returns {Promise<Object>}
19
- */
20
- private _getProjectConfig;
21
- /**
22
- * Get global config from ~/.vizzly/config.json
23
- * @private
24
- * @returns {Promise<Object>}
25
- */
26
- private _getGlobalConfig;
27
- /**
28
- * Get merged config showing source for each setting
29
- * @private
30
- * @returns {Promise<Object>}
31
- */
32
- private _getMergedConfig;
33
- /**
34
- * Update configuration
35
- * @param {string} scope - 'project' or 'global'
36
- * @param {Object} updates - Configuration updates to apply
37
- * @returns {Promise<Object>} Updated config
38
- */
39
- updateConfig(scope: string, updates: any): Promise<any>;
40
- /**
41
- * Update project-level config
42
- * @private
43
- * @param {Object} updates - Config updates
44
- * @returns {Promise<Object>} Updated config
45
- */
46
- private _updateProjectConfig;
47
- /**
48
- * Update global config
49
- * @private
50
- * @param {Object} updates - Config updates
51
- * @returns {Promise<Object>} Updated config
52
- */
53
- private _updateGlobalConfig;
54
- /**
55
- * Write project config file (JavaScript format)
56
- * @private
57
- * @param {string} filepath - Path to write to
58
- * @param {Object} config - Config object
59
- * @returns {Promise<void>}
60
- */
61
- private _writeProjectConfigFile;
62
- /**
63
- * Serialize config object to JavaScript module
64
- * @private
65
- * @param {Object} config - Config object
66
- * @returns {string} JavaScript source code
67
- */
68
- private _serializeToJavaScript;
69
- /**
70
- * Stringify object with proper indentation (2 spaces)
71
- * @private
72
- * @param {*} value - Value to stringify
73
- * @param {number} depth - Current depth
74
- * @returns {string}
75
- */
76
- private _stringifyWithIndent;
77
- /**
78
- * Validate configuration object
79
- * @param {Object} config - Config to validate
80
- * @returns {Promise<Object>} Validation result
81
- */
82
- validateConfig(config: any): Promise<any>;
83
- /**
84
- * Get the source of a specific config key
85
- * @param {string} key - Config key
86
- * @returns {Promise<string>} Source ('default', 'global', 'project', 'env', 'cli')
87
- */
88
- getConfigSource(key: string): Promise<string>;
89
- /**
90
- * Deep merge two objects
91
- * @private
92
- * @param {Object} target - Target object
93
- * @param {Object} source - Source object
94
- * @returns {Object} Merged object
95
- */
96
- private _deepMerge;
97
- }
@@ -1,52 +0,0 @@
1
- export class HtmlReportGenerator {
2
- constructor(workingDir: any, config: any);
3
- workingDir: any;
4
- config: any;
5
- reportDir: any;
6
- reportPath: any;
7
- cssPath: any;
8
- /**
9
- * Sanitize HTML content to prevent XSS attacks
10
- * @param {string} text - Text to sanitize
11
- * @returns {string} Sanitized text
12
- */
13
- sanitizeHtml(text: string): string;
14
- /**
15
- * Sanitize build info object
16
- * @param {Object} buildInfo - Build information to sanitize
17
- * @returns {Object} Sanitized build info
18
- */
19
- sanitizeBuildInfo(buildInfo?: any): any;
20
- /**
21
- * Generate HTML report from TDD results
22
- * @param {Object} results - TDD comparison results
23
- * @param {Object} buildInfo - Build information
24
- * @returns {string} Path to generated report
25
- */
26
- generateReport(results: any, buildInfo?: any): string;
27
- /**
28
- * Process comparison data for HTML report
29
- * @param {Object} comparison - Comparison object
30
- * @returns {Object} Processed comparison data
31
- */
32
- processComparison(comparison: any): any;
33
- /**
34
- * Get relative path from report directory to image file
35
- * @param {string} imagePath - Absolute path to image
36
- * @param {string} reportDir - Report directory path
37
- * @returns {string|null} Relative path or null if invalid
38
- */
39
- getRelativePath(imagePath: string, reportDir: string): string | null;
40
- /**
41
- * Generate the complete HTML template
42
- * @param {Object} data - Report data
43
- * @returns {string} HTML content
44
- */
45
- generateHtmlTemplate(data: any): string;
46
- /**
47
- * Generate HTML for a single comparison
48
- * @param {Object} comparison - Comparison data
49
- * @returns {string} HTML content
50
- */
51
- generateComparisonHtml(comparison: any): string;
52
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Create all services with their dependencies
3
- * @param {Object} config - Configuration object
4
- * @param {string} [command='run'] - Command context ('run', 'tdd', 'status')
5
- * @returns {Object} Services object
6
- */
7
- export function createServices(config: any, command?: string): any;
@@ -1,105 +0,0 @@
1
- /**
2
- * ProjectService for managing project mappings and operations
3
- */
4
- export class ProjectService {
5
- constructor(config: any, options?: {});
6
- config: any;
7
- apiService: any;
8
- authService: any;
9
- /**
10
- * List all project mappings
11
- * @returns {Promise<Array>} Array of project mappings
12
- */
13
- listMappings(): Promise<any[]>;
14
- /**
15
- * Get project mapping for a specific directory
16
- * @param {string} directory - Directory path
17
- * @returns {Promise<Object|null>} Project mapping or null
18
- */
19
- getMapping(directory: string): Promise<any | null>;
20
- /**
21
- * Create or update project mapping
22
- * @param {string} directory - Directory path
23
- * @param {Object} projectData - Project data
24
- * @param {string} projectData.projectSlug - Project slug
25
- * @param {string} projectData.organizationSlug - Organization slug
26
- * @param {string} projectData.token - Project API token
27
- * @param {string} [projectData.projectName] - Optional project name
28
- * @returns {Promise<Object>} Created mapping
29
- */
30
- createMapping(directory: string, projectData: {
31
- projectSlug: string;
32
- organizationSlug: string;
33
- token: string;
34
- projectName?: string;
35
- }): Promise<any>;
36
- /**
37
- * Remove project mapping
38
- * @param {string} directory - Directory path
39
- * @returns {Promise<void>}
40
- */
41
- removeMapping(directory: string): Promise<void>;
42
- /**
43
- * Switch project for current directory
44
- * @param {string} projectSlug - Project slug
45
- * @param {string} organizationSlug - Organization slug
46
- * @param {string} token - Project token
47
- * @returns {Promise<Object>} Updated mapping
48
- */
49
- switchProject(projectSlug: string, organizationSlug: string, token: string): Promise<any>;
50
- /**
51
- * List all projects from API
52
- * Uses OAuth authentication (authService) when available, falls back to API token
53
- * @returns {Promise<Array>} Array of projects with organization info
54
- */
55
- listProjects(): Promise<any[]>;
56
- /**
57
- * Get project details
58
- * @param {string} projectSlug - Project slug
59
- * @param {string} organizationSlug - Organization slug
60
- * @returns {Promise<Object>} Project details
61
- */
62
- getProject(projectSlug: string, organizationSlug: string): Promise<any>;
63
- /**
64
- * Get recent builds for a project
65
- * Uses OAuth authentication (authService) when available, falls back to API token
66
- * @param {string} projectSlug - Project slug
67
- * @param {string} organizationSlug - Organization slug
68
- * @param {Object} options - Query options
69
- * @param {number} [options.limit=10] - Number of builds to fetch
70
- * @param {string} [options.branch] - Filter by branch
71
- * @returns {Promise<Array>} Array of builds
72
- */
73
- getRecentBuilds(projectSlug: string, organizationSlug: string, options?: {
74
- limit?: number;
75
- branch?: string;
76
- }): Promise<any[]>;
77
- /**
78
- * Create a project token
79
- * @param {string} projectSlug - Project slug
80
- * @param {string} organizationSlug - Organization slug
81
- * @param {Object} tokenData - Token data
82
- * @param {string} tokenData.name - Token name
83
- * @param {string} [tokenData.description] - Token description
84
- * @returns {Promise<Object>} Created token
85
- */
86
- createProjectToken(projectSlug: string, organizationSlug: string, tokenData: {
87
- name: string;
88
- description?: string;
89
- }): Promise<any>;
90
- /**
91
- * List project tokens
92
- * @param {string} projectSlug - Project slug
93
- * @param {string} organizationSlug - Organization slug
94
- * @returns {Promise<Array>} Array of tokens
95
- */
96
- listProjectTokens(projectSlug: string, organizationSlug: string): Promise<any[]>;
97
- /**
98
- * Revoke a project token
99
- * @param {string} projectSlug - Project slug
100
- * @param {string} organizationSlug - Organization slug
101
- * @param {string} tokenId - Token ID
102
- * @returns {Promise<void>}
103
- */
104
- revokeProjectToken(projectSlug: string, organizationSlug: string, tokenId: string): Promise<void>;
105
- }
File without changes
@@ -1,10 +0,0 @@
1
- export class ScreenshotServer {
2
- constructor(config: any, buildManager: any);
3
- config: any;
4
- buildManager: any;
5
- server: any;
6
- start(): Promise<any>;
7
- stop(): Promise<any>;
8
- handleRequest(req: any, res: any): Promise<void>;
9
- parseRequestBody(req: any): Promise<any>;
10
- }
@@ -1,269 +0,0 @@
1
- export class ServerManager {
2
- constructor(config: any, options?: {});
3
- config: any;
4
- httpServer: {
5
- start: () => Promise<any>;
6
- stop: () => Promise<any>;
7
- finishBuild: (_buildId: any) => Promise<any>;
8
- getServer: () => any;
9
- };
10
- handler: {
11
- initialize: () => Promise<void>;
12
- handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
13
- statusCode: number;
14
- body: {
15
- error: string;
16
- details: any;
17
- tddMode: boolean;
18
- originalPath?: undefined;
19
- filePath?: undefined;
20
- receivedType?: undefined;
21
- comparison?: undefined;
22
- status?: undefined;
23
- message?: undefined;
24
- success?: undefined;
25
- };
26
- } | {
27
- statusCode: number;
28
- body: {
29
- error: string;
30
- originalPath: any;
31
- tddMode: boolean;
32
- details?: undefined;
33
- filePath?: undefined;
34
- receivedType?: undefined;
35
- comparison?: undefined;
36
- status?: undefined;
37
- message?: undefined;
38
- success?: undefined;
39
- };
40
- } | {
41
- statusCode: number;
42
- body: {
43
- error: string;
44
- filePath: any;
45
- tddMode: boolean;
46
- details?: undefined;
47
- originalPath?: undefined;
48
- receivedType?: undefined;
49
- comparison?: undefined;
50
- status?: undefined;
51
- message?: undefined;
52
- success?: undefined;
53
- };
54
- } | {
55
- statusCode: number;
56
- body: {
57
- error: string;
58
- tddMode: boolean;
59
- details?: undefined;
60
- originalPath?: undefined;
61
- filePath?: undefined;
62
- receivedType?: undefined;
63
- comparison?: undefined;
64
- status?: undefined;
65
- message?: undefined;
66
- success?: undefined;
67
- };
68
- } | {
69
- statusCode: number;
70
- body: {
71
- error: string;
72
- receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
73
- tddMode: boolean;
74
- details?: undefined;
75
- originalPath?: undefined;
76
- filePath?: undefined;
77
- comparison?: undefined;
78
- status?: undefined;
79
- message?: undefined;
80
- success?: undefined;
81
- };
82
- } | {
83
- statusCode: number;
84
- body: {
85
- error: string;
86
- details: string;
87
- comparison: {
88
- name: any;
89
- status: string;
90
- baseline: any;
91
- current: any;
92
- diff: any;
93
- diffPercentage: any;
94
- threshold: any;
95
- };
96
- tddMode: boolean;
97
- originalPath?: undefined;
98
- filePath?: undefined;
99
- receivedType?: undefined;
100
- status?: undefined;
101
- message?: undefined;
102
- success?: undefined;
103
- };
104
- } | {
105
- statusCode: number;
106
- body: {
107
- status: string;
108
- message: string;
109
- comparison: {
110
- name: any;
111
- status: string;
112
- baseline: any;
113
- current: any;
114
- diff?: undefined;
115
- diffPercentage?: undefined;
116
- threshold?: undefined;
117
- };
118
- tddMode: boolean;
119
- error?: undefined;
120
- details?: undefined;
121
- originalPath?: undefined;
122
- filePath?: undefined;
123
- receivedType?: undefined;
124
- success?: undefined;
125
- };
126
- } | {
127
- statusCode: number;
128
- body: {
129
- success: boolean;
130
- comparison: {
131
- name: any;
132
- status: string;
133
- baseline?: undefined;
134
- current?: undefined;
135
- diff?: undefined;
136
- diffPercentage?: undefined;
137
- threshold?: undefined;
138
- };
139
- tddMode: boolean;
140
- error?: undefined;
141
- details?: undefined;
142
- originalPath?: undefined;
143
- filePath?: undefined;
144
- receivedType?: undefined;
145
- status?: undefined;
146
- message?: undefined;
147
- };
148
- }>;
149
- getResults: () => Promise<{
150
- total: number;
151
- passed: number;
152
- failed: number;
153
- new: number;
154
- errors: number;
155
- comparisons: any[];
156
- baseline: any;
157
- }>;
158
- acceptBaseline: (comparisonId: any) => Promise<any>;
159
- acceptAllBaselines: () => Promise<{
160
- count: number;
161
- }>;
162
- resetBaselines: () => Promise<{
163
- success: boolean;
164
- deletedBaselines: number;
165
- deletedCurrents: number;
166
- deletedDiffs: number;
167
- }>;
168
- cleanup: () => void;
169
- tddService: import("./tdd-service.js").TddService;
170
- } | {
171
- handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
172
- statusCode: number;
173
- body: {
174
- success: boolean;
175
- disabled: boolean;
176
- count: number;
177
- message: string;
178
- error?: undefined;
179
- originalPath?: undefined;
180
- filePath?: undefined;
181
- receivedType?: undefined;
182
- name?: undefined;
183
- };
184
- } | {
185
- statusCode: number;
186
- body: {
187
- error: string;
188
- success?: undefined;
189
- disabled?: undefined;
190
- count?: undefined;
191
- message?: undefined;
192
- originalPath?: undefined;
193
- filePath?: undefined;
194
- receivedType?: undefined;
195
- name?: undefined;
196
- };
197
- } | {
198
- statusCode: number;
199
- body: {
200
- error: string;
201
- originalPath: any;
202
- success?: undefined;
203
- disabled?: undefined;
204
- count?: undefined;
205
- message?: undefined;
206
- filePath?: undefined;
207
- receivedType?: undefined;
208
- name?: undefined;
209
- };
210
- } | {
211
- statusCode: number;
212
- body: {
213
- error: string;
214
- filePath: any;
215
- success?: undefined;
216
- disabled?: undefined;
217
- count?: undefined;
218
- message?: undefined;
219
- originalPath?: undefined;
220
- receivedType?: undefined;
221
- name?: undefined;
222
- };
223
- } | {
224
- statusCode: number;
225
- body: {
226
- error: string;
227
- receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
228
- success?: undefined;
229
- disabled?: undefined;
230
- count?: undefined;
231
- message?: undefined;
232
- originalPath?: undefined;
233
- filePath?: undefined;
234
- name?: undefined;
235
- };
236
- } | {
237
- statusCode: number;
238
- body: {
239
- success: boolean;
240
- name: any;
241
- count: number;
242
- disabled?: undefined;
243
- message?: undefined;
244
- error?: undefined;
245
- originalPath?: undefined;
246
- filePath?: undefined;
247
- receivedType?: undefined;
248
- };
249
- }>;
250
- getScreenshotCount: () => number;
251
- flush: () => Promise<{
252
- uploaded: number;
253
- failed: number;
254
- total: number;
255
- }>;
256
- cleanup: () => void;
257
- };
258
- services: any;
259
- start(buildId?: any, tddMode?: boolean, setBaseline?: boolean): Promise<void>;
260
- buildId: any;
261
- tddMode: boolean;
262
- setBaseline: boolean;
263
- createApiService(): Promise<import("./api-service.js").ApiService>;
264
- stop(): Promise<void>;
265
- get server(): {
266
- getScreenshotCount: (buildId: any) => any;
267
- finishBuild: (buildId: any) => Promise<any>;
268
- };
269
- }