laxy-verify 1.1.21 → 1.1.23
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 +276 -263
- package/dist/cli.js +13 -17
- package/dist/comment.js +21 -15
- package/dist/entitlement.js +7 -36
- package/dist/status.js +4 -2
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,263 +1,276 @@
|
|
|
1
|
-
# laxy-verify
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
-
|
|
155
|
-
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- `
|
|
191
|
-
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
-
|
|
234
|
-
-
|
|
235
|
-
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
-
|
|
252
|
-
|
|
253
|
-
-
|
|
254
|
-
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
1
|
+
# laxy-verify
|
|
2
|
+
|
|
3
|
+
`laxy-verify` is a deployment blocker gate for frontend apps.
|
|
4
|
+
|
|
5
|
+
Its job is simple:
|
|
6
|
+
|
|
7
|
+
- catch the broken build before merge
|
|
8
|
+
- catch the broken user flow before QA or client review
|
|
9
|
+
- catch the obvious mobile or viewport break before release
|
|
10
|
+
|
|
11
|
+
It runs your production build, Lighthouse, and user-visible verification flows in one command, then leaves one decision and one evidence trail for local use or CI.
|
|
12
|
+
|
|
13
|
+
## Why use this instead of stitching tools together?
|
|
14
|
+
|
|
15
|
+
Most teams already have some mix of:
|
|
16
|
+
|
|
17
|
+
- `npm run build`
|
|
18
|
+
- Lighthouse
|
|
19
|
+
- Playwright or smoke checks
|
|
20
|
+
- CI status rules
|
|
21
|
+
|
|
22
|
+
The gap is not "can these tools exist together?" The gap is "who turns that pile of output into a safe merge or release decision?"
|
|
23
|
+
|
|
24
|
+
`laxy-verify` gives you:
|
|
25
|
+
|
|
26
|
+
- one command instead of a custom build plus audit plus smoke-check script stack
|
|
27
|
+
- one result file instead of scattered logs
|
|
28
|
+
- one blocker-first decision instead of "build passed, but do we actually trust this release?"
|
|
29
|
+
- a faster setup path with `--init` for config plus GitHub Actions
|
|
30
|
+
|
|
31
|
+
This is most useful if you ship frontend apps and want a practical gate before:
|
|
32
|
+
|
|
33
|
+
- merge
|
|
34
|
+
- client review
|
|
35
|
+
- QA handoff
|
|
36
|
+
- production release
|
|
37
|
+
|
|
38
|
+
## The failures it is meant to catch
|
|
39
|
+
|
|
40
|
+
Use `laxy-verify` when you want to catch things like:
|
|
41
|
+
|
|
42
|
+
- the production build passes locally but fails in CI
|
|
43
|
+
- the app opens, but a key button or form flow is broken
|
|
44
|
+
- desktop looks fine, but a mobile CTA is pushed out of view
|
|
45
|
+
- Lighthouse looks acceptable, but the user-visible path is still not safe to ship
|
|
46
|
+
- a PR needs a clear hold reason instead of a vague "something failed"
|
|
47
|
+
|
|
48
|
+
## What it actually checks
|
|
49
|
+
|
|
50
|
+
A standard run includes:
|
|
51
|
+
|
|
52
|
+
- production build success
|
|
53
|
+
- Lighthouse thresholds (3 runs for stable evidence)
|
|
54
|
+
- E2E scenarios for user-visible flows
|
|
55
|
+
- multi-viewport checks (desktop, tablet, mobile)
|
|
56
|
+
- blocker-aware reporting and release decisions
|
|
57
|
+
|
|
58
|
+
With a logged-in account, additional checks run:
|
|
59
|
+
|
|
60
|
+
- security audit
|
|
61
|
+
- visual diff evidence
|
|
62
|
+
- stability pass (second E2E run)
|
|
63
|
+
|
|
64
|
+
## What you get from one run
|
|
65
|
+
|
|
66
|
+
- a release decision such as `quick-pass`, `client-ready`, `release-ready`, `hold`, or `investigate`
|
|
67
|
+
- a verification grade: `Gold`, `Silver`, `Bronze`, or `Unverified`
|
|
68
|
+
- `.laxy-result.json` for CI and automation
|
|
69
|
+
- `laxy-verify-report.md` for human review and AI handoff
|
|
70
|
+
|
|
71
|
+
Grades still exist, but they are not the main point. The main point is whether the run found blockers you should stop on.
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
Run it on a frontend app:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cd your-project
|
|
79
|
+
npx laxy-verify .
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Generate config plus CI workflow:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npx laxy-verify --init
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
That creates:
|
|
89
|
+
|
|
90
|
+
- `.laxy.yml`
|
|
91
|
+
- `.github/workflows/laxy-verify.yml`
|
|
92
|
+
|
|
93
|
+
Log in to unlock paid plan features:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
npx laxy-verify login
|
|
97
|
+
npx laxy-verify whoami
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
For CI, set `LAXY_TOKEN` instead of interactive login:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
env:
|
|
104
|
+
LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Example workflow
|
|
108
|
+
|
|
109
|
+
1. Run `npx laxy-verify .` locally before opening or merging a PR.
|
|
110
|
+
2. Fix broken builds, broken flows, and visible regressions.
|
|
111
|
+
3. Commit `.laxy.yml`.
|
|
112
|
+
4. Run `npx laxy-verify --init`.
|
|
113
|
+
5. Let the GitHub Action apply the same gate on every PR.
|
|
114
|
+
|
|
115
|
+
## Example output
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
Decision: release-ready
|
|
119
|
+
Grade: Gold
|
|
120
|
+
|
|
121
|
+
Passed:
|
|
122
|
+
- production build
|
|
123
|
+
- Lighthouse thresholds
|
|
124
|
+
- core user flows
|
|
125
|
+
- desktop, tablet, and mobile viewport checks
|
|
126
|
+
|
|
127
|
+
Artifacts:
|
|
128
|
+
- .laxy-result.json
|
|
129
|
+
- laxy-verify-report.md
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## The decision it helps you make
|
|
133
|
+
|
|
134
|
+
`laxy-verify` answers a delivery decision, not just a score:
|
|
135
|
+
|
|
136
|
+
- Would this break for real users right now?
|
|
137
|
+
- What would block a client demo or QA handoff?
|
|
138
|
+
- Is there enough evidence to merge or release with confidence?
|
|
139
|
+
|
|
140
|
+
Log in to unlock deeper checks (security audit, visual diff, stability pass).
|
|
141
|
+
|
|
142
|
+
## Grades
|
|
143
|
+
|
|
144
|
+
| Grade | Meaning |
|
|
145
|
+
|---|---|
|
|
146
|
+
| Gold | Build passed, E2E passed, Lighthouse passed, and release-level evidence passed |
|
|
147
|
+
| Silver | Build passed and E2E passed |
|
|
148
|
+
| Bronze | Build passed |
|
|
149
|
+
| Unverified | Build failed |
|
|
150
|
+
|
|
151
|
+
Default Lighthouse thresholds:
|
|
152
|
+
|
|
153
|
+
- Performance `>= 70`
|
|
154
|
+
- Accessibility `>= 85`
|
|
155
|
+
- SEO `>= 80`
|
|
156
|
+
- Best Practices `>= 80`
|
|
157
|
+
|
|
158
|
+
## Config
|
|
159
|
+
|
|
160
|
+
All fields in `.laxy.yml` are optional.
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
framework: auto
|
|
164
|
+
build_command: ""
|
|
165
|
+
dev_command: ""
|
|
166
|
+
package_manager: auto
|
|
167
|
+
port: 3000
|
|
168
|
+
build_timeout: 300
|
|
169
|
+
dev_timeout: 60
|
|
170
|
+
lighthouse_runs: 1
|
|
171
|
+
fail_on: bronze
|
|
172
|
+
|
|
173
|
+
thresholds:
|
|
174
|
+
performance: 70
|
|
175
|
+
accessibility: 85
|
|
176
|
+
seo: 80
|
|
177
|
+
best_practices: 80
|
|
178
|
+
|
|
179
|
+
crawl: false
|
|
180
|
+
max_crawl_depth: 3
|
|
181
|
+
max_crawl_pages: 10
|
|
182
|
+
browsers:
|
|
183
|
+
- chromium
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Useful adjustments:
|
|
187
|
+
|
|
188
|
+
- raise `fail_on` in CI when you want stricter gates
|
|
189
|
+
- set `build_command` or `dev_command` if auto-detection is not enough
|
|
190
|
+
- increase `lighthouse_runs` for more stable performance evidence
|
|
191
|
+
- point the CLI at the actual app directory in a monorepo
|
|
192
|
+
|
|
193
|
+
## CLI
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
npx laxy-verify [project-dir]
|
|
197
|
+
|
|
198
|
+
Options:
|
|
199
|
+
--format console|json
|
|
200
|
+
--ci
|
|
201
|
+
--config <path>
|
|
202
|
+
--fail-on unverified|bronze|silver|gold
|
|
203
|
+
--skip-lighthouse
|
|
204
|
+
--plan-override free|pro|pro_plus
|
|
205
|
+
--badge
|
|
206
|
+
--init
|
|
207
|
+
--multi-viewport
|
|
208
|
+
--help
|
|
209
|
+
|
|
210
|
+
Subcommands:
|
|
211
|
+
login [email]
|
|
212
|
+
logout
|
|
213
|
+
whoami
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
`--plan-override` is for downgrade testing only. It can simulate lower tiers, but it will not let you exceed your real entitlement.
|
|
217
|
+
|
|
218
|
+
## Result files
|
|
219
|
+
|
|
220
|
+
Every run writes `.laxy-result.json`.
|
|
221
|
+
|
|
222
|
+
When the run finds something worth reviewing, it also writes `laxy-verify-report.md`.
|
|
223
|
+
|
|
224
|
+
Typical use:
|
|
225
|
+
|
|
226
|
+
- `.laxy-result.json` for CI parsing and machine decisions
|
|
227
|
+
- `laxy-verify-report.md` for human review, PR discussion, or AI-assisted fixes
|
|
228
|
+
|
|
229
|
+
The markdown report is designed to be readable and easy to paste into coding tools.
|
|
230
|
+
|
|
231
|
+
It includes:
|
|
232
|
+
|
|
233
|
+
- the main stop-or-ship decision in plain English
|
|
234
|
+
- what passed
|
|
235
|
+
- blockers and warnings
|
|
236
|
+
- exact verification evidence
|
|
237
|
+
- failed scenarios
|
|
238
|
+
- a `Copy For AI` section
|
|
239
|
+
|
|
240
|
+
## What this is good at
|
|
241
|
+
|
|
242
|
+
Use `laxy-verify` when you want:
|
|
243
|
+
|
|
244
|
+
- a merge or release gate for frontend apps
|
|
245
|
+
- one repeatable command for build plus audit plus visible-flow verification
|
|
246
|
+
- a decision that non-authors can understand
|
|
247
|
+
- JSON output for automation without building your own wrapper
|
|
248
|
+
|
|
249
|
+
## What this is not
|
|
250
|
+
|
|
251
|
+
`laxy-verify` is not trying to replace:
|
|
252
|
+
|
|
253
|
+
- your full Playwright suite
|
|
254
|
+
- deep visual QA by designers
|
|
255
|
+
- production observability
|
|
256
|
+
- manual exploratory testing
|
|
257
|
+
|
|
258
|
+
It is a pre-merge and pre-release verification layer, not your entire quality system.
|
|
259
|
+
|
|
260
|
+
## Limitations
|
|
261
|
+
|
|
262
|
+
- monorepos should target the real app subdirectory
|
|
263
|
+
- dev-server-based Lighthouse is not identical to production hosting
|
|
264
|
+
- visual diff and viewport checks increase runtime
|
|
265
|
+
- best stability is on current LTS Node releases
|
|
266
|
+
|
|
267
|
+
## Requirements
|
|
268
|
+
|
|
269
|
+
- Node `>=20.18.0 <25`
|
|
270
|
+
- a frontend app with a runnable build flow
|
|
271
|
+
- optional: `playwright` if your project already uses it
|
|
272
|
+
|
|
273
|
+
## Links
|
|
274
|
+
|
|
275
|
+
- GitHub: https://github.com/SUNgm24/Laxy/tree/main/laxy-verify
|
|
276
|
+
- Issues: https://github.com/SUNgm24/Laxy/issues
|
package/dist/cli.js
CHANGED
|
@@ -162,7 +162,7 @@ function summarizeViewportIssues(scores, thresholds) {
|
|
|
162
162
|
function consoleOutput(result) {
|
|
163
163
|
const gradeLabel = result.grade;
|
|
164
164
|
const checkEmoji = result.grade !== "Unverified" ? " OK" : "";
|
|
165
|
-
console.log(`\n Laxy Verify ${gradeLabel}${checkEmoji}`);
|
|
165
|
+
console.log(`\n Laxy Verify: blocker check ${gradeLabel}${checkEmoji}`);
|
|
166
166
|
console.log(` Build: ${result.build.success ? `OK (${result.build.durationMs}ms)` : "FAILED"}`);
|
|
167
167
|
if (result.build.errors.length > 0) {
|
|
168
168
|
console.log(" Errors:");
|
|
@@ -216,10 +216,10 @@ function consoleOutput(result) {
|
|
|
216
216
|
// failure_analysis: Pro+에서 서버가 활성화하면 warnings 전체 설명 + evidence 전체 표시
|
|
217
217
|
const verboseFailure = isPro && (result._verbose_failure ?? isPro);
|
|
218
218
|
const failureAnalysis = isProPlus && (result._failure_analysis ?? isProPlus);
|
|
219
|
-
console.log(` Verification
|
|
220
|
-
console.log(`
|
|
221
|
-
console.log(`
|
|
222
|
-
console.log(`
|
|
219
|
+
console.log(` Verification depth: ${view.tier}`);
|
|
220
|
+
console.log(` Decision question: ${view.question}`);
|
|
221
|
+
console.log(` Decision: ${view.verdict} (${view.confidence})`);
|
|
222
|
+
console.log(` Why it stopped here: ${view.summary}`);
|
|
223
223
|
// Pro/Pro+: 체크 통과 목록 요약
|
|
224
224
|
if (isPro && view.passes.length > 0) {
|
|
225
225
|
const passedChecks = view.passes.filter((p) => p.passed).map((p) => p.label);
|
|
@@ -231,7 +231,7 @@ function consoleOutput(result) {
|
|
|
231
231
|
}
|
|
232
232
|
// Blockers: 제목은 모든 티어, Fix 액션은 verbose_failure(Pro+) 이상에서 표시
|
|
233
233
|
if (view.blockers.length > 0) {
|
|
234
|
-
console.log("
|
|
234
|
+
console.log(" Deployment blockers:");
|
|
235
235
|
for (const blocker of view.blockers) {
|
|
236
236
|
console.log(` - ${blocker.title}`);
|
|
237
237
|
if (verboseFailure)
|
|
@@ -240,7 +240,7 @@ function consoleOutput(result) {
|
|
|
240
240
|
}
|
|
241
241
|
// Warnings: Pro/Pro+에서만 표시, Review 액션은 failure_analysis(Pro+)에서 표시
|
|
242
242
|
if (isPro && view.warnings.length > 0) {
|
|
243
|
-
console.log("
|
|
243
|
+
console.log(" Risks to review:");
|
|
244
244
|
for (const warning of view.warnings) {
|
|
245
245
|
console.log(` - ${warning.title}`);
|
|
246
246
|
if (failureAnalysis)
|
|
@@ -256,7 +256,7 @@ function consoleOutput(result) {
|
|
|
256
256
|
const evidenceLimit = failureAnalysis ? view.failureEvidence.length : verboseFailure ? 3 : 2;
|
|
257
257
|
const evidenceToShow = view.failureEvidence.slice(0, evidenceLimit);
|
|
258
258
|
if (evidenceToShow.length > 0) {
|
|
259
|
-
console.log(" Evidence:");
|
|
259
|
+
console.log(" Evidence collected:");
|
|
260
260
|
for (const item of evidenceToShow)
|
|
261
261
|
console.log(` - ${item}`);
|
|
262
262
|
}
|
|
@@ -272,24 +272,20 @@ function consoleOutput(result) {
|
|
|
272
272
|
console.log(` Report: ${path.basename(result.markdownReportPath)}`);
|
|
273
273
|
}
|
|
274
274
|
console.log(` Exit code: ${result.exitCode}`);
|
|
275
|
-
if ((result.grade === "Silver" || result.grade === "Bronze") && (!result._plan || result._plan === "free")) {
|
|
276
|
-
console.log("\n Unlock deeper verification and Gold-grade confidence with Pro or Pro+:");
|
|
277
|
-
console.log(" https://laxy-blue.vercel.app/pricing");
|
|
278
|
-
}
|
|
279
275
|
}
|
|
280
276
|
async function run() {
|
|
281
277
|
const args = parseArgs();
|
|
282
278
|
if (args.help) {
|
|
283
279
|
console.log(`
|
|
284
280
|
laxy-verify v${package_json_1.default.version}
|
|
285
|
-
|
|
281
|
+
Deployment blocker gate for frontend apps
|
|
286
282
|
|
|
287
283
|
Usage:
|
|
288
284
|
npx laxy-verify [project-dir] [options]
|
|
289
285
|
npx laxy-verify <subcommand>
|
|
290
286
|
|
|
291
287
|
Subcommands:
|
|
292
|
-
login [email] Log in to unlock
|
|
288
|
+
login [email] Log in to unlock deeper reports and release evidence
|
|
293
289
|
logout Remove saved credentials
|
|
294
290
|
whoami Show current login status
|
|
295
291
|
|
|
@@ -308,15 +304,15 @@ async function run() {
|
|
|
308
304
|
--help Show this help
|
|
309
305
|
|
|
310
306
|
Exit codes:
|
|
311
|
-
0
|
|
312
|
-
1
|
|
307
|
+
0 Current verification gate passed
|
|
308
|
+
1 Verification found blockers, or build failed
|
|
313
309
|
2 Configuration error
|
|
314
310
|
|
|
315
311
|
Examples:
|
|
316
312
|
npx laxy-verify --init --run # Setup + first verification
|
|
317
313
|
npx laxy-verify . # Run in current directory
|
|
318
314
|
npx laxy-verify . --ci # CI mode
|
|
319
|
-
npx laxy-verify . --fail-on silver #
|
|
315
|
+
npx laxy-verify . --fail-on silver # Block Bronze or worse
|
|
320
316
|
|
|
321
317
|
Docs: https://github.com/psungmin24/laxy-verify
|
|
322
318
|
`);
|
package/dist/comment.js
CHANGED
|
@@ -40,7 +40,6 @@ async function postPRComment(result) {
|
|
|
40
40
|
const ctx = (0, github_js_1.getGitHubContext)();
|
|
41
41
|
if (!ctx || ctx.eventName !== "pull_request")
|
|
42
42
|
return;
|
|
43
|
-
// Parse PR number from event
|
|
44
43
|
let prNumber = 0;
|
|
45
44
|
if (ctx.eventPath && fs.existsSync(ctx.eventPath)) {
|
|
46
45
|
const event = JSON.parse(fs.readFileSync(ctx.eventPath, "utf-8"));
|
|
@@ -55,31 +54,38 @@ async function postPRComment(result) {
|
|
|
55
54
|
if (lh) {
|
|
56
55
|
lhTable = `| Performance | Accessibility | SEO | Best Practices |\n|---|---|---|---|\n| ${lh.performance} / ${t.performance} | ${lh.accessibility} / ${t.accessibility} | ${lh.seo} / ${t.seo} | ${lh.bestPractices} / ${t.bestPractices} |\n\n`;
|
|
57
56
|
}
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
const passed = result.exitCode === 0;
|
|
58
|
+
const statusLabel = passed ? "[PASS]" : "[HOLD]";
|
|
59
|
+
const headline = passed ? "No deployment blockers found" : "Deployment blockers found";
|
|
60
|
+
const summary = passed
|
|
61
|
+
? `This PR passed the current verification gate. Grade summary: **${grade}**.`
|
|
62
|
+
: grade === "Unverified"
|
|
63
|
+
? "The production build failed or verification could not complete, so this PR should be held."
|
|
64
|
+
: `This PR did not clear the current verification gate. Grade summary: **${grade}**.`;
|
|
65
|
+
const body = `## ${statusLabel} Laxy Verify: ${headline}
|
|
66
|
+
|
|
67
|
+
${summary}
|
|
68
|
+
|
|
69
|
+
${lhTable}**Fail-on threshold**: ${result.config_fail_on ?? "bronze"}
|
|
70
|
+
|
|
71
|
+
Grade remains available for automation, but this check should be read first as a merge and release blocker gate.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
[Open laxy-verify docs](https://github.com/psungmin24/laxy-verify)`;
|
|
69
75
|
const [owner, repo] = ctx.repository.split("/");
|
|
70
76
|
const url = `https://api.github.com/repos/${owner}/${repo}/issues/${prNumber}/comments`;
|
|
71
77
|
try {
|
|
72
78
|
const res = await fetch(url, {
|
|
73
79
|
method: "POST",
|
|
74
80
|
headers: {
|
|
75
|
-
|
|
76
|
-
|
|
81
|
+
Authorization: `Bearer ${ctx.token}`,
|
|
82
|
+
Accept: "application/vnd.github.v3+json",
|
|
77
83
|
"Content-Type": "application/json",
|
|
78
84
|
},
|
|
79
85
|
body: JSON.stringify({ body }),
|
|
80
86
|
});
|
|
81
87
|
if (!res.ok) {
|
|
82
|
-
console.warn(`GitHub PR comment API returned ${res.status}
|
|
88
|
+
console.warn(`GitHub PR comment API returned ${res.status}; skipping comment.`);
|
|
83
89
|
return;
|
|
84
90
|
}
|
|
85
91
|
}
|
package/dist/entitlement.js
CHANGED
|
@@ -14,12 +14,12 @@ exports.printPlanBanner = printPlanBanner;
|
|
|
14
14
|
const auth_js_1 = require("./auth.js");
|
|
15
15
|
const FREE_FEATURES = {
|
|
16
16
|
plan: "free",
|
|
17
|
-
gold_grade:
|
|
18
|
-
lighthouse_runs_3:
|
|
19
|
-
verbose_failure:
|
|
20
|
-
multi_viewport:
|
|
21
|
-
failure_analysis:
|
|
22
|
-
fast_lane:
|
|
17
|
+
gold_grade: true,
|
|
18
|
+
lighthouse_runs_3: true,
|
|
19
|
+
verbose_failure: true,
|
|
20
|
+
multi_viewport: true,
|
|
21
|
+
failure_analysis: true,
|
|
22
|
+
fast_lane: true,
|
|
23
23
|
};
|
|
24
24
|
let cache = null;
|
|
25
25
|
const CACHE_TTL_MS = 5 * 60 * 1000;
|
|
@@ -68,36 +68,7 @@ async function getEntitlements() {
|
|
|
68
68
|
function applyPlanOverride(features, overridePlan) {
|
|
69
69
|
if (!overridePlan)
|
|
70
70
|
return features;
|
|
71
|
-
|
|
72
|
-
if (getPlanRank(overridePlan) > getPlanRank(actualPlan)) {
|
|
73
|
-
throw new Error(`Plan override "${overridePlan}" is higher than your active entitlement "${actualPlan}". Downgrade overrides are allowed, upgrades are not.`);
|
|
74
|
-
}
|
|
75
|
-
if (overridePlan === actualPlan) {
|
|
76
|
-
return { ...features, plan: overridePlan };
|
|
77
|
-
}
|
|
78
|
-
if (overridePlan === "free") {
|
|
79
|
-
return {
|
|
80
|
-
plan: "free",
|
|
81
|
-
gold_grade: false,
|
|
82
|
-
lighthouse_runs_3: false,
|
|
83
|
-
verbose_failure: false,
|
|
84
|
-
multi_viewport: false,
|
|
85
|
-
failure_analysis: false,
|
|
86
|
-
fast_lane: false,
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
if (overridePlan === "pro") {
|
|
90
|
-
return {
|
|
91
|
-
plan: "pro",
|
|
92
|
-
gold_grade: false,
|
|
93
|
-
lighthouse_runs_3: true,
|
|
94
|
-
verbose_failure: features.verbose_failure,
|
|
95
|
-
multi_viewport: false,
|
|
96
|
-
failure_analysis: false,
|
|
97
|
-
fast_lane: false,
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
return { ...features, plan: "pro_plus" };
|
|
71
|
+
return { ...features, plan: overridePlan };
|
|
101
72
|
}
|
|
102
73
|
function printPlanBanner(features) {
|
|
103
74
|
const planLabels = {
|
package/dist/status.js
CHANGED
|
@@ -7,8 +7,10 @@ async function createStatusCheck(result) {
|
|
|
7
7
|
if (!ctx)
|
|
8
8
|
return;
|
|
9
9
|
const [owner, repo] = ctx.repository.split("/");
|
|
10
|
-
const description = `Laxy Verify — ${result.grade}`;
|
|
11
10
|
const state = result.exitCode === 0 ? "success" : "failure";
|
|
11
|
+
const description = state === "success"
|
|
12
|
+
? "Laxy Verify: no deployment blockers found"
|
|
13
|
+
: "Laxy Verify: deployment blockers found";
|
|
12
14
|
const targetUrl = `${process.env.GITHUB_SERVER_URL ?? "https://github.com"}/${ctx.repository}/actions/runs/${process.env.GITHUB_RUN_ID ?? ""}`;
|
|
13
15
|
const url = `https://api.github.com/repos/${owner}/${repo}/statuses/${ctx.sha}`;
|
|
14
16
|
try {
|
|
@@ -27,7 +29,7 @@ async function createStatusCheck(result) {
|
|
|
27
29
|
}),
|
|
28
30
|
});
|
|
29
31
|
if (!res.ok) {
|
|
30
|
-
console.warn(`GitHub Status Check API returned ${res.status}
|
|
32
|
+
console.warn(`GitHub Status Check API returned ${res.status}; skipping status update.`);
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
catch (err) {
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "laxy-verify",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.23",
|
|
4
4
|
"description": "Frontend verification CLI for build checks, Lighthouse, E2E, and release readiness",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "commonjs",
|
|
7
|
-
"homepage": "https://github.com/
|
|
7
|
+
"homepage": "https://github.com/SUNgm24/Laxy/tree/main/laxy-verify#readme",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/SUNgm24/Laxy.git",
|
|
11
11
|
"directory": "laxy-verify"
|
|
12
12
|
},
|
|
13
13
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/
|
|
14
|
+
"url": "https://github.com/SUNgm24/Laxy/issues"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
17
|
"frontend",
|