laxy-verify 1.1.8 → 1.1.10
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 +150 -372
- package/dist/auth.js +38 -39
- package/dist/cli.js +148 -137
- package/dist/e2e.d.ts +36 -0
- package/dist/e2e.js +385 -0
- package/dist/entitlement.js +7 -9
- package/dist/init.js +38 -42
- package/dist/lighthouse.js +122 -72
- package/dist/multi-viewport.d.ts +0 -1
- package/dist/multi-viewport.js +47 -45
- package/dist/verification-core/report.js +11 -3
- package/dist/verification-core/types.d.ts +3 -0
- package/dist/visual-diff.d.ts +11 -0
- package/dist/visual-diff.js +126 -0
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,372 +1,150 @@
|
|
|
1
|
-
# laxy-verify
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
npx laxy-verify
|
|
9
|
-
npx laxy-verify
|
|
10
|
-
npx laxy-verify
|
|
11
|
-
npx laxy-verify
|
|
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
|
-
## exit codes
|
|
153
|
-
|
|
154
|
-
| Code | Meaning |
|
|
155
|
-
|------|--------|
|
|
156
|
-
| 0 | Grade meets or exceeds `fail_on` threshold |
|
|
157
|
-
| 1 | Grade worse than `fail_on`, or build failed |
|
|
158
|
-
| 2 | Configuration error (no package.json, invalid YAML, etc.) |
|
|
159
|
-
|
|
160
|
-
## GitHub Action
|
|
161
|
-
|
|
162
|
-
```yaml
|
|
163
|
-
- uses: psungmin24/laxy-verify@v1
|
|
164
|
-
with:
|
|
165
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
166
|
-
fail-on: silver # optional, default: bronze
|
|
167
|
-
config: .laxy.yml # optional
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
Posts a PR comment with grade and Lighthouse scores, and sets a commit status check.
|
|
171
|
-
|
|
172
|
-
For Pro/Pro+ features in CI, add `LAXY_TOKEN` to your repository secrets:
|
|
173
|
-
|
|
174
|
-
```yaml
|
|
175
|
-
- uses: psungmin24/laxy-verify@v1
|
|
176
|
-
with:
|
|
177
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
178
|
-
fail-on: gold # Gold requires Pro+ account
|
|
179
|
-
env:
|
|
180
|
-
LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
## Limitations (v1)
|
|
184
|
-
|
|
185
|
-
- **Monorepos:** Not supported. Run `npx laxy-verify apps/web` for the app subdirectory.
|
|
186
|
-
- **Lighthouse accuracy:** Scores are measured in dev mode (`npm run dev`). Production scores are typically higher.
|
|
187
|
-
- **Fork PRs:** Comments and status checks are not posted on PRs from forks (GitHub security restriction).
|
|
188
|
-
- **Yarn Berry:** May require manual `package_manager` configuration if using Corepack.
|
|
189
|
-
- **Gold grade:** Requires Pro+ plan and `--multi-viewport` flag. All three viewports must pass Lighthouse thresholds.
|
|
190
|
-
|
|
191
|
-
## Expected CI Timing
|
|
192
|
-
|
|
193
|
-
- Build: 15-30s
|
|
194
|
-
- Dev server start: 5-20s
|
|
195
|
-
- Lighthouse (1 run): ~15s
|
|
196
|
-
- Lighthouse (3 runs CI): ~45s
|
|
197
|
-
- Multi-viewport (Pro+, 3 viewports): ~60s
|
|
198
|
-
- **Total: 35-95s per PR**
|
|
199
|
-
|
|
200
|
-
## .laxy-result.json
|
|
201
|
-
|
|
202
|
-
Written after every run:
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"grade": "Silver",
|
|
207
|
-
"timestamp": "2026-04-07T10:30:00Z",
|
|
208
|
-
"build": { "success": true, "durationMs": 12300, "errors": [] },
|
|
209
|
-
"lighthouse": { "performance": 87, "accessibility": 92, "seo": 88, "bestPractices": 90, "runs": 1 },
|
|
210
|
-
"thresholds": { "performance": 70, "accessibility": 85, "seo": 80, "bestPractices": 80 },
|
|
211
|
-
"ciMode": false,
|
|
212
|
-
"framework": "nextjs",
|
|
213
|
-
"exitCode": 0,
|
|
214
|
-
"config_fail_on": "bronze"
|
|
215
|
-
}
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
Use `npx laxy-verify --badge` to output a shields.io badge markdown from this file.
|
|
219
|
-
|
|
220
|
-
## Badge
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
npx laxy-verify --badge
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
Output: ``
|
|
227
|
-
|
|
228
|
-
## License
|
|
229
|
-
|
|
230
|
-
MIT
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
## Quick Start
|
|
234
|
-
|
|
235
|
-
### 1. Initialize
|
|
236
|
-
|
|
237
|
-
```bash
|
|
238
|
-
cd your-project
|
|
239
|
-
npx laxy-verify --init
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
This generates `.laxy.yml` and `.github/workflows/laxy-verify.yml` automatically by detecting your framework and package manager.
|
|
243
|
-
|
|
244
|
-
### 2. Run Locally
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
npx laxy-verify .
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### 3. Add to CI
|
|
251
|
-
|
|
252
|
-
Push the generated workflow file. Every PR gets a quality gate with grade comment and status check.
|
|
253
|
-
|
|
254
|
-
## Grades
|
|
255
|
-
|
|
256
|
-
| Grade | Requirement |
|
|
257
|
-
|-------|------------|
|
|
258
|
-
| **Silver** | Build passes + Lighthouse exceeds all thresholds |
|
|
259
|
-
| **Bronze** | Build passes (Lighthouse not run or below threshold) |
|
|
260
|
-
| **Unverified** | Build failed |
|
|
261
|
-
|
|
262
|
-
`fail_on` controls the minimum acceptable grade. Default: `bronze`.
|
|
263
|
-
|
|
264
|
-
## Configuration
|
|
265
|
-
|
|
266
|
-
All fields optional in `.laxy.yml`:
|
|
267
|
-
|
|
268
|
-
```yaml
|
|
269
|
-
framework: "auto" # auto | nextjs | vite | cra | sveltekit
|
|
270
|
-
build_command: "" # default: auto-detected from package.json
|
|
271
|
-
dev_command: "" # default: auto-detected
|
|
272
|
-
package_manager: "auto" # auto | npm | pnpm | yarn | bun
|
|
273
|
-
port: 3000 # dev server port
|
|
274
|
-
build_timeout: 300 # seconds (default 5m)
|
|
275
|
-
dev_timeout: 60 # seconds for dev server start (90 in CI mode)
|
|
276
|
-
lighthouse_runs: 1 # @lhci/cli runs (CI mode auto-sets to 3)
|
|
277
|
-
|
|
278
|
-
thresholds:
|
|
279
|
-
performance: 70 # CI mode applies -10 offset (effective: 60)
|
|
280
|
-
accessibility: 85
|
|
281
|
-
seo: 80
|
|
282
|
-
best_practices: 80
|
|
283
|
-
|
|
284
|
-
fail_on: "bronze" # unverified | bronze | silver | gold
|
|
285
|
-
# unverified = never fail (informational only)
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**fail_on vs build failure:** Build failure always produces grade `Unverified` and exit code 1, regardless of `fail_on`. `fail_on: unverified` means informational only (always exit 0).
|
|
289
|
-
|
|
290
|
-
**--ci flag:** Lowers Performance threshold by 10, sets `lighthouse_runs=3` (when not explicitly set), and increases `dev_timeout` to 90s. Auto-set when `CI=true` env var exists.
|
|
291
|
-
|
|
292
|
-
## CLI Options
|
|
293
|
-
|
|
294
|
-
```
|
|
295
|
-
npx laxy-verify [project-dir] Default: current directory
|
|
296
|
-
|
|
297
|
-
Options:
|
|
298
|
-
--format console | json Output format (default: console)
|
|
299
|
-
--ci CI mode: -10 Performance, runs=3
|
|
300
|
-
--config <path> Path to .laxy.yml
|
|
301
|
-
--fail-on unverified|bronze|silver|gold Override fail_on
|
|
302
|
-
--skip-lighthouse Build-only verification (max Bronze)
|
|
303
|
-
--badge Show shields.io badge (reads .laxy-result.json)
|
|
304
|
-
--init Generate .laxy.yml + GitHub workflow
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
## exit codes
|
|
308
|
-
|
|
309
|
-
| Code | Meaning |
|
|
310
|
-
|------|--------|
|
|
311
|
-
| 0 | Grade meets or exceeds `fail_on` threshold |
|
|
312
|
-
| 1 | Grade worse than `fail_on`, or build failed |
|
|
313
|
-
| 2 | Configuration error (no package.json, invalid YAML, etc.) |
|
|
314
|
-
|
|
315
|
-
## GitHub Action
|
|
316
|
-
|
|
317
|
-
```yaml
|
|
318
|
-
- uses: psungmin24/laxy-verify@v1
|
|
319
|
-
with:
|
|
320
|
-
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
321
|
-
fail-on: silver # optional, default: bronze
|
|
322
|
-
config: .laxy.yml # optional
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
Posts a PR comment with grade and Lighthouse scores, and sets a commit status check.
|
|
326
|
-
|
|
327
|
-
## Limitations (v1)
|
|
328
|
-
|
|
329
|
-
- **Monorepos:** Not supported. Run `npx laxy-verify apps/web` for the app subdirectory.
|
|
330
|
-
- **Lighthouse accuracy:** Scores are measured in dev mode (`npm run dev`). Production scores are typically higher.
|
|
331
|
-
- **Fork PRs:** Comments and status checks are not posted on PRs from forks (GitHub security restriction).
|
|
332
|
-
- **Yarn Berry:** May require manual `package_manager` configuration if using Corepack.
|
|
333
|
-
|
|
334
|
-
## Expected CI Timing
|
|
335
|
-
|
|
336
|
-
- Build: 15-30s
|
|
337
|
-
- Dev server start: 5-20s
|
|
338
|
-
- Lighthouse (1 run): ~15s
|
|
339
|
-
- Lighthouse (3 runs CI): ~45s
|
|
340
|
-
- **Total: 35-95s per PR**
|
|
341
|
-
|
|
342
|
-
## .laxy-result.json
|
|
343
|
-
|
|
344
|
-
Written after every run:
|
|
345
|
-
|
|
346
|
-
```json
|
|
347
|
-
{
|
|
348
|
-
"grade": "Silver",
|
|
349
|
-
"timestamp": "2026-04-07T10:30:00Z",
|
|
350
|
-
"build": { "success": true, "durationMs": 12300, "errors": [] },
|
|
351
|
-
"lighthouse": { "performance": 87, "accessibility": 92, "seo": 88, "bestPractices": 90, "runs": 1 },
|
|
352
|
-
"thresholds": { "performance": 70, "accessibility": 85, "seo": 80, "bestPractices": 80 },
|
|
353
|
-
"ciMode": false,
|
|
354
|
-
"framework": "nextjs",
|
|
355
|
-
"exitCode": 0,
|
|
356
|
-
"config_fail_on": "bronze"
|
|
357
|
-
}
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
Use `npx laxy-verify --badge` to output a shields.io badge markdown from this file.
|
|
361
|
-
|
|
362
|
-
## Badge
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
npx laxy-verify --badge
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
Output: ``
|
|
369
|
-
|
|
370
|
-
## License
|
|
371
|
-
|
|
372
|
-
MIT
|
|
1
|
+
# laxy-verify
|
|
2
|
+
|
|
3
|
+
CLI verification for frontend apps.
|
|
4
|
+
|
|
5
|
+
`laxy-verify` runs production build checks, Lighthouse, tiered verify E2E, and plan-gated verification features for Free, Pro, and Pro+ accounts.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx laxy-verify --init --run
|
|
9
|
+
npx laxy-verify .
|
|
10
|
+
npx laxy-verify login
|
|
11
|
+
npx laxy-verify whoami
|
|
12
|
+
npx laxy-verify --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### 1. Initialize
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
cd your-project
|
|
21
|
+
npx laxy-verify --init
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This generates `.laxy.yml` and a GitHub Actions workflow.
|
|
25
|
+
|
|
26
|
+
### 2. Run locally
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npx laxy-verify .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 3. Add to CI
|
|
33
|
+
|
|
34
|
+
Commit the generated workflow. Each PR gets a verification run, grade output, and optional GitHub reporting.
|
|
35
|
+
|
|
36
|
+
## Verification Tiers
|
|
37
|
+
|
|
38
|
+
| Plan | Question it answers |
|
|
39
|
+
|------|---------------------|
|
|
40
|
+
| Free | Is this likely to break right now? |
|
|
41
|
+
| Pro | Is this strong enough to send to a client? |
|
|
42
|
+
| Pro+ | Can I call this release-ready with confidence? |
|
|
43
|
+
|
|
44
|
+
## Grades
|
|
45
|
+
|
|
46
|
+
| Grade | Meaning |
|
|
47
|
+
|-------|---------|
|
|
48
|
+
| Gold | Build passed + E2E passed + Lighthouse passed + Pro+ viewport evidence passed |
|
|
49
|
+
| Silver | Build passed + E2E passed |
|
|
50
|
+
| Bronze | Build passed |
|
|
51
|
+
| Unverified | Build failed |
|
|
52
|
+
|
|
53
|
+
## Paid Features
|
|
54
|
+
|
|
55
|
+
Log in with your Laxy account to unlock paid plan features.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx laxy-verify login
|
|
59
|
+
npx laxy-verify whoami
|
|
60
|
+
npx laxy-verify logout
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
| Feature | Free | Pro | Pro+ |
|
|
64
|
+
|---------|------|-----|------|
|
|
65
|
+
| Build verification | Yes | Yes | Yes |
|
|
66
|
+
| Lighthouse | 1 run | 3 runs | 3 runs |
|
|
67
|
+
| Verify E2E | Smoke | Deeper client-send checks | Deeper client-send checks |
|
|
68
|
+
| Detailed report view | No | Yes | Yes |
|
|
69
|
+
| Report export | No | Yes | Yes |
|
|
70
|
+
| Multi-viewport verification | No | No | Yes |
|
|
71
|
+
| Visual diff | No | No | Yes |
|
|
72
|
+
| Failure analysis signals | No | No | Yes |
|
|
73
|
+
|
|
74
|
+
For CI, set `LAXY_TOKEN` instead of using interactive login.
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
env:
|
|
78
|
+
LAXY_TOKEN: ${{ secrets.LAXY_TOKEN }}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Configuration
|
|
82
|
+
|
|
83
|
+
All fields are optional in `.laxy.yml`.
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
framework: "auto"
|
|
87
|
+
build_command: ""
|
|
88
|
+
dev_command: ""
|
|
89
|
+
package_manager: "auto"
|
|
90
|
+
port: 3000
|
|
91
|
+
build_timeout: 300
|
|
92
|
+
dev_timeout: 60
|
|
93
|
+
lighthouse_runs: 1
|
|
94
|
+
|
|
95
|
+
thresholds:
|
|
96
|
+
performance: 70
|
|
97
|
+
accessibility: 85
|
|
98
|
+
seo: 80
|
|
99
|
+
best_practices: 80
|
|
100
|
+
|
|
101
|
+
fail_on: "bronze"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## CLI Options
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
npx laxy-verify [project-dir]
|
|
108
|
+
|
|
109
|
+
Options:
|
|
110
|
+
--format console|json
|
|
111
|
+
--ci
|
|
112
|
+
--config <path>
|
|
113
|
+
--fail-on unverified|bronze|silver|gold
|
|
114
|
+
--skip-lighthouse
|
|
115
|
+
--badge
|
|
116
|
+
--init
|
|
117
|
+
--multi-viewport
|
|
118
|
+
--help
|
|
119
|
+
|
|
120
|
+
Subcommands:
|
|
121
|
+
login [email]
|
|
122
|
+
logout
|
|
123
|
+
whoami
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Result File
|
|
127
|
+
|
|
128
|
+
Each run writes `.laxy-result.json`.
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"grade": "Silver",
|
|
133
|
+
"timestamp": "2026-04-09T09:00:00Z",
|
|
134
|
+
"build": { "success": true, "durationMs": 12000, "errors": [] },
|
|
135
|
+
"e2e": { "passed": 4, "failed": 0, "total": 4, "results": [] },
|
|
136
|
+
"lighthouse": { "performance": 82, "accessibility": 94, "seo": 90, "bestPractices": 92, "runs": 3 },
|
|
137
|
+
"exitCode": 0,
|
|
138
|
+
"_plan": "pro"
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Limitations
|
|
143
|
+
|
|
144
|
+
- Monorepos require targeting the app subdirectory explicitly.
|
|
145
|
+
- Dev-server-based Lighthouse can differ from production hosting.
|
|
146
|
+
- Pro+ visual diff and viewport checks increase runtime.
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
MIT
|