@argus-vrt/cli 0.1.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 +215 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1778 -0
- package/dist/index.d.ts +88 -0
- package/dist/index.js +1029 -0
- package/package.json +48 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
interface CaptureOptions {
|
|
2
|
+
branch?: string;
|
|
3
|
+
device?: string;
|
|
4
|
+
skipBoot?: boolean;
|
|
5
|
+
skipShutdown?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Capture screenshots for all stories
|
|
9
|
+
*/
|
|
10
|
+
declare function captureCommand(options?: CaptureOptions): Promise<void>;
|
|
11
|
+
|
|
12
|
+
interface CompareOptions {
|
|
13
|
+
base?: string;
|
|
14
|
+
current?: string;
|
|
15
|
+
threshold?: number;
|
|
16
|
+
generateReport?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Compare current screenshots against baselines
|
|
20
|
+
*/
|
|
21
|
+
declare function compareCommand(options?: CompareOptions): Promise<void>;
|
|
22
|
+
|
|
23
|
+
interface ComparisonConfig {
|
|
24
|
+
mode: 'strict' | 'threshold';
|
|
25
|
+
threshold: number;
|
|
26
|
+
includeMetrics: boolean;
|
|
27
|
+
}
|
|
28
|
+
interface SimulatorConfig {
|
|
29
|
+
device: string;
|
|
30
|
+
os: string;
|
|
31
|
+
appScheme?: string;
|
|
32
|
+
bundleId?: string;
|
|
33
|
+
}
|
|
34
|
+
interface StorybookConfig {
|
|
35
|
+
port: number;
|
|
36
|
+
storiesPattern?: string;
|
|
37
|
+
startCommand?: string;
|
|
38
|
+
launchApp?: string;
|
|
39
|
+
scheme?: string;
|
|
40
|
+
}
|
|
41
|
+
interface VisualTestConfig {
|
|
42
|
+
storybook: StorybookConfig;
|
|
43
|
+
simulator: SimulatorConfig;
|
|
44
|
+
comparison: ComparisonConfig;
|
|
45
|
+
baselineDir: string;
|
|
46
|
+
screenshotDir: string;
|
|
47
|
+
apiUrl?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Load configuration from project root
|
|
52
|
+
*/
|
|
53
|
+
declare function loadConfig(cwd?: string): VisualTestConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Validate configuration
|
|
56
|
+
*/
|
|
57
|
+
declare function validateConfig(config: VisualTestConfig): void;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get current git branch
|
|
61
|
+
*/
|
|
62
|
+
declare function getCurrentBranch(): Promise<string>;
|
|
63
|
+
/**
|
|
64
|
+
* Get current commit hash
|
|
65
|
+
*/
|
|
66
|
+
declare function getCurrentCommitHash(): Promise<string>;
|
|
67
|
+
/**
|
|
68
|
+
* Get commit message
|
|
69
|
+
*/
|
|
70
|
+
declare function getCommitMessage(hash?: string): Promise<string>;
|
|
71
|
+
/**
|
|
72
|
+
* Check if working directory is clean
|
|
73
|
+
*/
|
|
74
|
+
declare function isWorkingDirectoryClean(): Promise<boolean>;
|
|
75
|
+
/**
|
|
76
|
+
* Get changed files between branches
|
|
77
|
+
*/
|
|
78
|
+
declare function getChangedFiles(baseBranch: string, currentBranch: string): Promise<string[]>;
|
|
79
|
+
|
|
80
|
+
declare const logger: {
|
|
81
|
+
info: (message: string) => void;
|
|
82
|
+
success: (message: string) => void;
|
|
83
|
+
warn: (message: string) => void;
|
|
84
|
+
error: (message: string) => void;
|
|
85
|
+
debug: (message: string) => void;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export { type CaptureOptions, type CompareOptions, captureCommand, compareCommand, getChangedFiles, getCommitMessage, getCurrentBranch, getCurrentCommitHash, isWorkingDirectoryClean, loadConfig, logger, validateConfig };
|