@vizzly-testing/cli 0.3.2 → 0.5.0
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/README.md +50 -28
- package/dist/cli.js +34 -30
- package/dist/client/index.js +1 -1
- package/dist/commands/run.js +38 -11
- package/dist/commands/tdd.js +30 -18
- package/dist/commands/upload.js +56 -5
- package/dist/server/handlers/api-handler.js +83 -0
- package/dist/server/handlers/tdd-handler.js +138 -0
- package/dist/server/http-server.js +132 -0
- package/dist/services/api-service.js +22 -2
- package/dist/services/server-manager.js +45 -29
- package/dist/services/test-runner.js +66 -69
- package/dist/services/uploader.js +11 -4
- package/dist/types/commands/run.d.ts +4 -1
- package/dist/types/commands/tdd.d.ts +5 -1
- package/dist/types/sdk/index.d.ts +6 -6
- package/dist/types/server/handlers/api-handler.d.ts +49 -0
- package/dist/types/server/handlers/tdd-handler.d.ts +85 -0
- package/dist/types/server/http-server.d.ts +5 -0
- package/dist/types/services/api-service.d.ts +1 -0
- package/dist/types/services/server-manager.d.ts +148 -3
- package/dist/types/services/test-runner.d.ts +1 -0
- package/dist/types/services/uploader.d.ts +2 -1
- package/dist/types/utils/ci-env.d.ts +55 -0
- package/dist/types/utils/config-helpers.d.ts +1 -1
- package/dist/types/utils/console-ui.d.ts +1 -1
- package/dist/types/utils/git.d.ts +12 -0
- package/dist/utils/ci-env.js +293 -0
- package/dist/utils/console-ui.js +4 -14
- package/dist/utils/git.js +38 -0
- package/docs/api-reference.md +17 -5
- package/docs/getting-started.md +1 -1
- package/docs/tdd-mode.md +9 -9
- package/docs/test-integration.md +9 -17
- package/docs/upload-command.md +7 -0
- package/package.json +4 -5
- package/dist/screenshot-wrapper.js +0 -68
- package/dist/server/index.js +0 -522
- package/dist/services/service-utils.js +0 -171
- package/dist/types/index.js +0 -153
- package/dist/types/screenshot-wrapper.d.ts +0 -27
- package/dist/types/server/index.d.ts +0 -38
- package/dist/types/services/service-utils.d.ts +0 -45
- package/dist/types/types/index.d.ts +0 -373
- package/dist/types/utils/diagnostics.d.ts +0 -69
- package/dist/types/utils/error-messages.d.ts +0 -42
- package/dist/types/utils/framework-detector.d.ts +0 -5
- package/dist/types/utils/help.d.ts +0 -11
- package/dist/types/utils/image-comparison.d.ts +0 -42
- package/dist/types/utils/package.d.ts +0 -1
- package/dist/types/utils/project-detection.d.ts +0 -19
- package/dist/types/utils/ui-helpers.d.ts +0 -23
- package/dist/utils/diagnostics.js +0 -184
- package/dist/utils/error-messages.js +0 -34
- package/dist/utils/framework-detector.js +0 -40
- package/dist/utils/help.js +0 -66
- package/dist/utils/image-comparison.js +0 -172
- package/dist/utils/package.js +0 -9
- package/dist/utils/project-detection.js +0 -145
- package/dist/utils/ui-helpers.js +0 -86
|
@@ -4,7 +4,10 @@
|
|
|
4
4
|
* @param {Object} options - Command options
|
|
5
5
|
* @param {Object} globalOptions - Global CLI options
|
|
6
6
|
*/
|
|
7
|
-
export function runCommand(testCommand: string, options?: any, globalOptions?: any): Promise<
|
|
7
|
+
export function runCommand(testCommand: string, options?: any, globalOptions?: any): Promise<{
|
|
8
|
+
success: boolean;
|
|
9
|
+
exitCode: number;
|
|
10
|
+
}>;
|
|
8
11
|
/**
|
|
9
12
|
* Validate run options
|
|
10
13
|
* @param {string} testCommand - Test command to execute
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
* @param {string} testCommand - Test command to execute
|
|
4
4
|
* @param {Object} options - Command options
|
|
5
5
|
* @param {Object} globalOptions - Global CLI options
|
|
6
|
+
* @returns {Promise<{result: Object, cleanup: Function}>} Result and cleanup function
|
|
6
7
|
*/
|
|
7
|
-
export function tddCommand(testCommand: string, options?: any, globalOptions?: any): Promise<
|
|
8
|
+
export function tddCommand(testCommand: string, options?: any, globalOptions?: any): Promise<{
|
|
9
|
+
result: any;
|
|
10
|
+
cleanup: Function;
|
|
11
|
+
}>;
|
|
8
12
|
/**
|
|
9
13
|
* Validate TDD options
|
|
10
14
|
* @param {string} testCommand - Test command to execute
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* // Cleanup
|
|
32
32
|
* await vizzly.stop();
|
|
33
33
|
*/
|
|
34
|
-
export function createVizzly(config?:
|
|
34
|
+
export function createVizzly(config?: any, options?: {}): Promise<VizzlySDK>;
|
|
35
35
|
/**
|
|
36
36
|
* @typedef {Object} VizzlySDK
|
|
37
37
|
* @property {Function} start - Start the Vizzly server
|
|
@@ -54,8 +54,8 @@ export class VizzlySDK extends EventEmitter<[never]> {
|
|
|
54
54
|
* @param {import('../utils/logger').Logger} logger - Logger instance
|
|
55
55
|
* @param {Object} services - Service instances
|
|
56
56
|
*/
|
|
57
|
-
constructor(config:
|
|
58
|
-
config:
|
|
57
|
+
constructor(config: any, logger: import("../utils/logger").Logger, services: any);
|
|
58
|
+
config: any;
|
|
59
59
|
logger: import("../utils/logger.js").Logger;
|
|
60
60
|
services: any;
|
|
61
61
|
server: ScreenshotServer;
|
|
@@ -85,20 +85,20 @@ export class VizzlySDK extends EventEmitter<[never]> {
|
|
|
85
85
|
* @param {import('../types').ScreenshotOptions} [options] - Options
|
|
86
86
|
* @returns {Promise<void>}
|
|
87
87
|
*/
|
|
88
|
-
screenshot(name: string, imageBuffer: Buffer, options?:
|
|
88
|
+
screenshot(name: string, imageBuffer: Buffer, options?: any): Promise<void>;
|
|
89
89
|
/**
|
|
90
90
|
* Upload all captured screenshots
|
|
91
91
|
* @param {import('../types').UploadOptions} [options] - Upload options
|
|
92
92
|
* @returns {Promise<import('../types').UploadResult>} Upload result
|
|
93
93
|
*/
|
|
94
|
-
upload(options?:
|
|
94
|
+
upload(options?: any): Promise<any>;
|
|
95
95
|
/**
|
|
96
96
|
* Run local comparison in TDD mode
|
|
97
97
|
* @param {string} name - Screenshot name
|
|
98
98
|
* @param {Buffer} imageBuffer - Current image
|
|
99
99
|
* @returns {Promise<import('../types').ComparisonResult>} Comparison result
|
|
100
100
|
*/
|
|
101
|
-
compare(name: string, imageBuffer: Buffer): Promise<
|
|
101
|
+
compare(name: string, imageBuffer: Buffer): Promise<any>;
|
|
102
102
|
}
|
|
103
103
|
export { loadConfig } from "../utils/config-loader.js";
|
|
104
104
|
export { createLogger } from "../utils/logger.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
name?: undefined;
|
|
11
|
+
skipped?: undefined;
|
|
12
|
+
};
|
|
13
|
+
} | {
|
|
14
|
+
statusCode: number;
|
|
15
|
+
body: {
|
|
16
|
+
error: string;
|
|
17
|
+
success?: undefined;
|
|
18
|
+
disabled?: undefined;
|
|
19
|
+
count?: undefined;
|
|
20
|
+
message?: undefined;
|
|
21
|
+
name?: undefined;
|
|
22
|
+
skipped?: undefined;
|
|
23
|
+
};
|
|
24
|
+
} | {
|
|
25
|
+
statusCode: number;
|
|
26
|
+
body: {
|
|
27
|
+
success: boolean;
|
|
28
|
+
name: any;
|
|
29
|
+
skipped: any;
|
|
30
|
+
count: number;
|
|
31
|
+
disabled?: undefined;
|
|
32
|
+
message?: undefined;
|
|
33
|
+
error?: undefined;
|
|
34
|
+
};
|
|
35
|
+
} | {
|
|
36
|
+
statusCode: number;
|
|
37
|
+
body: {
|
|
38
|
+
success: boolean;
|
|
39
|
+
name: any;
|
|
40
|
+
disabled: boolean;
|
|
41
|
+
message: string;
|
|
42
|
+
count?: undefined;
|
|
43
|
+
error?: undefined;
|
|
44
|
+
skipped?: undefined;
|
|
45
|
+
};
|
|
46
|
+
}>;
|
|
47
|
+
getScreenshotCount: () => number;
|
|
48
|
+
cleanup: () => void;
|
|
49
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export function createTddHandler(config: any, workingDir: any, baselineBuild: any, baselineComparison: any): {
|
|
2
|
+
initialize: () => Promise<void>;
|
|
3
|
+
registerBuild: (buildId: any) => void;
|
|
4
|
+
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
5
|
+
statusCode: number;
|
|
6
|
+
body: {
|
|
7
|
+
error: string;
|
|
8
|
+
details: string;
|
|
9
|
+
comparison: {
|
|
10
|
+
name: any;
|
|
11
|
+
status: string;
|
|
12
|
+
baseline: any;
|
|
13
|
+
current: any;
|
|
14
|
+
diff: any;
|
|
15
|
+
};
|
|
16
|
+
tddMode: boolean;
|
|
17
|
+
status?: undefined;
|
|
18
|
+
message?: undefined;
|
|
19
|
+
success?: undefined;
|
|
20
|
+
};
|
|
21
|
+
} | {
|
|
22
|
+
statusCode: number;
|
|
23
|
+
body: {
|
|
24
|
+
status: string;
|
|
25
|
+
message: string;
|
|
26
|
+
comparison: {
|
|
27
|
+
name: any;
|
|
28
|
+
status: string;
|
|
29
|
+
baseline: any;
|
|
30
|
+
current: any;
|
|
31
|
+
diff?: undefined;
|
|
32
|
+
};
|
|
33
|
+
tddMode: boolean;
|
|
34
|
+
error?: undefined;
|
|
35
|
+
details?: undefined;
|
|
36
|
+
success?: undefined;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
statusCode: number;
|
|
40
|
+
body: {
|
|
41
|
+
error: string;
|
|
42
|
+
tddMode: boolean;
|
|
43
|
+
details?: undefined;
|
|
44
|
+
comparison?: undefined;
|
|
45
|
+
status?: undefined;
|
|
46
|
+
message?: undefined;
|
|
47
|
+
success?: undefined;
|
|
48
|
+
};
|
|
49
|
+
} | {
|
|
50
|
+
statusCode: number;
|
|
51
|
+
body: {
|
|
52
|
+
success: boolean;
|
|
53
|
+
comparison: {
|
|
54
|
+
name: any;
|
|
55
|
+
status: string;
|
|
56
|
+
baseline?: undefined;
|
|
57
|
+
current?: undefined;
|
|
58
|
+
diff?: undefined;
|
|
59
|
+
};
|
|
60
|
+
tddMode: boolean;
|
|
61
|
+
error?: undefined;
|
|
62
|
+
details?: undefined;
|
|
63
|
+
status?: undefined;
|
|
64
|
+
message?: undefined;
|
|
65
|
+
};
|
|
66
|
+
}>;
|
|
67
|
+
getScreenshotCount: (buildId: any) => any;
|
|
68
|
+
finishBuild: (buildId: any) => Promise<{
|
|
69
|
+
id: any;
|
|
70
|
+
name: any;
|
|
71
|
+
tddMode: boolean;
|
|
72
|
+
results: {
|
|
73
|
+
total: number;
|
|
74
|
+
passed: number;
|
|
75
|
+
failed: number;
|
|
76
|
+
new: number;
|
|
77
|
+
errors: number;
|
|
78
|
+
comparisons: any[];
|
|
79
|
+
baseline: any;
|
|
80
|
+
};
|
|
81
|
+
url: any;
|
|
82
|
+
passed: boolean;
|
|
83
|
+
}>;
|
|
84
|
+
cleanup: () => void;
|
|
85
|
+
};
|
|
@@ -1,8 +1,153 @@
|
|
|
1
1
|
export class ServerManager extends BaseService {
|
|
2
2
|
constructor(config: any, logger: any);
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
httpServer: {
|
|
4
|
+
start: () => Promise<any>;
|
|
5
|
+
stop: () => Promise<any>;
|
|
6
|
+
getServer: () => any;
|
|
7
|
+
};
|
|
8
|
+
handler: {
|
|
9
|
+
initialize: () => Promise<void>;
|
|
10
|
+
registerBuild: (buildId: any) => void;
|
|
11
|
+
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
12
|
+
statusCode: number;
|
|
13
|
+
body: {
|
|
14
|
+
error: string;
|
|
15
|
+
details: string;
|
|
16
|
+
comparison: {
|
|
17
|
+
name: any;
|
|
18
|
+
status: string;
|
|
19
|
+
baseline: any;
|
|
20
|
+
current: any;
|
|
21
|
+
diff: any;
|
|
22
|
+
};
|
|
23
|
+
tddMode: boolean;
|
|
24
|
+
status?: undefined;
|
|
25
|
+
message?: undefined;
|
|
26
|
+
success?: undefined;
|
|
27
|
+
};
|
|
28
|
+
} | {
|
|
29
|
+
statusCode: number;
|
|
30
|
+
body: {
|
|
31
|
+
status: string;
|
|
32
|
+
message: string;
|
|
33
|
+
comparison: {
|
|
34
|
+
name: any;
|
|
35
|
+
status: string;
|
|
36
|
+
baseline: any;
|
|
37
|
+
current: any;
|
|
38
|
+
diff?: undefined;
|
|
39
|
+
};
|
|
40
|
+
tddMode: boolean;
|
|
41
|
+
error?: undefined;
|
|
42
|
+
details?: undefined;
|
|
43
|
+
success?: undefined;
|
|
44
|
+
};
|
|
45
|
+
} | {
|
|
46
|
+
statusCode: number;
|
|
47
|
+
body: {
|
|
48
|
+
error: string;
|
|
49
|
+
tddMode: boolean;
|
|
50
|
+
details?: undefined;
|
|
51
|
+
comparison?: undefined;
|
|
52
|
+
status?: undefined;
|
|
53
|
+
message?: undefined;
|
|
54
|
+
success?: undefined;
|
|
55
|
+
};
|
|
56
|
+
} | {
|
|
57
|
+
statusCode: number;
|
|
58
|
+
body: {
|
|
59
|
+
success: boolean;
|
|
60
|
+
comparison: {
|
|
61
|
+
name: any;
|
|
62
|
+
status: string;
|
|
63
|
+
baseline?: undefined;
|
|
64
|
+
current?: undefined;
|
|
65
|
+
diff?: undefined;
|
|
66
|
+
};
|
|
67
|
+
tddMode: boolean;
|
|
68
|
+
error?: undefined;
|
|
69
|
+
details?: undefined;
|
|
70
|
+
status?: undefined;
|
|
71
|
+
message?: undefined;
|
|
72
|
+
};
|
|
73
|
+
}>;
|
|
74
|
+
getScreenshotCount: (buildId: any) => any;
|
|
75
|
+
finishBuild: (buildId: any) => Promise<{
|
|
76
|
+
id: any;
|
|
77
|
+
name: any;
|
|
78
|
+
tddMode: boolean;
|
|
79
|
+
results: {
|
|
80
|
+
total: number;
|
|
81
|
+
passed: number;
|
|
82
|
+
failed: number;
|
|
83
|
+
new: number;
|
|
84
|
+
errors: number;
|
|
85
|
+
comparisons: any[];
|
|
86
|
+
baseline: any;
|
|
87
|
+
};
|
|
88
|
+
url: any;
|
|
89
|
+
passed: boolean;
|
|
90
|
+
}>;
|
|
91
|
+
cleanup: () => void;
|
|
92
|
+
} | {
|
|
93
|
+
handleScreenshot: (buildId: any, name: any, image: any, properties?: {}) => Promise<{
|
|
94
|
+
statusCode: number;
|
|
95
|
+
body: {
|
|
96
|
+
success: boolean;
|
|
97
|
+
disabled: boolean;
|
|
98
|
+
count: number;
|
|
99
|
+
message: string;
|
|
100
|
+
error?: undefined;
|
|
101
|
+
name?: undefined;
|
|
102
|
+
skipped?: undefined;
|
|
103
|
+
};
|
|
104
|
+
} | {
|
|
105
|
+
statusCode: number;
|
|
106
|
+
body: {
|
|
107
|
+
error: string;
|
|
108
|
+
success?: undefined;
|
|
109
|
+
disabled?: undefined;
|
|
110
|
+
count?: undefined;
|
|
111
|
+
message?: undefined;
|
|
112
|
+
name?: undefined;
|
|
113
|
+
skipped?: undefined;
|
|
114
|
+
};
|
|
115
|
+
} | {
|
|
116
|
+
statusCode: number;
|
|
117
|
+
body: {
|
|
118
|
+
success: boolean;
|
|
119
|
+
name: any;
|
|
120
|
+
skipped: any;
|
|
121
|
+
count: number;
|
|
122
|
+
disabled?: undefined;
|
|
123
|
+
message?: undefined;
|
|
124
|
+
error?: undefined;
|
|
125
|
+
};
|
|
126
|
+
} | {
|
|
127
|
+
statusCode: number;
|
|
128
|
+
body: {
|
|
129
|
+
success: boolean;
|
|
130
|
+
name: any;
|
|
131
|
+
disabled: boolean;
|
|
132
|
+
message: string;
|
|
133
|
+
count?: undefined;
|
|
134
|
+
error?: undefined;
|
|
135
|
+
skipped?: undefined;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
getScreenshotCount: () => number;
|
|
139
|
+
cleanup: () => void;
|
|
140
|
+
};
|
|
141
|
+
emitter: EventEmitter<[never]>;
|
|
142
|
+
start(buildId?: any, tddMode?: boolean): Promise<void>;
|
|
143
|
+
buildId: any;
|
|
144
|
+
tddMode: boolean;
|
|
5
145
|
createApiService(): Promise<import("./api-service.js").ApiService>;
|
|
146
|
+
get server(): {
|
|
147
|
+
emitter: EventEmitter<[never]>;
|
|
148
|
+
getScreenshotCount: (buildId: any) => any;
|
|
149
|
+
finishBuild: (buildId: any) => any;
|
|
150
|
+
};
|
|
6
151
|
}
|
|
7
152
|
import { BaseService } from './base-service.js';
|
|
8
|
-
import {
|
|
153
|
+
import { EventEmitter } from 'events';
|
|
@@ -17,6 +17,7 @@ export class TestRunner extends BaseService {
|
|
|
17
17
|
testsFailed: number;
|
|
18
18
|
screenshotsCaptured: number;
|
|
19
19
|
}>;
|
|
20
|
+
createBuild(options: any, tdd: any): Promise<any>;
|
|
20
21
|
createApiService(): Promise<import("./api-service.js").ApiService>;
|
|
21
22
|
finalizeBuild(buildId: any, isTddMode: any, success: any, executionTime: any): Promise<void>;
|
|
22
23
|
executeTestCommand(testCommand: any, env: any): Promise<any>;
|
|
@@ -8,7 +8,7 @@ export function createUploader({ apiKey, apiUrl, userAgent, command, upload: upl
|
|
|
8
8
|
command: any;
|
|
9
9
|
upload?: {};
|
|
10
10
|
}, options?: {}): {
|
|
11
|
-
upload: ({ screenshotsDir, buildName, branch, commit, message, environment, threshold, onProgress, }: {
|
|
11
|
+
upload: ({ screenshotsDir, buildName, branch, commit, message, environment, threshold, pullRequestNumber, onProgress, }: {
|
|
12
12
|
screenshotsDir: any;
|
|
13
13
|
buildName: any;
|
|
14
14
|
branch: any;
|
|
@@ -16,6 +16,7 @@ export function createUploader({ apiKey, apiUrl, userAgent, command, upload: upl
|
|
|
16
16
|
message: any;
|
|
17
17
|
environment?: string;
|
|
18
18
|
threshold: any;
|
|
19
|
+
pullRequestNumber: any;
|
|
19
20
|
onProgress?: () => void;
|
|
20
21
|
}) => Promise<{
|
|
21
22
|
success: boolean;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CI Environment Detection
|
|
3
|
+
*
|
|
4
|
+
* Generic functions to extract git and PR information from any CI provider
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Get the branch name from CI environment variables
|
|
8
|
+
* @returns {string|null} Branch name or null if not available
|
|
9
|
+
*/
|
|
10
|
+
export function getBranch(): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Get the commit SHA from CI environment variables
|
|
13
|
+
* @returns {string|null} Commit SHA or null if not available
|
|
14
|
+
*/
|
|
15
|
+
export function getCommit(): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Get the commit message from CI environment variables
|
|
18
|
+
* @returns {string|null} Commit message or null if not available
|
|
19
|
+
*/
|
|
20
|
+
export function getCommitMessage(): string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Get the pull request number from CI environment variables
|
|
23
|
+
* @returns {number|null} PR number or null if not available/not a PR
|
|
24
|
+
*/
|
|
25
|
+
export function getPullRequestNumber(): number | null;
|
|
26
|
+
/**
|
|
27
|
+
* Get the PR head SHA from CI environment variables
|
|
28
|
+
* @returns {string|null} PR head SHA or null if not available
|
|
29
|
+
*/
|
|
30
|
+
export function getPullRequestHeadSha(): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* Get the PR base SHA from CI environment variables
|
|
33
|
+
* @returns {string|null} PR base SHA or null if not available
|
|
34
|
+
*/
|
|
35
|
+
export function getPullRequestBaseSha(): string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Get the PR head ref (branch) from CI environment variables
|
|
38
|
+
* @returns {string|null} PR head ref or null if not available
|
|
39
|
+
*/
|
|
40
|
+
export function getPullRequestHeadRef(): string | null;
|
|
41
|
+
/**
|
|
42
|
+
* Get the PR base ref (target branch) from CI environment variables
|
|
43
|
+
* @returns {string|null} PR base ref or null if not available
|
|
44
|
+
*/
|
|
45
|
+
export function getPullRequestBaseRef(): string | null;
|
|
46
|
+
/**
|
|
47
|
+
* Check if we're currently in a pull request context
|
|
48
|
+
* @returns {boolean} True if in a PR context
|
|
49
|
+
*/
|
|
50
|
+
export function isPullRequest(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Get the CI provider name
|
|
53
|
+
* @returns {string} CI provider name or 'unknown'
|
|
54
|
+
*/
|
|
55
|
+
export function getCIProvider(): string;
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* @param {import('../types/index.js').VizzlyConfig} config
|
|
4
4
|
* @returns {import('../types/index.js').VizzlyConfig}
|
|
5
5
|
*/
|
|
6
|
-
export function defineConfig(config:
|
|
6
|
+
export function defineConfig(config: any): any;
|
|
@@ -45,11 +45,11 @@ export class ConsoleUI {
|
|
|
45
45
|
* Start a spinner with message
|
|
46
46
|
*/
|
|
47
47
|
startSpinner(message: any): void;
|
|
48
|
+
currentMessage: any;
|
|
48
49
|
/**
|
|
49
50
|
* Update spinner message and progress
|
|
50
51
|
*/
|
|
51
52
|
updateSpinner(message: any, current?: number, total?: number): void;
|
|
52
|
-
currentMessage: string;
|
|
53
53
|
/**
|
|
54
54
|
* Stop the spinner
|
|
55
55
|
*/
|
|
@@ -9,6 +9,13 @@ export function generateBuildName(): string;
|
|
|
9
9
|
* @returns {Promise<string|null>} Commit message or null if not available
|
|
10
10
|
*/
|
|
11
11
|
export function getCommitMessage(cwd?: string): Promise<string | null>;
|
|
12
|
+
/**
|
|
13
|
+
* Detect commit message with override and environment variable support
|
|
14
|
+
* @param {string} override - Commit message override from CLI
|
|
15
|
+
* @param {string} cwd - Working directory
|
|
16
|
+
* @returns {Promise<string|null>} Commit message or null if not available
|
|
17
|
+
*/
|
|
18
|
+
export function detectCommitMessage(override?: string, cwd?: string): Promise<string | null>;
|
|
12
19
|
/**
|
|
13
20
|
* Check if the working directory is a git repository
|
|
14
21
|
* @param {string} cwd - Working directory
|
|
@@ -42,3 +49,8 @@ export function detectCommit(override?: string, cwd?: string): Promise<string |
|
|
|
42
49
|
* @returns {Promise<string>}
|
|
43
50
|
*/
|
|
44
51
|
export function generateBuildNameWithGit(override?: string, cwd?: string): Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Detect pull request number from CI environment
|
|
54
|
+
* @returns {number|null} Pull request number or null if not in PR context
|
|
55
|
+
*/
|
|
56
|
+
export function detectPullRequestNumber(): number | null;
|