@uniweb/build 0.18.5 → 0.19.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/package.json +6 -6
- package/src/site/deploy-config.js +23 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -59,16 +59,16 @@
|
|
|
59
59
|
"js-yaml": "^4.1.0",
|
|
60
60
|
"sharp": "^0.35.3",
|
|
61
61
|
"yaml": "^2.5.0",
|
|
62
|
-
"@uniweb/theming": "^0.1.15",
|
|
63
|
-
"@uniweb/projections": "^0.2.8",
|
|
64
62
|
"@uniweb/content-writer": "^0.3.3",
|
|
63
|
+
"@uniweb/projections": "^0.2.8",
|
|
64
|
+
"@uniweb/theming": "^0.1.15",
|
|
65
65
|
"@uniweb/schemas": "^0.2.10"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
|
-
"@uniweb/runtime": "^0.11.5",
|
|
69
|
-
"@uniweb/semantic-parser": "^1.2.2",
|
|
70
68
|
"@uniweb/content-reader": "^1.2.2",
|
|
71
|
-
"@uniweb/
|
|
69
|
+
"@uniweb/runtime": "^0.11.7",
|
|
70
|
+
"@uniweb/schemas": "^0.2.10",
|
|
71
|
+
"@uniweb/semantic-parser": "^1.2.2"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
|
|
@@ -110,6 +110,29 @@ function validate(doc, path) {
|
|
|
110
110
|
if (doc.targets !== undefined && (typeof doc.targets !== 'object' || Array.isArray(doc.targets))) {
|
|
111
111
|
throw new Error(`${path}: \`targets\` must be a map.`)
|
|
112
112
|
}
|
|
113
|
+
// A site has exactly ONE Uniweb identity — `site.yml::$uuid`, a single scalar,
|
|
114
|
+
// set by the create and never moved. So two targets naming `host: uniweb` cannot
|
|
115
|
+
// both be coherent: whichever one `default:` selects is the site, and the other
|
|
116
|
+
// silently describes a site that does not exist. The per-target `backend` key
|
|
117
|
+
// makes that look expressible, which is exactly why it is worth rejecting rather
|
|
118
|
+
// than leaving to be discovered.
|
|
119
|
+
//
|
|
120
|
+
// *(Diego, 2026-08-12: multiple deploys are not expected in general, and are not
|
|
121
|
+
// allowed for Uniweb Cloud specifically — the only host that reads `$uuid` at
|
|
122
|
+
// all. Every other host is stateless from the CLI's side, so any number of those
|
|
123
|
+
// targets is fine.)*
|
|
124
|
+
if (doc.targets && typeof doc.targets === 'object' && !Array.isArray(doc.targets)) {
|
|
125
|
+
const uniwebTargets = Object.entries(doc.targets)
|
|
126
|
+
.filter(([, t]) => t && typeof t === 'object' && t.host === 'uniweb')
|
|
127
|
+
.map(([name]) => name)
|
|
128
|
+
if (uniwebTargets.length > 1) {
|
|
129
|
+
throw new Error(
|
|
130
|
+
`${path}: only one target may use \`host: uniweb\` — found ${uniwebTargets.length} (${uniwebTargets.join(', ')}). ` +
|
|
131
|
+
'A site has a single Uniweb identity (site.yml::$uuid), so a second Uniweb target cannot describe a different site. ' +
|
|
132
|
+
'Keep one, or point the others at a third-party host.'
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
}
|
|
113
136
|
if (doc.autoSave !== undefined && !VALID_AUTOSAVE.has(doc.autoSave)) {
|
|
114
137
|
throw new Error(
|
|
115
138
|
`${path}: \`autoSave\` must be one of: ${[...VALID_AUTOSAVE].join(', ')}.`
|