@se-studio/project-build 1.8.0 → 1.9.0

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/project-build
2
2
 
3
+ ## 1.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d2728ab: New `check-content-model` bin. It reads the published Contentful content types (Delivery token preferred, Management token as a fallback) and fails when a type that exists in the space lacks a field core selects or has a conflicting type; absent types are skipped. Run locally with no credentials it skips and exits 0 (`--require-credentials` makes it exit 1). `tagType.slug` is optional when `marketing-routes.json` sets `tagTypeRoutes: false`, and migration 42 then does not add it (set `CONTENT_MODEL_APP_DIR` to the app directory). Fix a failure with core migration `42-add-core-required-fields.js`, not in code. README documents it.
8
+
3
9
  ## 1.8.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -121,6 +121,22 @@ See [`packages/skills/README.md`](../skills/README.md) for frontmatter rules.
121
121
 
122
122
  ### CLI Commands
123
123
 
124
+ #### `check-content-model`
125
+ Read only. Lists the published content types in your Contentful space and fails when a type that exists there lacks a field core selects, or has it with a conflicting type (a Link where core needs RichText). Content types that are not in the space are skipped. Symbol and Text count as the same type.
126
+
127
+ ```bash
128
+ pnpm exec check-content-model . # or: pnpm check:content-model
129
+ pnpm exec check-content-model . --require-credentials # exit 1 instead of skipping when credentials are missing
130
+ ```
131
+
132
+ Credentials come from the environment, or from `.env.local` / `.env` in the directory you pass (the environment wins): `CONTENTFUL_SPACE_ID`, `CONTENTFUL_ENVIRONMENT` or `CONTENTFUL_ENVIRONMENT_NAME` (default `master`), and `CONTENTFUL_ACCESS_TOKEN` (Delivery, preferred) or `CONTENTFUL_MANAGEMENT_TOKEN`. Tokens are never printed. Run locally without credentials, the command prints a skip message and exits 0; `--require-credentials` makes that exit 1. The shared `site-ci.yml` job always passes it.
133
+
134
+ `tagType.slug` is required only when the site has tag type routes. With `"tagTypeRoutes": false` in `src/lib/marketing-routes.json` (read from the directory you pass) core falls back to `TAG_TYPE_MINIMAL_FIELDS`, which has no slug, so the check does not require it. Migration 42 reads the same file from `CONTENT_MODEL_APP_DIR` (default: the current directory) and does not add `slug` in that case.
135
+
136
+ When a site gets a 422 on a core select (for example `person.summary`), or this check fails, **run core migration `scripts/migrations/42-add-core-required-fields.js`** (and `37-add-summary-and-tag-parent.js` where it applies), after a human approves it. 42 adds only the missing fields, all optional; it aborts naming any field whose type conflicts and never changes or deletes an existing field. Do not work around a missing field in site code or the marketing-routes allowlist.
137
+
138
+ To run it in site CI, set `run_content_model: true` on the shared `site-ci.yml` workflow and pass `CONTENTFUL_SPACE_ID`, `CONTENTFUL_ACCESS_TOKEN` and optionally `CONTENTFUL_ENVIRONMENT` as workflow secrets (see `customer-guardrails/site-ci.yml`). It is a separate job, off by default; once `run_content_model` is true, missing secrets fail the job. The required field list lives in core (`scripts/content-model-spec.cjs`); a core test fails if the select lists in `listing-fetch-params.ts` gain a field the checker does not require.
139
+
124
140
  #### `generate-marketing-routes` and `check-marketing-routes`
125
141
  Customer sites run these from their own repo (`pnpm generate:routes`); do not copy the scripts.
126
142
 
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Fail when a Contentful content type that exists in the space lacks a field core selects,
4
+ * or has it with a conflicting type. Content types absent from the space are skipped.
5
+ * Read only: it never changes the space. Fix a failure with migration 42
6
+ * (scripts/migrations/42-add-core-required-fields.js), not in code.
7
+ *
8
+ * Credentials (env, or <dir>/.env.local and <dir>/.env; the environment wins):
9
+ * CONTENTFUL_SPACE_ID
10
+ * CONTENTFUL_ENVIRONMENT or CONTENTFUL_ENVIRONMENT_NAME (default master)
11
+ * CONTENTFUL_ACCESS_TOKEN (Delivery, preferred) or CONTENTFUL_MANAGEMENT_TOKEN
12
+ * Missing credentials exit 0 with a skip message for a local run. Pass --require-credentials to
13
+ * exit 1 instead; the shared site-ci.yml job always passes it, so a mis-wired site fails.
14
+ * Tokens are never printed. tagType.slug is optional when <dir>/src/lib/marketing-routes.json
15
+ * sets tagTypeRoutes: false (core falls back to TAG_TYPE_MINIMAL_FIELDS).
16
+ *
17
+ * Usage (core): node scripts/check-content-model.mjs [app-dir] [--require-credentials]
18
+ * Usage (customer): check-content-model [app-dir] [--require-credentials] (@se-studio/project-build bin)
19
+ */
20
+
21
+ import fs from 'node:fs';
22
+ import { createRequire } from 'node:module';
23
+ import path from 'node:path';
24
+ import { fileURLToPath } from 'node:url';
25
+
26
+ const require = createRequire(import.meta.url);
27
+ const { REQUIRED_FIELDS, diffContentType, readTagTypeRoutes } = require('./content-model-spec.cjs');
28
+
29
+ /** Minimal dotenv: KEY=VALUE lines, optional quotes, no expansion. */
30
+ export function parseEnvFile(text) {
31
+ const out = {};
32
+ for (const line of text.split(/\r?\n/)) {
33
+ const m = line.match(/^\s*(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*?)\s*$/);
34
+ if (!m) {
35
+ continue;
36
+ }
37
+ let value = m[2];
38
+ if (/^(["']).*\1$/.test(value)) {
39
+ value = value.slice(1, -1);
40
+ } else {
41
+ value = value.replace(/\s+#.*$/, '');
42
+ }
43
+ out[m[1]] = value;
44
+ }
45
+ return out;
46
+ }
47
+
48
+ function loadEnv(dir, env) {
49
+ const merged = { ...env };
50
+ for (const name of ['.env.local', '.env']) {
51
+ const file = path.join(dir, name);
52
+ if (!fs.existsSync(file)) {
53
+ continue;
54
+ }
55
+ for (const [key, value] of Object.entries(parseEnvFile(fs.readFileSync(file, 'utf8')))) {
56
+ if (merged[key] === undefined || merged[key] === '') {
57
+ merged[key] = value;
58
+ }
59
+ }
60
+ }
61
+ return merged;
62
+ }
63
+
64
+ /**
65
+ * @returns {{ spaceId: string, environment: string, token: string, api: 'cda' | 'cma' } | null}
66
+ */
67
+ export function resolveCredentials(env) {
68
+ const spaceId = env.CONTENTFUL_SPACE_ID;
69
+ const environment = env.CONTENTFUL_ENVIRONMENT || env.CONTENTFUL_ENVIRONMENT_NAME || 'master';
70
+ if (!spaceId) {
71
+ return null;
72
+ }
73
+ if (env.CONTENTFUL_ACCESS_TOKEN) {
74
+ return { spaceId, environment, token: env.CONTENTFUL_ACCESS_TOKEN, api: 'cda' };
75
+ }
76
+ if (env.CONTENTFUL_MANAGEMENT_TOKEN) {
77
+ return { spaceId, environment, token: env.CONTENTFUL_MANAGEMENT_TOKEN, api: 'cma' };
78
+ }
79
+ return null;
80
+ }
81
+
82
+ /** Published content types, the same view Delivery selects against. */
83
+ export async function fetchContentTypes(creds, fetchImpl = fetch) {
84
+ const base =
85
+ creds.api === 'cda'
86
+ ? 'https://cdn.contentful.com'
87
+ : 'https://api.contentful.com';
88
+ const tail = creds.api === 'cda' ? 'content_types' : 'public/content_types';
89
+ const url = `${base}/spaces/${encodeURIComponent(creds.spaceId)}/environments/${encodeURIComponent(creds.environment)}/${tail}?limit=1000`;
90
+ const res = await fetchImpl(url, { headers: { Authorization: `Bearer ${creds.token}` } });
91
+ if (!res.ok) {
92
+ throw new Error(
93
+ `Contentful ${creds.api.toUpperCase()} content_types returned HTTP ${res.status} for space ${creds.spaceId} environment ${creds.environment}`,
94
+ );
95
+ }
96
+ const body = await res.json();
97
+ return Array.isArray(body.items) ? body.items : [];
98
+ }
99
+
100
+ /**
101
+ * @param {object[]} contentTypes
102
+ * @param {{ tagTypeRoutes?: boolean }} [options] false: tagType.slug is optional (core falls back)
103
+ * @returns {{ ok: boolean, lines: string[], skipped: string[], checked: string[] }}
104
+ */
105
+ export function checkContentTypes(contentTypes, options = {}) {
106
+ const byId = new Map(contentTypes.map((ct) => [ct?.sys?.id, ct]));
107
+ const lines = [];
108
+ const skipped = [];
109
+ const checked = [];
110
+ for (const id of Object.keys(REQUIRED_FIELDS)) {
111
+ const ct = byId.get(id);
112
+ if (!ct) {
113
+ skipped.push(id);
114
+ continue;
115
+ }
116
+ checked.push(id);
117
+ const { missing, conflicts } = diffContentType(id, ct, options);
118
+ for (const fieldId of missing) {
119
+ lines.push(`${id}.${fieldId}: missing`);
120
+ }
121
+ for (const c of conflicts) {
122
+ lines.push(`${id}.${c.fieldId}: space has ${c.actual}, core needs ${c.expected}`);
123
+ }
124
+ }
125
+ return { ok: lines.length === 0, lines, skipped, checked };
126
+ }
127
+
128
+ /**
129
+ * @param {{ argv?: string[], env?: Record<string, string | undefined>, fetchImpl?: typeof fetch, log?: (s: string) => void, error?: (s: string) => void }} [opts]
130
+ * @returns {Promise<number>} exit code
131
+ */
132
+ export async function run(opts = {}) {
133
+ const argv = opts.argv ?? process.argv.slice(2);
134
+ const log = opts.log ?? console.log;
135
+ const error = opts.error ?? console.error;
136
+ const requireCredentials = argv.includes('--require-credentials');
137
+ const dir = path.resolve(argv.find((a) => !a.startsWith('--')) ?? '.');
138
+ const env = loadEnv(dir, opts.env ?? process.env);
139
+
140
+ const creds = resolveCredentials(env);
141
+ if (!creds) {
142
+ const msg =
143
+ 'check-content-model: no Contentful credentials (need CONTENTFUL_SPACE_ID plus CONTENTFUL_ACCESS_TOKEN or CONTENTFUL_MANAGEMENT_TOKEN).';
144
+ if (requireCredentials) {
145
+ error(`${msg} --require-credentials is set.`);
146
+ return 1;
147
+ }
148
+ log(`${msg} Skipping.`);
149
+ return 0;
150
+ }
151
+
152
+ let contentTypes;
153
+ try {
154
+ contentTypes = await fetchContentTypes(creds, opts.fetchImpl);
155
+ } catch (err) {
156
+ error(`check-content-model: ${err instanceof Error ? err.message : 'request failed'}`);
157
+ return 1;
158
+ }
159
+
160
+ const result = checkContentTypes(contentTypes, {
161
+ tagTypeRoutes: readTagTypeRoutes(dir),
162
+ });
163
+ log(
164
+ `check-content-model: ${creds.spaceId}/${creds.environment} via ${creds.api.toUpperCase()}: checked ${result.checked.join(', ') || 'nothing'}${result.skipped.length ? `; not in space: ${result.skipped.join(', ')}` : ''}`,
165
+ );
166
+ if (!result.ok) {
167
+ error('Content model is missing fields core selects:');
168
+ for (const line of result.lines) {
169
+ error(` ${line}`);
170
+ }
171
+ error(
172
+ 'Run scripts/migrations/42-add-core-required-fields.js (and 37 if needed) with a human approval. Do not work around this in code or the allowlist.',
173
+ );
174
+ return 1;
175
+ }
176
+ log('Content model has every field core selects.');
177
+ return 0;
178
+ }
179
+
180
+ if (process.argv[1] && fs.realpathSync(process.argv[1]) === fileURLToPath(import.meta.url)) {
181
+ process.exit(await run());
182
+ }
@@ -0,0 +1,271 @@
1
+ /**
2
+ * Fields core selects from Contentful, per content type, with golden types.
3
+ *
4
+ * Source of truth for migration 42 and `check-content-model`. A test keeps this in step with
5
+ * the select lists in packages/contentful-rest-api/src/api/listing-fetch-params.ts and with
6
+ * docs/schema-export.json. Every field is optional when migration 42 adds it, even where the
7
+ * golden schema marks it required: a type that already has entries must not gain a required field.
8
+ */
9
+
10
+ const fs = require('node:fs');
11
+ const path = require('node:path');
12
+
13
+ const SLUG_VALIDATIONS = [
14
+ {
15
+ regexp: { pattern: '^[^/]+(?:\\/[^/]+)*$', flags: null },
16
+ message:
17
+ 'Slug must not start or end with /. Use one or more segments separated by / (e.g. part1, part1/part2, or part1/part2/part3). Home page slug is "index".',
18
+ },
19
+ ];
20
+
21
+ const RICH_INLINE_VALIDATIONS = [
22
+ {
23
+ enabledMarks: ['bold', 'italic', 'underline', 'superscript', 'subscript', 'strikethrough'],
24
+ },
25
+ { enabledNodeTypes: [] },
26
+ { nodes: {} },
27
+ ];
28
+
29
+ const symbol = (name, validations = []) => ({ name, type: 'Symbol', validations });
30
+ const text = (name, validations = []) => ({ name, type: 'Text', validations });
31
+ const bool = (name) => ({ name, type: 'Boolean', validations: [] });
32
+ const asset = (name, validations = []) => ({ name, type: 'Link', linkType: 'Asset', validations });
33
+ const entry = (name, linkContentType) => ({
34
+ name,
35
+ type: 'Link',
36
+ linkType: 'Entry',
37
+ validations: [{ linkContentType }],
38
+ });
39
+ const entryArray = (name, linkContentType) => ({
40
+ name,
41
+ type: 'Array',
42
+ items: { type: 'Link', linkType: 'Entry', validations: [{ linkContentType }] },
43
+ validations: [],
44
+ });
45
+ const richInline = (name) => ({ name, type: 'RichText', validations: RICH_INLINE_VALIDATIONS });
46
+
47
+ const FEATURED = asset('Featured image', [{ linkMimetypeGroup: ['image'] }]);
48
+ const TEXT_COLOUR = symbol('Text colour', [{ in: ['Black', 'White'] }]);
49
+ // The colour palette is site specific, so a field added here carries no enum.
50
+ const BACKGROUND_COLOUR = symbol('Background colour');
51
+
52
+ /** Fields every route type has in common. */
53
+ const ROUTE_COMMON = {
54
+ slug: symbol('Slug', SLUG_VALIDATIONS),
55
+ breadcrumbTitle: symbol('Breadcrumb title'),
56
+ featuredImage: FEATURED,
57
+ thumbnail: asset('Thumbnail'),
58
+ backgroundColour: BACKGROUND_COLOUR,
59
+ textColour: TEXT_COLOUR,
60
+ indexed: bool('Indexed'),
61
+ hidden: bool('Hidden'),
62
+ metaTitle: symbol('Meta title'),
63
+ };
64
+
65
+ const { featuredImage: _hero, ...PERSON_COMMON } = ROUTE_COMMON;
66
+
67
+ /** content type id -> field id -> golden definition. */
68
+ const REQUIRED_FIELDS = {
69
+ page: {
70
+ cmsLabel: symbol('CMS label'),
71
+ title: symbol('Title'),
72
+ ...ROUTE_COMMON,
73
+ summary: richInline('Summary'),
74
+ tags: entryArray('Tags', ['tag']),
75
+ description: text('Description'),
76
+ },
77
+ article: {
78
+ cmsLabel: symbol('CMS label'),
79
+ title: symbol('Title'),
80
+ subtitle: symbol('Subtitle'),
81
+ ...ROUTE_COMMON,
82
+ tags: entryArray('Tags', ['tag']),
83
+ articleType: entry('Article type', ['articleType']),
84
+ date: { name: 'Date', type: 'Date', validations: [] },
85
+ author: entry('Author', ['person']),
86
+ authors: entryArray('Authors', ['person']),
87
+ externalLink: symbol('External link'),
88
+ download: asset('Download'),
89
+ visuals: entryArray('Visuals', ['externalVideo', 'media']),
90
+ description: text('Description', [{ size: { max: 160 } }]),
91
+ summary: richInline('Summary'),
92
+ icon: asset('Icon'),
93
+ },
94
+ articleType: {
95
+ name: symbol('Name'),
96
+ ...ROUTE_COMMON,
97
+ indexPageName: symbol('Index page name'),
98
+ indexPageDescription: symbol('Index page description'),
99
+ indexPageSummary: richInline('Index page summary'),
100
+ },
101
+ tag: {
102
+ cmsLabel: symbol('CMS label'),
103
+ name: symbol('Name'),
104
+ ...ROUTE_COMMON,
105
+ summary: richInline('Summary'),
106
+ show: bool('Show'),
107
+ tagType: entry('Tag type', ['tagType']),
108
+ parent: entry('Parent tag', ['tag']),
109
+ description: symbol('Description'),
110
+ },
111
+ tagType: {
112
+ name: symbol('Name'),
113
+ slug: symbol('Slug', SLUG_VALIDATIONS),
114
+ show: bool('Show'),
115
+ },
116
+ person: {
117
+ name: symbol('Name'),
118
+ ...PERSON_COMMON,
119
+ personType: entry('Person type', ['personType']),
120
+ media: asset('Media', [{ linkMimetypeGroup: ['image', 'video'] }]),
121
+ summary: richInline('Summary'),
122
+ bio: { name: 'Bio', type: 'RichText', validations: [] },
123
+ jobTitle: symbol('Job title'),
124
+ phoneNumber: symbol('Phone number'),
125
+ emailAddress: symbol('Email address'),
126
+ location: symbol('Location'),
127
+ linkedIn: symbol('LinkedIn'),
128
+ twitter: symbol('Twitter'),
129
+ website: symbol('Website'),
130
+ quote: text('Quote'),
131
+ visuals: entryArray('Visuals', ['externalVideo', 'media']),
132
+ description: text('Description', [{ size: { max: 160 } }]),
133
+ },
134
+ customType: {
135
+ name: symbol('Name'),
136
+ ...ROUTE_COMMON,
137
+ indexPageName: symbol('Index page name'),
138
+ indexPageDescription: symbol('Index page description'),
139
+ indexPageSummary: richInline('Index page summary'),
140
+ },
141
+ };
142
+
143
+ /** Per-field help text for fields that migration 37 documented. */
144
+ const HELP_TEXT = {
145
+ summary: 'Short rich text intro. Description stays the SEO text. Inline formatting only.',
146
+ indexPageSummary:
147
+ 'Short rich text intro for the index page. Index page description stays the SEO text. Inline formatting only.',
148
+ parent: 'Optional parent tag. Leave empty for a top-level tag. Use the same tag type.',
149
+ thumbnail: 'Small image for cards and listings. Featured image stays the hero.',
150
+ };
151
+
152
+ /**
153
+ * Fields that stay in REQUIRED_FIELDS (a select list requests them) but are a documented
154
+ * fallback, not an unconditional requirement. `tagType.slug` is needed only when the site has
155
+ * tag type routes: with `tagTypeRoutes: false` core falls back to TAG_TYPE_MINIMAL_FIELDS,
156
+ * which has no slug, so the checker must not demand it and migration 42 must not add it.
157
+ */
158
+ const OPTIONAL_WITHOUT_TAG_TYPE_ROUTES = { tagType: ['slug'] };
159
+
160
+ /**
161
+ * Reads `tagTypeRoutes` from `<appDir>/src/lib/marketing-routes.json`, the config the site
162
+ * already uses. Defaults to true (core's default) when the file is missing or unreadable.
163
+ * @param {string} [appDir]
164
+ * @returns {boolean}
165
+ */
166
+ function readTagTypeRoutes(appDir = '.') {
167
+ try {
168
+ const config = JSON.parse(
169
+ fs.readFileSync(path.join(appDir, 'src/lib/marketing-routes.json'), 'utf8'),
170
+ );
171
+ return config.tagTypeRoutes !== false;
172
+ } catch {
173
+ return true;
174
+ }
175
+ }
176
+
177
+ const STRING_TYPES = new Set(['Symbol', 'Text']);
178
+
179
+ /**
180
+ * @param {object[] | Record<string, object> | undefined} fields
181
+ * @returns {object[]}
182
+ */
183
+ function asFieldArray(fields) {
184
+ if (Array.isArray(fields)) {
185
+ return fields;
186
+ }
187
+ if (fields && typeof fields === 'object') {
188
+ return Object.keys(fields).map((id) => ({ id, ...fields[id] }));
189
+ }
190
+ return [];
191
+ }
192
+
193
+ /**
194
+ * Describes a field as `Link/Entry`, `Array<Link/Asset>` or `Symbol`.
195
+ * @param {{ type?: string, linkType?: string, items?: object }} field
196
+ */
197
+ function describeType(field) {
198
+ if (!field) {
199
+ return 'unknown';
200
+ }
201
+ if (field.type === 'Array') {
202
+ return `Array<${describeType(field.items)}>`;
203
+ }
204
+ return field.linkType ? `${field.type}/${field.linkType}` : String(field.type);
205
+ }
206
+
207
+ /**
208
+ * Type compatibility only. Validations, names and required flags are not compared.
209
+ * Symbol and Text are interchangeable: both select as a string.
210
+ * @returns {boolean}
211
+ */
212
+ function typesCompatible(expected, actual) {
213
+ if (!actual) {
214
+ return false;
215
+ }
216
+ if (STRING_TYPES.has(expected.type) && STRING_TYPES.has(actual.type)) {
217
+ return true;
218
+ }
219
+ if (expected.type !== actual.type) {
220
+ return false;
221
+ }
222
+ if (expected.type === 'Link') {
223
+ return expected.linkType === actual.linkType;
224
+ }
225
+ if (expected.type === 'Array') {
226
+ return typesCompatible(expected.items, actual.items);
227
+ }
228
+ return true;
229
+ }
230
+
231
+ /**
232
+ * @param {string} contentTypeId
233
+ * @param {{ fields?: object[] | Record<string, object> }} contentType
234
+ * @param {{ tagTypeRoutes?: boolean }} [options] `tagTypeRoutes: false` makes tagType.slug optional
235
+ * @returns {{ missing: string[], conflicts: { fieldId: string, expected: string, actual: string }[] }}
236
+ */
237
+ function diffContentType(contentTypeId, contentType, options = {}) {
238
+ const spec = REQUIRED_FIELDS[contentTypeId] ?? {};
239
+ const actualById = new Map(asFieldArray(contentType.fields).map((f) => [f.id, f]));
240
+ const missing = [];
241
+ const conflicts = [];
242
+ const optional =
243
+ options.tagTypeRoutes === false ? (OPTIONAL_WITHOUT_TAG_TYPE_ROUTES[contentTypeId] ?? []) : [];
244
+ for (const [fieldId, expected] of Object.entries(spec)) {
245
+ const actual = actualById.get(fieldId);
246
+ if (!actual && optional.includes(fieldId)) {
247
+ continue;
248
+ }
249
+ if (!actual) {
250
+ missing.push(fieldId);
251
+ } else if (!typesCompatible(expected, actual)) {
252
+ conflicts.push({
253
+ fieldId,
254
+ expected: describeType(expected),
255
+ actual: describeType(actual),
256
+ });
257
+ }
258
+ }
259
+ return { missing, conflicts };
260
+ }
261
+
262
+ module.exports = {
263
+ REQUIRED_FIELDS,
264
+ HELP_TEXT,
265
+ OPTIONAL_WITHOUT_TAG_TYPE_ROUTES,
266
+ readTagTypeRoutes,
267
+ asFieldArray,
268
+ describeType,
269
+ diffContentType,
270
+ typesCompatible,
271
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/project-build",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Build tools and management scripts for SE Studio projects",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,7 +45,8 @@
45
45
  "cms-generate-html-style-guide": "./dist/cms-generate-html-style-guide.js",
46
46
  "patch-next-flight-debuginfo": "./dist/patch-next-flight-debuginfo.js",
47
47
  "generate-marketing-routes": "./dist/generate-marketing-routes.mjs",
48
- "check-marketing-routes": "./dist/check-marketing-routes.mjs"
48
+ "check-marketing-routes": "./dist/check-marketing-routes.mjs",
49
+ "check-content-model": "./dist/check-content-model.mjs"
49
50
  },
50
51
  "files": [
51
52
  "dist",
@@ -84,7 +85,7 @@
84
85
  "vitest": "^5.1.0"
85
86
  },
86
87
  "scripts": {
87
- "build": "tsc --project tsconfig.build.json && cp src/patch-next-dev.cjs src/patch-next-dev.d.ts src/patch-next-browser-debug.cjs dist/ && cp ../../scripts/generate-marketing-routes.mjs ../../scripts/check-marketing-routes.mjs ../../scripts/marketing-routes.mjs ../../scripts/marketing-routes-cms.mjs dist/",
88
+ "build": "tsc --project tsconfig.build.json && cp src/patch-next-dev.cjs src/patch-next-dev.d.ts src/patch-next-browser-debug.cjs dist/ && cp ../../scripts/generate-marketing-routes.mjs ../../scripts/check-marketing-routes.mjs ../../scripts/marketing-routes.mjs ../../scripts/marketing-routes-cms.mjs ../../scripts/check-content-model.mjs ../../scripts/content-model-spec.cjs dist/",
88
89
  "dev": "tsc --project tsconfig.build.json --watch",
89
90
  "type-check": "tsc --noEmit",
90
91
  "lint": "biome lint .",