uniweb 1.31.12 → 1.32.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.
@@ -12,6 +12,7 @@
12
12
  import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs'
13
13
  import { resolve, extname, basename, dirname, join } from 'node:path'
14
14
  import yaml from 'js-yaml'
15
+ import { isSectionKey, isSectionParam } from '@uniweb/schemas/section'
15
16
 
16
17
  // Colors for terminal output
17
18
  const colors = {
@@ -105,27 +106,37 @@ function extractFrontmatter(raw) {
105
106
  }
106
107
 
107
108
  /**
108
- * Split frontmatter into reserved keys and custom params.
109
- * Exact match of content-collector line 642.
109
+ * Split a section's frontmatter as the site build does (`@uniweb/build`,
110
+ * `content-collector.js::processMarkdownFile`), then as core builds the Block: every key but
111
+ * `SECTION_KEYS` and `fetch` is a param, with `props:` merged in, and of those the section's own
112
+ * settings (`SECTION_PARAMS` — `theme`, `background`, `grid`, `vars`, `fetch`, `sticky`,
113
+ * `underHeader`) are lifted onto the Block, so the component never receives them
114
+ * (`@uniweb/schemas/section`). So `params` is what the component receives, less its `meta.js`
115
+ * defaults, which need the foundation; `reserved` is every other key written.
116
+ *
117
+ * ⛔ Until 2026-11-11 this kept its own list, said to match the build exactly, which had drifted:
118
+ * `hidden`, `query`, `grid`, `vars`, `sticky` and `underHeader` showed as params, a key under
119
+ * `props:` showed as none, and `component:` was read as `type:`.
110
120
  */
111
121
  function splitParams(frontMatter) {
112
- const {
113
- type,
114
- component,
115
- preset,
116
- input,
117
- props,
118
- fetch,
119
- data,
120
- id,
121
- background,
122
- theme,
123
- ...params
124
- } = frontMatter
122
+ const { type, preset, props } = frontMatter
123
+ const written = {}
124
+ const reserved = {}
125
+ for (const [key, value] of Object.entries(frontMatter)) {
126
+ if (key === 'type' || key === 'preset' || key === 'props') continue
127
+ if (key === 'fetch' || isSectionKey(key)) reserved[key] = value
128
+ else written[key] = value
129
+ }
130
+ if (props && typeof props === 'object' && !Array.isArray(props)) Object.assign(written, props)
131
+ const params = {}
132
+ for (const [key, value] of Object.entries(written)) {
133
+ if (isSectionParam(key)) reserved[key] = value
134
+ else params[key] = value
135
+ }
125
136
  return {
126
- type: type || component || null,
137
+ type: type || null,
127
138
  preset: preset || null,
128
- reserved: { data, id, background, theme, input },
139
+ reserved,
129
140
  params
130
141
  }
131
142
  }
@@ -148,11 +159,8 @@ function guaranteeItemStructure(item) {
148
159
  insets: item.insets || [],
149
160
  media: item.media || [],
150
161
  snippets: item.snippets || [],
151
- buttons: item.buttons || [],
152
162
  data: item.data || {},
153
- cards: item.cards || [],
154
163
  documents: item.documents || [],
155
- forms: item.forms || [],
156
164
  quotes: item.quotes || [],
157
165
  headings: item.headings || [],
158
166
  ...(item.math && item.math.length ? { math: item.math } : {}),
@@ -172,7 +180,6 @@ export function guaranteeContentStructure(parsedContent) {
172
180
  title: content.title || '',
173
181
  pretitle: content.pretitle || '',
174
182
  subtitle: content.subtitle || '',
175
- alignment: content.alignment || null,
176
183
  paragraphs: content.paragraphs || [],
177
184
  links: content.links || [],
178
185
  images: content.images || [],
@@ -182,11 +189,8 @@ export function guaranteeContentStructure(parsedContent) {
182
189
  insets: content.insets || [],
183
190
  media: content.media || [],
184
191
  snippets: content.snippets || [],
185
- buttons: content.buttons || [],
186
192
  data: content.data || {},
187
- cards: content.cards || [],
188
193
  documents: content.documents || [],
189
- forms: content.forms || [],
190
194
  quotes: content.quotes || [],
191
195
  headings: content.headings || [],
192
196
  ...(content.math && content.math.length ? { math: content.math } : {}),
@@ -117,8 +117,10 @@ import {
117
117
  deployRecordAtRest,
118
118
  reportWriteBacks,
119
119
  pushSyncPackages,
120
- readSiteWorkspace
120
+ readSiteWorkspace,
121
+ sentSiteDocument
121
122
  } from '../backend/site-sync.js'
123
+ import { sentBlueprintNote } from '../backend/blueprint-reach.js'
122
124
  import { repoOf } from '../utils/sync-point.js'
123
125
  import { commitBeforeSending } from '../backend/commit-before-sending.js'
124
126
  import { mountsBeforeSending } from '../backend/mounts-before-sending.js'
@@ -1015,6 +1017,10 @@ export async function publish(args = []) {
1015
1017
  // here, at publish, and never at push: syncing records does not depend on it.
1016
1018
  const notAsked = recordsNotAsked({ siteYml, shown: pkg.recordsShown })
1017
1019
  if (notAsked) say.warn(notAsked)
1020
+ // ⭐ A CHANGED BLUEPRINT REACHES NO BACKEND ALREADY STARTED FROM THE SITE — judged by the status read
1021
+ // before the push, since this publish's go-live may start the site's first backend with what it
1022
+ // sends (`backend/blueprint-reach.js`).
1023
+ const blueprintNote = sentBlueprintNote({ status, sent: sentSiteDocument(pkg)?.services ?? null })
1018
1024
  const pushResult = await pushSyncPackages({
1019
1025
  client,
1020
1026
  siteDir,
@@ -1024,6 +1030,10 @@ export async function publish(args = []) {
1024
1030
  // What the push wrote into the files is committed, whatever became of the lanes.
1025
1031
  reportWriteBacks(commitWriteBacks(siteDir, client.origin, { complete: pushResult.complete, released }), { note: say.dim })
1026
1032
  if (pushResult.exitCode !== 0) return { exitCode: pushResult.exitCode }
1033
+ if (blueprintNote) {
1034
+ say.warn(blueprintNote[0])
1035
+ for (const line of blueprintNote.slice(1)) say.dim(line)
1036
+ }
1027
1037
  const siteUuid = pushResult.boundSiteUuid
1028
1038
  if (!siteUuid) {
1029
1039
  say.err('Push did not yield a site uuid — cannot go live.')
@@ -109,8 +109,10 @@ import {
109
109
  reportWriteBacks,
110
110
  holdUnchangedPush,
111
111
  pushSyncPackages,
112
- readSiteWorkspace
112
+ readSiteWorkspace,
113
+ sentSiteDocument
113
114
  } from '../backend/site-sync.js'
115
+ import { sendsBlueprint, sentBlueprintNote } from '../backend/blueprint-reach.js'
114
116
  import { commitBeforeSending } from '../backend/commit-before-sending.js'
115
117
  import { mountsBeforeSending } from '../backend/mounts-before-sending.js'
116
118
  import { resolveWorkspace, describeWorkspace, previewWorkspace, SOURCE_LABEL } from '../backend/workspace.js'
@@ -734,6 +736,16 @@ export async function push(args = [], deps = {}) {
734
736
  return { exitCode: 0 }
735
737
  }
736
738
 
739
+ // ⭐ A CHANGED BLUEPRINT REACHES NO BACKEND ALREADY STARTED FROM THE SITE: said once the push lands,
740
+ // judged by the site's status before anything is sent (`backend/blueprint-reach.js`). Asked only
741
+ // when the push sends a blueprint, to a site the backend holds.
742
+ const sent = sentSiteDocument(pkg)?.services ?? null
743
+ const boundUuid = readBackendState(siteDir, client.origin).site?.uuid
744
+ const blueprintNote =
745
+ boundUuid && sendsBlueprint(sent)
746
+ ? sentBlueprintNote({ status: await client.siteStatus(boundUuid).catch(() => null), sent })
747
+ : null
748
+
737
749
  // Submit both lanes, back-fill the minted uuids, and persist the send-only-changed
738
750
  // cache. Shared with `uniweb publish` via ../backend/site-sync.js.
739
751
  const result = await pushSyncPackages({ client, siteDir, pkg, report })
@@ -747,6 +759,10 @@ export async function push(args = [], deps = {}) {
747
759
  const total = (created?.finalizedTotal || 0) + result.finalizedTotal
748
760
  const wrote = [...(created?.wrote || []), ...result.wrote]
749
761
  success(`Pushed ${total} entit${total === 1 ? 'y' : 'ies'}` + (wrote.length ? ` — ${wrote.join(', ')}` : ''))
762
+ if (blueprintNote) {
763
+ warn(blueprintNote[0])
764
+ for (const line of blueprintNote.slice(1)) note(line)
765
+ }
750
766
  reportWriteBacks(written, { note })
751
767
  // ⭐ The records this push took out of the site's folder are off the live site already (it reads
752
768
  // its folder as it stands): offer to delete them from the backend (ruled 2026-11-04).
@@ -59,7 +59,7 @@ import {
59
59
  import { discoverFoundations, discoverSites } from '../utils/discover.js'
60
60
  import { writeJsonPreservingStyleAsync } from '../utils/json-file.js'
61
61
  import { getExistingPackageNames, validatePackageName } from '../utils/names.js'
62
- import { detectPackageManager, installCmd } from '../utils/pm.js'
62
+ import { detectPackageManager, installCmd, pmToInstall } from '../utils/pm.js'
63
63
  import { getCliPrefix } from '../utils/interactive.js'
64
64
  import { replaceInYamlList, setYamlKey } from '@uniweb/build/uwx'
65
65
 
@@ -377,7 +377,7 @@ async function renameFoundation(rootDir, oldName, newName, prefix) {
377
377
  success(
378
378
  `Renamed foundation ${colors.bright}${oldName}${colors.reset} → ${colors.bright}${newName}${colors.reset}`
379
379
  )
380
- printNextSteps(prefix, pm)
380
+ printNextSteps(prefix, rootDir)
381
381
  }
382
382
 
383
383
  // ─── Site rename ─────────────────────────────────────────────────
@@ -449,7 +449,7 @@ async function renameSite(rootDir, oldName, newName, prefix) {
449
449
  success(
450
450
  `Renamed site ${colors.bright}${oldName}${colors.reset} → ${colors.bright}${newName}${colors.reset}`
451
451
  )
452
- printNextSteps(prefix, pm)
452
+ printNextSteps(prefix, rootDir)
453
453
  }
454
454
 
455
455
  // ─── Extension rename ────────────────────────────────────────────
@@ -574,20 +574,21 @@ async function renameExtension(rootDir, oldName, newName, prefix) {
574
574
  // extension name — the foundation's own scripts handle building).
575
575
  // No updateRootScripts needed.
576
576
 
577
- const pm = detectPackageManager()
578
577
  log('')
579
578
  success(
580
579
  `Renamed extension ${colors.bright}${oldName}${colors.reset} → ${colors.bright}${newName}${colors.reset}`
581
580
  )
582
- printNextSteps(prefix, pm)
581
+ printNextSteps(prefix, rootDir)
583
582
  }
584
583
 
585
584
  // ─── Shared output ───────────────────────────────────────────────
586
585
 
587
- function printNextSteps(prefix, pm) {
586
+ // The install every command names (`pmToInstall`): the workspace's own, by its lockfile. ⛔ Until
587
+ // 2026-11-11 this said whatever ran the CLI, so `npx uniweb rename` in a pnpm workspace said `npm install`.
588
+ function printNextSteps(prefix, rootDir) {
588
589
  log('')
589
590
  log(
590
- `Next: ${colors.cyan}${installCmd(pm)}${colors.reset} ${colors.dim}(refresh symlinks under the new name)${colors.reset}`
591
+ `Next: ${colors.cyan}${installCmd(pmToInstall(rootDir))}${colors.reset} ${colors.dim}(refresh symlinks under the new name)${colors.reset}`
591
592
  )
592
593
  log(
593
594
  ` ${colors.cyan}${prefix} doctor${colors.reset} ${colors.dim}(verify wiring)${colors.reset}`
@@ -30,7 +30,7 @@ import { fileURLToPath } from 'node:url'
30
30
  import Handlebars from 'handlebars'
31
31
  import { readFlagValue } from '../utils/args.js'
32
32
  import { findUniwebWorkspace, findWorkspaceRoot } from '../utils/workspace.js'
33
- import { detectWorkspacePm, installCmd } from '../utils/pm.js'
33
+ import { installCmd, pmToInstall } from '../utils/pm.js'
34
34
 
35
35
  const PARTIAL = join(dirname(fileURLToPath(import.meta.url)), '..', '..', 'partials', 'start.md')
36
36
 
@@ -77,7 +77,8 @@ export function startGuide({ cwd = process.cwd(), template = null } = {}) {
77
77
  starter: name === 'starter',
78
78
  none: name === 'none',
79
79
  paste: name === 'paste',
80
- install: installCmd(root ? detectWorkspacePm(root) : 'npm')
80
+ // What `create` will say to run, or the project's own (`pmToInstall`).
81
+ install: installCmd(pmToInstall(root))
81
82
  })
82
83
  }
83
84
 
@@ -62,6 +62,7 @@ import { describeWorkspace, resolveWorkspace, SOURCE_LABEL } from '../backend/wo
62
62
  import { BackendClient, resolveBackendOrigin } from '../backend/client.js'
63
63
  import { readAppChanges } from '../backend/app-changes.js'
64
64
  import { liveAddress } from '../backend/live-address.js'
65
+ import { blueprintCheck } from '../backend/blueprint-reach.js'
65
66
  import { probePull } from './pull.js'
66
67
  import { readOrgFlag } from '../utils/args.js'
67
68
  import { listSyncedBackends, readBackendState } from '@uniweb/build/uwx'
@@ -1627,6 +1628,9 @@ const NOT_REPORTED_AS_LIVE = new Set(['google', ...AD_PLATFORMS])
1627
1628
  * file with those is how to tell it is stale, by the backend's own contract.
1628
1629
  *
1629
1630
  * ⛔ A request is never said as what the site has: what is live is the backend's to say.
1631
+ *
1632
+ * And `hosting.blueprint` after it, for a site whose backend has started: a changed
1633
+ * `blueprint.yml` no longer reaches that backend (`backend/blueprint-reach.js`).
1630
1634
  */
1631
1635
  async function servicesCheck({ siteDir, siteYml, site }) {
1632
1636
  const { readServicesRequest } = await import('@uniweb/build/uwx')
@@ -1669,6 +1673,8 @@ async function servicesCheck({ siteDir, siteYml, site }) {
1669
1673
  if (offHere.length) {
1670
1674
  lines.push(`site.yml turns off ${list(offHere)}, which the live site has — a request the owner settles; a paid service stays on until its subscription changes.`)
1671
1675
  }
1676
+ // `hosting.blueprint`: once the site's backend has started, a changed blueprint.yml no longer reaches it.
1677
+ const blueprint = await blueprintCheck({ siteDir, status: site })
1672
1678
  return {
1673
1679
  checks: [
1674
1680
  {
@@ -1677,7 +1683,8 @@ async function servicesCheck({ siteDir, siteYml, site }) {
1677
1683
  summary: live.length ? `Services on the live site: ${list(live)}.` : site.published ? 'No services on the live site.' : 'No services live — the site is not.',
1678
1684
  lines,
1679
1685
  detail: { asked, requested, live }
1680
- }
1686
+ },
1687
+ ...(blueprint ? [blueprint] : [])
1681
1688
  ],
1682
1689
  proposals
1683
1690
  }
@@ -5,7 +5,10 @@
5
5
  * 1. Align workspace `@uniweb/*` + `uniweb` deps to this CLI's bundled
6
6
  * version matrix (`getResolvedVersions`) — only deps that *lag* the
7
7
  * matrix are touched; deps that are *ahead* are left alone (no
8
- * downgrades) — then run `<pm> install`.
8
+ * downgrades) — then run `<pm> install`, and move every `@uniweb/*`
9
+ * package the lockfile holds to the newest version its range allows,
10
+ * the ones the project reaches only through another included
11
+ * (`liftUniwebPackages`, `utils/lockfile-uniweb.js`).
9
12
  * 2. Refresh AGENTS.md from this CLI's bundled partial.
10
13
  *
11
14
  * Why those two belong together: AGENTS.md is regenerated from the CLI's
@@ -44,7 +47,8 @@ import { join } from 'node:path'
44
47
  import { spawn } from 'node:child_process'
45
48
  import prompts from 'prompts'
46
49
 
47
- import { findUniwebWorkspace } from '../utils/workspace.js'
50
+ import { findUniwebWorkspace, getWorkspacePackages } from '../utils/workspace.js'
51
+ import { lockedUniwebPackages, liftCommand, liftMoves } from '../utils/lockfile-uniweb.js'
48
52
  import {
49
53
  readAgentsVersion,
50
54
  refreshAgentsContent,
@@ -57,6 +61,7 @@ import {
57
61
  detectWorkspacePm,
58
62
  installCmd,
59
63
  installAfterEditCmd,
64
+ pmToInstall,
60
65
  detectGlobalCliPm,
61
66
  globalCliUpdateCmd
62
67
  } from '../utils/pm.js'
@@ -166,6 +171,91 @@ export function printStaleCliNotice({
166
171
  return true
167
172
  }
168
173
 
174
+ /** `pnpm update <14 @uniweb packages> -r`: the lift's command, short enough to read in a log. */
175
+ function liftCommandShort(pm, count) {
176
+ const names = `<${count} @uniweb package${count === 1 ? '' : 's'}>`
177
+ return pm === 'pnpm' ? `pnpm update ${names} -r` : `npm update ${names}`
178
+ }
179
+
180
+ /** The workspace's package.json files as they are now: the root's and each workspace package's. */
181
+ async function workspaceManifests(workspaceDir) {
182
+ const dirs = ['', ...(await getWorkspacePackages(workspaceDir))]
183
+ const manifests = []
184
+ for (const relDir of dirs) {
185
+ const path = join(relDir ? join(workspaceDir, relDir) : workspaceDir, 'package.json')
186
+ if (existsSync(path)) manifests.push({ path, text: readFileSync(path, 'utf8') })
187
+ }
188
+ return manifests
189
+ }
190
+
191
+ /**
192
+ * After the install, move every @uniweb package the lockfile holds to the newest version its range
193
+ * allows, wherever the workspace holds it, and keep the package.json files as this command aligned
194
+ * them. `utils/lockfile-uniweb.js` says why: without it, a patch to a package the project reaches
195
+ * only through another never arrives in an existing project.
196
+ *
197
+ * Never fatal. The alignment and its install have happened, so a failure says how to finish.
198
+ *
199
+ * @param {string} workspaceDir
200
+ * @param {'pnpm'|'npm'|'yarn'} pm
201
+ */
202
+ async function liftUniwebPackages(workspaceDir, pm) {
203
+ if (pm === 'yarn') {
204
+ log(
205
+ `${colors.dim}A package reached only through another stays as yarn locked it: ${colors.reset}${colors.cyan}yarn up -R '@uniweb/*'${colors.reset}${colors.dim} (berry) or ${colors.reset}${colors.cyan}yarn upgrade${colors.reset}${colors.dim} (classic) moves it.${colors.reset}`
206
+ )
207
+ log('')
208
+ return
209
+ }
210
+ const before = lockedUniwebPackages(workspaceDir, pm)
211
+ const names = before ? [...before.keys()] : []
212
+ const cmd = liftCommand(pm, names)
213
+ if (!cmd) return
214
+
215
+ const manifests = await workspaceManifests(workspaceDir)
216
+ info(
217
+ `Moving each @uniweb package the lockfile holds to the newest its range allows: ${colors.cyan}${liftCommandShort(pm, names.length)}${colors.reset}`
218
+ )
219
+ const code = await runCommand(cmd, workspaceDir)
220
+ if (code !== 0) {
221
+ warn(
222
+ `That failed (exit ${code}). The aligned versions are installed; to move the rest, run ${colors.cyan}${cmd}${colors.reset}`
223
+ )
224
+ log('')
225
+ return
226
+ }
227
+
228
+ // pnpm writes a newer version into a range a package.json declares. Put the ranges back as this
229
+ // command aligned them, and install again, which keeps the newer version: it meets the range.
230
+ const rewritten = manifests.filter(({ path, text }) => readFileSync(path, 'utf8') !== text)
231
+ if (rewritten.length) {
232
+ for (const { path, text } of rewritten) writeFileSync(path, text)
233
+ const resync = installAfterEditCmd(pm)
234
+ const again = await runCommand(resync, workspaceDir)
235
+ if (again !== 0) {
236
+ warn(
237
+ `Putting the aligned ranges back, ${colors.cyan}${resync}${colors.reset} failed (exit ${again}). Run it again to finish.`
238
+ )
239
+ log('')
240
+ return
241
+ }
242
+ }
243
+
244
+ const after = lockedUniwebPackages(workspaceDir, pm)
245
+ const moves = after ? liftMoves(before, after) : []
246
+ if (!moves.length) {
247
+ success('Every @uniweb package was already the newest its range allows.')
248
+ } else {
249
+ success(
250
+ `Moved ${moves.length} @uniweb package${moves.length === 1 ? '' : 's'} to the newest ${moves.length === 1 ? 'its range allows' : 'their ranges allow'}:`
251
+ )
252
+ for (const { name, from, to } of moves) {
253
+ log(` ${name} ${colors.dim}${from.join(', ') || 'none'} →${colors.reset} ${to.join(', ') || 'none'}`)
254
+ }
255
+ }
256
+ log('')
257
+ }
258
+
169
259
  /** Run a shell command, inheriting stdio. Resolves with the exit code. */
170
260
  function runCommand(cmd, cwd) {
171
261
  return new Promise((resolve) => {
@@ -456,7 +546,7 @@ export async function update(args = []) {
456
546
  }
457
547
  if (!existsSync(join(workspaceDir, 'node_modules'))) {
458
548
  warn(
459
- `No ${colors.bright}node_modules${colors.reset} in the workspace — run ${colors.cyan}${installCmd(installPm || 'pnpm')}${colors.reset} to install.`
549
+ `No ${colors.bright}node_modules${colors.reset} in the workspace — run ${colors.cyan}${installCmd(installPm || pmToInstall(workspaceDir))}${colors.reset} to install.`
460
550
  )
461
551
  }
462
552
  log('')
@@ -504,6 +594,12 @@ export async function update(args = []) {
504
594
  log(
505
595
  `${colors.dim}Then would run:${colors.reset} ${colors.cyan}${installAfterEditCmd(installPm)}${colors.reset}`
506
596
  )
597
+ const held = lockedUniwebPackages(workspaceDir, installPm)
598
+ if (held?.size && liftCommand(installPm, [...held.keys()])) {
599
+ log(
600
+ `${colors.dim}and then:${colors.reset} ${colors.cyan}${liftCommandShort(installPm, held.size)}${colors.reset}${colors.dim}, each @uniweb package the lockfile holds to the newest its range allows${colors.reset}`
601
+ )
602
+ }
507
603
  } else {
508
604
  log(
509
605
  `${colors.dim}Then would prompt for an install command (no lockfile detected).${colors.reset}`
@@ -560,6 +656,13 @@ export async function update(args = []) {
560
656
  info(
561
657
  `${colors.dim}Non-interactive — run the install yourself:${colors.reset} ${colors.cyan}${cmd}${colors.reset}`
562
658
  )
659
+ const held = lockedUniwebPackages(workspaceDir, installPm)
660
+ const lift = held?.size ? liftCommand(installPm, [...held.keys()]) : null
661
+ if (lift) {
662
+ log(
663
+ `${colors.dim}Then, to move each @uniweb package the lockfile holds to the newest its range allows:${colors.reset} ${colors.cyan}${lift}${colors.reset}`
664
+ )
665
+ }
563
666
  log('')
564
667
  } else {
565
668
  const { go } = await prompts({
@@ -577,6 +680,7 @@ export async function update(args = []) {
577
680
  installRan = true
578
681
  success('Install complete.')
579
682
  log('')
683
+ await liftUniwebPackages(workspaceDir, installPm)
580
684
  } else {
581
685
  error(
582
686
  `Install failed (exit ${code}). package.json edits are intact.`
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-11T02:16:44.434Z",
3
+ "generatedAt": "2026-11-11T15:48:33.783Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
6
  "version": "1.7.0"
7
7
  },
8
8
  "@uniweb/build": {
9
- "version": "1.20.9"
9
+ "version": "1.21.0"
10
10
  },
11
11
  "@uniweb/content-reader": {
12
12
  "version": "1.5.9"
@@ -24,7 +24,7 @@
24
24
  "version": "1.0.8"
25
25
  },
26
26
  "@uniweb/kit": {
27
- "version": "1.7.18"
27
+ "version": "1.7.19"
28
28
  },
29
29
  "@uniweb/loom": {
30
30
  "version": "1.1.3"
@@ -33,10 +33,10 @@
33
33
  "version": "1.2.2"
34
34
  },
35
35
  "@uniweb/projections": {
36
- "version": "1.2.16"
36
+ "version": "1.2.17"
37
37
  },
38
38
  "@uniweb/runtime": {
39
- "version": "1.5.9"
39
+ "version": "1.6.0"
40
40
  },
41
41
  "@uniweb/scene": {
42
42
  "version": "1.0.1"
@@ -45,7 +45,7 @@
45
45
  "version": "1.7.1"
46
46
  },
47
47
  "@uniweb/scholar": {
48
- "version": "1.1.1"
48
+ "version": "1.1.2"
49
49
  },
50
50
  "@uniweb/semantic-parser": {
51
51
  "version": "1.13.3"
@@ -54,13 +54,13 @@
54
54
  "version": "1.1.2"
55
55
  },
56
56
  "@uniweb/templates": {
57
- "version": "1.2.12"
57
+ "version": "1.2.14"
58
58
  },
59
59
  "@uniweb/theming": {
60
60
  "version": "1.3.2"
61
61
  },
62
62
  "@uniweb/unipress": {
63
- "version": "1.1.37"
63
+ "version": "1.1.38"
64
64
  }
65
65
  },
66
66
  "templates": {
package/src/index.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  filterCmd,
64
64
  installCmd,
65
65
  runCmd,
66
- isPnpmAvailable
66
+ pmToInstall
67
67
  } from './utils/pm.js'
68
68
  import {
69
69
  isNonInteractive,
@@ -317,13 +317,9 @@ async function importProjectCommand(modulePath) {
317
317
  )
318
318
  log(` ${colors.cyan}npm install uniweb ${missing}${colors.reset}`)
319
319
  } else if (!workspaceInstalled) {
320
- // Declared, not on disk. Prefer the workspace's own package manager,
321
- // read off its lockfile — but a workspace that has NEVER been installed
322
- // has no lockfile to read, so fall back the same way `create` does
323
- // rather than to whichever PM happens to be running this process.
324
- const pm =
325
- detectWorkspacePm(root) ||
326
- (isPnpmAvailable() ? 'pnpm' : detectPackageManager())
320
+ // Declared, not on disk: the install every command names (`pmToInstall`) — the workspace's
321
+ // lockfile, else what `create` recommended.
322
+ const pm = pmToInstall(root)
327
323
  log(`Uniweb workspace: ${colors.dim}${root}${colors.reset}`)
328
324
  log(`Its dependencies are not installed:`)
329
325
  log(` ${colors.cyan}${installCmd(pm)}${colors.reset}`)
@@ -1449,11 +1445,11 @@ async function main() {
1449
1445
  // Success message
1450
1446
  title('Project created successfully!')
1451
1447
 
1452
- // Recommend pnpm (the framework's package manager) when it's installed,
1453
- // otherwise fall back to however the user invoked the CLI. The scaffold
1454
- // supports both — the root package.json declares npm `workspaces` and a
1448
+ // The install every command names (`pmToInstall`): pnpm (the framework's package manager) when it's
1449
+ // installed, otherwise however the user invoked the CLI — what `uniweb start` told them too. The
1450
+ // scaffold supports both: the root package.json declares npm `workspaces` and a
1455
1451
  // pnpm-workspace.yaml ships next to it.
1456
- const recPm = isPnpmAvailable() ? 'pnpm' : pm
1452
+ const recPm = pmToInstall(projectDir)
1457
1453
 
1458
1454
  if (isBlank) {
1459
1455
  // ⛔ The install comes first. `add` loads @uniweb/build, which reaches a blank workspace only
@@ -1521,16 +1517,17 @@ and only offers destinations that can actually be acted on. Pick a host and it
1521
1517
  asks whether to set up CI (every push deploys) or upload from this machine now.
1522
1518
  Your answer is remembered in deploy.yml, so later runs go straight there.
1523
1519
 
1524
- Choosing ${colors.bright}Uniweb Cloud${colors.reset} delegates to ${colors.cyan}uniweb publish${colors.reset} (sync + dynamic serving;
1525
- brings the foundation along). Choosing ${colors.bright}Somewhere else${colors.reset} runs ${colors.cyan}uniweb export${colors.reset}.
1520
+ ${colors.bright}Uniweb Cloud${colors.reset}, the recommended host, comes first and delegates to ${colors.cyan}uniweb publish${colors.reset}
1521
+ (pages over live data, visual editing, forms and accounts; brings the foundation
1522
+ along). Choosing ${colors.bright}Somewhere else${colors.reset} runs ${colors.cyan}uniweb export${colors.reset}.
1526
1523
 
1527
1524
  ${colors.bright}Hosts:${colors.reset}
1525
+ uniweb Uniweb Cloud, recommended (delegates to \`uniweb publish\`)
1528
1526
  github-pages GitHub Pages — CI workflow, or commit dist/ to gh-pages
1529
1527
  cloudflare-pages Cloudflare Pages — CI workflow + PR previews, or wrangler
1530
1528
  netlify Netlify — CI workflow + PR previews, or the netlify CLI
1531
1529
  vercel Vercel — CI workflow + PR previews, or the vercel CLI
1532
1530
  s3-cloudfront AWS S3 + CloudFront — uploads + invalidates via the aws CLI
1533
- uniweb Uniweb Cloud (delegates to \`uniweb publish\`)
1534
1531
 
1535
1532
  ${colors.bright}Options:${colors.reset}
1536
1533
  --host <name> The host to ship to (no value → the wizard, TTY only)
@@ -17,9 +17,11 @@
17
17
  *
18
18
  * Two synthetic entries round out the menu:
19
19
  * - Uniweb Cloud — not an adapter; it delegates to `uniweb publish`.
20
- * Listed after the third-party hosts rather than first: the framework
21
- * is backend-optional and standalone-first, so leading a generic
22
- * `deploy` with the paid product would read as an upsell.
20
+ * Listed first and marked recommended: it is the host with the full
21
+ * set of features (pages over live data, the Uniweb app for authors,
22
+ * forms and accounts), and the one the docs recommend. Its title says
23
+ * it's paid, beside hosts that say they're free, so the person picks
24
+ * knowing it; a host deploy.yml remembers still floats above it.
23
25
  * - Somewhere else — delegates to `uniweb export`.
24
26
  */
25
27
 
@@ -28,9 +30,9 @@ import { isNonInteractive } from './interactive.js'
28
30
 
29
31
  export const UNIWEB_DESTINATION = {
30
32
  value: { kind: 'uniweb' },
31
- title: 'Uniweb Cloud · paid, dynamic + visual editing',
33
+ title: 'Uniweb Cloud · recommended · paid, live data + visual editing',
32
34
  description:
33
- 'Sync + dynamic SSR, visual editing for content authors, foundation propagation. Runs `uniweb publish`.'
35
+ 'The full set of hosting features: pages prerendered over live data, the Uniweb app for your authors, forms and accounts. Runs `uniweb publish`.'
34
36
  }
35
37
 
36
38
  export const EXPORT_DESTINATION = {
@@ -65,7 +67,7 @@ export async function buildDestinationChoices() {
65
67
  description: a.display?.summary || ''
66
68
  }))
67
69
 
68
- return [...choices, UNIWEB_DESTINATION, EXPORT_DESTINATION]
70
+ return [UNIWEB_DESTINATION, ...choices, EXPORT_DESTINATION]
69
71
  }
70
72
 
71
73
  /**