@uniweb/build 0.74.0 → 0.74.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/package.json +8 -8
- package/src/prerender.js +9 -5
- package/src/uwx/data-schema.js +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.74.
|
|
3
|
+
"version": "0.74.2",
|
|
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.1.0",
|
|
58
58
|
"sharp": "^0.35.3",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
|
-
"@uniweb/
|
|
60
|
+
"@uniweb/schemas": "^0.10.1",
|
|
61
61
|
"@uniweb/projections": "^0.7.11",
|
|
62
62
|
"@uniweb/content-writer": "^0.3.4",
|
|
63
|
-
"@uniweb/
|
|
64
|
-
"@uniweb/
|
|
65
|
-
"@uniweb/
|
|
63
|
+
"@uniweb/content-reader": "^1.2.8",
|
|
64
|
+
"@uniweb/theming": "^0.2.0",
|
|
65
|
+
"@uniweb/semantic-parser": "^1.5.1"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@uniweb/runtime": "^0.28.
|
|
68
|
+
"@uniweb/runtime": "^0.28.5"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -74,8 +74,8 @@
|
|
|
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/
|
|
78
|
-
"@uniweb/
|
|
77
|
+
"@uniweb/runtime": "^0.28.5",
|
|
78
|
+
"@uniweb/core": "^0.35.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"vite": {
|
package/src/prerender.js
CHANGED
|
@@ -1098,12 +1098,16 @@ export async function prerenderSite(siteDir, options = {}) {
|
|
|
1098
1098
|
continue
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
//
|
|
1102
|
-
//
|
|
1103
|
-
//
|
|
1104
|
-
//
|
|
1101
|
+
// `notFound` means the URL names nothing, and there is no page to write for it:
|
|
1102
|
+
// written, a not-found page would be published as a real one. Two cases, said
|
|
1103
|
+
// apart. No route matched — which this loop, iterating pages it already has,
|
|
1104
|
+
// cannot produce, and is handled anyway so a selected page is never silently
|
|
1105
|
+
// dropped. Or the page's record does not exist (`result.page` is set) — which an
|
|
1106
|
+
// expanded page reaches only if its record is not in the set it was expanded from.
|
|
1105
1107
|
if (result.outcome === 'notFound') {
|
|
1106
|
-
console.warn(
|
|
1108
|
+
console.warn(
|
|
1109
|
+
` Warning: ${outputRoute} ${result.page ? 'names a record that does not exist' : 'resolved to no page'}; skipped`
|
|
1110
|
+
)
|
|
1107
1111
|
continue
|
|
1108
1112
|
}
|
|
1109
1113
|
|
package/src/uwx/data-schema.js
CHANGED
|
@@ -112,8 +112,8 @@ export function isContentBodyField(field) {
|
|
|
112
112
|
* @param {(ref: string) => string} [opts.resolveOptions] - maps an `options`
|
|
113
113
|
* (item_ref) ref to its full `@org/model/<section>` path. Falls back to
|
|
114
114
|
* `resolveName` (model only) when not supplied.
|
|
115
|
-
* @returns {Object} the declaration (`{ name, label?,
|
|
116
|
-
* linkable?, sections }`).
|
|
115
|
+
* @returns {Object} the declaration (`{ name, label?, plural?, description?,
|
|
116
|
+
* source_locale?, linkable?, sections }`).
|
|
117
117
|
*/
|
|
118
118
|
export function toDataSchemaDeclaration(normalized, { name, resolveName, resolveOptions } = {}) {
|
|
119
119
|
if (!name) throw new Error('toDataSchemaDeclaration: a registry name is required')
|
|
@@ -136,19 +136,23 @@ export function toDataSchemaDeclaration(normalized, { name, resolveName, resolve
|
|
|
136
136
|
|
|
137
137
|
const decl = { name }
|
|
138
138
|
if (normalized.label) decl.label = normalized.label
|
|
139
|
+
if (normalized.plural) decl.plural = normalized.plural
|
|
139
140
|
if (normalized.description) decl.description = normalized.description
|
|
140
141
|
if (normalized.sourceLocale) decl.source_locale = normalized.sourceLocale
|
|
141
142
|
// ⛔ No `creatable_by`: retired 2026-09-23 — Models are open, and `@uniweb/schemas`
|
|
142
143
|
// refuses the key. (It was emitted here when authored.)
|
|
143
144
|
|
|
144
145
|
// `linkable` — AUTHORED ONLY (2026-09-27 [Diego]). A model is linkable unless it says
|
|
145
|
-
// `linkable: false` (omitted ⇒ true), with or without a brief
|
|
146
|
-
//
|
|
147
|
-
//
|
|
146
|
+
// `linkable: false` (omitted ⇒ true), with or without a brief. `linkable: false` keeps
|
|
147
|
+
// its entries out of references and out of a site's folder, and nothing else keeps them
|
|
148
|
+
// out of a folder. Whether a reference field may point at a model with no brief — no
|
|
149
|
+
// card to show — is the host's to decide, and nothing here derives it.
|
|
148
150
|
//
|
|
149
151
|
// ⛔ Until then a brief-less model was emitted `linkable: false` and `linkable: true`
|
|
150
152
|
// on one was refused, on the reasoning that a reference would have no card to show —
|
|
151
153
|
// which kept its records out of every site's folder.
|
|
154
|
+
// ⛔ And until 2026-09-30 this said a missing card "is not a reason to refuse" a
|
|
155
|
+
// reference, which read as a promise that one is accepted. A backend refuses it.
|
|
152
156
|
if (normalized.linkable === false) decl.linkable = false
|
|
153
157
|
|
|
154
158
|
decl.sections = sections
|