@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.
- package/dist/client/index.js +21 -4
- package/dist/reporter/reporter-bundle.css +1 -1
- package/dist/reporter/reporter-bundle.iife.js +14 -14
- package/dist/sdk/index.js +6 -6
- package/dist/server/handlers/tdd-handler.js +13 -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/package.json +24 -7
- 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 -121
- 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 -122
- 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 +0,0 @@
|
|
|
1
|
-
export default function SettingsView(): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function StatsView(): any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function WaitingForScreenshots(): any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function useAuthStatus(): import("@tanstack/react-query").UseQueryResult<{
|
|
2
|
-
authenticated: boolean;
|
|
3
|
-
user: any | null;
|
|
4
|
-
}, Error>;
|
|
5
|
-
export function useInitiateLogin(): import("@tanstack/react-query").UseMutationResult<{
|
|
6
|
-
deviceCode: string;
|
|
7
|
-
userCode: string;
|
|
8
|
-
verificationUri: string;
|
|
9
|
-
expiresIn: number;
|
|
10
|
-
}, Error, void, unknown>;
|
|
11
|
-
export function usePollAuthorization(): import("@tanstack/react-query").UseMutationResult<{
|
|
12
|
-
status: "pending" | "complete";
|
|
13
|
-
user?: any;
|
|
14
|
-
}, Error, void, unknown>;
|
|
15
|
-
export function useLogout(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export function useProjects(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
2
|
-
export function useBuilds(orgSlug: any, projectSlug: any, options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
3
|
-
export function useDownloadBaselines(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
4
|
-
export function useProjectMappings(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
5
|
-
export function useCreateProjectMapping(): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
|
|
6
|
-
export function useDeleteProjectMapping(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export function useConfig(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
2
|
-
export function useProjectConfig(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
3
|
-
export function useGlobalConfig(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
4
|
-
export function useUpdateProjectConfig(): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
|
|
5
|
-
export function useUpdateGlobalConfig(): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
|
|
6
|
-
export function useValidateConfig(): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function useReportData(options?: {}): import("@tanstack/react-query").DefinedUseQueryResult<any, Error>;
|
|
2
|
-
export function useTddStatus(options?: {}): import("@tanstack/react-query").UseQueryResult<any, Error>;
|
|
3
|
-
export function useAcceptBaseline(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
4
|
-
export function useAcceptAllBaselines(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
5
|
-
export function useResetBaselines(): import("@tanstack/react-query").UseMutationResult<any, Error, void, unknown>;
|
|
6
|
-
export function useRejectBaseline(): import("@tanstack/react-query").UseMutationResult<{
|
|
7
|
-
success: boolean;
|
|
8
|
-
id: void;
|
|
9
|
-
}, Error, void, unknown>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export default function useComparisonFilters(comparisons?: any[]): {
|
|
2
|
-
filteredComparisons: any;
|
|
3
|
-
filter: any;
|
|
4
|
-
setFilter: any;
|
|
5
|
-
sortBy: any;
|
|
6
|
-
setSortBy: any;
|
|
7
|
-
searchQuery: any;
|
|
8
|
-
setSearchQuery: any;
|
|
9
|
-
selectedBrowser: any;
|
|
10
|
-
setSelectedBrowser: any;
|
|
11
|
-
selectedViewport: any;
|
|
12
|
-
setSelectedViewport: any;
|
|
13
|
-
availableFilters: any;
|
|
14
|
-
counts: {
|
|
15
|
-
all: number;
|
|
16
|
-
failed: number;
|
|
17
|
-
passed: number;
|
|
18
|
-
new: number;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function useImageLoader(src: any): any;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export namespace queryKeys {
|
|
2
|
-
let auth: string[];
|
|
3
|
-
function authStatus(): string[];
|
|
4
|
-
let config: string[];
|
|
5
|
-
function projectConfig(): string[];
|
|
6
|
-
function globalConfig(): string[];
|
|
7
|
-
let tdd: string[];
|
|
8
|
-
function reportData(): string[];
|
|
9
|
-
function status(): string[];
|
|
10
|
-
let cloud: string[];
|
|
11
|
-
function projects(): string[];
|
|
12
|
-
function builds(orgSlug: any, projectSlug: any): any[];
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if we're in static mode (data embedded in HTML)
|
|
3
|
-
*/
|
|
4
|
-
export function isStaticMode(): boolean;
|
|
5
|
-
/**
|
|
6
|
-
* Fetch report data from server or return embedded static data
|
|
7
|
-
*/
|
|
8
|
-
export function fetchReportData(): Promise<any>;
|
|
9
|
-
export function acceptBaseline(comparisonId: any): Promise<any>;
|
|
10
|
-
export function acceptAllBaselines(): Promise<any>;
|
|
11
|
-
export function resetBaselines(): Promise<any>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export function getStatusInfo(comparison: any): {
|
|
2
|
-
type: string;
|
|
3
|
-
label: string;
|
|
4
|
-
description: string;
|
|
5
|
-
icon: React.ForwardRefExoticComponent<any>;
|
|
6
|
-
colorClass: string;
|
|
7
|
-
} | {
|
|
8
|
-
type: string;
|
|
9
|
-
label: string;
|
|
10
|
-
icon: React.ForwardRefExoticComponent<any>;
|
|
11
|
-
colorClass: string;
|
|
12
|
-
description?: undefined;
|
|
13
|
-
};
|
|
14
|
-
export function calculatePassRate(summary: any): number;
|
|
15
|
-
export function sortComparisons(comparisons: any, sortBy: any): any[];
|
|
16
|
-
export function filterComparisons(comparisons: any, filter: any): any;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export namespace VIEW_MODES {
|
|
2
|
-
let OVERLAY: string;
|
|
3
|
-
let TOGGLE: string;
|
|
4
|
-
let ONION: string;
|
|
5
|
-
let SIDE_BY_SIDE: string;
|
|
6
|
-
}
|
|
7
|
-
export namespace FILTER_TYPES {
|
|
8
|
-
let ALL: string;
|
|
9
|
-
let FAILED: string;
|
|
10
|
-
let PASSED: string;
|
|
11
|
-
let NEW: string;
|
|
12
|
-
}
|
|
13
|
-
export namespace SORT_TYPES {
|
|
14
|
-
let PRIORITY: string;
|
|
15
|
-
let NAME: string;
|
|
16
|
-
let TIME: string;
|
|
17
|
-
}
|
|
18
|
-
export namespace CONNECTION_STATUS {
|
|
19
|
-
let CONNECTING: string;
|
|
20
|
-
let CONNECTED: string;
|
|
21
|
-
let DISCONNECTED: string;
|
|
22
|
-
}
|
|
23
|
-
export namespace COMPARISON_STATUS {
|
|
24
|
-
let PASSED_1: string;
|
|
25
|
-
export { PASSED_1 as PASSED };
|
|
26
|
-
let FAILED_1: string;
|
|
27
|
-
export { FAILED_1 as FAILED };
|
|
28
|
-
let NEW_1: string;
|
|
29
|
-
export { NEW_1 as NEW };
|
|
30
|
-
export let BASELINE_CREATED: string;
|
|
31
|
-
export let ERROR: string;
|
|
32
|
-
}
|
|
33
|
-
export namespace USER_ACTION {
|
|
34
|
-
let ACCEPTING: string;
|
|
35
|
-
let ACCEPTED: string;
|
|
36
|
-
let REJECTED: string;
|
|
37
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a new Vizzly instance with custom configuration
|
|
3
|
-
*
|
|
4
|
-
* @param {import('../types').VizzlyConfig} [config] - Configuration options
|
|
5
|
-
* @returns {Promise<VizzlySDK>} Configured Vizzly SDK instance
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* // Create with custom config
|
|
9
|
-
* import { createVizzly } from '@vizzly-testing/cli/sdk';
|
|
10
|
-
*
|
|
11
|
-
* const vizzly = await createVizzly({
|
|
12
|
-
* apiKey: process.env.VIZZLY_TOKEN,
|
|
13
|
-
* apiUrl: 'https://app.vizzly.dev',
|
|
14
|
-
* server: {
|
|
15
|
-
* port: 3003,
|
|
16
|
-
* enabled: true
|
|
17
|
-
* }
|
|
18
|
-
* });
|
|
19
|
-
*
|
|
20
|
-
* // Start the server
|
|
21
|
-
* await vizzly.start();
|
|
22
|
-
*
|
|
23
|
-
* // Take screenshots
|
|
24
|
-
* const screenshot = await getScreenshotSomehow();
|
|
25
|
-
* await vizzly.screenshot('my-test', screenshot);
|
|
26
|
-
*
|
|
27
|
-
* // Upload results
|
|
28
|
-
* const result = await vizzly.upload();
|
|
29
|
-
* console.log(`Build URL: ${result.url}`);
|
|
30
|
-
*
|
|
31
|
-
* // Cleanup
|
|
32
|
-
* await vizzly.stop();
|
|
33
|
-
*/
|
|
34
|
-
export function createVizzly(config?: any, options?: {}): Promise<VizzlySDK>;
|
|
35
|
-
/**
|
|
36
|
-
* @typedef {Object} VizzlySDK
|
|
37
|
-
* @property {Function} start - Start the Vizzly server
|
|
38
|
-
* @property {Function} stop - Stop the Vizzly server
|
|
39
|
-
* @property {Function} screenshot - Capture a screenshot
|
|
40
|
-
* @property {Function} upload - Upload screenshots to Vizzly
|
|
41
|
-
* @property {Function} compare - Run local comparison (TDD mode)
|
|
42
|
-
* @property {Function} getConfig - Get current configuration
|
|
43
|
-
* @property {Function} on - Subscribe to events
|
|
44
|
-
* @property {Function} off - Unsubscribe from events
|
|
45
|
-
*/
|
|
46
|
-
/**
|
|
47
|
-
* VizzlySDK class implementation
|
|
48
|
-
* @class
|
|
49
|
-
* @extends {EventEmitter}
|
|
50
|
-
*/
|
|
51
|
-
export class VizzlySDK {
|
|
52
|
-
/**
|
|
53
|
-
* @param {import('../types').VizzlyConfig} config - Configuration
|
|
54
|
-
* @param {Object} services - Service instances
|
|
55
|
-
*/
|
|
56
|
-
constructor(config: any, services: any);
|
|
57
|
-
config: any;
|
|
58
|
-
services: any;
|
|
59
|
-
server: ScreenshotServer;
|
|
60
|
-
currentBuildId: any;
|
|
61
|
-
/**
|
|
62
|
-
* Stop the Vizzly server
|
|
63
|
-
* @returns {Promise<void>}
|
|
64
|
-
*/
|
|
65
|
-
stop(): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Get current configuration
|
|
68
|
-
* @returns {Object} Current config
|
|
69
|
-
*/
|
|
70
|
-
getConfig(): any;
|
|
71
|
-
/**
|
|
72
|
-
* Start the Vizzly server
|
|
73
|
-
* @returns {Promise<{port: number, url: string}>} Server information
|
|
74
|
-
*/
|
|
75
|
-
start(): Promise<{
|
|
76
|
-
port: number;
|
|
77
|
-
url: string;
|
|
78
|
-
}>;
|
|
79
|
-
/**
|
|
80
|
-
* Capture a screenshot
|
|
81
|
-
* @param {string} name - Screenshot name
|
|
82
|
-
* @param {Buffer|string} imageBuffer - Image data as a Buffer, or a file path to an image
|
|
83
|
-
* @param {import('../types').ScreenshotOptions} [options] - Options
|
|
84
|
-
* @returns {Promise<void>}
|
|
85
|
-
* @throws {VizzlyError} When server is not running
|
|
86
|
-
* @throws {VizzlyError} When file path is provided but file doesn't exist
|
|
87
|
-
* @throws {VizzlyError} When file cannot be read due to permissions or I/O errors
|
|
88
|
-
*/
|
|
89
|
-
screenshot(name: string, imageBuffer: Buffer | string, options?: any): Promise<void>;
|
|
90
|
-
/**
|
|
91
|
-
* Upload all captured screenshots
|
|
92
|
-
* @param {import('../types').UploadOptions} [options] - Upload options
|
|
93
|
-
* @returns {Promise<import('../types').UploadResult>} Upload result
|
|
94
|
-
*/
|
|
95
|
-
upload(options?: any): Promise<any>;
|
|
96
|
-
/**
|
|
97
|
-
* Run local comparison in TDD mode
|
|
98
|
-
* @param {string} name - Screenshot name
|
|
99
|
-
* @param {Buffer|string} imageBuffer - Current image as a Buffer, or a file path to an image
|
|
100
|
-
* @returns {Promise<import('../types').ComparisonResult>} Comparison result
|
|
101
|
-
* @throws {VizzlyError} When file path is provided but file doesn't exist
|
|
102
|
-
* @throws {VizzlyError} When file cannot be read due to permissions or I/O errors
|
|
103
|
-
*/
|
|
104
|
-
compare(name: string, imageBuffer: Buffer | string): Promise<any>;
|
|
105
|
-
}
|
|
106
|
-
export { loadConfig } from "../utils/config-loader.js";
|
|
107
|
-
export * as output from "../utils/output.js";
|
|
108
|
-
export { createUploader } from "../services/uploader.js";
|
|
109
|
-
export { createTDDService } from "../services/tdd-service.js";
|
|
110
|
-
import { ScreenshotServer } from '../services/screenshot-server.js';
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
export function createApiHandler(apiService: any): {
|
|
2
|
-
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
3
|
-
statusCode: number;
|
|
4
|
-
body: {
|
|
5
|
-
success: boolean;
|
|
6
|
-
disabled: boolean;
|
|
7
|
-
count: number;
|
|
8
|
-
message: string;
|
|
9
|
-
error?: undefined;
|
|
10
|
-
originalPath?: undefined;
|
|
11
|
-
filePath?: undefined;
|
|
12
|
-
receivedType?: undefined;
|
|
13
|
-
name?: undefined;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
statusCode: number;
|
|
17
|
-
body: {
|
|
18
|
-
error: string;
|
|
19
|
-
success?: undefined;
|
|
20
|
-
disabled?: undefined;
|
|
21
|
-
count?: undefined;
|
|
22
|
-
message?: undefined;
|
|
23
|
-
originalPath?: undefined;
|
|
24
|
-
filePath?: undefined;
|
|
25
|
-
receivedType?: undefined;
|
|
26
|
-
name?: undefined;
|
|
27
|
-
};
|
|
28
|
-
} | {
|
|
29
|
-
statusCode: number;
|
|
30
|
-
body: {
|
|
31
|
-
error: string;
|
|
32
|
-
originalPath: any;
|
|
33
|
-
success?: undefined;
|
|
34
|
-
disabled?: undefined;
|
|
35
|
-
count?: undefined;
|
|
36
|
-
message?: undefined;
|
|
37
|
-
filePath?: undefined;
|
|
38
|
-
receivedType?: undefined;
|
|
39
|
-
name?: undefined;
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
|
-
statusCode: number;
|
|
43
|
-
body: {
|
|
44
|
-
error: string;
|
|
45
|
-
filePath: any;
|
|
46
|
-
success?: undefined;
|
|
47
|
-
disabled?: undefined;
|
|
48
|
-
count?: undefined;
|
|
49
|
-
message?: undefined;
|
|
50
|
-
originalPath?: undefined;
|
|
51
|
-
receivedType?: undefined;
|
|
52
|
-
name?: undefined;
|
|
53
|
-
};
|
|
54
|
-
} | {
|
|
55
|
-
statusCode: number;
|
|
56
|
-
body: {
|
|
57
|
-
error: string;
|
|
58
|
-
receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
59
|
-
success?: undefined;
|
|
60
|
-
disabled?: undefined;
|
|
61
|
-
count?: undefined;
|
|
62
|
-
message?: undefined;
|
|
63
|
-
originalPath?: undefined;
|
|
64
|
-
filePath?: undefined;
|
|
65
|
-
name?: undefined;
|
|
66
|
-
};
|
|
67
|
-
} | {
|
|
68
|
-
statusCode: number;
|
|
69
|
-
body: {
|
|
70
|
-
success: boolean;
|
|
71
|
-
name: any;
|
|
72
|
-
count: number;
|
|
73
|
-
disabled?: undefined;
|
|
74
|
-
message?: undefined;
|
|
75
|
-
error?: undefined;
|
|
76
|
-
originalPath?: undefined;
|
|
77
|
-
filePath?: undefined;
|
|
78
|
-
receivedType?: undefined;
|
|
79
|
-
};
|
|
80
|
-
}>;
|
|
81
|
-
getScreenshotCount: () => number;
|
|
82
|
-
flush: () => Promise<{
|
|
83
|
-
uploaded: number;
|
|
84
|
-
failed: number;
|
|
85
|
-
total: number;
|
|
86
|
-
}>;
|
|
87
|
-
cleanup: () => void;
|
|
88
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
export function createTddHandler(config: any, workingDir: any, baselineBuild: any, baselineComparison: any, setBaseline?: boolean): {
|
|
2
|
-
initialize: () => Promise<void>;
|
|
3
|
-
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
4
|
-
statusCode: number;
|
|
5
|
-
body: {
|
|
6
|
-
error: string;
|
|
7
|
-
details: any;
|
|
8
|
-
tddMode: boolean;
|
|
9
|
-
originalPath?: undefined;
|
|
10
|
-
filePath?: undefined;
|
|
11
|
-
receivedType?: undefined;
|
|
12
|
-
comparison?: undefined;
|
|
13
|
-
status?: undefined;
|
|
14
|
-
message?: undefined;
|
|
15
|
-
success?: undefined;
|
|
16
|
-
};
|
|
17
|
-
} | {
|
|
18
|
-
statusCode: number;
|
|
19
|
-
body: {
|
|
20
|
-
error: string;
|
|
21
|
-
originalPath: any;
|
|
22
|
-
tddMode: boolean;
|
|
23
|
-
details?: undefined;
|
|
24
|
-
filePath?: undefined;
|
|
25
|
-
receivedType?: undefined;
|
|
26
|
-
comparison?: undefined;
|
|
27
|
-
status?: undefined;
|
|
28
|
-
message?: undefined;
|
|
29
|
-
success?: undefined;
|
|
30
|
-
};
|
|
31
|
-
} | {
|
|
32
|
-
statusCode: number;
|
|
33
|
-
body: {
|
|
34
|
-
error: string;
|
|
35
|
-
filePath: any;
|
|
36
|
-
tddMode: boolean;
|
|
37
|
-
details?: undefined;
|
|
38
|
-
originalPath?: undefined;
|
|
39
|
-
receivedType?: undefined;
|
|
40
|
-
comparison?: undefined;
|
|
41
|
-
status?: undefined;
|
|
42
|
-
message?: undefined;
|
|
43
|
-
success?: undefined;
|
|
44
|
-
};
|
|
45
|
-
} | {
|
|
46
|
-
statusCode: number;
|
|
47
|
-
body: {
|
|
48
|
-
error: string;
|
|
49
|
-
tddMode: boolean;
|
|
50
|
-
details?: undefined;
|
|
51
|
-
originalPath?: undefined;
|
|
52
|
-
filePath?: undefined;
|
|
53
|
-
receivedType?: undefined;
|
|
54
|
-
comparison?: undefined;
|
|
55
|
-
status?: undefined;
|
|
56
|
-
message?: undefined;
|
|
57
|
-
success?: undefined;
|
|
58
|
-
};
|
|
59
|
-
} | {
|
|
60
|
-
statusCode: number;
|
|
61
|
-
body: {
|
|
62
|
-
error: string;
|
|
63
|
-
receivedType: "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function";
|
|
64
|
-
tddMode: boolean;
|
|
65
|
-
details?: undefined;
|
|
66
|
-
originalPath?: undefined;
|
|
67
|
-
filePath?: undefined;
|
|
68
|
-
comparison?: undefined;
|
|
69
|
-
status?: undefined;
|
|
70
|
-
message?: undefined;
|
|
71
|
-
success?: undefined;
|
|
72
|
-
};
|
|
73
|
-
} | {
|
|
74
|
-
statusCode: number;
|
|
75
|
-
body: {
|
|
76
|
-
error: string;
|
|
77
|
-
details: string;
|
|
78
|
-
comparison: {
|
|
79
|
-
name: any;
|
|
80
|
-
status: string;
|
|
81
|
-
baseline: any;
|
|
82
|
-
current: any;
|
|
83
|
-
diff: any;
|
|
84
|
-
diffPercentage: any;
|
|
85
|
-
threshold: any;
|
|
86
|
-
};
|
|
87
|
-
tddMode: boolean;
|
|
88
|
-
originalPath?: undefined;
|
|
89
|
-
filePath?: undefined;
|
|
90
|
-
receivedType?: undefined;
|
|
91
|
-
status?: undefined;
|
|
92
|
-
message?: undefined;
|
|
93
|
-
success?: undefined;
|
|
94
|
-
};
|
|
95
|
-
} | {
|
|
96
|
-
statusCode: number;
|
|
97
|
-
body: {
|
|
98
|
-
status: string;
|
|
99
|
-
message: string;
|
|
100
|
-
comparison: {
|
|
101
|
-
name: any;
|
|
102
|
-
status: string;
|
|
103
|
-
baseline: any;
|
|
104
|
-
current: any;
|
|
105
|
-
diff?: undefined;
|
|
106
|
-
diffPercentage?: undefined;
|
|
107
|
-
threshold?: undefined;
|
|
108
|
-
};
|
|
109
|
-
tddMode: boolean;
|
|
110
|
-
error?: undefined;
|
|
111
|
-
details?: undefined;
|
|
112
|
-
originalPath?: undefined;
|
|
113
|
-
filePath?: undefined;
|
|
114
|
-
receivedType?: undefined;
|
|
115
|
-
success?: undefined;
|
|
116
|
-
};
|
|
117
|
-
} | {
|
|
118
|
-
statusCode: number;
|
|
119
|
-
body: {
|
|
120
|
-
success: boolean;
|
|
121
|
-
comparison: {
|
|
122
|
-
name: any;
|
|
123
|
-
status: string;
|
|
124
|
-
baseline?: undefined;
|
|
125
|
-
current?: undefined;
|
|
126
|
-
diff?: undefined;
|
|
127
|
-
diffPercentage?: undefined;
|
|
128
|
-
threshold?: undefined;
|
|
129
|
-
};
|
|
130
|
-
tddMode: boolean;
|
|
131
|
-
error?: undefined;
|
|
132
|
-
details?: undefined;
|
|
133
|
-
originalPath?: undefined;
|
|
134
|
-
filePath?: undefined;
|
|
135
|
-
receivedType?: undefined;
|
|
136
|
-
status?: undefined;
|
|
137
|
-
message?: undefined;
|
|
138
|
-
};
|
|
139
|
-
}>;
|
|
140
|
-
getResults: () => Promise<{
|
|
141
|
-
total: number;
|
|
142
|
-
passed: number;
|
|
143
|
-
failed: number;
|
|
144
|
-
new: number;
|
|
145
|
-
errors: number;
|
|
146
|
-
comparisons: any[];
|
|
147
|
-
baseline: any;
|
|
148
|
-
}>;
|
|
149
|
-
acceptBaseline: (comparisonId: any) => Promise<any>;
|
|
150
|
-
acceptAllBaselines: () => Promise<{
|
|
151
|
-
count: number;
|
|
152
|
-
}>;
|
|
153
|
-
resetBaselines: () => Promise<{
|
|
154
|
-
success: boolean;
|
|
155
|
-
deletedBaselines: number;
|
|
156
|
-
deletedCurrents: number;
|
|
157
|
-
deletedDiffs: number;
|
|
158
|
-
}>;
|
|
159
|
-
cleanup: () => void;
|
|
160
|
-
tddService: TddService;
|
|
161
|
-
};
|
|
162
|
-
import { TddService } from '../../services/tdd-service.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CORS Middleware
|
|
3
|
-
* Handles cross-origin requests and preflight OPTIONS
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Apply CORS headers and handle OPTIONS preflight
|
|
7
|
-
* @param {http.IncomingMessage} req
|
|
8
|
-
* @param {http.ServerResponse} res
|
|
9
|
-
* @returns {boolean} True if request was handled (OPTIONS), false to continue
|
|
10
|
-
*/
|
|
11
|
-
export function corsMiddleware(req: http.IncomingMessage, res: http.ServerResponse): boolean;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* JSON Body Parser Middleware
|
|
3
|
-
* Parses JSON request bodies for POST requests
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Parse JSON body from request
|
|
7
|
-
* @param {http.IncomingMessage} req
|
|
8
|
-
* @returns {Promise<Object|null>} Parsed JSON body or null for non-POST
|
|
9
|
-
*/
|
|
10
|
-
export function parseJsonBody(req: http.IncomingMessage): Promise<any | null>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Response Helpers
|
|
3
|
-
* Standardized response utilities for consistent API responses
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Send JSON response
|
|
7
|
-
* @param {http.ServerResponse} res
|
|
8
|
-
* @param {number} statusCode
|
|
9
|
-
* @param {Object} data
|
|
10
|
-
*/
|
|
11
|
-
export function sendJson(res: http.ServerResponse, statusCode: number, data: any): void;
|
|
12
|
-
/**
|
|
13
|
-
* Send success response
|
|
14
|
-
* @param {http.ServerResponse} res
|
|
15
|
-
* @param {Object} data
|
|
16
|
-
*/
|
|
17
|
-
export function sendSuccess(res: http.ServerResponse, data?: any): void;
|
|
18
|
-
/**
|
|
19
|
-
* Send error response
|
|
20
|
-
* @param {http.ServerResponse} res
|
|
21
|
-
* @param {number} statusCode
|
|
22
|
-
* @param {string} message
|
|
23
|
-
*/
|
|
24
|
-
export function sendError(res: http.ServerResponse, statusCode: number, message: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* Send 404 Not Found
|
|
27
|
-
* @param {http.ServerResponse} res
|
|
28
|
-
* @param {string} message
|
|
29
|
-
*/
|
|
30
|
-
export function sendNotFound(res: http.ServerResponse, message?: string): void;
|
|
31
|
-
/**
|
|
32
|
-
* Send 503 Service Unavailable
|
|
33
|
-
* @param {http.ServerResponse} res
|
|
34
|
-
* @param {string} serviceName
|
|
35
|
-
*/
|
|
36
|
-
export function sendServiceUnavailable(res: http.ServerResponse, serviceName: string): void;
|
|
37
|
-
/**
|
|
38
|
-
* Send HTML response
|
|
39
|
-
* @param {http.ServerResponse} res
|
|
40
|
-
* @param {number} statusCode
|
|
41
|
-
* @param {string} html
|
|
42
|
-
*/
|
|
43
|
-
export function sendHtml(res: http.ServerResponse, statusCode: number, html: string): void;
|
|
44
|
-
/**
|
|
45
|
-
* Send file response with specified content type
|
|
46
|
-
* @param {http.ServerResponse} res
|
|
47
|
-
* @param {Buffer|string} content
|
|
48
|
-
* @param {string} contentType
|
|
49
|
-
*/
|
|
50
|
-
export function sendFile(res: http.ServerResponse, content: Buffer | string, contentType: string): void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create baseline router
|
|
3
|
-
* @param {Object} context - Router context
|
|
4
|
-
* @param {Object} context.screenshotHandler - Screenshot handler
|
|
5
|
-
* @param {Object} context.tddService - TDD service for baseline downloads
|
|
6
|
-
* @param {Object} context.authService - Auth service for OAuth requests
|
|
7
|
-
* @returns {Function} Route handler
|
|
8
|
-
*/
|
|
9
|
-
export function createBaselineRouter({ screenshotHandler, tddService, authService, }: {
|
|
10
|
-
screenshotHandler: any;
|
|
11
|
-
tddService: any;
|
|
12
|
-
authService: any;
|
|
13
|
-
}): Function;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create cloud proxy router
|
|
3
|
-
* @param {Object} context - Router context
|
|
4
|
-
* @param {Object} context.authService - Auth service for token management
|
|
5
|
-
* @param {string} context.apiUrl - Base API URL (default: https://app.vizzly.dev)
|
|
6
|
-
* @returns {Function} Route handler
|
|
7
|
-
*/
|
|
8
|
-
export function createCloudProxyRouter({ authService, apiUrl: _apiUrl, }: {
|
|
9
|
-
authService: any;
|
|
10
|
-
apiUrl: string;
|
|
11
|
-
}): Function;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create config router
|
|
3
|
-
* @param {Object} context - Router context
|
|
4
|
-
* @param {Object} context.configService - Config service
|
|
5
|
-
* @returns {Function} Route handler
|
|
6
|
-
*/
|
|
7
|
-
export function createConfigRouter({ configService }: {
|
|
8
|
-
configService: any;
|
|
9
|
-
}): Function;
|