uniweb 0.86.0 → 0.87.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.87.0",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,17 +41,17 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
-
"@uniweb/
|
|
44
|
+
"@uniweb/kit": "^0.20.0",
|
|
45
|
+
"@uniweb/runtime": "^0.29.4",
|
|
45
46
|
"@uniweb/core": "^0.38.0",
|
|
46
|
-
"@uniweb/runtime": "^0.29.3",
|
|
47
47
|
"@uniweb/semantic-parser": "^1.5.1",
|
|
48
48
|
"@uniweb/schemas": "^0.13.0",
|
|
49
|
-
"@uniweb/
|
|
49
|
+
"@uniweb/content-writer": "^0.3.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@uniweb/
|
|
53
|
-
"@uniweb/
|
|
54
|
-
"@uniweb/
|
|
52
|
+
"@uniweb/build": "^0.80.0",
|
|
53
|
+
"@uniweb/semantic-parser": "^1.5.1",
|
|
54
|
+
"@uniweb/content-reader": "^1.2.8"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -1740,7 +1740,7 @@ source: education
|
|
|
1740
1740
|
|
|
1741
1741
|
### Custom layouts
|
|
1742
1742
|
|
|
1743
|
-
Layouts live in `layouts/` inside the foundation and are auto-discovered. Set `defaultLayout` in `main.js`.
|
|
1743
|
+
Layouts live in `layouts/` inside the foundation and are auto-discovered. Set `defaultLayout` in `main.js`, or name a layout `Default`. With neither, a page that names no layout gets the built-in layout — `header`, the page, `footer`, nothing else — and a `defaultLayout` that names none of your layouts stops the build.
|
|
1744
1744
|
|
|
1745
1745
|
```jsx
|
|
1746
1746
|
// layouts/DocsLayout/index.jsx
|
package/src/backend/site-sync.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import { writeFileSync, readFileSync, mkdirSync, existsSync, unlinkSync } from 'node:fs'
|
|
15
|
-
import { join, dirname, relative, isAbsolute } from 'node:path'
|
|
15
|
+
import { join, dirname, relative, isAbsolute, basename } from 'node:path'
|
|
16
16
|
import yaml from 'js-yaml'
|
|
17
17
|
import { hasUncommittedContent } from '../utils/git.js'
|
|
18
18
|
import { recordWritten } from '../utils/pull-written.js'
|
|
@@ -54,7 +54,8 @@ import {
|
|
|
54
54
|
writeRegisteredFoundation,
|
|
55
55
|
backfillLinkUuids,
|
|
56
56
|
LINK_MODEL,
|
|
57
|
-
bankedFileUuids
|
|
57
|
+
bankedFileUuids,
|
|
58
|
+
existingSectionFile
|
|
58
59
|
} from '@uniweb/build/uwx'
|
|
59
60
|
|
|
60
61
|
// First entity `$`-document out of a `.uwx` we produced or the backend served.
|
|
@@ -295,7 +296,15 @@ export function pulledItemVersions(doc, itemVersions) {
|
|
|
295
296
|
// The files a unit projects to, under the site's own roots — `site.yml::paths` can
|
|
296
297
|
// relocate `pages` and `layout`. `site.yml` stands for the `info` unit, which projects
|
|
297
298
|
// to three files.
|
|
298
|
-
|
|
299
|
+
//
|
|
300
|
+
// ⭐ A section unit's path names it by its id (`pages/about/about.md`), and the author's
|
|
301
|
+
// file may carry an ordering prefix or a child mark (`1-about.md`, `@about.md`), which a
|
|
302
|
+
// pull writes back into in place. So the unit is looked up as a pull finds it
|
|
303
|
+
// (`existingSectionFile`). ⛔ Until 2026-10-07 the id path was taken as the file: a push
|
|
304
|
+
// recorded no file for a numbered section, and the next `pull --merge` merged against an
|
|
305
|
+
// older version — a false conflict on a line only the other side had changed (measured
|
|
306
|
+
// on the starter's `1-welcome.md`).
|
|
307
|
+
export function unitFilesOf(siteDir, unitPath) {
|
|
299
308
|
if (unitPath === 'site.yml') return ['site.yml', 'theme.yml', 'head.html']
|
|
300
309
|
let paths = {}
|
|
301
310
|
try {
|
|
@@ -304,7 +313,12 @@ function unitFilesOf(siteDir, unitPath) {
|
|
|
304
313
|
/* no or unreadable site.yml — the defaults are right */
|
|
305
314
|
}
|
|
306
315
|
for (const root of ['pages', 'layout']) {
|
|
307
|
-
if (unitPath.startsWith(`${root}/`))
|
|
316
|
+
if (!unitPath.startsWith(`${root}/`)) continue
|
|
317
|
+
const rel = `${paths[root] || root}${unitPath.slice(root.length)}`
|
|
318
|
+
if (!rel.endsWith('.md') || existsSync(join(siteDir, rel))) return [rel]
|
|
319
|
+
const id = basename(rel, '.md')
|
|
320
|
+
const found = existingSectionFile(join(siteDir, dirname(rel)), id, id, { child: true })
|
|
321
|
+
return [found ? relative(siteDir, found) : rel]
|
|
308
322
|
}
|
|
309
323
|
return []
|
|
310
324
|
}
|
|
@@ -2467,7 +2481,10 @@ export async function pushSyncPackages({
|
|
|
2467
2481
|
// What the backend holds that this copy doesn't. None of it was overwritten, and no
|
|
2468
2482
|
// later push will overwrite it — but the files are behind until a pull.
|
|
2469
2483
|
if (notHeld.kept.length || notHeld.foreign.length) {
|
|
2470
|
-
|
|
2484
|
+
// Named by the file it is in here, not by its id (`unitFilesOf`).
|
|
2485
|
+
const paths = [
|
|
2486
|
+
...new Set([...notHeld.kept, ...notHeld.foreign].map((p) => (p === 'site.yml' ? p : unitFilesOf(siteDir, p)[0] || p)))
|
|
2487
|
+
].sort()
|
|
2471
2488
|
note(`Changed on the backend by someone else, not in your files yet: ${paths.join(', ')}`)
|
|
2472
2489
|
note('Take them with `uniweb refresh` (or `uniweb pull --merge`). Until then, pushing leaves them as they are.')
|
|
2473
2490
|
}
|
package/src/commands/register.js
CHANGED
|
@@ -698,7 +698,10 @@ async function runRegister(args = []) {
|
|
|
698
698
|
// fd 2 is our stderr: progress stays visible, stdout stays parseable.
|
|
699
699
|
// Found by a harness that had to work around it by taking the last
|
|
700
700
|
// JSON line off stdout.
|
|
701
|
-
stdio: jsonMode ? ['inherit', 2, 'inherit'] : 'inherit'
|
|
701
|
+
stdio: jsonMode ? ['inherit', 2, 'inherit'] : 'inherit',
|
|
702
|
+
// A step of register: the build's "Share with clients: uniweb register" hint
|
|
703
|
+
// would tell someone running register to run register.
|
|
704
|
+
env: { ...process.env, UNIWEB_BUILD_STEP: '1' }
|
|
702
705
|
})
|
|
703
706
|
} catch (err) {
|
|
704
707
|
error(`Build failed: ${err.message}`)
|
package/src/framework-index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-
|
|
3
|
+
"generatedAt": "2026-10-08T04:40:54.241Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "0.7.0",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
]
|
|
11
11
|
},
|
|
12
12
|
"@uniweb/build": {
|
|
13
|
-
"version": "0.
|
|
13
|
+
"version": "0.80.0",
|
|
14
14
|
"path": "framework/build",
|
|
15
15
|
"deps": [
|
|
16
16
|
"@uniweb/content-reader",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"@uniweb/runtime": {
|
|
87
|
-
"version": "0.29.
|
|
87
|
+
"version": "0.29.4",
|
|
88
88
|
"path": "framework/runtime",
|
|
89
89
|
"deps": [
|
|
90
90
|
"@uniweb/core",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"deps": []
|
|
118
118
|
},
|
|
119
119
|
"@uniweb/templates": {
|
|
120
|
-
"version": "0.18.
|
|
120
|
+
"version": "0.18.2",
|
|
121
121
|
"path": "framework/templates",
|
|
122
122
|
"deps": []
|
|
123
123
|
},
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"deps": []
|
|
128
128
|
},
|
|
129
129
|
"@uniweb/unipress": {
|
|
130
|
-
"version": "0.10.
|
|
130
|
+
"version": "0.10.24",
|
|
131
131
|
"path": "framework/unipress",
|
|
132
132
|
"deps": [
|
|
133
133
|
"@uniweb/build",
|