@kb-labs/qa-core 2.94.0 → 2.98.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/dist/index.d.ts +72 -6
- package/dist/index.js +562 -1553
- package/dist/index.js.map +1 -1
- package/dist/report/index.d.ts +14 -45
- package/dist/report/index.js +180 -410
- package/dist/report/index.js.map +1 -1
- package/package.json +5 -16
- package/dist/baseline/index.d.ts +0 -27
- package/dist/baseline/index.js +0 -838
- package/dist/baseline/index.js.map +0 -1
- package/dist/categories/index.d.ts +0 -13
- package/dist/categories/index.js +0 -39
- package/dist/categories/index.js.map +0 -1
- package/dist/history/index.d.ts +0 -58
- package/dist/history/index.js +0 -361
- package/dist/history/index.js.map +0 -1
- package/dist/last-run-store-C1AkskWI.d.ts +0 -81
- package/dist/runner/index.d.ts +0 -43
- package/dist/runner/index.js +0 -789
- package/dist/runner/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { ShellAPI } from '@kb-labs/sdk';
|
|
2
|
+
import { DevkitRunOutput, DevkitCheckOutput, DevkitStatsOutput, DevkitStatusOutput, DevkitGateOutput, SnapshotGit, RunSnapshot, CheckSnapshot, StatsSnapshot, GateSnapshot, BaselineData, TrendAnalysis, RegressionDetection, BaselineCheckDiff, PackageTimeline } from '@kb-labs/qa-contracts';
|
|
3
|
+
export { ReportSection, buildBaselineDiffReport, buildBaselineReport, buildCheckJsonReport, buildCheckReport, buildHistoryTable, buildRegressionsReport, buildRunJsonReport, buildRunReport, buildStatsJsonReport, buildStatsReport, buildTrendsReport, formatTaskName } from './report/index.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the kb-devkit binary path.
|
|
7
|
+
*
|
|
8
|
+
* Resolution order:
|
|
9
|
+
* 1. configPath (from QAPluginConfig.devkitPath) — absolute or relative to rootDir
|
|
10
|
+
* 2. tools/kb-devkit/kb-devkit relative to rootDir (workspace-local copy)
|
|
11
|
+
* 3. "kb-devkit" — resolved from PATH at spawn time
|
|
12
|
+
*
|
|
13
|
+
* The shell permission whitelist matches by basename, so passing a full path
|
|
14
|
+
* to shell.exec() works correctly when allow: ['kb-devkit'] is declared.
|
|
15
|
+
*/
|
|
16
|
+
declare function resolveDevkitBin(rootDir: string, configPath?: string): string;
|
|
17
|
+
|
|
18
|
+
interface DevkitAdapterOptions {
|
|
19
|
+
binaryPath: string;
|
|
20
|
+
cwd: string;
|
|
21
|
+
shell: ShellAPI;
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
}
|
|
24
|
+
declare class DevkitAdapter {
|
|
25
|
+
private readonly bin;
|
|
26
|
+
private readonly cwd;
|
|
27
|
+
private readonly shell;
|
|
28
|
+
private readonly timeout;
|
|
29
|
+
constructor(opts: DevkitAdapterOptions);
|
|
30
|
+
run(tasks: string[]): Promise<DevkitRunOutput>;
|
|
31
|
+
check(): Promise<DevkitCheckOutput>;
|
|
32
|
+
stats(): Promise<DevkitStatsOutput>;
|
|
33
|
+
status(): Promise<DevkitStatusOutput>;
|
|
34
|
+
gate(): Promise<DevkitGateOutput>;
|
|
35
|
+
version(): Promise<string>;
|
|
36
|
+
private invoke;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Capture current git context using ctx.api.shell.
|
|
41
|
+
* Returns undefined if the directory is not a git repo or git is unavailable.
|
|
42
|
+
*/
|
|
43
|
+
declare function captureGit(shell: ShellAPI, cwd: string): Promise<SnapshotGit | undefined>;
|
|
44
|
+
|
|
45
|
+
declare class SnapshotStore {
|
|
46
|
+
private readonly rootDir;
|
|
47
|
+
private readonly maxEntries;
|
|
48
|
+
constructor(rootDir: string, maxEntries?: number);
|
|
49
|
+
loadRunHistory(): RunSnapshot[];
|
|
50
|
+
saveRun(raw: DevkitRunOutput, tasks: string[], durationMs: number, git?: SnapshotGit, runContext?: Record<string, unknown>): RunSnapshot;
|
|
51
|
+
latestRun(): RunSnapshot | null;
|
|
52
|
+
loadCheckHistory(): CheckSnapshot[];
|
|
53
|
+
saveCheck(raw: DevkitCheckOutput, durationMs: number, git?: SnapshotGit, runContext?: Record<string, unknown>): CheckSnapshot;
|
|
54
|
+
latestCheck(): CheckSnapshot | null;
|
|
55
|
+
loadStatsHistory(): StatsSnapshot[];
|
|
56
|
+
saveStats(raw: DevkitStatsOutput, durationMs: number, git?: SnapshotGit, runContext?: Record<string, unknown>): StatsSnapshot;
|
|
57
|
+
latestStats(): StatsSnapshot | null;
|
|
58
|
+
loadGateHistory(): GateSnapshot[];
|
|
59
|
+
saveGate(raw: DevkitGateOutput, durationMs: number, git?: SnapshotGit, runContext?: Record<string, unknown>): GateSnapshot;
|
|
60
|
+
loadBaseline(): BaselineData | null;
|
|
61
|
+
saveBaseline(check: DevkitCheckOutput, stats: DevkitStatsOutput, git?: SnapshotGit): BaselineData;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare function analyzeTrends(history: RunSnapshot[], window?: number): TrendAnalysis;
|
|
65
|
+
|
|
66
|
+
declare function detectRegressions(history: RunSnapshot[]): RegressionDetection;
|
|
67
|
+
|
|
68
|
+
declare function compareWithBaseline(currentCheck: DevkitCheckOutput, currentStats: DevkitStatsOutput, baseline: BaselineData): BaselineCheckDiff;
|
|
69
|
+
|
|
70
|
+
declare function buildPackageTimeline(history: RunSnapshot[], packageName: string): PackageTimeline;
|
|
71
|
+
|
|
72
|
+
export { DevkitAdapter, type DevkitAdapterOptions, SnapshotStore, analyzeTrends, buildPackageTimeline, captureGit, compareWithBaseline, detectRegressions, resolveDevkitBin };
|