uniweb 1.7.4 → 1.8.1

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.
@@ -1,37 +1,24 @@
1
1
  /**
2
- * The record of what a machine wrote into a site project — pull's own output.
3
- *
4
- * ⭐ And, since 2026-09-23, what a push delivered: the files of the units the backend
5
- * now holds as they were sent (`recordPushedUnits`, site-sync.js). Both are "the last
6
- * version this file synced at", which is what `pull --merge` needs as its ancestor —
7
- * found again in the repo's history by this hash (`findCommitted`, utils/git.js).
2
+ * The record of what a pull wrote into a site project — outside git.
8
3
  *
9
4
  * ## What it is for
10
5
  *
11
- * `uniweb pull` refuses to run when there are uncommitted changes under the files
12
- * it rewrites, because it reconciles the working tree to the backend and would
13
- * overwrite them. That guard needs one distinction to be useful: **a file the
14
- * user edited** versus **a file a previous pull wrote and nobody has touched
15
- * since**. Without it the guard cries wolf — pull rewrites the tree, so the next
16
- * pull sees its own output as uncommitted work and refuses, listing files the
17
- * user never touched. A guard that fires on nothing teaches people to reach for
18
- * `--force`, which is the destructive option.
19
- *
20
- * So each write is recorded with a content hash, and a dirty path whose hash
21
- * still matches is not user work.
22
- *
23
- * ## Why it lives here rather than in `pull.js`
6
+ * Outside git, `uniweb pull` rewrites the files under its roots from the backend, and
7
+ * nothing stands behind them — so it asks before it does, unless nothing there is the
8
+ * author's. That needs one distinction: **a file the author edited** versus **a file a
9
+ * previous pull wrote and nobody has touched since**. Without it the question comes
10
+ * every time — pull rewrites the tree, so the next pull sees its own output as the
11
+ * author's — and an unattended pull refuses over files nobody touched, which teaches
12
+ * people to reach for `--force`, the destructive option.
24
13
  *
25
- * `uniweb clone` has the same claim to make and cannot make it from there.
26
- * `pull.js` statically imports `@uniweb/build`, which resolves from the
27
- * *project's* `node_modules` — and `clone` runs before a project exists (see
28
- * `utils/uwx-read.js` for the same constraint on the `.uwx` reader).
14
+ * So each write is recorded with a content hash, and a path whose hash still matches is
15
+ * not the author's work.
29
16
  *
30
- * Clone scaffolds `site.yml` and `theme.yml` and then delegates to `pull`, so
31
- * without this the delegated pull sees clone's own scaffolding as uncommitted
32
- * user work and refuses — on a project created seconds earlier, where there is no
33
- * user work to protect. Clone records what it wrote; the guard then exempts those
34
- * files **for the right reason** rather than being overridden.
17
+ * ⛔ In a repository there is no such record: a pull merges, from a sync point
18
+ * (`utils/sync-point.js`). Until 2026-10-17 this record was also a merge's ancestor —
19
+ * the version each file last synced at, found again in the repository by its hash — and
20
+ * committed work outside it was lost; and `clone` recorded its scaffold here, before a
21
+ * delegated pull that now takes the backend's version with `--force`.
35
22
  *
36
23
  * Nothing here imports `@uniweb/build`, and nothing here may start to.
37
24
  */