uniweb 1.24.19 → 1.24.21
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": "1.24.
|
|
3
|
+
"version": "1.24.21",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"js-yaml": "^4.3.2",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.5.21",
|
|
44
|
-
"@uniweb/content-writer": "~1.3.1",
|
|
45
44
|
"@uniweb/core": "~1.5.2",
|
|
46
|
-
"@uniweb/
|
|
47
|
-
"@uniweb/schemas": "~1.6.7"
|
|
45
|
+
"@uniweb/content-writer": "~1.3.1",
|
|
46
|
+
"@uniweb/schemas": "~1.6.7",
|
|
47
|
+
"@uniweb/semantic-parser": "~1.13.2"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@uniweb/build": "~1.13.11",
|
|
@@ -282,7 +282,8 @@ export async function bringFoundationAlong({
|
|
|
282
282
|
confirm,
|
|
283
283
|
cliBin,
|
|
284
284
|
dryRun = false,
|
|
285
|
-
verb = 'publish'
|
|
285
|
+
verb = 'publish',
|
|
286
|
+
commits = []
|
|
286
287
|
}) {
|
|
287
288
|
const local = resolveLocalFoundation(siteDir, siteYml)
|
|
288
289
|
if (!local) {
|
|
@@ -300,7 +301,8 @@ export async function bringFoundationAlong({
|
|
|
300
301
|
confirm,
|
|
301
302
|
cliBin,
|
|
302
303
|
dryRun,
|
|
303
|
-
verb
|
|
304
|
+
verb,
|
|
305
|
+
committed: commits.includes(relative(siteDir, join(local.dir, 'package.json')))
|
|
304
306
|
})
|
|
305
307
|
}
|
|
306
308
|
|
|
@@ -312,6 +314,7 @@ export async function bringFoundationAlong({
|
|
|
312
314
|
* @param {object} o
|
|
313
315
|
* @param {{dir: string, version: string|null}} o.local
|
|
314
316
|
* @param {'foundation'|'extension'} o.kind
|
|
317
|
+
* @param {boolean} [o.committed] - the push commits this package's package.json (`filesAReleaseWrites`)
|
|
315
318
|
* @returns {Promise<{ released: boolean, proceed: boolean, ref: string|null, bumped?: string }>}
|
|
316
319
|
* `bumped` is the version written into package.json when changed code was released
|
|
317
320
|
* under the next version.
|
|
@@ -325,7 +328,8 @@ async function bringLocalCodeAlong({
|
|
|
325
328
|
confirm,
|
|
326
329
|
cliBin,
|
|
327
330
|
dryRun = false,
|
|
328
|
-
verb = 'publish'
|
|
331
|
+
verb = 'publish',
|
|
332
|
+
committed = false
|
|
329
333
|
}) {
|
|
330
334
|
const Kind = kind === 'extension' ? 'Extension ' : 'Foundation'
|
|
331
335
|
const scopedName = await foundationScopedName(local.dir)
|
|
@@ -473,7 +477,7 @@ async function bringLocalCodeAlong({
|
|
|
473
477
|
writePkgVersion(local.dir, bumpTo)
|
|
474
478
|
say.info(`Releasing the ${kind} ${scopedName || kind} as ${bumpTo} — ${why}…`)
|
|
475
479
|
const released = await release()
|
|
476
|
-
say.dim(`The ${kind}'s package.json now says ${bumpTo} — commit it.`)
|
|
480
|
+
say.dim(`The ${kind}'s package.json now says ${bumpTo}${committed ? '' : ' — commit it'}.`)
|
|
477
481
|
if (optOut) say.dim('To send content without releasing code, pass `--no-release`.')
|
|
478
482
|
return { released, proceed: true, bumped: bumpTo, ref: await pinnedRef() }
|
|
479
483
|
}
|
|
@@ -704,7 +708,8 @@ export async function bringExtensionsAlong({
|
|
|
704
708
|
say,
|
|
705
709
|
confirm,
|
|
706
710
|
cliBin,
|
|
707
|
-
dryRun = false
|
|
711
|
+
dryRun = false,
|
|
712
|
+
commits = []
|
|
708
713
|
}) {
|
|
709
714
|
const locals = resolveLocalExtensions(siteDir, siteYml)
|
|
710
715
|
const pins = {}
|
|
@@ -718,7 +723,8 @@ export async function bringExtensionsAlong({
|
|
|
718
723
|
say,
|
|
719
724
|
confirm,
|
|
720
725
|
cliBin,
|
|
721
|
-
dryRun
|
|
726
|
+
dryRun,
|
|
727
|
+
committed: commits.includes(relative(siteDir, join(local.dir, 'package.json')))
|
|
722
728
|
})
|
|
723
729
|
// A declined prompt aborts the whole publish, exactly as it does for the
|
|
724
730
|
// primary — a site live against half its code is worse than not shipping.
|
package/src/backend/site-sync.js
CHANGED
|
@@ -383,6 +383,43 @@ export function unitFilesOf(siteDir, unitPath) {
|
|
|
383
383
|
return []
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
+
/** Unit paths → the files the author keeps them in, as a pull writes them back. */
|
|
387
|
+
export function filesOfUnits(siteDir, units) {
|
|
388
|
+
return units.map((u) => (u === 'site.yml' ? 'site.yml' : unitFilesOf(siteDir, u)[0] ?? u))
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// How many files a push names before it says how many more.
|
|
392
|
+
const MOVED_SHOWN = 12
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* What a site-content push moved, file by file. The lane sends one entity, the site's whole
|
|
396
|
+
* document, so the backend's `changed` flag counts to 1 however much moved. ⛔ Until 2026-11-01
|
|
397
|
+
* that was all it said, and a publish of the hero and ten pages read `site-content: 1 changed`.
|
|
398
|
+
*
|
|
399
|
+
* @param {string} siteDir
|
|
400
|
+
* @param {object} sent - the document this push sent
|
|
401
|
+
* @param {Record<string,string>} base - each unit's hash at the last sync (`readUnitBases().local`)
|
|
402
|
+
* @returns {string[]} the lines to print
|
|
403
|
+
*/
|
|
404
|
+
export function describeContentMoved(siteDir, sent, base) {
|
|
405
|
+
// Nothing to compare with, so the backend's word is all there is.
|
|
406
|
+
if (!Object.keys(base).length) return ['site-content: changed']
|
|
407
|
+
const hashes = computeUnitHashes(sent)
|
|
408
|
+
const units = Object.keys(hashes)
|
|
409
|
+
const files = [
|
|
410
|
+
...filesOfUnits(siteDir, units.filter((u) => u in base && base[u] !== hashes[u])),
|
|
411
|
+
...filesOfUnits(siteDir, units.filter((u) => !(u in base))).map((f) => `${f} (new)`),
|
|
412
|
+
...filesOfUnits(siteDir, Object.keys(base).filter((u) => !(u in hashes))).map((f) => `${f} (removed)`)
|
|
413
|
+
].sort()
|
|
414
|
+
// The document moved and no unit did: what moved is outside the pages (`contentChanges`).
|
|
415
|
+
if (!files.length) return ["site-content: the site's settings changed — its services, languages or queries"]
|
|
416
|
+
return [
|
|
417
|
+
`site-content: ${files.length} file${files.length === 1 ? '' : 's'} changed`,
|
|
418
|
+
...files.slice(0, MOVED_SHOWN).map((f) => ` ${f}`),
|
|
419
|
+
...(files.length > MOVED_SHOWN ? [` … and ${files.length - MOVED_SHOWN} more`] : [])
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
|
|
386
423
|
// Pull the finalized entities out of the restore response. The backend returns
|
|
387
424
|
// `{ report: { finalized: [ { index, uuid, changed, document }, … ] } }` — each entry
|
|
388
425
|
// carries its position in the SUBMITTED sequence (`index`, the correlation key — `$id`
|
|
@@ -2522,8 +2559,12 @@ export async function pushSyncPackages({
|
|
|
2522
2559
|
note(JSON.stringify(payload).slice(0, 800))
|
|
2523
2560
|
return null
|
|
2524
2561
|
}
|
|
2525
|
-
const
|
|
2526
|
-
if (
|
|
2562
|
+
const moved = opts?.describeMoved && finalized.some((f) => f.changed === true) ? opts.describeMoved() : null
|
|
2563
|
+
if (moved) moved.forEach((line) => note(line))
|
|
2564
|
+
else {
|
|
2565
|
+
const summary = changedSummary(finalized)
|
|
2566
|
+
if (summary) note(`${label}: ${summary}`)
|
|
2567
|
+
}
|
|
2527
2568
|
return finalized
|
|
2528
2569
|
}
|
|
2529
2570
|
|
|
@@ -2705,7 +2746,15 @@ export async function pushSyncPackages({
|
|
|
2705
2746
|
localBuffer: siteContent.buffer,
|
|
2706
2747
|
uuid: siteContentUuid
|
|
2707
2748
|
}),
|
|
2708
|
-
{
|
|
2749
|
+
{
|
|
2750
|
+
boundUuid: siteContentUuid,
|
|
2751
|
+
reportTemplate: true,
|
|
2752
|
+
sent: siteContent.buffer,
|
|
2753
|
+
// Read before `settleSiteContent` moves the bases on to this push.
|
|
2754
|
+
describeMoved: sentSiteDoc
|
|
2755
|
+
? () => describeContentMoved(siteDir, sentSiteDoc, readUnitBases(siteDir, client.origin).local)
|
|
2756
|
+
: null
|
|
2757
|
+
}
|
|
2709
2758
|
)
|
|
2710
2759
|
if (!finalized) {
|
|
2711
2760
|
mergeHarvested()
|
package/src/commands/publish.js
CHANGED
|
@@ -533,6 +533,7 @@ export async function publish(args = []) {
|
|
|
533
533
|
args,
|
|
534
534
|
say,
|
|
535
535
|
confirm,
|
|
536
|
+
commits: released,
|
|
536
537
|
cliBin: process.argv[1]
|
|
537
538
|
})
|
|
538
539
|
} catch (err) {
|
|
@@ -560,6 +561,7 @@ export async function publish(args = []) {
|
|
|
560
561
|
args,
|
|
561
562
|
say,
|
|
562
563
|
confirm,
|
|
564
|
+
commits: released,
|
|
563
565
|
cliBin: process.argv[1]
|
|
564
566
|
})
|
|
565
567
|
} catch (err) {
|
package/src/commands/push.js
CHANGED
|
@@ -310,6 +310,7 @@ export async function push(args = [], deps = {}) {
|
|
|
310
310
|
args,
|
|
311
311
|
say,
|
|
312
312
|
confirm,
|
|
313
|
+
commits: released,
|
|
313
314
|
cliBin: process.argv[1],
|
|
314
315
|
// An offline emit reports what it WOULD do and touches no network; the ref
|
|
315
316
|
// still comes back (read from the foundation's package.json) so the preview
|
package/src/commands/status.js
CHANGED
|
@@ -48,6 +48,7 @@ import { basename, dirname, isAbsolute, join, posix, relative, resolve, sep } fr
|
|
|
48
48
|
import yaml from 'js-yaml'
|
|
49
49
|
|
|
50
50
|
import {
|
|
51
|
+
filesOfUnits,
|
|
51
52
|
probeUnpushed,
|
|
52
53
|
readItemUuids,
|
|
53
54
|
readSiteWorkspace,
|
|
@@ -469,11 +470,6 @@ function loginCommand(siteDir, origin, uuid) {
|
|
|
469
470
|
return `npx uniweb login --browser${server} ${ws ? `--org ${ws}` : '--personal'}`
|
|
470
471
|
}
|
|
471
472
|
|
|
472
|
-
/** Unit paths → the files the author keeps them in, as a pull writes them back. */
|
|
473
|
-
function filesOfUnits(siteDir, units) {
|
|
474
|
-
return units.map((u) => (u === 'site.yml' ? 'site.yml' : unitFilesOf(siteDir, u)[0] ?? u))
|
|
475
|
-
}
|
|
476
|
-
|
|
477
473
|
/**
|
|
478
474
|
* The app: what the backend holds of this site, against this copy.
|
|
479
475
|
* @returns {Promise<{ checks: object[], proposals: object[], backend: object }>}
|
package/src/framework-index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-11-
|
|
3
|
+
"generatedAt": "2026-11-01T19:02:17.496Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "1.6.7"
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
"version": "1.5.2"
|
|
19
19
|
},
|
|
20
20
|
"@uniweb/frame-bridge": {
|
|
21
|
-
"version": "1.0.
|
|
21
|
+
"version": "1.0.3"
|
|
22
22
|
},
|
|
23
23
|
"@uniweb/icons": {
|
|
24
24
|
"version": "1.0.7"
|
|
25
25
|
},
|
|
26
26
|
"@uniweb/kit": {
|
|
27
|
-
"version": "1.6.
|
|
27
|
+
"version": "1.6.16"
|
|
28
28
|
},
|
|
29
29
|
"@uniweb/loom": {
|
|
30
30
|
"version": "1.1.2"
|
|
31
31
|
},
|
|
32
32
|
"@uniweb/press": {
|
|
33
|
-
"version": "1.
|
|
33
|
+
"version": "1.2.0"
|
|
34
34
|
},
|
|
35
35
|
"@uniweb/projections": {
|
|
36
36
|
"version": "1.2.9"
|
|
37
37
|
},
|
|
38
38
|
"@uniweb/runtime": {
|
|
39
|
-
"version": "1.3.
|
|
39
|
+
"version": "1.3.8"
|
|
40
40
|
},
|
|
41
41
|
"@uniweb/scene": {
|
|
42
42
|
"version": "1.0.1"
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"version": "1.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "1.1.
|
|
57
|
+
"version": "1.1.15"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "1.2.1"
|
|
61
61
|
},
|
|
62
62
|
"@uniweb/unipress": {
|
|
63
|
-
"version": "1.1.
|
|
63
|
+
"version": "1.1.26"
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"templates": {
|