uniweb 1.21.8 → 1.21.9
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 +1 -1
- package/src/commands/status.js +12 -3
package/package.json
CHANGED
package/src/commands/status.js
CHANGED
|
@@ -641,7 +641,9 @@ async function appChecks(siteDir, siteYml, { offline, args, git }) {
|
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
|
|
644
|
-
|
|
644
|
+
// A site kept in another workspace refuses every read of it from this one.
|
|
645
|
+
const elsewhere = state?.state === 'live' && state.status === 409
|
|
646
|
+
if (changes) checks.push(...changeChecks(siteDir, changes, unpushedFiles, proposals, { elsewhere }))
|
|
645
647
|
|
|
646
648
|
const site = state?.site
|
|
647
649
|
if (site) {
|
|
@@ -704,8 +706,12 @@ const cloudName = (origin) => (origin === DEFAULT_BACKEND_ORIGIN ? 'Uniweb Cloud
|
|
|
704
706
|
const CHANGE = { A: 'added', M: 'changed', D: 'removed' }
|
|
705
707
|
|
|
706
708
|
/** `app.changes`: what moved on the backend, and where it meets what moved here. */
|
|
707
|
-
function changeChecks(siteDir, changes, unpushedFiles, proposals) {
|
|
709
|
+
function changeChecks(siteDir, changes, unpushedFiles, proposals, { elsewhere = false } = {}) {
|
|
710
|
+
// ⭐ A REFUSAL IS SAID ONCE. `app.site` says where the site is kept and how to work there;
|
|
711
|
+
// the reads here are refused for that reason. ⛔ Until 2026-10-26 this repeated the refusal.
|
|
712
|
+
const unread = { id: 'app.changes', state: 'unknown', summary: 'Could not tell what changed on the backend while the site is kept in another workspace.' }
|
|
708
713
|
if (changes.error) {
|
|
714
|
+
if (elsewhere) return [unread]
|
|
709
715
|
return [{ id: 'app.changes', state: 'unknown', summary: `Could not read the site from the backend: ${changes.error.message}` }]
|
|
710
716
|
}
|
|
711
717
|
if (changes.probe) return probedChanges(changes.probe, unpushedFiles, proposals)
|
|
@@ -723,9 +729,12 @@ function changeChecks(siteDir, changes, unpushedFiles, proposals) {
|
|
|
723
729
|
if (records.folder) lines.push('the records\' sub-folders (folder.yml)')
|
|
724
730
|
const moved = files.length + lines.length
|
|
725
731
|
if (!moved) {
|
|
732
|
+
if (unknown.length && elsewhere) return [unread]
|
|
733
|
+
// Each reason without its own full stop: the sentence ends once.
|
|
734
|
+
const reasons = [...new Set(unknown.map((l) => String(l.detail).replace(/\.+$/, '')))]
|
|
726
735
|
return [
|
|
727
736
|
unknown.length
|
|
728
|
-
? { id: 'app.changes', state: 'unknown', summary: `Could not tell what changed on the backend: ${
|
|
737
|
+
? { id: 'app.changes', state: 'unknown', summary: `Could not tell what changed on the backend: ${reasons.join('; ')}.` }
|
|
729
738
|
: { id: 'app.changes', state: 'ok', summary: 'Nothing changed on the backend since this copy last synced.', detail: { source: 'units' } }
|
|
730
739
|
]
|
|
731
740
|
}
|