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.
- package/README.md +1 -1
- package/package.json +7 -7
- package/partials/agents.md +2 -2
- package/src/backend/client.js +22 -4
- package/src/backend/site-sync.js +70 -48
- package/src/commands/clone.js +55 -29
- package/src/commands/i18n.js +56 -49
- package/src/commands/publish.js +11 -0
- package/src/commands/pull.js +423 -463
- package/src/commands/push.js +12 -0
- package/src/commands/refresh.js +16 -17
- package/src/framework-index.json +2 -2
- package/src/index.js +5 -4
- package/src/utils/flag-guard.js +20 -8
- package/src/utils/git.js +20 -213
- package/src/utils/pull-written.js +15 -28
- package/src/utils/sync-point.js +512 -0
package/src/commands/publish.js
CHANGED
|
@@ -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
|
//
|