@elench/testkit 0.1.134 → 0.1.135
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/lib/cli/entrypoint.mjs +6 -4
- package/lib/config-api/database-steps.mjs +1 -1
- package/lib/database/schema-source.mjs +58 -5
- package/node_modules/@elench/next-analysis/package.json +1 -1
- package/node_modules/@elench/testkit-bridge/package.json +2 -2
- package/node_modules/@elench/testkit-protocol/package.json +1 -1
- package/node_modules/@elench/ts-analysis/package.json +1 -1
- package/package.json +5 -5
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.d.ts +0 -188
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.d.ts.map +0 -1
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.js +0 -293
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/dist/index.js.map +0 -1
- package/packages/testkit-bridge/node_modules/@elench/testkit-protocol/package.json +0 -25
package/lib/cli/entrypoint.mjs
CHANGED
|
@@ -46,6 +46,7 @@ export function normalizeCliArgs(argv) {
|
|
|
46
46
|
]);
|
|
47
47
|
const positionals = findPositionals(argv, valueFlags);
|
|
48
48
|
const firstPositional = positionals[0] || null;
|
|
49
|
+
const explicitTopLevelCommand = topLevelCommands.has(firstPositional?.value);
|
|
49
50
|
const forcedInteractiveAssistant = process.env.TESTKIT_FORCE_INTERACTIVE_ASSISTANT === "1";
|
|
50
51
|
const interactiveTty = process.stdout.isTTY || forcedInteractiveAssistant;
|
|
51
52
|
const assistantDefaultDisabled = process.env.TESTKIT_NO_ASSISTANT_DEFAULT === "1";
|
|
@@ -69,10 +70,11 @@ export function normalizeCliArgs(argv) {
|
|
|
69
70
|
].includes(value)
|
|
70
71
|
);
|
|
71
72
|
const shouldPrefixRun =
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
!explicitTopLevelCommand &&
|
|
74
|
+
((!firstPositional && !interactiveTty) ||
|
|
75
|
+
runTypeShortcuts.has(firstPositional?.value) ||
|
|
76
|
+
runFlagPresent ||
|
|
77
|
+
!topLevelCommands.has(firstPositional?.value));
|
|
76
78
|
|
|
77
79
|
if (!firstPositional && interactiveTty && !runFlagPresent && !assistantDefaultDisabled) {
|
|
78
80
|
return ["assistant", ...argv];
|
|
@@ -96,7 +96,7 @@ export async function materializePostgresBinding(context = {}) {
|
|
|
96
96
|
|
|
97
97
|
const assignments = columns.map((column) => {
|
|
98
98
|
const identifier = requireIdentifier(column, `materializePostgresBinding.args.values.${column}`);
|
|
99
|
-
return `${identifier} = ${
|
|
99
|
+
return `${identifier} = ${toSqlExpression(values[column], context)}`;
|
|
100
100
|
});
|
|
101
101
|
const query =
|
|
102
102
|
`with updated as (update ${table} set ${assignments.join(", ")} ` +
|
|
@@ -166,6 +166,7 @@ export async function verifyLocalSchemaMatchesSource(config, databaseUrl, state,
|
|
|
166
166
|
return { status: "skipped" };
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
clearSchemaMismatchDiagnosticsForService(config);
|
|
169
170
|
const sourceSchema = readSourceSchemaCacheText(state.cachePath);
|
|
170
171
|
const localSchema = await captureTemplateSnapshotText(config, databaseUrl, {
|
|
171
172
|
reporter: options.reporter || null,
|
|
@@ -174,7 +175,7 @@ export async function verifyLocalSchemaMatchesSource(config, databaseUrl, state,
|
|
|
174
175
|
return { status: "matched" };
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
const diagnostics = await writeSchemaMismatchDiagnostics(config, state
|
|
178
|
+
const diagnostics = await writeSchemaMismatchDiagnostics(config, state, sourceSchema, localSchema);
|
|
178
179
|
return {
|
|
179
180
|
status: "mismatch",
|
|
180
181
|
diagnostics,
|
|
@@ -396,21 +397,73 @@ function readJson(filePath) {
|
|
|
396
397
|
}
|
|
397
398
|
}
|
|
398
399
|
|
|
399
|
-
|
|
400
|
-
|
|
400
|
+
function schemaMismatchDiagnosticsDir(config) {
|
|
401
|
+
return path.join(config.productDir, ".testkit", "results", "schema");
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function schemaMismatchDiagnosticsPrefix(config) {
|
|
405
|
+
return `${sanitizePathSegment(config.runtimeLabel || config.name)}__${sanitizePathSegment(config.name)}`;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function clearSchemaMismatchDiagnosticsForService(config) {
|
|
409
|
+
const dir = schemaMismatchDiagnosticsDir(config);
|
|
410
|
+
if (!fs.existsSync(dir)) return;
|
|
411
|
+
const serviceSegment = sanitizePathSegment(config.name);
|
|
412
|
+
for (const entry of fs.readdirSync(dir)) {
|
|
413
|
+
if (!isSchemaMismatchDiagnosticForService(entry, serviceSegment)) continue;
|
|
414
|
+
fs.rmSync(path.join(dir, entry), { force: true });
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
function isSchemaMismatchDiagnosticForService(entry, serviceSegment) {
|
|
419
|
+
for (const suffix of [
|
|
420
|
+
"__source-schema.sql",
|
|
421
|
+
"__local-replay-schema.sql",
|
|
422
|
+
"__schema.diff",
|
|
423
|
+
"__schema.meta.json",
|
|
424
|
+
]) {
|
|
425
|
+
if (!entry.endsWith(suffix)) continue;
|
|
426
|
+
return entry.slice(0, -suffix.length).endsWith(`__${serviceSegment}`);
|
|
427
|
+
}
|
|
428
|
+
return false;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
async function writeSchemaMismatchDiagnostics(config, state, sourceSchema, localSchema) {
|
|
432
|
+
const dir = schemaMismatchDiagnosticsDir(config);
|
|
401
433
|
fs.mkdirSync(dir, { recursive: true });
|
|
402
|
-
const prefix =
|
|
434
|
+
const prefix = schemaMismatchDiagnosticsPrefix(config);
|
|
403
435
|
const sourcePath = path.join(dir, `${prefix}__source-schema.sql`);
|
|
404
436
|
const localPath = path.join(dir, `${prefix}__local-replay-schema.sql`);
|
|
405
437
|
const diffPath = path.join(dir, `${prefix}__schema.diff`);
|
|
438
|
+
const metaPath = path.join(dir, `${prefix}__schema.meta.json`);
|
|
406
439
|
fs.writeFileSync(sourcePath, sourceSchema);
|
|
407
440
|
fs.writeFileSync(localPath, localSchema);
|
|
408
441
|
fs.writeFileSync(diffPath, await buildUnifiedDiff(sourcePath, localPath));
|
|
442
|
+
writeJson(metaPath, buildSchemaMismatchMetadata(config, state));
|
|
409
443
|
return {
|
|
410
|
-
sourceCachePath,
|
|
444
|
+
sourceCachePath: state.cachePath,
|
|
411
445
|
sourcePath,
|
|
412
446
|
localPath,
|
|
413
447
|
diffPath,
|
|
448
|
+
metaPath,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function buildSchemaMismatchMetadata(config, state) {
|
|
453
|
+
const sourceMetadata = readJson(state.metadataPath) || {};
|
|
454
|
+
return {
|
|
455
|
+
version: 1,
|
|
456
|
+
createdAt: new Date().toISOString(),
|
|
457
|
+
serviceName: config.name,
|
|
458
|
+
runtimeLabel: config.runtimeLabel || config.name,
|
|
459
|
+
sourceSchema: {
|
|
460
|
+
envName: state.envName || null,
|
|
461
|
+
cacheKey: state.cacheKey || null,
|
|
462
|
+
cacheKind: state.cacheKind || null,
|
|
463
|
+
cachePath: path.relative(config.productDir, state.cachePath),
|
|
464
|
+
refreshedAt: sourceMetadata.refreshedAt || null,
|
|
465
|
+
},
|
|
466
|
+
repo: state.repoState ? summarizeRepoStateForMetadata(state.repoState) : null,
|
|
414
467
|
};
|
|
415
468
|
}
|
|
416
469
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elench/testkit-bridge",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.135",
|
|
4
4
|
"description": "Browser bridge helpers for testkit",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@elench/testkit-protocol": "0.1.
|
|
25
|
+
"@elench/testkit-protocol": "0.1.135"
|
|
26
26
|
},
|
|
27
27
|
"private": false
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elench/testkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.135",
|
|
4
4
|
"description": "Assistant-first CLI for running, inspecting, and debugging local testkit suites",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -95,10 +95,10 @@
|
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
97
|
"@babel/code-frame": "^7.29.0",
|
|
98
|
-
"@elench/next-analysis": "0.1.
|
|
99
|
-
"@elench/testkit-bridge": "0.1.
|
|
100
|
-
"@elench/testkit-protocol": "0.1.
|
|
101
|
-
"@elench/ts-analysis": "0.1.
|
|
98
|
+
"@elench/next-analysis": "0.1.135",
|
|
99
|
+
"@elench/testkit-bridge": "0.1.135",
|
|
100
|
+
"@elench/testkit-protocol": "0.1.135",
|
|
101
|
+
"@elench/ts-analysis": "0.1.135",
|
|
102
102
|
"@oclif/core": "^4.10.6",
|
|
103
103
|
"@playwright/test": "^1.52.0",
|
|
104
104
|
"esbuild": "^0.25.11",
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
export declare const TESTKIT_BROWSER_PROTOCOL_VERSION = 1;
|
|
2
|
-
export declare const TESTKIT_COVERAGE_GRAPH_VERSION = 1;
|
|
3
|
-
export type BrowserTargetKind = "testId" | "role" | "text" | "css" | "xpath" | "component";
|
|
4
|
-
export type BrowserConfidence = "low" | "medium" | "high";
|
|
5
|
-
export type BrowserFailureState = "failing" | "healthy" | "unavailable";
|
|
6
|
-
export type BrowserCoverageState = "covered" | "missing" | "unavailable";
|
|
7
|
-
export type BridgeSurfaceImportance = "critical" | "high" | "medium" | "low";
|
|
8
|
-
export type BridgeCoverageSupportKind = "direct" | "indirect" | "mixed";
|
|
9
|
-
export type CoverageNodeKind = "page_view" | "ui_surface" | "ui_action" | "client_request" | "api_route" | "server_action" | "server_capability" | "data_capability" | "test_file";
|
|
10
|
-
export type CoverageEdgeKind = "contains" | "renders" | "triggers" | "requests" | "handles" | "delegates_to" | "covers";
|
|
11
|
-
export type CoverageEvidenceSource = "convention" | "static" | "runtime";
|
|
12
|
-
export type CoverageGraphDiagnosticLevel = "info" | "warn";
|
|
13
|
-
export interface BrowserTarget {
|
|
14
|
-
kind: BrowserTargetKind;
|
|
15
|
-
value: string;
|
|
16
|
-
label?: string;
|
|
17
|
-
confidence?: BrowserConfidence;
|
|
18
|
-
}
|
|
19
|
-
export interface BrowserMetadata {
|
|
20
|
-
label?: string;
|
|
21
|
-
origins?: string[];
|
|
22
|
-
routes?: string[];
|
|
23
|
-
targets?: BrowserTarget[];
|
|
24
|
-
}
|
|
25
|
-
export interface BrowserMetadataDocument {
|
|
26
|
-
schemaVersion: number;
|
|
27
|
-
browser: BrowserMetadata;
|
|
28
|
-
}
|
|
29
|
-
export interface CoverageGraphNode {
|
|
30
|
-
id: string;
|
|
31
|
-
kind: CoverageNodeKind;
|
|
32
|
-
service: string;
|
|
33
|
-
label: string;
|
|
34
|
-
filePath?: string;
|
|
35
|
-
route?: string;
|
|
36
|
-
method?: string;
|
|
37
|
-
path?: string;
|
|
38
|
-
target?: BrowserTarget | null;
|
|
39
|
-
metadata?: Record<string, string | number | boolean | null>;
|
|
40
|
-
}
|
|
41
|
-
export interface CoverageGraphEdge {
|
|
42
|
-
id: string;
|
|
43
|
-
kind: CoverageEdgeKind;
|
|
44
|
-
from: string;
|
|
45
|
-
to: string;
|
|
46
|
-
confidence?: BrowserConfidence;
|
|
47
|
-
metadata?: Record<string, string | number | boolean | null>;
|
|
48
|
-
}
|
|
49
|
-
export interface CoverageEvidenceDetails {
|
|
50
|
-
requestPaths?: string[];
|
|
51
|
-
route?: string;
|
|
52
|
-
targets?: BrowserTarget[];
|
|
53
|
-
}
|
|
54
|
-
export interface CoverageEvidence {
|
|
55
|
-
id: string;
|
|
56
|
-
source: CoverageEvidenceSource;
|
|
57
|
-
confidence?: BrowserConfidence;
|
|
58
|
-
service: string;
|
|
59
|
-
suiteName: string;
|
|
60
|
-
type: string;
|
|
61
|
-
testFilePath: string;
|
|
62
|
-
coveredNodeIds: string[];
|
|
63
|
-
details?: CoverageEvidenceDetails;
|
|
64
|
-
}
|
|
65
|
-
export interface CoverageGraphDiagnostic {
|
|
66
|
-
level: CoverageGraphDiagnosticLevel;
|
|
67
|
-
code: string;
|
|
68
|
-
filePath: string;
|
|
69
|
-
service: string;
|
|
70
|
-
message: string;
|
|
71
|
-
}
|
|
72
|
-
export interface CoverageGraph {
|
|
73
|
-
schemaVersion: number;
|
|
74
|
-
nodes: CoverageGraphNode[];
|
|
75
|
-
edges: CoverageGraphEdge[];
|
|
76
|
-
evidence: CoverageEvidence[];
|
|
77
|
-
diagnostics: CoverageGraphDiagnostic[];
|
|
78
|
-
}
|
|
79
|
-
export interface BridgeProductRef {
|
|
80
|
-
name: string;
|
|
81
|
-
directory: string;
|
|
82
|
-
}
|
|
83
|
-
export interface BridgeServiceRef {
|
|
84
|
-
name: string;
|
|
85
|
-
baseUrl: string;
|
|
86
|
-
origin: string;
|
|
87
|
-
}
|
|
88
|
-
export interface BrowserMatchResponse {
|
|
89
|
-
protocolVersion: number;
|
|
90
|
-
url: string;
|
|
91
|
-
origin: string;
|
|
92
|
-
route: string;
|
|
93
|
-
matched: boolean;
|
|
94
|
-
product: BridgeProductRef;
|
|
95
|
-
service: BridgeServiceRef | null;
|
|
96
|
-
}
|
|
97
|
-
export interface BridgeRunSummary {
|
|
98
|
-
artifactAvailable: boolean;
|
|
99
|
-
generatedAt: string | null;
|
|
100
|
-
status: string | null;
|
|
101
|
-
}
|
|
102
|
-
export interface BridgeSupportingTestRef {
|
|
103
|
-
service: string;
|
|
104
|
-
suite: string;
|
|
105
|
-
type: string;
|
|
106
|
-
filePath: string;
|
|
107
|
-
label: string;
|
|
108
|
-
status?: "passed" | "failed" | "skipped" | "not_run";
|
|
109
|
-
error?: string | null;
|
|
110
|
-
}
|
|
111
|
-
export interface BridgeCoverageViaNodeRef {
|
|
112
|
-
id: string;
|
|
113
|
-
kind: CoverageNodeKind;
|
|
114
|
-
label: string;
|
|
115
|
-
route?: string;
|
|
116
|
-
method?: string;
|
|
117
|
-
path?: string;
|
|
118
|
-
}
|
|
119
|
-
export interface FailureOverlayEntry {
|
|
120
|
-
id: string;
|
|
121
|
-
kind: CoverageNodeKind;
|
|
122
|
-
label: string;
|
|
123
|
-
service: string;
|
|
124
|
-
route?: string | null;
|
|
125
|
-
targets: BrowserTarget[];
|
|
126
|
-
failedTests: BridgeSupportingTestRef[];
|
|
127
|
-
viaNodes: BridgeCoverageViaNodeRef[];
|
|
128
|
-
importance?: BridgeSurfaceImportance;
|
|
129
|
-
surfaceKind?: string | null;
|
|
130
|
-
reason?: string | null;
|
|
131
|
-
}
|
|
132
|
-
export interface CoverageOverlayEntry {
|
|
133
|
-
id: string;
|
|
134
|
-
kind: CoverageNodeKind;
|
|
135
|
-
label: string;
|
|
136
|
-
service: string;
|
|
137
|
-
route?: string | null;
|
|
138
|
-
targets: BrowserTarget[];
|
|
139
|
-
supportingTests: BridgeSupportingTestRef[];
|
|
140
|
-
viaNodes: BridgeCoverageViaNodeRef[];
|
|
141
|
-
confidence: BrowserConfidence;
|
|
142
|
-
importance?: BridgeSurfaceImportance;
|
|
143
|
-
surfaceKind?: string | null;
|
|
144
|
-
supportKind?: BridgeCoverageSupportKind;
|
|
145
|
-
reason?: string | null;
|
|
146
|
-
}
|
|
147
|
-
export interface PageOverlayResponse {
|
|
148
|
-
protocolVersion: number;
|
|
149
|
-
page: {
|
|
150
|
-
url: string;
|
|
151
|
-
origin: string;
|
|
152
|
-
route: string;
|
|
153
|
-
};
|
|
154
|
-
match: BrowserMatchResponse;
|
|
155
|
-
run: BridgeRunSummary;
|
|
156
|
-
summary: {
|
|
157
|
-
failureState: BrowserFailureState;
|
|
158
|
-
coverageState: BrowserCoverageState;
|
|
159
|
-
relatedFailureCount: number;
|
|
160
|
-
relatedCoverageCount: number;
|
|
161
|
-
coverageBreakdown?: {
|
|
162
|
-
direct: number;
|
|
163
|
-
indirect: number;
|
|
164
|
-
mixed: number;
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
failures: FailureOverlayEntry[];
|
|
168
|
-
coverage: CoverageOverlayEntry[];
|
|
169
|
-
}
|
|
170
|
-
export interface BridgeErrorResponse {
|
|
171
|
-
protocolVersion: number;
|
|
172
|
-
error: {
|
|
173
|
-
code: string;
|
|
174
|
-
message: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
export declare function normalizeBrowserTarget(value: unknown): BrowserTarget | null;
|
|
178
|
-
export declare function normalizeBrowserMetadata(value: unknown): BrowserMetadata | null;
|
|
179
|
-
export declare function normalizeBrowserMetadataDocument(value: unknown): BrowserMetadataDocument | null;
|
|
180
|
-
export declare function normalizeCoverageGraphNode(value: unknown): CoverageGraphNode | null;
|
|
181
|
-
export declare function normalizeCoverageGraphEdge(value: unknown): CoverageGraphEdge | null;
|
|
182
|
-
export declare function normalizeCoverageEvidence(value: unknown): CoverageEvidence | null;
|
|
183
|
-
export declare function normalizeCoverageGraphDiagnostic(value: unknown): CoverageGraphDiagnostic | null;
|
|
184
|
-
export declare function normalizeCoverageGraph(value: unknown): CoverageGraph | null;
|
|
185
|
-
export declare function isPageOverlayResponse(value: unknown): value is PageOverlayResponse;
|
|
186
|
-
export declare function normalizePageOverlayResponse(value: unknown): PageOverlayResponse | null;
|
|
187
|
-
export declare function createBridgeErrorResponse(code: string, message: string): BridgeErrorResponse;
|
|
188
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,8BAA8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AA0B,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,GAAG,IAAI,CAkBnF;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAmCjF;AAED,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAW/F;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,IAAI,CA6B3E;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAYvF;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAQ5F"}
|
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
export const TESTKIT_BROWSER_PROTOCOL_VERSION = 1;
|
|
2
|
-
export const TESTKIT_COVERAGE_GRAPH_VERSION = 1;
|
|
3
|
-
const TARGET_KINDS = new Set(["testId", "role", "text", "css", "xpath", "component"]);
|
|
4
|
-
const CONFIDENCE_LEVELS = new Set(["low", "medium", "high"]);
|
|
5
|
-
const FAILURE_STATES = new Set(["failing", "healthy", "unavailable"]);
|
|
6
|
-
const COVERAGE_STATES = new Set(["covered", "missing", "unavailable"]);
|
|
7
|
-
const NODE_KINDS = new Set([
|
|
8
|
-
"page_view",
|
|
9
|
-
"ui_surface",
|
|
10
|
-
"ui_action",
|
|
11
|
-
"client_request",
|
|
12
|
-
"api_route",
|
|
13
|
-
"server_action",
|
|
14
|
-
"server_capability",
|
|
15
|
-
"data_capability",
|
|
16
|
-
"test_file",
|
|
17
|
-
]);
|
|
18
|
-
const EDGE_KINDS = new Set([
|
|
19
|
-
"contains",
|
|
20
|
-
"renders",
|
|
21
|
-
"triggers",
|
|
22
|
-
"requests",
|
|
23
|
-
"handles",
|
|
24
|
-
"delegates_to",
|
|
25
|
-
"covers",
|
|
26
|
-
]);
|
|
27
|
-
const EVIDENCE_SOURCES = new Set(["convention", "static", "runtime"]);
|
|
28
|
-
const DIAGNOSTIC_LEVELS = new Set(["info", "warn"]);
|
|
29
|
-
export function normalizeBrowserTarget(value) {
|
|
30
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
31
|
-
return null;
|
|
32
|
-
const record = value;
|
|
33
|
-
const kind = normalizeOptionalString(record.kind);
|
|
34
|
-
const targetValue = normalizeOptionalString(record.value);
|
|
35
|
-
if (!kind || !isSetValue(TARGET_KINDS, kind) || !targetValue)
|
|
36
|
-
return null;
|
|
37
|
-
const label = normalizeOptionalString(record.label);
|
|
38
|
-
const confidence = normalizeOptionalString(record.confidence);
|
|
39
|
-
return {
|
|
40
|
-
kind,
|
|
41
|
-
value: targetValue,
|
|
42
|
-
...(label ? { label } : {}),
|
|
43
|
-
...(confidence && isSetValue(CONFIDENCE_LEVELS, confidence) ? { confidence } : {}),
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export function normalizeBrowserMetadata(value) {
|
|
47
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
48
|
-
return null;
|
|
49
|
-
const record = value;
|
|
50
|
-
const label = normalizeOptionalString(record.label);
|
|
51
|
-
const origins = normalizeStringArray(record.origins);
|
|
52
|
-
const routes = normalizeStringArray(record.routes);
|
|
53
|
-
const targets = Array.isArray(record.targets)
|
|
54
|
-
? record.targets.map((entry) => normalizeBrowserTarget(entry)).filter((entry) => Boolean(entry))
|
|
55
|
-
: [];
|
|
56
|
-
if (!label && origins.length === 0 && routes.length === 0 && targets.length === 0) {
|
|
57
|
-
return null;
|
|
58
|
-
}
|
|
59
|
-
return {
|
|
60
|
-
...(label ? { label } : {}),
|
|
61
|
-
...(origins.length > 0 ? { origins } : {}),
|
|
62
|
-
...(routes.length > 0 ? { routes } : {}),
|
|
63
|
-
...(targets.length > 0 ? { targets } : {}),
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export function normalizeBrowserMetadataDocument(value) {
|
|
67
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
68
|
-
return null;
|
|
69
|
-
const record = value;
|
|
70
|
-
const schemaVersion = Number.isInteger(record.schemaVersion) && Number(record.schemaVersion) > 0
|
|
71
|
-
? Number(record.schemaVersion)
|
|
72
|
-
: TESTKIT_BROWSER_PROTOCOL_VERSION;
|
|
73
|
-
const browser = normalizeBrowserMetadata(record.browser);
|
|
74
|
-
if (!browser)
|
|
75
|
-
return null;
|
|
76
|
-
return {
|
|
77
|
-
schemaVersion,
|
|
78
|
-
browser,
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
export function normalizeCoverageGraphNode(value) {
|
|
82
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
83
|
-
return null;
|
|
84
|
-
const record = value;
|
|
85
|
-
const id = normalizeOptionalString(record.id);
|
|
86
|
-
const kind = normalizeOptionalString(record.kind);
|
|
87
|
-
const service = normalizeOptionalString(record.service);
|
|
88
|
-
const label = normalizeOptionalString(record.label);
|
|
89
|
-
if (!id || !kind || !isSetValue(NODE_KINDS, kind) || !service || !label)
|
|
90
|
-
return null;
|
|
91
|
-
const filePath = normalizeOptionalString(record.filePath);
|
|
92
|
-
const route = normalizeOptionalString(record.route);
|
|
93
|
-
const method = normalizeOptionalString(record.method);
|
|
94
|
-
const path = normalizeOptionalString(record.path);
|
|
95
|
-
const target = normalizeBrowserTarget(record.target);
|
|
96
|
-
const metadata = normalizeMetadataRecord(record.metadata);
|
|
97
|
-
return {
|
|
98
|
-
id,
|
|
99
|
-
kind,
|
|
100
|
-
service,
|
|
101
|
-
label,
|
|
102
|
-
...(filePath ? { filePath } : {}),
|
|
103
|
-
...(route ? { route } : {}),
|
|
104
|
-
...(method ? { method } : {}),
|
|
105
|
-
...(path ? { path } : {}),
|
|
106
|
-
...(target ? { target } : {}),
|
|
107
|
-
...(metadata ? { metadata } : {}),
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
export function normalizeCoverageGraphEdge(value) {
|
|
111
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
112
|
-
return null;
|
|
113
|
-
const record = value;
|
|
114
|
-
const id = normalizeOptionalString(record.id);
|
|
115
|
-
const kind = normalizeOptionalString(record.kind);
|
|
116
|
-
const from = normalizeOptionalString(record.from);
|
|
117
|
-
const to = normalizeOptionalString(record.to);
|
|
118
|
-
if (!id || !kind || !isSetValue(EDGE_KINDS, kind) || !from || !to)
|
|
119
|
-
return null;
|
|
120
|
-
const confidence = normalizeOptionalString(record.confidence);
|
|
121
|
-
const metadata = normalizeMetadataRecord(record.metadata);
|
|
122
|
-
return {
|
|
123
|
-
id,
|
|
124
|
-
kind,
|
|
125
|
-
from,
|
|
126
|
-
to,
|
|
127
|
-
...(confidence && isSetValue(CONFIDENCE_LEVELS, confidence) ? { confidence } : {}),
|
|
128
|
-
...(metadata ? { metadata } : {}),
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export function normalizeCoverageEvidence(value) {
|
|
132
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
133
|
-
return null;
|
|
134
|
-
const record = value;
|
|
135
|
-
const id = normalizeOptionalString(record.id);
|
|
136
|
-
const source = normalizeOptionalString(record.source);
|
|
137
|
-
const service = normalizeOptionalString(record.service);
|
|
138
|
-
const suiteName = normalizeOptionalString(record.suiteName);
|
|
139
|
-
const type = normalizeOptionalString(record.type) || normalizeOptionalString(record.selectionType);
|
|
140
|
-
const testFilePath = normalizeOptionalString(record.testFilePath);
|
|
141
|
-
const coveredNodeIds = normalizeStringArray(record.coveredNodeIds);
|
|
142
|
-
if (!id ||
|
|
143
|
-
!source ||
|
|
144
|
-
!isSetValue(EVIDENCE_SOURCES, source) ||
|
|
145
|
-
!service ||
|
|
146
|
-
!suiteName ||
|
|
147
|
-
!type ||
|
|
148
|
-
!testFilePath ||
|
|
149
|
-
coveredNodeIds.length === 0) {
|
|
150
|
-
return null;
|
|
151
|
-
}
|
|
152
|
-
const confidence = normalizeOptionalString(record.confidence);
|
|
153
|
-
const details = normalizeEvidenceDetails(record.details);
|
|
154
|
-
return {
|
|
155
|
-
id,
|
|
156
|
-
source,
|
|
157
|
-
service,
|
|
158
|
-
suiteName,
|
|
159
|
-
type,
|
|
160
|
-
testFilePath,
|
|
161
|
-
coveredNodeIds,
|
|
162
|
-
...(confidence && isSetValue(CONFIDENCE_LEVELS, confidence) ? { confidence } : {}),
|
|
163
|
-
...(details ? { details } : {}),
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
export function normalizeCoverageGraphDiagnostic(value) {
|
|
167
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
168
|
-
return null;
|
|
169
|
-
const record = value;
|
|
170
|
-
const level = normalizeOptionalString(record.level);
|
|
171
|
-
const code = normalizeOptionalString(record.code);
|
|
172
|
-
const filePath = normalizeOptionalString(record.filePath);
|
|
173
|
-
const service = normalizeOptionalString(record.service);
|
|
174
|
-
const message = normalizeOptionalString(record.message);
|
|
175
|
-
if (!level || !code || !filePath || !service || !message)
|
|
176
|
-
return null;
|
|
177
|
-
if (!isSetValue(DIAGNOSTIC_LEVELS, level))
|
|
178
|
-
return null;
|
|
179
|
-
return { level, code, filePath, service, message };
|
|
180
|
-
}
|
|
181
|
-
export function normalizeCoverageGraph(value) {
|
|
182
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
183
|
-
return null;
|
|
184
|
-
const record = value;
|
|
185
|
-
const schemaVersion = Number.isInteger(record.schemaVersion) && Number(record.schemaVersion) > 0
|
|
186
|
-
? Number(record.schemaVersion)
|
|
187
|
-
: TESTKIT_COVERAGE_GRAPH_VERSION;
|
|
188
|
-
const nodes = Array.isArray(record.nodes)
|
|
189
|
-
? record.nodes.map((entry) => normalizeCoverageGraphNode(entry)).filter((entry) => Boolean(entry))
|
|
190
|
-
: [];
|
|
191
|
-
const edges = Array.isArray(record.edges)
|
|
192
|
-
? record.edges.map((entry) => normalizeCoverageGraphEdge(entry)).filter((entry) => Boolean(entry))
|
|
193
|
-
: [];
|
|
194
|
-
const evidence = Array.isArray(record.evidence)
|
|
195
|
-
? record.evidence.map((entry) => normalizeCoverageEvidence(entry)).filter((entry) => Boolean(entry))
|
|
196
|
-
: [];
|
|
197
|
-
const diagnostics = Array.isArray(record.diagnostics)
|
|
198
|
-
? record.diagnostics
|
|
199
|
-
.map((entry) => normalizeCoverageGraphDiagnostic(entry))
|
|
200
|
-
.filter((entry) => Boolean(entry))
|
|
201
|
-
: [];
|
|
202
|
-
if (nodes.length === 0)
|
|
203
|
-
return null;
|
|
204
|
-
return {
|
|
205
|
-
schemaVersion,
|
|
206
|
-
nodes,
|
|
207
|
-
edges,
|
|
208
|
-
evidence,
|
|
209
|
-
diagnostics,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
export function isPageOverlayResponse(value) {
|
|
213
|
-
return Boolean(normalizePageOverlayResponse(value));
|
|
214
|
-
}
|
|
215
|
-
export function normalizePageOverlayResponse(value) {
|
|
216
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
217
|
-
return null;
|
|
218
|
-
const record = value;
|
|
219
|
-
if (record.protocolVersion !== TESTKIT_BROWSER_PROTOCOL_VERSION)
|
|
220
|
-
return null;
|
|
221
|
-
if (!record.page || typeof record.page !== "object")
|
|
222
|
-
return null;
|
|
223
|
-
if (!record.match || typeof record.match !== "object")
|
|
224
|
-
return null;
|
|
225
|
-
if (!record.summary || typeof record.summary !== "object")
|
|
226
|
-
return null;
|
|
227
|
-
if (!Array.isArray(record.coverage) || !Array.isArray(record.failures))
|
|
228
|
-
return null;
|
|
229
|
-
const summary = record.summary;
|
|
230
|
-
if (!isSetValue(FAILURE_STATES, summary.failureState))
|
|
231
|
-
return null;
|
|
232
|
-
if (!isSetValue(COVERAGE_STATES, summary.coverageState))
|
|
233
|
-
return null;
|
|
234
|
-
return record;
|
|
235
|
-
}
|
|
236
|
-
export function createBridgeErrorResponse(code, message) {
|
|
237
|
-
return {
|
|
238
|
-
protocolVersion: TESTKIT_BROWSER_PROTOCOL_VERSION,
|
|
239
|
-
error: {
|
|
240
|
-
code,
|
|
241
|
-
message,
|
|
242
|
-
},
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
function normalizeEvidenceDetails(value) {
|
|
246
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
247
|
-
return null;
|
|
248
|
-
const record = value;
|
|
249
|
-
const requestPaths = normalizeStringArray(record.requestPaths);
|
|
250
|
-
const route = normalizeOptionalString(record.route);
|
|
251
|
-
const targets = Array.isArray(record.targets)
|
|
252
|
-
? record.targets.map((entry) => normalizeBrowserTarget(entry)).filter((entry) => Boolean(entry))
|
|
253
|
-
: [];
|
|
254
|
-
if (requestPaths.length === 0 && !route && targets.length === 0)
|
|
255
|
-
return null;
|
|
256
|
-
return {
|
|
257
|
-
...(requestPaths.length > 0 ? { requestPaths } : {}),
|
|
258
|
-
...(route ? { route } : {}),
|
|
259
|
-
...(targets.length > 0 ? { targets } : {}),
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
function normalizeMetadataRecord(value) {
|
|
263
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
264
|
-
return null;
|
|
265
|
-
const normalized = {};
|
|
266
|
-
for (const [key, entry] of Object.entries(value)) {
|
|
267
|
-
const normalizedKey = normalizeOptionalString(key);
|
|
268
|
-
if (!normalizedKey)
|
|
269
|
-
continue;
|
|
270
|
-
if (entry === null ||
|
|
271
|
-
typeof entry === "string" ||
|
|
272
|
-
typeof entry === "number" ||
|
|
273
|
-
typeof entry === "boolean") {
|
|
274
|
-
normalized[normalizedKey] = entry;
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
return Object.keys(normalized).length > 0 ? normalized : null;
|
|
278
|
-
}
|
|
279
|
-
function normalizeStringArray(value) {
|
|
280
|
-
if (!Array.isArray(value))
|
|
281
|
-
return [];
|
|
282
|
-
return value.map((entry) => normalizeOptionalString(entry)).filter((entry) => Boolean(entry));
|
|
283
|
-
}
|
|
284
|
-
function normalizeOptionalString(value) {
|
|
285
|
-
if (typeof value !== "string")
|
|
286
|
-
return null;
|
|
287
|
-
const normalized = value.trim();
|
|
288
|
-
return normalized.length > 0 ? normalized : null;
|
|
289
|
-
}
|
|
290
|
-
function isSetValue(set, value) {
|
|
291
|
-
return typeof value === "string" && set.has(value);
|
|
292
|
-
}
|
|
293
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAyNhD,MAAM,YAAY,GAAG,IAAI,GAAG,CAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC,CAAC;AACzG,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAoB,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAChF,MAAM,cAAc,GAAG,IAAI,GAAG,CAAsB,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAC3F,MAAM,eAAe,GAAG,IAAI,GAAG,CAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAC7F,MAAM,UAAU,GAAG,IAAI,GAAG,CAAmB;IAC3C,WAAW;IACX,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,WAAW;IACX,eAAe;IACf,mBAAmB;IACnB,iBAAiB;IACjB,WAAW;CACZ,CAAC,CAAC;AACH,MAAM,UAAU,GAAG,IAAI,GAAG,CAAmB;IAC3C,UAAU;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,S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B,EAAE,KAAc;IACvE,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,CAAC,KAAU,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@elench/testkit-protocol",
|
|
3
|
-
"version": "0.1.133",
|
|
4
|
-
"description": "Shared browser protocol for testkit bridge and extension consumers",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/index.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"default": "./dist/index.js"
|
|
12
|
-
},
|
|
13
|
-
"./package.json": "./package.json"
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist/",
|
|
17
|
-
"package.json"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsc -p tsconfig.build.json",
|
|
21
|
-
"clean": "rm -rf dist",
|
|
22
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
23
|
-
},
|
|
24
|
-
"private": false
|
|
25
|
-
}
|