uniweb 1.7.3 → 1.8.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.
@@ -103,6 +103,7 @@ import {
103
103
  ensureSiteExists,
104
104
  refuseUnsendableRecords,
105
105
  clearRemoteSyncStateIfUnbound,
106
+ untakenBase,
106
107
  dropSiteBoundValues,
107
108
  pushSyncPackages
108
109
  } from '../backend/site-sync.js'
@@ -622,6 +623,16 @@ export async function publish(args = []) {
622
623
  `Dropped the previous site's ${droppedValues.join(' and ')} from site.yml.`
623
624
  )
624
625
  }
626
+ // ⛔ The gated push publish rides claims a base only while the files hold it — said here,
627
+ // before anything is uploaded or created (`untakenBase`). `--force` drops the gate.
628
+ if (!args.includes('--force')) {
629
+ const untaken = untakenBase(siteDir, client.origin)
630
+ if (untaken) {
631
+ say.err(untaken.headline)
632
+ for (const line of untaken.lines) say.dim(line)
633
+ return { exitCode: 1 }
634
+ }
635
+ }
625
636
 
626
637
  // 3b. Make sure the SITE EXISTS before a single byte is uploaded.
627
638
  //