@uniweb/build 1.24.3 → 1.24.4
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/package.json +8 -8
- package/src/validate-data.js +9 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "1.24.
|
|
3
|
+
"version": "1.24.4",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"js-yaml": "^4.3.2",
|
|
58
58
|
"sharp": "^0.35.5",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
|
-
"@uniweb/content-writer": "~1.3.
|
|
61
|
-
"@uniweb/content-reader": "~1.5.
|
|
60
|
+
"@uniweb/content-writer": "~1.3.3",
|
|
61
|
+
"@uniweb/content-reader": "~1.5.12",
|
|
62
|
+
"@uniweb/semantic-parser": "~1.13.6",
|
|
62
63
|
"@uniweb/projections": "~1.2.17",
|
|
63
|
-
"@uniweb/
|
|
64
|
-
"@uniweb/
|
|
65
|
-
"@uniweb/schemas": "~1.7.4"
|
|
64
|
+
"@uniweb/theming": "~1.3.3",
|
|
65
|
+
"@uniweb/schemas": "~1.7.5"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@uniweb/runtime": "~1.6.
|
|
68
|
+
"@uniweb/runtime": "~1.6.6"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@tailwindcss/vite": "^4.0.0",
|
|
75
75
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.0.0",
|
|
77
|
-
"@uniweb/runtime": "~1.6.
|
|
77
|
+
"@uniweb/runtime": "~1.6.6",
|
|
78
78
|
"@uniweb/core": "~1.6.13"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
package/src/validate-data.js
CHANGED
|
@@ -33,6 +33,7 @@ import { parentRouteOf } from '@uniweb/core/route-match'
|
|
|
33
33
|
|
|
34
34
|
import { validateItem, validateRecordFile, validateBound, validateKeyValue, contentBodyField, rootListSection, referencesOf, undeclaredFields } from '@uniweb/schemas/conform'
|
|
35
35
|
import { normalizeData } from '@uniweb/schemas/foundation'
|
|
36
|
+
import { markdownToProseMirror } from '@uniweb/content-reader'
|
|
36
37
|
import { isUuid } from './uwx/uuid.js'
|
|
37
38
|
import { validateAndNormalizeSchema, buildDataSchemaMap } from './resolve-data-schema.js'
|
|
38
39
|
|
|
@@ -326,7 +327,7 @@ export async function validateDataInputs({ siteRoot, foundationPath }) {
|
|
|
326
327
|
recordCount++
|
|
327
328
|
// A delivered record is named by `$name` — the handle its file's pool entry is keyed by.
|
|
328
329
|
if (item && typeof item.$name === 'string') checkedRecords.add(recordKey(entry.ref, item.$name))
|
|
329
|
-
for (const finding of validateItem(entry.schema, item)) {
|
|
330
|
+
for (const finding of validateItem(entry.schema, item, READ_RICH_TEXT)) {
|
|
330
331
|
violations.push({
|
|
331
332
|
file: entry.path,
|
|
332
333
|
schema: entry.ref,
|
|
@@ -389,6 +390,12 @@ function listViolation(finding, label, base) {
|
|
|
389
390
|
return { ...base, item: label(idx), ...finding, field: finding.field.slice(m[0].length) || finding.field }
|
|
390
391
|
}
|
|
391
392
|
|
|
393
|
+
/**
|
|
394
|
+
* A rich-text field written as markdown, read into the document a push sends, so its `max_length`
|
|
395
|
+
* counts the characters a reader sees (`@uniweb/schemas/rich-text-length`, 2026-11-17).
|
|
396
|
+
*/
|
|
397
|
+
const READ_RICH_TEXT = { readRichText: (markdown) => markdownToProseMirror(markdown) }
|
|
398
|
+
|
|
392
399
|
/**
|
|
393
400
|
* Check the records in the records directory that pass 2 did not, each against the
|
|
394
401
|
* data schema its folder names (`records/member/` → `@/member`).
|
|
@@ -465,7 +472,7 @@ async function validateRecordFiles(siteRoot, { srcDir, dataSchemas, keyTypes = n
|
|
|
465
472
|
if (!checked.has(recordKey(ref, r.slug))) {
|
|
466
473
|
out.checked++
|
|
467
474
|
out.schemas.add(ref)
|
|
468
|
-
for (const finding of validateRecordFile(schema, record)) {
|
|
475
|
+
for (const finding of validateRecordFile(schema, record, READ_RICH_TEXT)) {
|
|
469
476
|
out.violations.push({ file: pooled.relPath, schema: ref, item: r.slug, users: [], ...finding })
|
|
470
477
|
}
|
|
471
478
|
}
|