laxy-verify 1.2.0 → 1.2.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.
@@ -1,13 +1,13 @@
1
- import type { TierVerificationView, VerificationReport, VerificationTier } from "./types.js";
2
- export interface TierPolicy {
3
- tier: VerificationTier;
4
- showDetailedLighthouse: boolean;
5
- showDetailedE2E: boolean;
6
- showReportExport: boolean;
7
- maxBlockers: number;
8
- maxWarnings: number;
9
- }
10
- export declare function getTierPolicy(tier?: VerificationTier): TierPolicy;
11
- export declare function planToVerificationTier(plan?: string | null): VerificationTier;
12
- export declare function getVerificationTierQuestion(tier: VerificationTier): string;
13
- export declare function getTierVerificationView(report: VerificationReport): TierVerificationView;
1
+ import type { TierVerificationView, VerificationReport, VerificationTier } from "./types.js";
2
+ export interface TierPolicy {
3
+ tier: VerificationTier;
4
+ showDetailedLighthouse: boolean;
5
+ showDetailedE2E: boolean;
6
+ showReportExport: boolean;
7
+ maxBlockers: number;
8
+ maxWarnings: number;
9
+ }
10
+ export declare function getTierPolicy(tier?: VerificationTier): TierPolicy;
11
+ export declare function planToVerificationTier(plan?: string | null): VerificationTier;
12
+ export declare function getVerificationTierQuestion(tier: VerificationTier): string;
13
+ export declare function getTierVerificationView(report: VerificationReport): TierVerificationView;
@@ -1,60 +1,60 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTierPolicy = getTierPolicy;
4
- exports.planToVerificationTier = planToVerificationTier;
5
- exports.getVerificationTierQuestion = getVerificationTierQuestion;
6
- exports.getTierVerificationView = getTierVerificationView;
7
- const UNLOCKED_POLICY = {
8
- showDetailedLighthouse: true,
9
- showDetailedE2E: true,
10
- showReportExport: true,
11
- maxBlockers: 10,
12
- maxWarnings: 10,
13
- };
14
- const TIER_POLICIES = {
15
- free: {
16
- tier: "free",
17
- ...UNLOCKED_POLICY,
18
- },
19
- pro: {
20
- tier: "pro",
21
- ...UNLOCKED_POLICY,
22
- },
23
- team: {
24
- tier: "team",
25
- ...UNLOCKED_POLICY,
26
- },
27
- };
28
- function getTierPolicy(tier = "free") {
29
- return TIER_POLICIES[tier];
30
- }
31
- function planToVerificationTier(plan) {
32
- if (plan === "pro")
33
- return "pro";
34
- if (plan === "team")
35
- return "team";
36
- return "free";
37
- }
38
- function getVerificationTierQuestion(tier) {
39
- void tier;
40
- return "Is this ready to ship?";
41
- }
42
- function getTierVerificationView(report) {
43
- const policy = getTierPolicy(report.tier);
44
- return {
45
- tier: report.tier,
46
- question: getVerificationTierQuestion(report.tier),
47
- verdict: report.verdict,
48
- confidence: report.confidence,
49
- summary: report.summary,
50
- grade: report.grade,
51
- blockers: report.blockers.slice(0, policy.maxBlockers),
52
- warnings: report.warnings.slice(0, policy.maxWarnings),
53
- passes: report.passes,
54
- nextActions: report.nextActions.slice(0, Math.max(2, policy.maxWarnings)),
55
- failureEvidence: report.failureEvidence.slice(0, Math.max(2, policy.maxWarnings)),
56
- showDetailedLighthouse: policy.showDetailedLighthouse,
57
- showDetailedE2E: policy.showDetailedE2E,
58
- showReportExport: policy.showReportExport,
59
- };
60
- }
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTierPolicy = getTierPolicy;
4
+ exports.planToVerificationTier = planToVerificationTier;
5
+ exports.getVerificationTierQuestion = getVerificationTierQuestion;
6
+ exports.getTierVerificationView = getTierVerificationView;
7
+ const UNLOCKED_POLICY = {
8
+ showDetailedLighthouse: true,
9
+ showDetailedE2E: true,
10
+ showReportExport: true,
11
+ maxBlockers: 10,
12
+ maxWarnings: 10,
13
+ };
14
+ const TIER_POLICIES = {
15
+ free: {
16
+ tier: "free",
17
+ ...UNLOCKED_POLICY,
18
+ },
19
+ pro: {
20
+ tier: "pro",
21
+ ...UNLOCKED_POLICY,
22
+ },
23
+ team: {
24
+ tier: "team",
25
+ ...UNLOCKED_POLICY,
26
+ },
27
+ };
28
+ function getTierPolicy(tier = "free") {
29
+ return TIER_POLICIES[tier];
30
+ }
31
+ function planToVerificationTier(plan) {
32
+ if (plan === "pro")
33
+ return "pro";
34
+ if (plan === "team")
35
+ return "team";
36
+ return "free";
37
+ }
38
+ function getVerificationTierQuestion(tier) {
39
+ void tier;
40
+ return "Is this ready to ship?";
41
+ }
42
+ function getTierVerificationView(report) {
43
+ const policy = getTierPolicy(report.tier);
44
+ return {
45
+ tier: report.tier,
46
+ question: getVerificationTierQuestion(report.tier),
47
+ verdict: report.verdict,
48
+ confidence: report.confidence,
49
+ summary: report.summary,
50
+ grade: report.grade,
51
+ blockers: report.blockers.slice(0, policy.maxBlockers),
52
+ warnings: report.warnings.slice(0, policy.maxWarnings),
53
+ passes: report.passes,
54
+ nextActions: report.nextActions.slice(0, Math.max(2, policy.maxWarnings)),
55
+ failureEvidence: report.failureEvidence.slice(0, Math.max(2, policy.maxWarnings)),
56
+ showDetailedLighthouse: policy.showDetailedLighthouse,
57
+ showDetailedE2E: policy.showDetailedE2E,
58
+ showReportExport: policy.showReportExport,
59
+ };
60
+ }
@@ -1,108 +1,108 @@
1
- export type VerificationGrade = "gold" | "silver" | "bronze" | "unverified";
2
- export type VerificationTier = "free" | "pro" | "team";
3
- export type ReleaseVerdict = "quick-pass" | "client-ready" | "investigate" | "hold" | "release-ready" | "build-failed";
4
- export interface LighthouseThresholds {
5
- performance: number;
6
- accessibility: number;
7
- seo: number;
8
- bestPractices: number;
9
- }
10
- export interface LighthouseScores {
11
- performance: number;
12
- accessibility: number;
13
- bestPractices: number;
14
- seo: number;
15
- }
16
- export interface VerificationInput {
17
- buildSuccess?: boolean;
18
- buildErrors?: string[];
19
- e2ePassed?: number;
20
- e2eTotal?: number;
21
- e2eCoverageGaps?: string[];
22
- e2eStabilityPassed?: boolean;
23
- e2eConsoleErrorCount?: number;
24
- lighthouseSkipped?: boolean;
25
- lighthouseErrorCount?: number;
26
- viewportIssues?: number;
27
- multiViewportPassed?: boolean;
28
- multiViewportSummary?: string;
29
- visualDiffVerdict?: "pass" | "warn" | "rollback";
30
- visualDiffPercentage?: number;
31
- hasVisualBaseline?: boolean;
32
- failureEvidence?: string[];
33
- lighthouseScores?: LighthouseScores;
34
- mobileLighthouseScores?: LighthouseScores;
35
- securityAudit?: {
36
- totalVulnerabilities: number;
37
- critical: number;
38
- high: number;
39
- summary: string;
40
- };
41
- brokenLinksAudit?: {
42
- checkedCount: number;
43
- brokenCount: number;
44
- summary: string;
45
- };
46
- }
47
- export interface VerificationCheck {
48
- key: "build" | "e2e" | "lighthouse" | "viewport" | "visual" | "security" | "mobile-lh" | "console-errors" | "broken-links";
49
- label: string;
50
- passed: boolean;
51
- }
52
- export interface VerificationFinding {
53
- category: "build" | "performance" | "accessibility" | "seo" | "bestPractices" | "e2e" | "viewport" | "visual" | "security" | "runtime";
54
- severity: "critical" | "high" | "medium";
55
- title: string;
56
- description: string;
57
- action: string;
58
- }
59
- export interface VerificationEvidence {
60
- input: VerificationInput;
61
- thresholds: LighthouseThresholds;
62
- buildPassed: boolean;
63
- e2ePassedAll: boolean;
64
- e2eStabilityPassed: boolean;
65
- hasE2EData: boolean;
66
- hasLighthouseData: boolean;
67
- lighthouseSkipped: boolean;
68
- hasMultiViewportData: boolean;
69
- multiViewportPassed: boolean;
70
- hasVisualDiffData: boolean;
71
- hasComparableVisualDiffData: boolean;
72
- visualDiffPassed: boolean;
73
- lighthousePassed: boolean;
74
- hasConsoleErrors: boolean;
75
- hasSecurityData: boolean;
76
- securityPassed: boolean;
77
- hasMobileLighthouseData: boolean;
78
- mobileLighthousePassed: boolean;
79
- }
80
- export interface VerificationReport {
81
- tier: VerificationTier;
82
- verdict: ReleaseVerdict;
83
- confidence: "low" | "medium" | "high";
84
- summary: string;
85
- grade: VerificationGrade;
86
- blockers: VerificationFinding[];
87
- warnings: VerificationFinding[];
88
- passes: VerificationCheck[];
89
- nextActions: string[];
90
- failureEvidence: string[];
91
- evidence: VerificationEvidence;
92
- }
93
- export interface TierVerificationView {
94
- tier: VerificationTier;
95
- question: string;
96
- verdict: ReleaseVerdict;
97
- confidence: "low" | "medium" | "high";
98
- summary: string;
99
- grade: VerificationGrade;
100
- blockers: VerificationFinding[];
101
- warnings: VerificationFinding[];
102
- passes: VerificationCheck[];
103
- nextActions: string[];
104
- failureEvidence: string[];
105
- showDetailedLighthouse: boolean;
106
- showDetailedE2E: boolean;
107
- showReportExport: boolean;
108
- }
1
+ export type VerificationGrade = "gold" | "silver" | "bronze" | "unverified";
2
+ export type VerificationTier = "free" | "pro" | "team";
3
+ export type ReleaseVerdict = "quick-pass" | "client-ready" | "investigate" | "hold" | "release-ready" | "build-failed";
4
+ export interface LighthouseThresholds {
5
+ performance: number;
6
+ accessibility: number;
7
+ seo: number;
8
+ bestPractices: number;
9
+ }
10
+ export interface LighthouseScores {
11
+ performance: number;
12
+ accessibility: number;
13
+ bestPractices: number;
14
+ seo: number;
15
+ }
16
+ export interface VerificationInput {
17
+ buildSuccess?: boolean;
18
+ buildErrors?: string[];
19
+ e2ePassed?: number;
20
+ e2eTotal?: number;
21
+ e2eCoverageGaps?: string[];
22
+ e2eStabilityPassed?: boolean;
23
+ e2eConsoleErrorCount?: number;
24
+ lighthouseSkipped?: boolean;
25
+ lighthouseErrorCount?: number;
26
+ viewportIssues?: number;
27
+ multiViewportPassed?: boolean;
28
+ multiViewportSummary?: string;
29
+ visualDiffVerdict?: "pass" | "warn" | "rollback";
30
+ visualDiffPercentage?: number;
31
+ hasVisualBaseline?: boolean;
32
+ failureEvidence?: string[];
33
+ lighthouseScores?: LighthouseScores;
34
+ mobileLighthouseScores?: LighthouseScores;
35
+ securityAudit?: {
36
+ totalVulnerabilities: number;
37
+ critical: number;
38
+ high: number;
39
+ summary: string;
40
+ };
41
+ brokenLinksAudit?: {
42
+ checkedCount: number;
43
+ brokenCount: number;
44
+ summary: string;
45
+ };
46
+ }
47
+ export interface VerificationCheck {
48
+ key: "build" | "e2e" | "lighthouse" | "viewport" | "visual" | "security" | "mobile-lh" | "console-errors" | "broken-links";
49
+ label: string;
50
+ passed: boolean;
51
+ }
52
+ export interface VerificationFinding {
53
+ category: "build" | "performance" | "accessibility" | "seo" | "bestPractices" | "e2e" | "viewport" | "visual" | "security" | "runtime";
54
+ severity: "critical" | "high" | "medium";
55
+ title: string;
56
+ description: string;
57
+ action: string;
58
+ }
59
+ export interface VerificationEvidence {
60
+ input: VerificationInput;
61
+ thresholds: LighthouseThresholds;
62
+ buildPassed: boolean;
63
+ e2ePassedAll: boolean;
64
+ e2eStabilityPassed: boolean;
65
+ hasE2EData: boolean;
66
+ hasLighthouseData: boolean;
67
+ lighthouseSkipped: boolean;
68
+ hasMultiViewportData: boolean;
69
+ multiViewportPassed: boolean;
70
+ hasVisualDiffData: boolean;
71
+ hasComparableVisualDiffData: boolean;
72
+ visualDiffPassed: boolean;
73
+ lighthousePassed: boolean;
74
+ hasConsoleErrors: boolean;
75
+ hasSecurityData: boolean;
76
+ securityPassed: boolean;
77
+ hasMobileLighthouseData: boolean;
78
+ mobileLighthousePassed: boolean;
79
+ }
80
+ export interface VerificationReport {
81
+ tier: VerificationTier;
82
+ verdict: ReleaseVerdict;
83
+ confidence: "low" | "medium" | "high";
84
+ summary: string;
85
+ grade: VerificationGrade;
86
+ blockers: VerificationFinding[];
87
+ warnings: VerificationFinding[];
88
+ passes: VerificationCheck[];
89
+ nextActions: string[];
90
+ failureEvidence: string[];
91
+ evidence: VerificationEvidence;
92
+ }
93
+ export interface TierVerificationView {
94
+ tier: VerificationTier;
95
+ question: string;
96
+ verdict: ReleaseVerdict;
97
+ confidence: "low" | "medium" | "high";
98
+ summary: string;
99
+ grade: VerificationGrade;
100
+ blockers: VerificationFinding[];
101
+ warnings: VerificationFinding[];
102
+ passes: VerificationCheck[];
103
+ nextActions: string[];
104
+ failureEvidence: string[];
105
+ showDetailedLighthouse: boolean;
106
+ showDetailedE2E: boolean;
107
+ showReportExport: boolean;
108
+ }
@@ -1,2 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +1,26 @@
1
- export type VisualDiffViewportName = "desktop" | "tablet" | "mobile";
2
- export interface VisualDiffViewportResult {
3
- viewport: VisualDiffViewportName;
4
- hasBaseline: boolean;
5
- diffPercentage: number;
6
- verdict: "pass" | "warn" | "rollback";
7
- diffPixels: number;
8
- totalPixels: number;
9
- baselinePath: string;
10
- currentPath: string;
11
- diffPath: string;
12
- }
13
- export interface VisualDiffResult {
14
- hasBaseline: boolean;
15
- diffPercentage: number;
16
- verdict: "pass" | "warn" | "rollback";
17
- diffPixels: number;
18
- totalPixels: number;
19
- baselinePath: string;
20
- currentPath: string;
21
- diffPath: string;
22
- viewports: VisualDiffViewportResult[];
23
- summary: string;
24
- }
25
- export declare function formatVisualDiffSummary(result: VisualDiffResult): string;
26
- export declare function runVisualDiff(projectDir: string, url: string, label?: string): Promise<VisualDiffResult>;
1
+ export type VisualDiffViewportName = "desktop" | "tablet" | "mobile";
2
+ export interface VisualDiffViewportResult {
3
+ viewport: VisualDiffViewportName;
4
+ hasBaseline: boolean;
5
+ diffPercentage: number;
6
+ verdict: "pass" | "warn" | "rollback";
7
+ diffPixels: number;
8
+ totalPixels: number;
9
+ baselinePath: string;
10
+ currentPath: string;
11
+ diffPath: string;
12
+ }
13
+ export interface VisualDiffResult {
14
+ hasBaseline: boolean;
15
+ diffPercentage: number;
16
+ verdict: "pass" | "warn" | "rollback";
17
+ diffPixels: number;
18
+ totalPixels: number;
19
+ baselinePath: string;
20
+ currentPath: string;
21
+ diffPath: string;
22
+ viewports: VisualDiffViewportResult[];
23
+ summary: string;
24
+ }
25
+ export declare function formatVisualDiffSummary(result: VisualDiffResult): string;
26
+ export declare function runVisualDiff(projectDir: string, url: string, label?: string): Promise<VisualDiffResult>;