@se-studio/site-check 2.6.1 → 2.6.3
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/CHANGELOG.md +13 -0
- package/README.md +40 -2
- package/docs/llms.md +99 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.6.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
- @se-studio/contentful-rest-api@1.11.0
|
|
9
|
+
|
|
10
|
+
## 2.6.2
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- f2de9ba: Document CMS smoke integrity (`cmsIntegrity`, `runStaticSmokeTestWithIntegrity`), Vercel `VERCEL_FORCE_NO_BUILD_CACHE`, and update `se-marketing-sites-smoke-test-setup` skill plus `example-empty` reference.
|
|
15
|
+
|
|
3
16
|
## 2.6.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -103,10 +103,14 @@ Programmatic module for live production SEO audits (used by per-app `pnpm seo:au
|
|
|
103
103
|
|
|
104
104
|
Curated local smoke tests for marketing sites: verify HTML and `.md` for URLs listed in **`smoke.cases.json`** (generated once from a live sitemap — see skill `se-marketing-sites-smoke-test-setup`).
|
|
105
105
|
|
|
106
|
+
Optional **`cmsIntegrity`** in `smoke.cases.json` adds a **local-only** Contentful article-link check (parallel with `pnpm smoke-test` server boot). Deployment / live smoke remains HTTP-only.
|
|
107
|
+
|
|
108
|
+
Requires **^2.6.1** when using `cmsIntegrity` or `pnpm smoke-test` with integrity enabled.
|
|
109
|
+
|
|
106
110
|
Import from `@se-studio/site-check/smoke-test`:
|
|
107
111
|
|
|
108
|
-
- `loadStaticSmokeConfig`, `runStaticSmokeTest`, `runPreviewStaticSmokeTest`, `runSmokeTest`
|
|
109
|
-
- `formatSmokeTestReport`, `getSmokeTestExitCode`
|
|
112
|
+
- `loadStaticSmokeConfig`, `runStaticSmokeTest`, `runStaticSmokeTestWithIntegrity`, `runPreviewStaticSmokeTest`, `runSmokeTest`
|
|
113
|
+
- `formatSmokeTestReport`, `formatCombinedSmokeReport`, `getSmokeTestExitCode`, `getCombinedSmokeExitCode`
|
|
110
114
|
|
|
111
115
|
**Per-app usage** (see `apps/example-empty`):
|
|
112
116
|
|
|
@@ -133,9 +137,43 @@ Add `smoke.cases.json`, `scripts/smoke-test-run.ts`, and optionally `scripts/smo
|
|
|
133
137
|
| `SMOKE_TEST_CACHE_SKIP_SEVERITY=warn` | `warn` or `error` for cache-skip log lines (default `warn`) |
|
|
134
138
|
| `SMOKE_TEST_READY_PATH=/` | Path polled until the server responds |
|
|
135
139
|
| `SMOKE_TEST_USE_RUNNING_SERVER=false` | Force a fresh server (default `true` for local dev) |
|
|
140
|
+
| `SMOKE_TEST_SKIP_INTEGRITY=true` | HTTP smoke only (set by `smoke-test-one` when `cmsIntegrity` runs in parallel) |
|
|
136
141
|
|
|
137
142
|
`LOG_CMS_FETCH=1` is set when verify-cache or audit-cache-logs is enabled. The smoke HTTP client never sends `Cache-Control: no-cache`.
|
|
138
143
|
|
|
144
|
+
### CMS article-link integrity (`cmsIntegrity` in `smoke.cases.json`)
|
|
145
|
+
|
|
146
|
+
```json
|
|
147
|
+
{
|
|
148
|
+
"cmsIntegrity": {
|
|
149
|
+
"enabled": true,
|
|
150
|
+
"routing": {
|
|
151
|
+
"articleTypesBasePath": "/resources",
|
|
152
|
+
"tagsBasePath": "/topics",
|
|
153
|
+
"peopleBasePath": "/team",
|
|
154
|
+
"defaultTopic": "other",
|
|
155
|
+
"enablePrimaryTagPartOfSlug": true,
|
|
156
|
+
"topiclessArticleTypeSlugs": ["ebooks"]
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Map `routing` from the app’s `constants.ts` / URL rules. Use `runStaticSmokeTestWithIntegrity` in `scripts/smoke-test-run.ts` (see `apps/example-empty`).
|
|
163
|
+
|
|
164
|
+
Import from `@se-studio/site-check/cms-integrity` for standalone checks: `runArticleLinkIntegrityFromSmokeConfig`, `evaluateArticleLinkIntegrity`, `getArticleLinkIntegrityExitCode`.
|
|
165
|
+
|
|
166
|
+
### Vercel build cache (`VERCEL_FORCE_NO_BUILD_CACHE`)
|
|
167
|
+
|
|
168
|
+
Not a smoke variable — set on the **Vercel project** when `next build` fails intermittently with webpack `WasmHash` errors (often with stale remote build cache; local `pnpm build` may still pass).
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
vercel env add VERCEL_FORCE_NO_BUILD_CACHE preview develop --value 1 --yes
|
|
172
|
+
vercel env add VERCEL_FORCE_NO_BUILD_CACHE production --value 1 --yes
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
Cannot be set in `vercel.json` — Vercel restores cache before install/build commands. Tradeoff: slower cold builds, more reliable compiles.
|
|
176
|
+
|
|
139
177
|
**Deploy check** (`smoke-test-deploy-check`): post-build gate for Vercel — starts `pnpm start` without rebuilding, runs `pnpm smoke-test:run`, exits non-zero on failure. Port defaults from `smoke.cases.json`. Set `SMOKE_TEST_IGNORE=true` in Vercel env to bypass in an emergency.
|
|
140
178
|
|
|
141
179
|
```json
|
package/docs/llms.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# @se-studio/site-check — LLM Reference
|
|
2
|
+
|
|
3
|
+
Site validation CLI, production SEO audits, and curated smoke tests for SE marketing sites.
|
|
4
|
+
|
|
5
|
+
## Subpath exports
|
|
6
|
+
|
|
7
|
+
| Import | Purpose |
|
|
8
|
+
|--------|---------|
|
|
9
|
+
| `@se-studio/site-check` | CLI: sitemap / llms.txt / markdown export |
|
|
10
|
+
| `@se-studio/site-check/smoke-test` | HTTP smoke + optional CMS integrity orchestration |
|
|
11
|
+
| `@se-studio/site-check/cms-integrity` | Article-link integrity (Node-safe; no Next barrel) |
|
|
12
|
+
| `@se-studio/site-check/production-audit` | Live production SEO audit |
|
|
13
|
+
| `@se-studio/site-check/screaming-frog` | Screaming Frog export analysis |
|
|
14
|
+
|
|
15
|
+
## Smoke test (HTTP)
|
|
16
|
+
|
|
17
|
+
Apps commit `smoke.cases.json`. Requires **^2.0.0** for static smoke; **^2.6.1** when `cmsIntegrity` is enabled.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
runStaticSmokeTest,
|
|
22
|
+
runStaticSmokeTestWithIntegrity,
|
|
23
|
+
formatSmokeTestReport,
|
|
24
|
+
formatCombinedSmokeReport,
|
|
25
|
+
getSmokeTestExitCode,
|
|
26
|
+
getCombinedSmokeExitCode,
|
|
27
|
+
} from '@se-studio/site-check/smoke-test';
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Per-app scripts:**
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
"smoke-test": "smoke-test-one 3012",
|
|
34
|
+
"smoke-test:run": "tsx scripts/smoke-test-run.ts",
|
|
35
|
+
"smoke-test:live": "smoke-test-live"
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**`smoke-test-run.ts` with optional integrity:**
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
const skipIntegrity = (process.env.SMOKE_TEST_SKIP_INTEGRITY ?? '').toLowerCase() === 'true';
|
|
42
|
+
const { integrity, http } = await runStaticSmokeTestWithIntegrity('smoke.cases.json', {
|
|
43
|
+
skipIntegrity,
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## CMS article-link integrity (local only)
|
|
48
|
+
|
|
49
|
+
Opt-in via `cmsIntegrity` in `smoke.cases.json`. Fetches all article links from Contentful once; validates `href` for entries with body content. **Not** used on deployment / live smoke.
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{
|
|
53
|
+
"cmsIntegrity": {
|
|
54
|
+
"enabled": true,
|
|
55
|
+
"routing": {
|
|
56
|
+
"articleTypesBasePath": "/resources",
|
|
57
|
+
"tagsBasePath": "/topics",
|
|
58
|
+
"peopleBasePath": "/team",
|
|
59
|
+
"defaultTopic": "other",
|
|
60
|
+
"enablePrimaryTagPartOfSlug": true,
|
|
61
|
+
"topiclessArticleTypeSlugs": ["ebooks"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
```ts
|
|
68
|
+
import { runArticleLinkIntegrityFromSmokeConfig } from '@se-studio/site-check/cms-integrity';
|
|
69
|
+
// or from smoke-test barrel: runArticleLinkIntegrityFromSmokeConfig
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Deps when enabled:** `@se-studio/contentful-rest-api@^1.10.0`, `@se-studio/core-data-types@^1.5.1`, Contentful env in `.env.local`.
|
|
73
|
+
|
|
74
|
+
**`pnpm smoke-test`:** `smoke-test-one` runs integrity in parallel with dev server boot; sets `SMOKE_TEST_SKIP_INTEGRITY=true` on the HTTP child run.
|
|
75
|
+
|
|
76
|
+
## Smoke env vars
|
|
77
|
+
|
|
78
|
+
| Variable | Purpose |
|
|
79
|
+
|----------|---------|
|
|
80
|
+
| `SMOKE_TEST_IGNORE=true` | Skip smoke entirely |
|
|
81
|
+
| `SMOKE_TEST_SERVER_SCRIPT` | `dev:dev` (default) or `start` |
|
|
82
|
+
| `SMOKE_TEST_SKIP_INTEGRITY` | HTTP-only (set by smoke-test-one when integrity parallel) |
|
|
83
|
+
| `PREVIEW_SITE_URL` | Preview smoke base URL |
|
|
84
|
+
| `DEPLOYMENT_URL` | Live deployment smoke URL |
|
|
85
|
+
| `VERCEL_PROTECTION_BYPASS_TOKEN` | Deployment Protection bypass |
|
|
86
|
+
|
|
87
|
+
## Vercel build cache (not smoke)
|
|
88
|
+
|
|
89
|
+
Set on **Vercel project** env (not app `.env.local`, not `vercel.json`):
|
|
90
|
+
|
|
91
|
+
| Variable | Value | Purpose |
|
|
92
|
+
|----------|-------|---------|
|
|
93
|
+
| `VERCEL_FORCE_NO_BUILD_CACHE` | `1` | Skip remote build cache when webpack `WasmHash` fails on Vercel |
|
|
94
|
+
|
|
95
|
+
Mitigates intermittent `WasmHash._updateWithBuffer` / `Cannot read properties of undefined (reading 'length')` during `next build`. Local builds may still pass.
|
|
96
|
+
|
|
97
|
+
## Skill
|
|
98
|
+
|
|
99
|
+
Setup and regeneration: `se-marketing-sites-smoke-test-setup` (`@se-studio/skills`). Example app: `apps/example-empty`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@se-studio/site-check",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"description": "Validate SE marketing sites (sitemap, llms.txt) and download markdown files preserving structure",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"files": [
|
|
51
51
|
"dist",
|
|
52
|
+
"docs",
|
|
52
53
|
"*.md",
|
|
53
54
|
"smoke-test-one.mjs",
|
|
54
55
|
"smoke-test-deploy-check.mjs",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"url": "https://github.com/Something-Else-Studio/se-core-product/issues"
|
|
71
72
|
},
|
|
72
73
|
"dependencies": {
|
|
73
|
-
"@se-studio/contentful-rest-api": "1.
|
|
74
|
+
"@se-studio/contentful-rest-api": "1.11.0",
|
|
74
75
|
"@se-studio/core-data-types": "1.5.1"
|
|
75
76
|
},
|
|
76
77
|
"devDependencies": {
|