@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
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Vizzly SDK Type Definitions
3
+ * Full SDK for custom integrations
4
+ * @module @vizzly-testing/cli/sdk
5
+ */
6
+
7
+ import { EventEmitter } from 'events';
8
+
9
+ // Re-export common types
10
+ export {
11
+ VizzlyConfig,
12
+ ScreenshotOptions,
13
+ UploadOptions,
14
+ UploadResult,
15
+ ComparisonResult,
16
+ TddResults,
17
+ BaselineData,
18
+ Uploader,
19
+ TddService,
20
+ OutputUtils,
21
+ } from './index';
22
+
23
+ /**
24
+ * VizzlySDK class - Full SDK for custom integrations
25
+ *
26
+ * @example
27
+ * import { createVizzly } from '@vizzly-testing/cli/sdk';
28
+ *
29
+ * const vizzly = await createVizzly({
30
+ * apiKey: process.env.VIZZLY_TOKEN,
31
+ * server: { port: 3003 }
32
+ * });
33
+ *
34
+ * await vizzly.start();
35
+ * await vizzly.screenshot('test', buffer);
36
+ * await vizzly.upload();
37
+ * await vizzly.stop();
38
+ */
39
+ export class VizzlySDK extends EventEmitter {
40
+ config: import('./index').VizzlyConfig;
41
+
42
+ constructor(config: import('./index').VizzlyConfig, services: unknown);
43
+
44
+ /**
45
+ * Start the Vizzly server
46
+ * @returns Server information including port and URL
47
+ */
48
+ start(): Promise<{ port: number; url: string }>;
49
+
50
+ /**
51
+ * Stop the Vizzly server
52
+ */
53
+ stop(): Promise<void>;
54
+
55
+ /**
56
+ * Get current configuration
57
+ */
58
+ getConfig(): import('./index').VizzlyConfig;
59
+
60
+ /**
61
+ * Capture a screenshot
62
+ * @param name - Screenshot name
63
+ * @param imageBuffer - Image data as a Buffer, or a file path to an image
64
+ * @param options - Screenshot options
65
+ * @throws VizzlyError when server is not running
66
+ * @throws VizzlyError when file path is provided but file doesn't exist
67
+ */
68
+ screenshot(
69
+ name: string,
70
+ imageBuffer: Buffer | string,
71
+ options?: import('./index').ScreenshotOptions
72
+ ): Promise<void>;
73
+
74
+ /**
75
+ * Upload all captured screenshots
76
+ * @param options - Upload options
77
+ * @returns Upload result with build URL and stats
78
+ */
79
+ upload(
80
+ options?: import('./index').UploadOptions
81
+ ): Promise<import('./index').UploadResult>;
82
+
83
+ /**
84
+ * Run local comparison in TDD mode
85
+ * @param name - Screenshot name
86
+ * @param imageBuffer - Current image as a Buffer, or a file path to an image
87
+ * @returns Comparison result
88
+ */
89
+ compare(
90
+ name: string,
91
+ imageBuffer: Buffer | string
92
+ ): Promise<import('./index').ComparisonResult>;
93
+ }
94
+
95
+ /**
96
+ * Create a new Vizzly SDK instance
97
+ *
98
+ * @param config - Configuration options
99
+ * @param options - Additional options
100
+ * @returns Configured Vizzly SDK instance
101
+ *
102
+ * @example
103
+ * const vizzly = await createVizzly({
104
+ * apiKey: process.env.VIZZLY_TOKEN,
105
+ * apiUrl: 'https://app.vizzly.dev',
106
+ * server: { port: 3003 }
107
+ * });
108
+ */
109
+ export function createVizzly(
110
+ config?: import('./index').VizzlyConfig,
111
+ options?: { verbose?: boolean }
112
+ ): Promise<VizzlySDK>;
113
+
114
+ /** Load configuration from file and environment */
115
+ export function loadConfig(options?: {
116
+ cwd?: string;
117
+ }): Promise<import('./index').VizzlyConfig>;
118
+
119
+ /** Output utilities */
120
+ export const output: import('./index').OutputUtils;
121
+
122
+ /** Create an uploader instance */
123
+ export function createUploader(
124
+ config?: {
125
+ apiKey?: string;
126
+ apiUrl?: string;
127
+ userAgent?: string;
128
+ command?: string;
129
+ upload?: import('./index').UploadConfig;
130
+ },
131
+ options?: {
132
+ signal?: AbortSignal;
133
+ batchSize?: number;
134
+ timeout?: number;
135
+ }
136
+ ): import('./index').Uploader;
137
+
138
+ /** Create a TDD service instance */
139
+ export function createTDDService(
140
+ config: import('./index').VizzlyConfig,
141
+ options?: {
142
+ workingDir?: string;
143
+ setBaseline?: boolean;
144
+ authService?: unknown;
145
+ }
146
+ ): import('./index').TddService;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Define Vizzly configuration with type hints
3
- * @param {import('../types/index.js').VizzlyConfig} config
4
- * @returns {import('../types/index.js').VizzlyConfig}
3
+ * @param {Object} config - Vizzly configuration object
4
+ * @returns {Object} The same configuration object (passthrough for type hints)
5
5
  */
6
6
  export function defineConfig(config) {
7
7
  return config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",
@@ -16,25 +16,29 @@
16
16
  "bugs": "https://github.com/vizzly-testing/cli/issues",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "https://github.com/vizzly-testing/cli.git"
19
+ "url": "git+https://github.com/vizzly-testing/cli.git"
20
20
  },
21
21
  "license": "MIT",
22
22
  "author": "Stubborn Mule Software <support@vizzly.dev>",
23
23
  "type": "module",
24
24
  "exports": {
25
25
  ".": {
26
+ "types": "./dist/types/index.d.ts",
26
27
  "import": "./dist/index.js",
27
28
  "require": "./dist/index.js"
28
29
  },
29
30
  "./client": {
31
+ "types": "./dist/types/client.d.ts",
30
32
  "import": "./dist/client/index.js",
31
33
  "require": "./dist/client/index.js"
32
34
  },
33
35
  "./sdk": {
36
+ "types": "./dist/types/sdk.d.ts",
34
37
  "import": "./dist/sdk/index.js",
35
38
  "require": "./dist/sdk/index.js"
36
39
  },
37
40
  "./config": {
41
+ "types": "./dist/types/config.d.ts",
38
42
  "import": "./dist/utils/config-helpers.js",
39
43
  "require": "./dist/utils/config-helpers.js"
40
44
  }
@@ -42,7 +46,7 @@
42
46
  "main": "./dist/index.js",
43
47
  "types": "./dist/types/index.d.ts",
44
48
  "bin": {
45
- "vizzly": "./bin/vizzly.js"
49
+ "vizzly": "bin/vizzly.js"
46
50
  },
47
51
  "files": [
48
52
  "bin",
@@ -54,14 +58,15 @@
54
58
  ],
55
59
  "scripts": {
56
60
  "start": "node src/index.js",
57
- "build": "npm run clean && npm run compile && npm run copy-assets && npm run build:reporter && npm run types",
61
+ "build": "npm run clean && npm run compile && npm run copy-assets && npm run build:reporter && npm run copy-types",
58
62
  "clean": "rimraf dist",
59
63
  "compile": "babel src --out-dir dist --ignore '**/*.test.js'",
60
64
  "copy-assets": "cp src/services/report-generator/report.css dist/services/report-generator/",
65
+ "copy-types": "mkdir -p dist/types && cp src/types/*.d.ts dist/types/",
61
66
  "build:reporter": "cd src/reporter && vite build",
62
67
  "dev:reporter": "cd src/reporter && vite --config vite.dev.config.js",
63
- "types": "tsc --emitDeclarationOnly --outDir dist/types",
64
- "prepublishOnly": "npm test && npm run build",
68
+ "test:types": "tsd",
69
+ "prepublishOnly": "npm run build",
65
70
  "test": "vitest run",
66
71
  "test:watch": "vitest",
67
72
  "test:reporter": "playwright test --config=tests/reporter/playwright.config.js",
@@ -79,7 +84,7 @@
79
84
  "registry": "https://registry.npmjs.org/"
80
85
  },
81
86
  "dependencies": {
82
- "@vizzly-testing/honeydiff": "^0.3.1",
87
+ "@vizzly-testing/honeydiff": "^0.4.3",
83
88
  "commander": "^14.0.0",
84
89
  "cosmiconfig": "^9.0.0",
85
90
  "dotenv": "^17.2.1",
@@ -87,6 +92,16 @@
87
92
  "glob": "^13.0.0",
88
93
  "zod": "^4.1.12"
89
94
  },
95
+ "tsd": {
96
+ "directory": "test-d",
97
+ "typingsFile": "src/types/index.d.ts",
98
+ "compilerOptions": {
99
+ "esModuleInterop": true,
100
+ "module": "ESNext",
101
+ "moduleResolution": "node",
102
+ "strict": true
103
+ }
104
+ },
90
105
  "devDependencies": {
91
106
  "@babel/cli": "^7.28.0",
92
107
  "@babel/core": "^7.23.6",
@@ -99,6 +114,7 @@
99
114
  "@playwright/test": "^1.55.1",
100
115
  "@tailwindcss/postcss": "^4.1.13",
101
116
  "@tanstack/react-query": "^5.90.11",
117
+ "@types/node": "^24.10.1",
102
118
  "@vitejs/plugin-react": "^5.0.3",
103
119
  "@vitest/coverage-v8": "^4.0.3",
104
120
  "autoprefixer": "^10.4.21",
@@ -114,6 +130,7 @@
114
130
  "react-dom": "^19.1.1",
115
131
  "rimraf": "^6.0.1",
116
132
  "tailwindcss": "^4.1.13",
133
+ "tsd": "^0.33.0",
117
134
  "typescript": "^5.0.4",
118
135
  "vite": "^7.1.7",
119
136
  "vitest": "^4.0.3",
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,80 +0,0 @@
1
- /**
2
- * Take a screenshot for visual regression testing
3
- *
4
- * @param {string} name - Unique name for the screenshot
5
- * @param {Buffer|string} imageBuffer - PNG image data as a Buffer, or a file path to an image
6
- * @param {Object} [options] - Optional configuration
7
- * @param {Record<string, any>} [options.properties] - Additional properties to attach to the screenshot
8
- * @param {number} [options.threshold=0] - Pixel difference threshold (0-100)
9
- * @param {boolean} [options.fullPage=false] - Whether this is a full page screenshot
10
- *
11
- * @returns {Promise<void>}
12
- *
13
- * @example
14
- * // Basic usage with Buffer
15
- * import { vizzlyScreenshot } from '@vizzly-testing/cli/client';
16
- *
17
- * const screenshot = await page.screenshot();
18
- * await vizzlyScreenshot('homepage', screenshot);
19
- *
20
- * @example
21
- * // Basic usage with file path
22
- * await vizzlyScreenshot('homepage', './screenshots/homepage.png');
23
- *
24
- * @example
25
- * // With properties and threshold
26
- * await vizzlyScreenshot('checkout-form', screenshot, {
27
- * properties: {
28
- * browser: 'chrome',
29
- * viewport: '1920x1080'
30
- * },
31
- * threshold: 5
32
- * });
33
- *
34
- * @throws {VizzlyError} When screenshot capture fails or client is not initialized
35
- * @throws {VizzlyError} When file path is provided but file doesn't exist
36
- * @throws {VizzlyError} When file cannot be read due to permissions or I/O errors
37
- */
38
- export function vizzlyScreenshot(name: string, imageBuffer: Buffer | string, options?: {
39
- properties?: Record<string, any>;
40
- threshold?: number;
41
- fullPage?: boolean;
42
- }): Promise<void>;
43
- /**
44
- * Wait for all queued screenshots to be processed
45
- *
46
- * @returns {Promise<void>}
47
- *
48
- * @example
49
- * afterAll(async () => {
50
- * await vizzlyFlush();
51
- * });
52
- */
53
- export function vizzlyFlush(): Promise<void>;
54
- /**
55
- * Check if the Vizzly client is initialized and ready
56
- *
57
- * @returns {boolean} True if client is ready, false otherwise
58
- */
59
- export function isVizzlyReady(): boolean;
60
- /**
61
- * Configure the client with custom settings
62
- *
63
- * @param {Object} config - Configuration options
64
- * @param {string} [config.serverUrl] - Server URL override
65
- * @param {boolean} [config.enabled] - Enable/disable screenshots
66
- */
67
- export function configure(config?: {
68
- serverUrl?: string;
69
- enabled?: boolean;
70
- }): void;
71
- /**
72
- * Enable or disable screenshot capture
73
- * @param {boolean} enabled - Whether to enable screenshots
74
- */
75
- export function setEnabled(enabled: boolean): void;
76
- /**
77
- * Get information about Vizzly client state
78
- * @returns {Object} Client information
79
- */
80
- export function getVizzlyInfo(): any;
@@ -1,11 +0,0 @@
1
- /**
2
- * Doctor command implementation - Run diagnostics to check environment
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function doctorCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Validate doctor options (no specific validation needed)
9
- * @param {Object} options - Command options
10
- */
11
- export function validateDoctorOptions(): any[];
@@ -1,13 +0,0 @@
1
- /**
2
- * Finalize command implementation
3
- * @param {string} parallelId - Parallel ID to finalize
4
- * @param {Object} options - Command options
5
- * @param {Object} globalOptions - Global CLI options
6
- */
7
- export function finalizeCommand(parallelId: string, options?: any, globalOptions?: any): Promise<void>;
8
- /**
9
- * Validate finalize options
10
- * @param {string} parallelId - Parallel ID to finalize
11
- * @param {Object} options - Command options
12
- */
13
- export function validateFinalizeOptions(parallelId: string, _options: any): string[];
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env node
2
- export function createInitCommand(options: any): () => Promise<void>;
3
- export function init(options?: {}): Promise<void>;
4
- /**
5
- * Simple configuration setup for Vizzly CLI
6
- */
7
- export class InitCommand {
8
- constructor(plugins?: any[]);
9
- plugins: any[];
10
- run(options?: {}): Promise<void>;
11
- generateConfigFile(configPath: any): Promise<void>;
12
- /**
13
- * Generate configuration sections for plugins
14
- * @returns {string} Plugin config sections as formatted string
15
- */
16
- generatePluginConfigs(): string;
17
- /**
18
- * Format a plugin's config schema as JavaScript code
19
- * @param {Object} plugin - Plugin with configSchema
20
- * @returns {string} Formatted config string
21
- */
22
- formatPluginConfig(plugin: any): string;
23
- /**
24
- * Format a JavaScript value with proper indentation
25
- * @param {*} value - Value to format
26
- * @param {number} depth - Current indentation depth
27
- * @returns {string} Formatted value
28
- */
29
- formatValue(value: any, depth?: number): string;
30
- showNextSteps(): void;
31
- fileExists(filePath: any): Promise<boolean>;
32
- }
@@ -1,11 +0,0 @@
1
- /**
2
- * Login command implementation using OAuth device flow
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function loginCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Validate login options
9
- * @param {Object} options - Command options
10
- */
11
- export function validateLoginOptions(): any[];
@@ -1,11 +0,0 @@
1
- /**
2
- * Logout command implementation
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function logoutCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Validate logout options
9
- * @param {Object} options - Command options
10
- */
11
- export function validateLogoutOptions(): any[];
@@ -1,28 +0,0 @@
1
- /**
2
- * Project select command - configure project for current directory
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function projectSelectCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Project list command - show all configured projects
9
- * @param {Object} _options - Command options (unused)
10
- * @param {Object} globalOptions - Global CLI options
11
- */
12
- export function projectListCommand(_options?: any, globalOptions?: any): Promise<void>;
13
- /**
14
- * Project token command - show/regenerate token for current directory
15
- * @param {Object} _options - Command options (unused)
16
- * @param {Object} globalOptions - Global CLI options
17
- */
18
- export function projectTokenCommand(_options?: any, globalOptions?: any): Promise<void>;
19
- /**
20
- * Project remove command - remove project configuration for current directory
21
- * @param {Object} _options - Command options (unused)
22
- * @param {Object} globalOptions - Global CLI options
23
- */
24
- export function projectRemoveCommand(_options?: any, globalOptions?: any): Promise<void>;
25
- /**
26
- * Validate project command options
27
- */
28
- export function validateProjectOptions(): any[];
@@ -1,16 +0,0 @@
1
- /**
2
- * Run command implementation
3
- * @param {string} testCommand - Test command to execute
4
- * @param {Object} options - Command options
5
- * @param {Object} globalOptions - Global CLI options
6
- */
7
- export function runCommand(testCommand: string, options?: any, globalOptions?: any): Promise<{
8
- success: boolean;
9
- exitCode: number;
10
- }>;
11
- /**
12
- * Validate run options
13
- * @param {string} testCommand - Test command to execute
14
- * @param {Object} options - Command options
15
- */
16
- export function validateRunOptions(testCommand: string, options: any): string[];
@@ -1,13 +0,0 @@
1
- /**
2
- * Status command implementation
3
- * @param {string} buildId - Build ID to check status for
4
- * @param {Object} options - Command options
5
- * @param {Object} globalOptions - Global CLI options
6
- */
7
- export function statusCommand(buildId: string, options?: any, globalOptions?: any): Promise<void>;
8
- /**
9
- * Validate status options
10
- * @param {string} buildId - Build ID to check
11
- * @param {Object} options - Command options
12
- */
13
- export function validateStatusOptions(buildId: string): string[];
@@ -1,24 +0,0 @@
1
- /**
2
- * Start TDD server in daemon mode
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function tddStartCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Internal function to run server in child process
9
- * This is called when --daemon-child flag is present
10
- * @private
11
- */
12
- export function runDaemonChild(options?: {}, globalOptions?: {}): Promise<void>;
13
- /**
14
- * Stop TDD daemon server
15
- * @param {Object} options - Command options
16
- * @param {Object} globalOptions - Global CLI options
17
- */
18
- export function tddStopCommand(options?: any, globalOptions?: any): Promise<void>;
19
- /**
20
- * Check TDD daemon server status
21
- * @param {Object} options - Command options
22
- * @param {Object} globalOptions - Global CLI options
23
- */
24
- export function tddStatusCommand(options: any, globalOptions?: any): Promise<void>;
@@ -1,17 +0,0 @@
1
- /**
2
- * TDD command implementation
3
- * @param {string} testCommand - Test command to execute
4
- * @param {Object} options - Command options
5
- * @param {Object} globalOptions - Global CLI options
6
- * @returns {Promise<{result: Object, cleanup: Function}>} Result and cleanup function
7
- */
8
- export function tddCommand(testCommand: string, options?: any, globalOptions?: any): Promise<{
9
- result: any;
10
- cleanup: Function;
11
- }>;
12
- /**
13
- * Validate TDD options
14
- * @param {string} testCommand - Test command to execute
15
- * @param {Object} options - Command options
16
- */
17
- export function validateTddOptions(testCommand: string, options: any): string[];
@@ -1,13 +0,0 @@
1
- /**
2
- * Upload command implementation
3
- * @param {string} screenshotsPath - Path to screenshots
4
- * @param {Object} options - Command options
5
- * @param {Object} globalOptions - Global CLI options
6
- */
7
- export function uploadCommand(screenshotsPath: string, options?: any, globalOptions?: any): Promise<void>;
8
- /**
9
- * Validate upload options
10
- * @param {string} screenshotsPath - Path to screenshots
11
- * @param {Object} options - Command options
12
- */
13
- export function validateUploadOptions(screenshotsPath: string, options: any): string[];
@@ -1,11 +0,0 @@
1
- /**
2
- * Whoami command implementation
3
- * @param {Object} options - Command options
4
- * @param {Object} globalOptions - Global CLI options
5
- */
6
- export function whoamiCommand(options?: any, globalOptions?: any): Promise<void>;
7
- /**
8
- * Validate whoami options
9
- * @param {Object} options - Command options
10
- */
11
- export function validateWhoamiOptions(): any[];
@@ -1,75 +0,0 @@
1
- /**
2
- * Base error class for all Vizzly errors
3
- * Provides consistent error structure and helpful debugging information
4
- */
5
- export class VizzlyError extends Error {
6
- constructor(message: any, code?: string, context?: {});
7
- code: string;
8
- context: {};
9
- timestamp: string;
10
- /**
11
- * Get a user-friendly error message
12
- */
13
- getUserMessage(): string;
14
- /**
15
- * Get error details for logging
16
- */
17
- toJSON(): {
18
- name: string;
19
- code: string;
20
- message: string;
21
- context: {};
22
- timestamp: string;
23
- stack: string;
24
- };
25
- }
26
- /**
27
- * Configuration-related errors
28
- */
29
- export class ConfigError extends VizzlyError {
30
- constructor(message: any, context?: {});
31
- }
32
- /**
33
- * Authentication/authorization errors
34
- */
35
- export class AuthError extends VizzlyError {
36
- constructor(message: any, context?: {});
37
- }
38
- /**
39
- * Network/connection errors
40
- */
41
- export class NetworkError extends VizzlyError {
42
- constructor(message: any, context?: {});
43
- }
44
- /**
45
- * Upload-related errors
46
- */
47
- export class UploadError extends VizzlyError {
48
- constructor(message: any, context?: {});
49
- }
50
- /**
51
- * Screenshot-related errors
52
- */
53
- export class ScreenshotError extends VizzlyError {
54
- constructor(message: any, context?: {});
55
- }
56
- /**
57
- * Build-related errors
58
- */
59
- export class BuildError extends VizzlyError {
60
- constructor(message: any, context?: {});
61
- }
62
- /**
63
- * Timeout errors
64
- */
65
- export class TimeoutError extends VizzlyError {
66
- constructor(message: any, duration: any, context?: {});
67
- duration: any;
68
- }
69
- /**
70
- * Validation errors
71
- */
72
- export class ValidationError extends VizzlyError {
73
- constructor(message: any, errors?: any[], context?: {});
74
- errors: any[];
75
- }
@@ -1,7 +0,0 @@
1
- /**
2
- * Load and register plugins from node_modules and config
3
- * @param {string|null} configPath - Path to config file
4
- * @param {Object} config - Loaded configuration
5
- * @returns {Promise<Array>} Array of loaded plugins
6
- */
7
- export function loadPlugins(configPath: string | null, config: any): Promise<any[]>;