qa360 1.4.5 → 2.0.1
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 +1 -1
- package/dist/commands/ai.d.ts +41 -0
- package/dist/commands/ai.js +499 -0
- package/dist/commands/ask.js +12 -12
- package/dist/commands/coverage.d.ts +8 -0
- package/dist/commands/coverage.js +252 -0
- package/dist/commands/explain.d.ts +27 -0
- package/dist/commands/explain.js +630 -0
- package/dist/commands/flakiness.d.ts +73 -0
- package/dist/commands/flakiness.js +435 -0
- package/dist/commands/generate.d.ts +66 -0
- package/dist/commands/generate.js +438 -0
- package/dist/commands/init.d.ts +56 -9
- package/dist/commands/init.js +217 -10
- package/dist/commands/monitor.d.ts +27 -0
- package/dist/commands/monitor.js +225 -0
- package/dist/commands/ollama.d.ts +40 -0
- package/dist/commands/ollama.js +301 -0
- package/dist/commands/pack.d.ts +37 -9
- package/dist/commands/pack.js +240 -141
- package/dist/commands/regression.d.ts +8 -0
- package/dist/commands/regression.js +340 -0
- package/dist/commands/repair.d.ts +26 -0
- package/dist/commands/repair.js +307 -0
- package/dist/commands/retry.d.ts +43 -0
- package/dist/commands/retry.js +275 -0
- package/dist/commands/run.d.ts +8 -3
- package/dist/commands/run.js +45 -31
- package/dist/commands/slo.d.ts +8 -0
- package/dist/commands/slo.js +327 -0
- package/dist/core/adapters/playwright-native-api.d.ts +183 -0
- package/dist/core/adapters/playwright-native-api.js +461 -0
- package/dist/core/adapters/playwright-ui.d.ts +7 -0
- package/dist/core/adapters/playwright-ui.js +29 -1
- package/dist/core/ai/anthropic-provider.d.ts +50 -0
- package/dist/core/ai/anthropic-provider.js +211 -0
- package/dist/core/ai/deepseek-provider.d.ts +81 -0
- package/dist/core/ai/deepseek-provider.js +254 -0
- package/dist/core/ai/index.d.ts +60 -0
- package/dist/core/ai/index.js +18 -0
- package/dist/core/ai/llm-client.d.ts +45 -0
- package/dist/core/ai/llm-client.js +7 -0
- package/dist/core/ai/mock-provider.d.ts +49 -0
- package/dist/core/ai/mock-provider.js +121 -0
- package/dist/core/ai/ollama-provider.d.ts +78 -0
- package/dist/core/ai/ollama-provider.js +192 -0
- package/dist/core/ai/openai-provider.d.ts +48 -0
- package/dist/core/ai/openai-provider.js +188 -0
- package/dist/core/ai/provider-factory.d.ts +160 -0
- package/dist/core/ai/provider-factory.js +269 -0
- package/dist/core/auth/api-key-provider.d.ts +16 -0
- package/dist/core/auth/api-key-provider.js +63 -0
- package/dist/core/auth/aws-iam-provider.d.ts +35 -0
- package/dist/core/auth/aws-iam-provider.js +177 -0
- package/dist/core/auth/azure-ad-provider.d.ts +15 -0
- package/dist/core/auth/azure-ad-provider.js +99 -0
- package/dist/core/auth/basic-auth-provider.d.ts +26 -0
- package/dist/core/auth/basic-auth-provider.js +111 -0
- package/dist/core/auth/gcp-adc-provider.d.ts +27 -0
- package/dist/core/auth/gcp-adc-provider.js +126 -0
- package/dist/core/auth/index.d.ts +238 -0
- package/dist/core/auth/index.js +82 -0
- package/dist/core/auth/jwt-provider.d.ts +19 -0
- package/dist/core/auth/jwt-provider.js +160 -0
- package/dist/core/auth/manager.d.ts +84 -0
- package/dist/core/auth/manager.js +230 -0
- package/dist/core/auth/oauth2-provider.d.ts +17 -0
- package/dist/core/auth/oauth2-provider.js +114 -0
- package/dist/core/auth/totp-provider.d.ts +31 -0
- package/dist/core/auth/totp-provider.js +134 -0
- package/dist/core/auth/ui-login-provider.d.ts +26 -0
- package/dist/core/auth/ui-login-provider.js +198 -0
- package/dist/core/cache/index.d.ts +7 -0
- package/dist/core/cache/index.js +6 -0
- package/dist/core/cache/lru-cache.d.ts +203 -0
- package/dist/core/cache/lru-cache.js +397 -0
- package/dist/core/coverage/analyzer.d.ts +101 -0
- package/dist/core/coverage/analyzer.js +415 -0
- package/dist/core/coverage/collector.d.ts +74 -0
- package/dist/core/coverage/collector.js +459 -0
- package/dist/core/coverage/config.d.ts +37 -0
- package/dist/core/coverage/config.js +156 -0
- package/dist/core/coverage/index.d.ts +11 -0
- package/dist/core/coverage/index.js +15 -0
- package/dist/core/coverage/types.d.ts +267 -0
- package/dist/core/coverage/types.js +6 -0
- package/dist/core/coverage/vault.d.ts +95 -0
- package/dist/core/coverage/vault.js +405 -0
- package/dist/core/dashboard/assets.d.ts +6 -0
- package/dist/core/dashboard/assets.js +690 -0
- package/dist/core/dashboard/index.d.ts +6 -0
- package/dist/core/dashboard/index.js +5 -0
- package/dist/core/dashboard/server.d.ts +72 -0
- package/dist/core/dashboard/server.js +354 -0
- package/dist/core/dashboard/types.d.ts +70 -0
- package/dist/core/dashboard/types.js +5 -0
- package/dist/core/discoverer/index.d.ts +115 -0
- package/dist/core/discoverer/index.js +250 -0
- package/dist/core/flakiness/index.d.ts +228 -0
- package/dist/core/flakiness/index.js +384 -0
- package/dist/core/generation/code-formatter.d.ts +111 -0
- package/dist/core/generation/code-formatter.js +307 -0
- package/dist/core/generation/code-generator.d.ts +144 -0
- package/dist/core/generation/code-generator.js +293 -0
- package/dist/core/generation/generator.d.ts +40 -0
- package/dist/core/generation/generator.js +76 -0
- package/dist/core/generation/index.d.ts +30 -0
- package/dist/core/generation/index.js +28 -0
- package/dist/core/generation/pack-generator.d.ts +107 -0
- package/dist/core/generation/pack-generator.js +416 -0
- package/dist/core/generation/prompt-builder.d.ts +132 -0
- package/dist/core/generation/prompt-builder.js +672 -0
- package/dist/core/generation/source-analyzer.d.ts +213 -0
- package/dist/core/generation/source-analyzer.js +657 -0
- package/dist/core/generation/test-optimizer.d.ts +117 -0
- package/dist/core/generation/test-optimizer.js +328 -0
- package/dist/core/generation/types.d.ts +214 -0
- package/dist/core/generation/types.js +4 -0
- package/dist/core/index.d.ts +23 -1
- package/dist/core/index.js +39 -0
- package/dist/core/pack/validator.js +31 -1
- package/dist/core/pack-v2/index.d.ts +9 -0
- package/dist/core/pack-v2/index.js +8 -0
- package/dist/core/pack-v2/loader.d.ts +62 -0
- package/dist/core/pack-v2/loader.js +231 -0
- package/dist/core/pack-v2/migrator.d.ts +56 -0
- package/dist/core/pack-v2/migrator.js +455 -0
- package/dist/core/pack-v2/validator.d.ts +61 -0
- package/dist/core/pack-v2/validator.js +577 -0
- package/dist/core/regression/detector.d.ts +107 -0
- package/dist/core/regression/detector.js +497 -0
- package/dist/core/regression/index.d.ts +9 -0
- package/dist/core/regression/index.js +11 -0
- package/dist/core/regression/trend-analyzer.d.ts +102 -0
- package/dist/core/regression/trend-analyzer.js +345 -0
- package/dist/core/regression/types.d.ts +222 -0
- package/dist/core/regression/types.js +7 -0
- package/dist/core/regression/vault.d.ts +87 -0
- package/dist/core/regression/vault.js +289 -0
- package/dist/core/repair/engine/fixer.d.ts +24 -0
- package/dist/core/repair/engine/fixer.js +226 -0
- package/dist/core/repair/engine/suggestion-engine.d.ts +18 -0
- package/dist/core/repair/engine/suggestion-engine.js +187 -0
- package/dist/core/repair/index.d.ts +10 -0
- package/dist/core/repair/index.js +13 -0
- package/dist/core/repair/repairer.d.ts +90 -0
- package/dist/core/repair/repairer.js +284 -0
- package/dist/core/repair/types.d.ts +91 -0
- package/dist/core/repair/types.js +6 -0
- package/dist/core/repair/utils/error-analyzer.d.ts +28 -0
- package/dist/core/repair/utils/error-analyzer.js +264 -0
- package/dist/core/retry/flakiness-integration.d.ts +60 -0
- package/dist/core/retry/flakiness-integration.js +228 -0
- package/dist/core/retry/index.d.ts +14 -0
- package/dist/core/retry/index.js +16 -0
- package/dist/core/retry/retry-engine.d.ts +80 -0
- package/dist/core/retry/retry-engine.js +296 -0
- package/dist/core/retry/types.d.ts +178 -0
- package/dist/core/retry/types.js +52 -0
- package/dist/core/retry/vault.d.ts +77 -0
- package/dist/core/retry/vault.js +304 -0
- package/dist/core/runner/e2e-helpers.d.ts +102 -0
- package/dist/core/runner/e2e-helpers.js +153 -0
- package/dist/core/runner/phase3-runner.d.ts +101 -2
- package/dist/core/runner/phase3-runner.js +559 -24
- package/dist/core/self-healing/assertion-healer.d.ts +97 -0
- package/dist/core/self-healing/assertion-healer.js +371 -0
- package/dist/core/self-healing/engine.d.ts +122 -0
- package/dist/core/self-healing/engine.js +538 -0
- package/dist/core/self-healing/index.d.ts +10 -0
- package/dist/core/self-healing/index.js +11 -0
- package/dist/core/self-healing/selector-healer.d.ts +103 -0
- package/dist/core/self-healing/selector-healer.js +372 -0
- package/dist/core/self-healing/types.d.ts +152 -0
- package/dist/core/self-healing/types.js +6 -0
- package/dist/core/slo/config.d.ts +107 -0
- package/dist/core/slo/config.js +360 -0
- package/dist/core/slo/index.d.ts +11 -0
- package/dist/core/slo/index.js +15 -0
- package/dist/core/slo/sli-calculator.d.ts +92 -0
- package/dist/core/slo/sli-calculator.js +364 -0
- package/dist/core/slo/slo-tracker.d.ts +148 -0
- package/dist/core/slo/slo-tracker.js +379 -0
- package/dist/core/slo/types.d.ts +281 -0
- package/dist/core/slo/types.js +7 -0
- package/dist/core/slo/vault.d.ts +102 -0
- package/dist/core/slo/vault.js +427 -0
- package/dist/core/tui/index.d.ts +7 -0
- package/dist/core/tui/index.js +6 -0
- package/dist/core/tui/monitor.d.ts +92 -0
- package/dist/core/tui/monitor.js +271 -0
- package/dist/core/tui/renderer.d.ts +33 -0
- package/dist/core/tui/renderer.js +218 -0
- package/dist/core/tui/types.d.ts +63 -0
- package/dist/core/tui/types.js +5 -0
- package/dist/core/types/pack-v2.d.ts +425 -0
- package/dist/core/types/pack-v2.js +8 -0
- package/dist/core/vault/index.d.ts +116 -0
- package/dist/core/vault/index.js +400 -5
- package/dist/core/watch/index.d.ts +7 -0
- package/dist/core/watch/index.js +6 -0
- package/dist/core/watch/watch-mode.d.ts +213 -0
- package/dist/core/watch/watch-mode.js +389 -0
- package/dist/index.js +68 -68
- package/dist/utils/config.d.ts +5 -0
- package/dist/utils/config.js +136 -0
- package/package.json +5 -1
- package/dist/core/adapters/playwright-api.d.ts +0 -82
- package/dist/core/adapters/playwright-api.js +0 -264
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* QA360 Phase 3 Runner
|
|
3
3
|
* Orchestrates hooks, adapters, and proof generation
|
|
4
|
+
* Supports both Pack v1 and Pack v2 configurations
|
|
4
5
|
*/
|
|
5
6
|
import { PackConfigV1 } from '../types/pack-v1.js';
|
|
7
|
+
import { PackConfigV2 } from '../types/pack-v2.js';
|
|
8
|
+
import { FlakinessResult } from '../flakiness/index.js';
|
|
9
|
+
export type PackConfig = PackConfigV1 | PackConfigV2;
|
|
6
10
|
export interface Phase3RunnerOptions {
|
|
7
11
|
workingDir: string;
|
|
8
|
-
pack:
|
|
12
|
+
pack: PackConfig;
|
|
9
13
|
outputDir?: string;
|
|
14
|
+
/** Enable flakiness detection (runs tests N times consecutively) */
|
|
15
|
+
flakyDetect?: boolean;
|
|
16
|
+
/** Number of consecutive runs for flakiness detection (default: 3) */
|
|
17
|
+
flakyRuns?: number;
|
|
10
18
|
}
|
|
11
19
|
export interface GateResult {
|
|
12
20
|
gate: string;
|
|
@@ -19,7 +27,7 @@ export interface GateResult {
|
|
|
19
27
|
}
|
|
20
28
|
export interface Phase3RunResult {
|
|
21
29
|
success: boolean;
|
|
22
|
-
pack:
|
|
30
|
+
pack: PackConfig;
|
|
23
31
|
duration: number;
|
|
24
32
|
gates: GateResult[];
|
|
25
33
|
hooks: {
|
|
@@ -34,7 +42,11 @@ export interface Phase3RunResult {
|
|
|
34
42
|
failed: number;
|
|
35
43
|
trustScore: number;
|
|
36
44
|
};
|
|
45
|
+
/** Flakiness analysis results (if enabled) */
|
|
46
|
+
flakiness?: FlakinessResult[];
|
|
37
47
|
proofPath?: string;
|
|
48
|
+
/** Vault run ID for this execution */
|
|
49
|
+
runId?: string;
|
|
38
50
|
error?: string;
|
|
39
51
|
}
|
|
40
52
|
export declare class Phase3Runner {
|
|
@@ -45,7 +57,40 @@ export declare class Phase3Runner {
|
|
|
45
57
|
private hooksRunner;
|
|
46
58
|
private keyPair?;
|
|
47
59
|
private vault?;
|
|
60
|
+
private authManager;
|
|
61
|
+
private authCredentialsCache;
|
|
62
|
+
private flakyDetect;
|
|
63
|
+
private flakyRuns;
|
|
64
|
+
private flakinessDetector;
|
|
48
65
|
constructor(options: Phase3RunnerOptions);
|
|
66
|
+
/**
|
|
67
|
+
* Type guard to check if pack is v2
|
|
68
|
+
*/
|
|
69
|
+
private isPackV2;
|
|
70
|
+
/**
|
|
71
|
+
* Register authentication profiles from pack config
|
|
72
|
+
*/
|
|
73
|
+
private registerAuthProfiles;
|
|
74
|
+
/**
|
|
75
|
+
* Get auth profile name for a specific gate
|
|
76
|
+
*/
|
|
77
|
+
private getAuthProfileForGate;
|
|
78
|
+
/**
|
|
79
|
+
* Authenticate and get credentials for a gate
|
|
80
|
+
*/
|
|
81
|
+
private getCredentialsForGate;
|
|
82
|
+
/**
|
|
83
|
+
* Convert v2 hooks to v1 format
|
|
84
|
+
*/
|
|
85
|
+
private convertV2HooksToV1;
|
|
86
|
+
/**
|
|
87
|
+
* Convert v2 execution config to v1 format
|
|
88
|
+
*/
|
|
89
|
+
private convertV2ExecutionToV1;
|
|
90
|
+
/**
|
|
91
|
+
* Get gates array from pack (handles v1 and v2)
|
|
92
|
+
*/
|
|
93
|
+
private getGatesArray;
|
|
49
94
|
/**
|
|
50
95
|
* Execute complete Phase 3 workflow
|
|
51
96
|
*/
|
|
@@ -54,8 +99,30 @@ export declare class Phase3Runner {
|
|
|
54
99
|
* Execute a single quality gate
|
|
55
100
|
*/
|
|
56
101
|
private executeGate;
|
|
102
|
+
/**
|
|
103
|
+
* Execute a dynamic v2 gate
|
|
104
|
+
*/
|
|
105
|
+
private executeDynamicGate;
|
|
106
|
+
/**
|
|
107
|
+
* Execute Playwright API gate with v2 config
|
|
108
|
+
* Uses PlaywrightNativeApiAdapter for zero-overhead HTTP testing
|
|
109
|
+
*/
|
|
110
|
+
private executePlaywrightApiGate;
|
|
111
|
+
/**
|
|
112
|
+
* Execute Playwright UI gate with v2 config
|
|
113
|
+
*/
|
|
114
|
+
private executePlaywrightUiGate;
|
|
115
|
+
/**
|
|
116
|
+
* Execute K6 Performance gate with v2 config
|
|
117
|
+
*/
|
|
118
|
+
private executeK6PerfGate;
|
|
119
|
+
/**
|
|
120
|
+
* Execute Semgrep SAST gate with v2 config
|
|
121
|
+
*/
|
|
122
|
+
private executeSemgrepSastGate;
|
|
57
123
|
/**
|
|
58
124
|
* Run API smoke gate
|
|
125
|
+
* Uses PlaywrightNativeApiAdapter for zero-overhead HTTP testing
|
|
59
126
|
*/
|
|
60
127
|
private runApiSmokeGate;
|
|
61
128
|
/**
|
|
@@ -88,12 +155,44 @@ export declare class Phase3Runner {
|
|
|
88
155
|
private generateProof;
|
|
89
156
|
/**
|
|
90
157
|
* Save run results to Evidence Vault
|
|
158
|
+
* @returns The vault run ID
|
|
91
159
|
*/
|
|
92
160
|
private saveToVault;
|
|
161
|
+
/**
|
|
162
|
+
* Detect flakiness by running tests multiple times consecutively
|
|
163
|
+
* @param gateResults Original gate results from first run
|
|
164
|
+
* @returns Flakiness analysis results
|
|
165
|
+
*/
|
|
166
|
+
private detectFlakiness;
|
|
167
|
+
/**
|
|
168
|
+
* Extract test results from a gate result
|
|
169
|
+
* Returns a map of testId to TestResult for flakiness tracking
|
|
170
|
+
*/
|
|
171
|
+
private extractTestResults;
|
|
93
172
|
/**
|
|
94
173
|
* Generate hash of pack configuration
|
|
95
174
|
*/
|
|
96
175
|
private hashPack;
|
|
176
|
+
/**
|
|
177
|
+
* Get API target (v1 or v2 format)
|
|
178
|
+
*/
|
|
179
|
+
private getTargetApi;
|
|
180
|
+
/**
|
|
181
|
+
* Get Web target (v1 or v2 format)
|
|
182
|
+
*/
|
|
183
|
+
private getTargetWeb;
|
|
184
|
+
/**
|
|
185
|
+
* Get budgets (v1 or v2 format)
|
|
186
|
+
*/
|
|
187
|
+
private getBudgets;
|
|
188
|
+
/**
|
|
189
|
+
* Get execution timeout (v1 or v2 format)
|
|
190
|
+
*/
|
|
191
|
+
private getExecutionTimeout;
|
|
192
|
+
/**
|
|
193
|
+
* Get execution retries (v1 or v2 format)
|
|
194
|
+
*/
|
|
195
|
+
private getExecutionRetries;
|
|
97
196
|
/**
|
|
98
197
|
* Ensure output directory exists
|
|
99
198
|
*/
|