uniweb 1.21.7 → 1.21.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "1.21.7",
3
+ "version": "1.21.9",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -41,15 +41,15 @@
41
41
  "js-yaml": "^4.3.2",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.5.21",
44
- "@uniweb/core": "~1.4.9",
45
44
  "@uniweb/content-writer": "~1.3.1",
46
- "@uniweb/schemas": "~1.6.5",
47
- "@uniweb/semantic-parser": "~1.13.0"
45
+ "@uniweb/core": "~1.4.9",
46
+ "@uniweb/semantic-parser": "~1.13.0",
47
+ "@uniweb/schemas": "~1.6.5"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "~1.10.6",
51
- "@uniweb/semantic-parser": "~1.13.0",
52
- "@uniweb/content-reader": "~1.5.7"
50
+ "@uniweb/build": "~1.10.7",
51
+ "@uniweb/content-reader": "~1.5.7",
52
+ "@uniweb/semantic-parser": "~1.13.0"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@uniweb/build": {
@@ -2862,7 +2862,7 @@ uniweb <command> --help # Per-command flags — no side effects. Prefe
2862
2862
  | Any static host at all | `uniweb export` | full control; no Uniweb account needed |
2863
2863
  | Uniweb Cloud | `uniweb publish` | teams with non-technical content authors, or client work |
2864
2864
 
2865
- `uniweb deploy` never assumes a host: with nothing configured it opens a picker listing only destinations it can act on, and records the choice in `deploy.yml` so later runs go straight there. On Cloudflare Pages / Netlify / Vercel, `add ci` also adds per-PR previews that comment the URL. GitHub runs workflows only from the top of the repository: in a project that is a folder of a larger repository, the project's own `.github/` never runs, and `uniweb status` says so — as it says when a target in `deploy.yml` was never deployed from this copy. Adapters: `github-pages`, `cloudflare-pages`, `netlify`, `vercel`, plus `s3-cloudfront` for `deploy`. That record is `deploy.yml`, beside `site.yml` — **the CLI writes it, you don't create it**: the first successful deploy scaffolds the whole file, and later deploys rewrite only its `deploys:` block. Edit `targets:` when you want to change where a site ships. Host credentials come from the environment, never from that committed file.
2865
+ `uniweb deploy` never assumes a host: with nothing configured it opens a picker listing only destinations it can act on, and records the choice in `deploy.yml` so later runs go straight there. On Cloudflare Pages / Netlify / Vercel, `add ci` also adds per-PR previews that comment the URL. GitHub runs workflows only from the top of the repository: in a project that is a folder of a larger repository, the project's own `.github/` never runs — `uniweb status` says so, and `uniweb add ci` refuses to write one there — as it says when a target in `deploy.yml` was never deployed from this copy. Adapters: `github-pages`, `cloudflare-pages`, `netlify`, `vercel`, plus `s3-cloudfront` for `deploy`. That record is `deploy.yml`, beside `site.yml` — **the CLI writes it, you don't create it**: the first successful deploy scaffolds the whole file, and later deploys rewrite only its `deploys:` block. Edit `targets:` when you want to change where a site ships. Host credentials come from the environment, never from that committed file.
2866
2866
 
2867
2867
  Foundations have their own free path too: `uniweb add ci --target foundation` publishes to permanent versioned URLs on GitHub Pages.
2868
2868
 
@@ -44,6 +44,7 @@ import {
44
44
  resolveUniqueName
45
45
  } from '../utils/names.js'
46
46
  import { findWorkspaceRoot } from '../utils/workspace.js'
47
+ import { repoOf } from '../utils/sync-point.js'
47
48
  import {
48
49
  normalizeFoundationName,
49
50
  ensureFoundationName,
@@ -1479,6 +1480,20 @@ export default function ${name}({ content, params }) {
1479
1480
  * and can plug in later.
1480
1481
  */
1481
1482
  async function addCi(rootDir, opts, pm = 'pnpm') {
1483
+ // ⛔ A PROJECT THAT IS A FOLDER OF A LARGER REPOSITORY gets no workflow: GitHub runs workflows
1484
+ // only from a repository's top, and this writes into the project's own `.github/`, where it
1485
+ // would never run. Refused rather than written, for now [Diego, 2026-10-26: "refuse for now"] —
1486
+ // measured on a repository of client projects, one of which carried a GitHub Pages workflow
1487
+ // from its old repository that had not run since it moved.
1488
+ const repo = repoOf(rootDir)
1489
+ if (repo?.prefix) {
1490
+ error(`Not added: this project is the folder ${repo.path} of the repository at ${repo.top}.`)
1491
+ log(` GitHub runs workflows only from the top of a repository (${relative(rootDir, join(repo.top, '.github', 'workflows'))}/),`)
1492
+ log(` so one written in this project's own .github/ would never run.`)
1493
+ log(` Deploy from a repository of its own, or by hand from here: uniweb deploy --host=<adapter>.`)
1494
+ process.exit(1)
1495
+ }
1496
+
1482
1497
  // Lazy-load the host registry so the CLI doesn't pay this import on
1483
1498
  // every add invocation.
1484
1499
  let getAdapter, listAdapters
@@ -641,7 +641,9 @@ async function appChecks(siteDir, siteYml, { offline, args, git }) {
641
641
  }
642
642
  }
643
643
 
644
- if (changes) checks.push(...changeChecks(siteDir, changes, unpushedFiles, proposals))
644
+ // A site kept in another workspace refuses every read of it from this one.
645
+ const elsewhere = state?.state === 'live' && state.status === 409
646
+ if (changes) checks.push(...changeChecks(siteDir, changes, unpushedFiles, proposals, { elsewhere }))
645
647
 
646
648
  const site = state?.site
647
649
  if (site) {
@@ -704,8 +706,12 @@ const cloudName = (origin) => (origin === DEFAULT_BACKEND_ORIGIN ? 'Uniweb Cloud
704
706
  const CHANGE = { A: 'added', M: 'changed', D: 'removed' }
705
707
 
706
708
  /** `app.changes`: what moved on the backend, and where it meets what moved here. */
707
- function changeChecks(siteDir, changes, unpushedFiles, proposals) {
709
+ function changeChecks(siteDir, changes, unpushedFiles, proposals, { elsewhere = false } = {}) {
710
+ // ⭐ A REFUSAL IS SAID ONCE. `app.site` says where the site is kept and how to work there;
711
+ // the reads here are refused for that reason. ⛔ Until 2026-10-26 this repeated the refusal.
712
+ const unread = { id: 'app.changes', state: 'unknown', summary: 'Could not tell what changed on the backend while the site is kept in another workspace.' }
708
713
  if (changes.error) {
714
+ if (elsewhere) return [unread]
709
715
  return [{ id: 'app.changes', state: 'unknown', summary: `Could not read the site from the backend: ${changes.error.message}` }]
710
716
  }
711
717
  if (changes.probe) return probedChanges(changes.probe, unpushedFiles, proposals)
@@ -723,9 +729,12 @@ function changeChecks(siteDir, changes, unpushedFiles, proposals) {
723
729
  if (records.folder) lines.push('the records\' sub-folders (folder.yml)')
724
730
  const moved = files.length + lines.length
725
731
  if (!moved) {
732
+ if (unknown.length && elsewhere) return [unread]
733
+ // Each reason without its own full stop: the sentence ends once.
734
+ const reasons = [...new Set(unknown.map((l) => String(l.detail).replace(/\.+$/, '')))]
726
735
  return [
727
736
  unknown.length
728
- ? { id: 'app.changes', state: 'unknown', summary: `Could not tell what changed on the backend: ${[...new Set(unknown.map((l) => l.detail))].join('; ')}.` }
737
+ ? { id: 'app.changes', state: 'unknown', summary: `Could not tell what changed on the backend: ${reasons.join('; ')}.` }
729
738
  : { id: 'app.changes', state: 'ok', summary: 'Nothing changed on the backend since this copy last synced.', detail: { source: 'units' } }
730
739
  ]
731
740
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-26T22:50:14.357Z",
3
+ "generatedAt": "2026-10-26T23:21:20.295Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "1.6.4"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.10.6"
9
+ "version": "1.10.7"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
12
  "version": "1.5.7"
@@ -24,7 +24,7 @@
24
24
  "version": "1.0.6"
25
25
  },
26
26
  "@uniweb/kit": {
27
- "version": "1.6.6"
27
+ "version": "1.6.7"
28
28
  },
29
29
  "@uniweb/loom": {
30
30
  "version": "1.1.2"