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.
- package/README.md +1 -1
- package/package.json +6 -6
- package/partials/agents.md +2 -2
- package/src/backend/client.js +22 -4
- package/src/backend/site-sync.js +131 -48
- package/src/commands/clone.js +68 -29
- package/src/commands/publish.js +23 -1
- package/src/commands/pull.js +476 -463
- package/src/commands/push.js +26 -0
- package/src/commands/refresh.js +17 -18
- package/src/framework-index.json +5 -5
- package/src/index.js +10 -15
- package/src/utils/flag-guard.js +20 -8
- package/src/utils/git.js +53 -226
- package/src/utils/pull-written.js +15 -28
- package/src/utils/sync-point.js +693 -0
|
@@ -1,37 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The record of what a
|
|
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`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
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
|
-
*
|
|
26
|
-
*
|
|
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
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
*/
|