@se-studio/skills 1.16.1 → 1.16.2
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @se-studio/skills
|
|
2
2
|
|
|
3
|
+
## 1.16.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d2728ab: The customer `site-ci.yml` template gains an off-by-default `run_content_model` input (when on, missing Contentful secrets fail the job) and a commented secrets block (`CONTENTFUL_SPACE_ID`, `CONTENTFUL_ACCESS_TOKEN`, optional `CONTENTFUL_ENVIRONMENT`). `contentful-cms-content-model` and `contentful-cms-sync-schema` document migration `42-add-core-required-fields.js` and `check-content-model` for a site 422 on a core select (for example `person.summary`).
|
|
8
|
+
|
|
3
9
|
## 1.16.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
# workflow strips `?` and `#` before the report and does not upload reports
|
|
6
6
|
# to temporary public storage.
|
|
7
7
|
#
|
|
8
|
+
# Content model check (opt in): set run_content_model: true and uncomment the secrets block
|
|
9
|
+
# below. It compares the published Contentful content types with the fields core selects, so a
|
|
10
|
+
# site 422 on a core select (for example person.summary) fails here first. Use a read-only
|
|
11
|
+
# Delivery token (CONTENTFUL_ACCESS_TOKEN) in repo or org Actions secrets; a Management token
|
|
12
|
+
# is not needed. With run_content_model: true and no secrets the job FAILS (it runs with
|
|
13
|
+
# --require-credentials), so a mis-wired site is never reported as checked. A real missing
|
|
14
|
+
# field fails that job only, never the lint, typecheck, and test gate. Fix it with core
|
|
15
|
+
# migration 42, not in code. The filesystem-only jobs never receive CMS tokens.
|
|
16
|
+
#
|
|
8
17
|
# actions: write is granted on this job so the shared workflow's Lighthouse
|
|
9
18
|
# job can upload artifacts. That job is the only one that uses it. Lint,
|
|
10
19
|
# typecheck, test, Prettier, and lychee stay at contents: read.
|
|
@@ -36,6 +45,12 @@ jobs:
|
|
|
36
45
|
# false to skip it. The shared workflow defaults to false only so a caller pinned
|
|
37
46
|
# to @dev does not change under it.
|
|
38
47
|
run_marketing_routes: true
|
|
48
|
+
run_content_model: false
|
|
39
49
|
run_prettier: false
|
|
40
50
|
run_lychee: false
|
|
41
51
|
run_lighthouse: false
|
|
52
|
+
# Uncomment with run_content_model: true. Required when run_content_model is true: missing secrets fail the job.
|
|
53
|
+
# secrets:
|
|
54
|
+
# CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
|
|
55
|
+
# CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
|
|
56
|
+
# CONTENTFUL_ENVIRONMENT: ${{ secrets.CONTENTFUL_ENVIRONMENT }} # optional, default master
|
|
@@ -14,6 +14,8 @@ The content model is a **development** concern. **cms-edit edits content (entrie
|
|
|
14
14
|
3. In se-core-product only, after a core migration, re-export the golden schema (`docs/schema-export.json`; see `contentful-cms-sync-schema`). Customer-specific migrations do not touch the golden file.
|
|
15
15
|
4. Regenerate types (`pnpm codegen`) and update `src/lib/registrations.ts` when a new component/collection/external component is added (skill `se-marketing-sites-register-cms-features`).
|
|
16
16
|
|
|
17
|
+
**Site 422 on a core select** (for example `person.summary`, `Unknown field` from Delivery): the space is missing a field core queries. Run `pnpm exec check-content-model .` to list them, then migration `scripts/migrations/42-add-core-required-fields.js` (and `37-add-summary-and-tag-parent.js` if needed) with human approval. 42 adds only missing fields, all optional, and aborts on a type conflict. Do not work around it in site code, with `withUnknownFieldFallback`, or in the marketing-routes allowlist. Sites can run the check in CI with `run_content_model` on the shared site CI workflow; missing Contentful secrets fail that job. `tagType.slug` is not required when `marketing-routes.json` sets `tagTypeRoutes: false`.
|
|
18
|
+
|
|
17
19
|
`add-cms-type` and `setup-colours` call the management API directly (they need `CONTENTFUL_MANAGEMENT_TOKEN`) instead of going through the CLI, so they leave no numbered migration behind. Both are safe to re-run. `add-cms-type` prints the target space and environment, refuses a content type that has unpublished changes, and never reorders or removes existing values. They still need the same human approval as a migration, and in se-core-product a core change still needs the golden schema re-exported.
|
|
18
20
|
|
|
19
21
|
Rules:
|
|
@@ -97,6 +97,7 @@ Standard order when diff shows these gaps:
|
|
|
97
97
|
| 8 | `25-add-meta-field.js` | Optional Long text `meta` JSON bag on template/page/article/tag/person and related types. Idempotent. Unused until filled. |
|
|
98
98
|
| 9 | `28-add-html-component-external-scripts.js` | Optional `externalScripts` (array of URL strings) on existing `htmlComponent`. Idempotent. Greenfield spaces that run migration 12 after this change already get the field. |
|
|
99
99
|
| 10 | `37-add-summary-and-tag-parent.js` | Optional rich-text `summary` after `description`, optional `indexPageSummary` after `indexPageDescription`, optional `tag.parent` (one tag link), and optional `thumbnail` asset on route types (page, pageVariant, article, articleType, tag, person, personType, customType). Idempotent. Does not copy description text and does not publish entries. |
|
|
100
|
+
| 11 | `42-add-core-required-fields.js` | **The standard "make the space match what core queries".** Adds every missing field core selects (the `listing-fetch-params.ts` select lists: `summary`, `indexPageSummary`, `thumbnail`, `tag.parent`, `description`, `metaTitle`, `breadcrumbTitle`, `personType`, `authors`, ...) with golden types, all optional. Covers what 37 adds, plus `description` where 37 skips it (a `person` type with neither `description` nor `summary` is fixed in one run). Skips content types the space lacks. Aborts, changing nothing, if an existing field has a different type or linkType. Idempotent. Does not publish or modify entries. |
|
|
100
101
|
|
|
101
102
|
Site-specific (run only when diff shows missing field **and** app uses it):
|
|
102
103
|
|
|
@@ -119,6 +120,8 @@ contentful space migration \
|
|
|
119
120
|
scripts/migrations/12-add-html-component.js
|
|
120
121
|
```
|
|
121
122
|
|
|
123
|
+
**Check before and after:** `pnpm exec check-content-model .` (core: `pnpm check:content-model`) reads the published content types with a Delivery token and lists missing or conflicting fields; it is the same list migration 42 applies. When a site 422s on a core select (for example `person.summary`), run migration 42 (and 37 if needed) with human approval. Do not work around it in code or the marketing-routes allowlist.
|
|
124
|
+
|
|
122
125
|
Remove dry-run flags only after reviewing output. Re-run compare until **missing types/fields** are cleared (extras and enum diffs may remain).
|
|
123
126
|
|
|
124
127
|
### 6. App follow-up
|