@vizzly-testing/cli 0.16.0 → 0.16.2

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 (133) 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 +14 -14
  4. package/dist/sdk/index.js +6 -6
  5. package/dist/server/handlers/tdd-handler.js +13 -6
  6. package/dist/services/test-runner.js +0 -8
  7. package/dist/services/uploader.js +1 -1
  8. package/dist/types/client.d.ts +88 -0
  9. package/dist/types/config.d.ts +29 -0
  10. package/dist/types/index.d.ts +426 -9
  11. package/dist/types/sdk.d.ts +146 -0
  12. package/dist/utils/config-helpers.js +2 -2
  13. package/package.json +24 -7
  14. package/dist/types/cli.d.ts +0 -2
  15. package/dist/types/client/index.d.ts +0 -80
  16. package/dist/types/commands/doctor.d.ts +0 -11
  17. package/dist/types/commands/finalize.d.ts +0 -13
  18. package/dist/types/commands/init.d.ts +0 -32
  19. package/dist/types/commands/login.d.ts +0 -11
  20. package/dist/types/commands/logout.d.ts +0 -11
  21. package/dist/types/commands/project.d.ts +0 -28
  22. package/dist/types/commands/run.d.ts +0 -16
  23. package/dist/types/commands/status.d.ts +0 -13
  24. package/dist/types/commands/tdd-daemon.d.ts +0 -24
  25. package/dist/types/commands/tdd.d.ts +0 -17
  26. package/dist/types/commands/upload.d.ts +0 -13
  27. package/dist/types/commands/whoami.d.ts +0 -11
  28. package/dist/types/errors/vizzly-error.d.ts +0 -75
  29. package/dist/types/plugin-loader.d.ts +0 -7
  30. package/dist/types/reporter/src/api/client.d.ts +0 -178
  31. package/dist/types/reporter/src/components/app-router.d.ts +0 -1
  32. package/dist/types/reporter/src/components/code-block.d.ts +0 -4
  33. package/dist/types/reporter/src/components/comparison/comparison-actions.d.ts +0 -5
  34. package/dist/types/reporter/src/components/comparison/comparison-card.d.ts +0 -7
  35. package/dist/types/reporter/src/components/comparison/comparison-group.d.ts +0 -10
  36. package/dist/types/reporter/src/components/comparison/comparison-list.d.ts +0 -6
  37. package/dist/types/reporter/src/components/comparison/comparison-modes/onion-skin-mode.d.ts +0 -10
  38. package/dist/types/reporter/src/components/comparison/comparison-modes/overlay-mode.d.ts +0 -11
  39. package/dist/types/reporter/src/components/comparison/comparison-modes/shared/base-comparison-mode.d.ts +0 -14
  40. package/dist/types/reporter/src/components/comparison/comparison-modes/shared/image-renderer.d.ts +0 -30
  41. package/dist/types/reporter/src/components/comparison/comparison-modes/toggle-view.d.ts +0 -8
  42. package/dist/types/reporter/src/components/comparison/comparison-viewer.d.ts +0 -8
  43. package/dist/types/reporter/src/components/comparison/fullscreen-viewer.d.ts +0 -13
  44. package/dist/types/reporter/src/components/comparison/screenshot-display.d.ts +0 -16
  45. package/dist/types/reporter/src/components/comparison/screenshot-list.d.ts +0 -9
  46. package/dist/types/reporter/src/components/comparison/variant-selector.d.ts +0 -9
  47. package/dist/types/reporter/src/components/comparison/view-mode-selector.d.ts +0 -4
  48. package/dist/types/reporter/src/components/dashboard/dashboard-filters.d.ts +0 -16
  49. package/dist/types/reporter/src/components/design-system/alert.d.ts +0 -9
  50. package/dist/types/reporter/src/components/design-system/badge.d.ts +0 -17
  51. package/dist/types/reporter/src/components/design-system/button.d.ts +0 -19
  52. package/dist/types/reporter/src/components/design-system/card.d.ts +0 -31
  53. package/dist/types/reporter/src/components/design-system/empty-state.d.ts +0 -13
  54. package/dist/types/reporter/src/components/design-system/form-controls.d.ts +0 -44
  55. package/dist/types/reporter/src/components/design-system/health-ring.d.ts +0 -7
  56. package/dist/types/reporter/src/components/design-system/index.d.ts +0 -11
  57. package/dist/types/reporter/src/components/design-system/modal.d.ts +0 -10
  58. package/dist/types/reporter/src/components/design-system/skeleton.d.ts +0 -19
  59. package/dist/types/reporter/src/components/design-system/spinner.d.ts +0 -10
  60. package/dist/types/reporter/src/components/design-system/tabs.d.ts +0 -13
  61. package/dist/types/reporter/src/components/layout/header.d.ts +0 -5
  62. package/dist/types/reporter/src/components/layout/index.d.ts +0 -2
  63. package/dist/types/reporter/src/components/layout/layout.d.ts +0 -6
  64. package/dist/types/reporter/src/components/ui/smart-image.d.ts +0 -7
  65. package/dist/types/reporter/src/components/ui/toast.d.ts +0 -4
  66. package/dist/types/reporter/src/components/views/builds-view.d.ts +0 -1
  67. package/dist/types/reporter/src/components/views/comparison-detail-view.d.ts +0 -5
  68. package/dist/types/reporter/src/components/views/comparisons-view.d.ts +0 -5
  69. package/dist/types/reporter/src/components/views/projects-view.d.ts +0 -1
  70. package/dist/types/reporter/src/components/views/settings-view.d.ts +0 -1
  71. package/dist/types/reporter/src/components/views/stats-view.d.ts +0 -1
  72. package/dist/types/reporter/src/components/waiting-for-screenshots.d.ts +0 -1
  73. package/dist/types/reporter/src/hooks/queries/use-auth-queries.d.ts +0 -15
  74. package/dist/types/reporter/src/hooks/queries/use-cloud-queries.d.ts +0 -6
  75. package/dist/types/reporter/src/hooks/queries/use-config-queries.d.ts +0 -6
  76. package/dist/types/reporter/src/hooks/queries/use-tdd-queries.d.ts +0 -9
  77. package/dist/types/reporter/src/hooks/use-comparison-filters.d.ts +0 -20
  78. package/dist/types/reporter/src/hooks/use-image-loader.d.ts +0 -1
  79. package/dist/types/reporter/src/lib/query-client.d.ts +0 -2
  80. package/dist/types/reporter/src/lib/query-keys.d.ts +0 -13
  81. package/dist/types/reporter/src/main.d.ts +0 -1
  82. package/dist/types/reporter/src/services/api-client.d.ts +0 -11
  83. package/dist/types/reporter/src/utils/comparison-helpers.d.ts +0 -16
  84. package/dist/types/reporter/src/utils/constants.d.ts +0 -37
  85. package/dist/types/reporter/vite.config.d.ts +0 -2
  86. package/dist/types/reporter/vite.dev.config.d.ts +0 -2
  87. package/dist/types/sdk/index.d.ts +0 -110
  88. package/dist/types/server/handlers/api-handler.d.ts +0 -88
  89. package/dist/types/server/handlers/tdd-handler.d.ts +0 -162
  90. package/dist/types/server/http-server.d.ts +0 -6
  91. package/dist/types/server/middleware/cors.d.ts +0 -11
  92. package/dist/types/server/middleware/json-parser.d.ts +0 -10
  93. package/dist/types/server/middleware/response.d.ts +0 -50
  94. package/dist/types/server/routers/assets.d.ts +0 -6
  95. package/dist/types/server/routers/auth.d.ts +0 -9
  96. package/dist/types/server/routers/baseline.d.ts +0 -13
  97. package/dist/types/server/routers/cloud-proxy.d.ts +0 -11
  98. package/dist/types/server/routers/config.d.ts +0 -9
  99. package/dist/types/server/routers/dashboard.d.ts +0 -6
  100. package/dist/types/server/routers/health.d.ts +0 -11
  101. package/dist/types/server/routers/projects.d.ts +0 -9
  102. package/dist/types/server/routers/screenshot.d.ts +0 -11
  103. package/dist/types/services/api-service.d.ts +0 -121
  104. package/dist/types/services/auth-service.d.ts +0 -59
  105. package/dist/types/services/build-manager.d.ts +0 -69
  106. package/dist/types/services/config-service.d.ts +0 -97
  107. package/dist/types/services/html-report-generator.d.ts +0 -52
  108. package/dist/types/services/index.d.ts +0 -7
  109. package/dist/types/services/project-service.d.ts +0 -105
  110. package/dist/types/services/report-generator/viewer.d.ts +0 -0
  111. package/dist/types/services/screenshot-server.d.ts +0 -10
  112. package/dist/types/services/server-manager.d.ts +0 -269
  113. package/dist/types/services/static-report-generator.d.ts +0 -25
  114. package/dist/types/services/tdd-service.d.ts +0 -122
  115. package/dist/types/services/test-runner.d.ts +0 -31
  116. package/dist/types/services/uploader.d.ts +0 -36
  117. package/dist/types/utils/browser.d.ts +0 -6
  118. package/dist/types/utils/build-history.d.ts +0 -16
  119. package/dist/types/utils/ci-env.d.ts +0 -55
  120. package/dist/types/utils/colors.d.ts +0 -12
  121. package/dist/types/utils/config-helpers.d.ts +0 -6
  122. package/dist/types/utils/config-loader.d.ts +0 -25
  123. package/dist/types/utils/config-schema.d.ts +0 -51
  124. package/dist/types/utils/environment-config.d.ts +0 -59
  125. package/dist/types/utils/environment.d.ts +0 -36
  126. package/dist/types/utils/fetch-utils.d.ts +0 -1
  127. package/dist/types/utils/file-helpers.d.ts +0 -18
  128. package/dist/types/utils/git.d.ts +0 -56
  129. package/dist/types/utils/global-config.d.ts +0 -84
  130. package/dist/types/utils/image-input-detector.d.ts +0 -71
  131. package/dist/types/utils/output.d.ts +0 -84
  132. package/dist/types/utils/package-info.d.ts +0 -15
  133. package/dist/types/utils/security.d.ts +0 -30
@@ -1,6 +0,0 @@
1
- /**
2
- * Create dashboard router
3
- * @param {Object} context - Router context
4
- * @returns {Function} Route handler
5
- */
6
- export function createDashboardRouter(): Function;
@@ -1,11 +0,0 @@
1
- /**
2
- * Create health router
3
- * @param {Object} context - Router context
4
- * @param {number} context.port - Server port
5
- * @param {Object} context.screenshotHandler - Screenshot handler
6
- * @returns {Function} Route handler
7
- */
8
- export function createHealthRouter({ port, screenshotHandler }: {
9
- port: number;
10
- screenshotHandler: any;
11
- }): Function;
@@ -1,9 +0,0 @@
1
- /**
2
- * Create projects router
3
- * @param {Object} context - Router context
4
- * @param {Object} context.projectService - Project service
5
- * @returns {Function} Route handler
6
- */
7
- export function createProjectsRouter({ projectService }: {
8
- projectService: any;
9
- }): Function;
@@ -1,11 +0,0 @@
1
- /**
2
- * Create screenshot router
3
- * @param {Object} context - Router context
4
- * @param {Object} context.screenshotHandler - Screenshot handler
5
- * @param {string|null} context.defaultBuildId - Default build ID
6
- * @returns {Function} Route handler
7
- */
8
- export function createScreenshotRouter({ screenshotHandler, defaultBuildId }: {
9
- screenshotHandler: any;
10
- defaultBuildId: string | null;
11
- }): Function;
@@ -1,121 +0,0 @@
1
- /**
2
- * ApiService class for direct API communication
3
- */
4
- export class ApiService {
5
- constructor(options?: {});
6
- baseUrl: any;
7
- token: any;
8
- uploadAll: any;
9
- userAgent: string;
10
- /**
11
- * Make an API request
12
- * @param {string} endpoint - API endpoint
13
- * @param {Object} options - Fetch options
14
- * @param {boolean} isRetry - Internal flag to prevent infinite retry loops
15
- * @returns {Promise<Object>} Response data
16
- */
17
- request(endpoint: string, options?: any, isRetry?: boolean): Promise<any>;
18
- /**
19
- * Get build information
20
- * @param {string} buildId - Build ID
21
- * @param {string} include - Optional include parameter (e.g., 'screenshots')
22
- * @returns {Promise<Object>} Build data
23
- */
24
- getBuild(buildId: string, include?: string): Promise<any>;
25
- /**
26
- * Get comparison information
27
- * @param {string} comparisonId - Comparison ID
28
- * @returns {Promise<Object>} Comparison data
29
- */
30
- getComparison(comparisonId: string): Promise<any>;
31
- /**
32
- * Search for comparisons by name across builds
33
- * @param {string} name - Screenshot name to search for
34
- * @param {Object} filters - Optional filters (branch, limit, offset)
35
- * @param {string} [filters.branch] - Filter by branch name
36
- * @param {number} [filters.limit=50] - Maximum number of results (default: 50)
37
- * @param {number} [filters.offset=0] - Pagination offset (default: 0)
38
- * @returns {Promise<Object>} Search results with comparisons and pagination
39
- */
40
- searchComparisons(name: string, filters?: {
41
- branch?: string;
42
- limit?: number;
43
- offset?: number;
44
- }): Promise<any>;
45
- /**
46
- * Get builds for a project
47
- * @param {Object} filters - Filter options
48
- * @returns {Promise<Array>} List of builds
49
- */
50
- getBuilds(filters?: any): Promise<any[]>;
51
- /**
52
- * Create a new build
53
- * @param {Object} metadata - Build metadata
54
- * @returns {Promise<Object>} Created build data
55
- */
56
- createBuild(metadata: any): Promise<any>;
57
- /**
58
- * Check if SHAs already exist on the server
59
- * @param {string[]|Object[]} shas - Array of SHA256 hashes to check, or array of screenshot objects with metadata
60
- * @param {string} buildId - Build ID for screenshot record creation
61
- * @returns {Promise<Object>} Response with existing SHAs and screenshot data
62
- */
63
- checkShas(shas: string[] | any[], buildId: string): Promise<any>;
64
- /**
65
- * Upload a screenshot with SHA checking
66
- * @param {string} buildId - Build ID
67
- * @param {string} name - Screenshot name
68
- * @param {Buffer} buffer - Screenshot data
69
- * @param {Object} metadata - Additional metadata
70
- * @returns {Promise<Object>} Upload result
71
- */
72
- uploadScreenshot(buildId: string, name: string, buffer: Buffer, metadata?: any): Promise<any>;
73
- /**
74
- * Update build status
75
- * @param {string} buildId - Build ID
76
- * @param {string} status - Build status (pending|running|completed|failed)
77
- * @param {number} executionTimeMs - Execution time in milliseconds
78
- * @returns {Promise<Object>} Updated build data
79
- */
80
- updateBuildStatus(buildId: string, status: string, executionTimeMs?: number): Promise<any>;
81
- /**
82
- * Finalize a build (convenience method)
83
- * @param {string} buildId - Build ID
84
- * @param {boolean} success - Whether the build succeeded
85
- * @param {number} executionTimeMs - Execution time in milliseconds
86
- * @returns {Promise<Object>} Finalized build data
87
- */
88
- finalizeBuild(buildId: string, success?: boolean, executionTimeMs?: number): Promise<any>;
89
- /**
90
- * Get token context (organization and project info)
91
- * @returns {Promise<Object>} Token context data
92
- */
93
- getTokenContext(): Promise<any>;
94
- /**
95
- * Finalize a parallel build
96
- * @param {string} parallelId - Parallel ID to finalize
97
- * @returns {Promise<Object>} Finalization result
98
- */
99
- finalizeParallelBuild(parallelId: string): Promise<any>;
100
- /**
101
- * Get hotspot analysis for a single screenshot
102
- * @param {string} screenshotName - Screenshot name to get hotspots for
103
- * @param {Object} options - Optional settings
104
- * @param {number} [options.windowSize=20] - Number of historical builds to analyze
105
- * @returns {Promise<Object>} Hotspot analysis data
106
- */
107
- getScreenshotHotspots(screenshotName: string, options?: {
108
- windowSize?: number;
109
- }): Promise<any>;
110
- /**
111
- * Batch get hotspot analysis for multiple screenshots
112
- * More efficient than calling getScreenshotHotspots for each screenshot
113
- * @param {string[]} screenshotNames - Array of screenshot names
114
- * @param {Object} options - Optional settings
115
- * @param {number} [options.windowSize=20] - Number of historical builds to analyze
116
- * @returns {Promise<Object>} Hotspots keyed by screenshot name
117
- */
118
- getBatchHotspots(screenshotNames: string[], options?: {
119
- windowSize?: number;
120
- }): Promise<any>;
121
- }
@@ -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
- }