uniweb 1.21.0 → 1.21.2

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,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-26T02:00:48.151Z",
3
+ "generatedAt": "2026-10-26T17:53:53.949Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "1.6.4"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.10.2"
9
+ "version": "1.10.4"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
12
  "version": "1.5.7"
package/src/index.js CHANGED
@@ -1777,17 +1777,25 @@ ${colors.cyan}${colors.bright}uniweb status${colors.reset} ${colors.dim}— What
1777
1777
  ${colors.bright}Usage:${colors.reset}
1778
1778
  uniweb status [options]
1779
1779
 
1780
- Run it when you begin, before you push, and after a command refuses. It checks:
1780
+ Run it when you begin, when you come back to the project, before you push, publish
1781
+ or deploy, and after a command refuses. It opens with what the site is — synced
1782
+ where, live where, deployed where — and checks:
1781
1783
 
1784
+ project the workspace's sites and foundations, the foundation this site is built
1785
+ with and the other sites it reaches, pages from outside the site's folder,
1786
+ the languages
1782
1787
  git conflicts, a merge waiting, the site's files not committed, the git remote
1783
- app the session, what changed on the backend since this copy last synced,
1784
- what is not pushed, whether the site is live, who has it open in the app,
1785
- the foundation
1788
+ app the session, what changed on the backend since this copy last synced —
1789
+ the files a pull would change — what is not pushed, who has the site
1790
+ open in the app, the foundation
1791
+ hosting where the site is live, the other hosts deploy.yml lists (by CI or by
1792
+ hand, and how far behind), and the services the live site has
1786
1793
  uniweb whether a newer release is out
1787
1794
  health doctor's findings
1788
1795
  dev the dev server
1789
1796
 
1790
- and ends with the steps to take, in the order to take them. A step marked
1797
+ and ends with the steps to take, in the order to take them. At the root of a
1798
+ workspace with several sites, it says what each one is. A step marked
1791
1799
  "ask the person first" is theirs to decide — going live, for one.
1792
1800
 
1793
1801
  It changes nothing and asks nothing: with no session it says how to sign in.
@@ -7,13 +7,13 @@
7
7
  * then sends the reader back up. So the order is one table, not each check's own idea:
8
8
  *
9
9
  * sign in → settle conflicts → finish a merge → take what others did (refresh, or pull)
10
- * → push → push to git → go live → update Uniweb → read doctor's findings
10
+ * → push → push to git → go live → deploy to another host → update Uniweb → read doctor's findings
11
11
  *
12
12
  * Each check proposes steps by name (`step`); this sorts them, folds the ones another step
13
13
  * already does, and drops duplicates.
14
14
  */
15
15
 
16
- const ORDER = ['login', 'conflicts', 'merge', 'refresh', 'pull', 'push', 'gitpush', 'publish', 'update', 'doctor']
16
+ const ORDER = ['login', 'conflicts', 'merge', 'refresh', 'pull', 'push', 'gitpush', 'publish', 'deploy', 'update', 'doctor']
17
17
 
18
18
  /**
19
19
  * @param {Array<{ step: string, command: string|null, why: string, ask?: boolean }>} proposals
@@ -382,7 +382,7 @@ function differsIn(repo, a, b, roots) {
382
382
  * @param {string[]} opts.roots - the site's content roots, relative to the site
383
383
  * @param {string|null} opts.rev - the commit whose content the roots are filled from;
384
384
  * null for none
385
- * @returns {{ siteDir: string, commit: Function, placeIgnored: Function, close: Function }}
385
+ * @returns {{ siteDir: string, commit: Function, changes: Function, placeIgnored: Function, close: Function }}
386
386
  */
387
387
  export function openStandIn(repo, { roots, rev }) {
388
388
  for (const r of roots) {
@@ -543,6 +543,24 @@ export function openStandIn(repo, { roots, rev }) {
543
543
  return placed
544
544
  }
545
545
 
546
+ /**
547
+ * What is written under the roots that `rev` does not hold so — each `[status, path]`,
548
+ * status `A`, `M` or `D`, the path relative to the site. Asked of the stand-in's own
549
+ * index, which holds `rev`: nothing is staged, committed or written to the repository.
550
+ * What the repository ignores is no change, as for `commit`.
551
+ * @returns {Array<[string, string]>}
552
+ */
553
+ const changes = () => {
554
+ const roots = full.filter((f) => present.includes(f) || existsSync(join(root, f)))
555
+ if (!roots.length) return []
556
+ const site = (p) => (sitePrefix && p.startsWith(sitePrefix) ? p.slice(sitePrefix.length) : p)
557
+ const out = []
558
+ const tracked = zlist(at(['diff', '--name-status', '-z', '--no-renames', '--', ...roots]))
559
+ for (let i = 0; i + 1 < tracked.length; i += 2) out.push([tracked[i], site(tracked[i + 1])])
560
+ for (const p of zlist(at(['ls-files', '--others', '--exclude-standard', '-z', '--', ...roots]))) out.push(['A', site(p)])
561
+ return out.sort((a, b) => (a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : 0))
562
+ }
563
+
546
564
  // The roots git can hold here. ⛔ One the repository ignores whole is not named to
547
565
  // `git add`, which refuses an ignored path; what is written under it is placed instead.
548
566
  const held = (paths) => {
@@ -556,7 +574,7 @@ export function openStandIn(repo, { roots, rev }) {
556
574
  return paths.filter((p) => !ignored.includes(p))
557
575
  }
558
576
 
559
- return { siteDir, commit, placeIgnored, close }
577
+ return { siteDir, commit, changes, placeIgnored, close }
560
578
  } catch (err) {
561
579
  close()
562
580
  throw err