uniweb 1.31.1 → 1.31.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 +6 -6
- package/src/commands/doctor.js +38 -1
- package/src/commands/pull.js +5 -0
- package/src/framework-index.json +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.2",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/core": "~1.6.9",
|
|
45
45
|
"@uniweb/semantic-parser": "~1.13.2",
|
|
46
|
-
"@uniweb/
|
|
47
|
-
"@uniweb/
|
|
46
|
+
"@uniweb/content-writer": "~1.3.1",
|
|
47
|
+
"@uniweb/schemas": "~1.7.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/semantic-parser": "~1.13.2",
|
|
51
51
|
"@uniweb/content-reader": "~1.5.9",
|
|
52
|
-
"@uniweb/
|
|
52
|
+
"@uniweb/build": "~1.20.2"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/src/commands/doctor.js
CHANGED
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
findPublicFavicon
|
|
33
33
|
} from '@uniweb/build/site'
|
|
34
34
|
import { listAdapters } from '@uniweb/build/hosts'
|
|
35
|
-
import { RUNTIME_KEYS, writeSiteConfig } from '@uniweb/build/uwx'
|
|
35
|
+
import { RUNTIME_KEYS, writeSiteConfig, readBlueprint, refuseUnreadableBlueprint, blueprintWarnings, siteDeclaredTypes, siteSelfScope, BLUEPRINT_FILE } from '@uniweb/build/uwx'
|
|
36
36
|
import { getCliVersion } from '../versions.js'
|
|
37
37
|
import { readAgentsVersion } from '../utils/agents-stamp.js'
|
|
38
38
|
import { writeJsonPreservingStyle } from '../utils/json-file.js'
|
|
@@ -1257,6 +1257,41 @@ export async function checkSiteAddress({ sitePath, siteName, siteYml, workspaceD
|
|
|
1257
1257
|
log(` ${colors.dim}${without}${colors.reset}`)
|
|
1258
1258
|
}
|
|
1259
1259
|
|
|
1260
|
+
/**
|
|
1261
|
+
* `blueprint.yml` — how a backend started from the site begins. What a build and a push would refuse
|
|
1262
|
+
* is an error; a line a backend would leave out — a type none of the site's foundations declares — a
|
|
1263
|
+
* warning, as the push says it; and a blueprint whose types could not be checked here, a note saying
|
|
1264
|
+
* why, since a clean report would otherwise read as checked.
|
|
1265
|
+
*/
|
|
1266
|
+
export async function checkBlueprint({ sitePath, siteName, siteYml, issues }) {
|
|
1267
|
+
let blueprint
|
|
1268
|
+
try {
|
|
1269
|
+
blueprint = readBlueprint(sitePath)
|
|
1270
|
+
refuseUnreadableBlueprint(blueprint, { siteYml })
|
|
1271
|
+
} catch (err) {
|
|
1272
|
+
const id = 'blueprint-unreadable'
|
|
1273
|
+
const message = err.message.replace(/^\[uniweb\] /, '')
|
|
1274
|
+
issues.push({ id, type: 'error', site: siteName, message })
|
|
1275
|
+
error(`[${id}] ${message}`)
|
|
1276
|
+
return
|
|
1277
|
+
}
|
|
1278
|
+
if (!blueprint) return
|
|
1279
|
+
const scope = await siteSelfScope(sitePath)
|
|
1280
|
+
const declared = await siteDeclaredTypes(sitePath, siteYml, { scope })
|
|
1281
|
+
for (const line of blueprintWarnings(blueprint, { scope, declared })) {
|
|
1282
|
+
const id = 'blueprint-leaves-out'
|
|
1283
|
+
issues.push({ id, type: 'warn', site: siteName, message: line })
|
|
1284
|
+
warn(`[${id}] ${line}`)
|
|
1285
|
+
}
|
|
1286
|
+
const namesTypes = ['access', 'publicQueries'].some((key) => blueprint[key] && Object.keys(blueprint[key]).length)
|
|
1287
|
+
if (namesTypes && !declared.types) {
|
|
1288
|
+
const id = 'blueprint-types-unchecked'
|
|
1289
|
+
const message = `${BLUEPRINT_FILE}: its types were not checked against the site's foundations — ${declared.unread.join('; ')}`
|
|
1290
|
+
issues.push({ id, type: 'info', site: siteName, message })
|
|
1291
|
+
info(`[${id}] ${message}`)
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1260
1295
|
// What a link preview draws, from the platforms' own pages, read 2026-10-27. Facebook
|
|
1261
1296
|
// (developers.facebook.com/docs/sharing/webmasters/images): 1.91:1 shows the whole image, at least
|
|
1262
1297
|
// 1200×630 for high-resolution screens and 600×315 for a large card, 8 MB at most. LinkedIn
|
|
@@ -2268,6 +2303,8 @@ async function runDoctor(args = []) {
|
|
|
2268
2303
|
await checkFormSubmitTarget({ sitePath, siteName, siteYml, issues })
|
|
2269
2304
|
checkAgentsBlock({ siteName, siteYml, issues })
|
|
2270
2305
|
checkTrackingBlock({ siteName, siteYml, issues })
|
|
2306
|
+
// How a backend started from the site begins: what a push would refuse, and what a backend would leave out.
|
|
2307
|
+
await checkBlueprint({ sitePath, siteName, siteYml, issues })
|
|
2271
2308
|
|
|
2272
2309
|
// `public/<DATA_DIR>/` is the build's output directory and nothing else —
|
|
2273
2310
|
// `records/` is the only supported way to provide structured data. That makes the mapping a bijection: every entry there should be backed
|
package/src/commands/pull.js
CHANGED
|
@@ -1218,6 +1218,8 @@ export async function pull(args = [], deps = {}) {
|
|
|
1218
1218
|
let notTaken = false
|
|
1219
1219
|
// The languages the backend holds text in that the site does not list: not written (`documentLanguages`).
|
|
1220
1220
|
let outsideLanguages = []
|
|
1221
|
+
// A `blueprint.yml` the pull left as it was, and why (`@uniweb/build/uwx`, `writePulledBlueprint`).
|
|
1222
|
+
let blueprintKept = null
|
|
1221
1223
|
try {
|
|
1222
1224
|
if (siteDoc) {
|
|
1223
1225
|
// Re-base the page attribution. The pulled document IS the backend's own
|
|
@@ -1294,6 +1296,7 @@ export async function pull(args = [], deps = {}) {
|
|
|
1294
1296
|
mountRoutes = report.mountRoutes || []
|
|
1295
1297
|
mountedMoved = mountedPagesMoved(mountedPages, pulledVersions, priorVersions)
|
|
1296
1298
|
outsideLanguages = report.outsideLanguages || []
|
|
1299
|
+
blueprintKept = report.config?.blueprint?.file === 'kept' ? report.config.blueprint.note : null
|
|
1297
1300
|
// ⭐ WHAT IT HELD, AS THE FILES KEEP IT — where each held page is in the files it wrote into, the
|
|
1298
1301
|
// stand-in in a repository, and what they say there — for a push to leave out while they still
|
|
1299
1302
|
// say it (`readHeldUnits`). Replaced by each pull that takes the site's content. In the stand-in's
|
|
@@ -1703,6 +1706,8 @@ export async function pull(args = [], deps = {}) {
|
|
|
1703
1706
|
// ⭐ A mounted folder's pages are as current as its repository, which no pull moves.
|
|
1704
1707
|
for (const line of await behindLines(siteDir)) note(line)
|
|
1705
1708
|
}
|
|
1709
|
+
// ⭐ Said, since the file and the site now differ: the file is the author's, and the next push sends it.
|
|
1710
|
+
if (blueprintKept) note(blueprintKept)
|
|
1706
1711
|
// ⭐ Said, because the text is not in a translation file: one would make the language the site's,
|
|
1707
1712
|
// and the next publish would ask to serve it (`uwx/source-locale.js`). It is kept for the push to
|
|
1708
1713
|
// send back (`locales/_kept.json`), since a language removed in the app keeps its translations.
|
package/src/framework-index.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-09T22:12:50.994Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.7.0"
|
|
7
7
|
},
|
|
8
8
|
"@uniweb/build": {
|
|
9
|
-
"version": "1.20.
|
|
9
|
+
"version": "1.20.2"
|
|
10
10
|
},
|
|
11
11
|
"@uniweb/content-reader": {
|
|
12
12
|
"version": "1.5.9"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.2.
|
|
57
|
+
"version": "1.2.11"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "1.3.2"
|