uniweb 0.14.31 → 0.14.33

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": "0.14.31",
3
+ "version": "0.14.33",
4
4
  "description": "Create structured Vite + React sites with content/code separation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,11 +42,11 @@
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
44
  "@uniweb/core": "0.8.2",
45
- "@uniweb/runtime": "0.9.9",
46
- "@uniweb/kit": "0.10.22"
45
+ "@uniweb/kit": "0.10.22",
46
+ "@uniweb/runtime": "0.9.10"
47
47
  },
48
48
  "peerDependencies": {
49
- "@uniweb/build": "0.16.21",
49
+ "@uniweb/build": "0.16.23",
50
50
  "@uniweb/content-reader": "1.2.2",
51
51
  "@uniweb/semantic-parser": "1.2.1"
52
52
  },
@@ -892,7 +892,7 @@ Nothing to install — the import brings the plugin with it. **Skip the import a
892
892
  **Layout helpers:** `useGridLayout(columns, { gap })`, `useAccordion({ multiple, defaultOpen })`
893
893
  **Theming data:** `useThemeData()`, `useColorContext(block)`
894
894
  **Data fetching:** `useFetched`, `useCacheEntry`, `useEntityDetail`
895
- **Forms:** `useFormValues` (an author-designed form's state), `useFormSubmit`, `submitForm`, `resolveSubmitTarget` — see *Forms* below
895
+ **Forms:** `useFormValues` (an author-designed form's state), `valueAt(values, path)`, `useFormSubmit`, `submitForm`, `resolveSubmitTarget` — see *Forms* below
896
896
  **Utilities:** `cn()`, `SafeHtml`, `SocialIcon`, `filterSocialLinks(links)`, `getSocialPlatform(url)`, `getLocaleLabel(locale)`
897
897
  **Other styled:** `Code`, `Alert`, `Table`, `Details`, `Divider`, `Disclaimer`
898
898
 
@@ -1839,6 +1839,12 @@ const { submit, canSubmit, status } = useFormSubmit({ block })
1839
1839
  <button disabled={!canSubmit || missing.length > 0} onClick={() => submit(formData, { files })}>
1840
1840
  ```
1841
1841
 
1842
+ `valueAt(values, path)` reads one control's value back out. It is the companion
1843
+ of `setValue` and is exported for exactly this loop: `values` is **nested**, so a
1844
+ control at `address.street` lives at `values.address.street`, and `values[c.path]`
1845
+ returns `undefined` for every nested control — a form that silently renders blank
1846
+ inputs and submits empty answers. Use `valueAt`, never index by path.
1847
+
1842
1848
  It seeds each control's `default`, tracks edits, and reports `missing` — the
1843
1849
  `required` controls still empty — without enforcing anything, the same line
1844
1850
  `canSubmit` draws. **Submit `formData`, not `values`:** they differ because a
@@ -1918,7 +1924,7 @@ uniweb inspect <path> # Show parsed content for a section or page (-
1918
1924
  uniweb <command> --help # Per-command flags — no side effects. Prefer this over guessing.
1919
1925
  ```
1920
1926
 
1921
- **Four verbs dispatch but are deliberately not listed above.** `invite`, `handoff` and `template` are **reserved names with no implementation** — the flows they named ran against a backend the CLI no longer talks to, and the names are held so a future rebuild doesn't need a breaking change. `runtime register` uploads a built runtime and is internal. Running any of them is not useful; their absence from this list is the answer, not an omission to fix.
1927
+ **Four verbs dispatch but are deliberately not listed above.** `invite`, `handoff` and `template` are **reserved names with no implementation** — the flows they named ran against a backend the CLI no longer talks to, and the names are held so a future rebuild doesn't need a breaking change. `runtime register` uploads a built runtime and is internal — an **escape hatch** for a build npm does not have (an unreleased version, a local workspace tree, or a deployment that cannot reach the distribution channel), never the normal way a runtime reaches a backend. Running any of them is not useful; their absence from this list is the answer, not an omission to fix.
1922
1928
 
1923
1929
  ### Where a site can live
1924
1930
 
@@ -3,6 +3,37 @@
3
3
  * can serve the runtime version. The runtime is a SYSTEM artifact: registering it
4
4
  * requires **@std membership** (a non-@std bearer 403s).
5
5
  *
6
+ * ─────────────────────────────────────────────────────────────────────────────
7
+ * ⛔ THIS IS AN ESCAPE HATCH. IT IS NOT HOW A RUNTIME NORMALLY REACHES A BACKEND.
8
+ * ─────────────────────────────────────────────────────────────────────────────
9
+ *
10
+ * The normal path is **publish to npm**, which CI mirrors into the public
11
+ * distribution channel, from which a backend acquires the version itself — no
12
+ * login, no per-backend push, no credentials leaving the backend.
13
+ *
14
+ * This verb pushes ONE build to ONE backend, by hand. Its cost is not the
15
+ * upload, it is that the result is **invisible to every other backend and to
16
+ * the channel**: a version installed this way exists nowhere else, cannot be
17
+ * verified against a published digest, and will not be what a second
18
+ * environment resolves. Two backends can end up serving different bytes under
19
+ * one version number, which is the exact defect the channel's immutability
20
+ * exists to make impossible.
21
+ *
22
+ * It stays because three cases have no other path, and they are all LOCAL or
23
+ * pre-release:
24
+ *
25
+ * • **an unpublished build** — npm versions are immutable, so you cannot
26
+ * iterate on a published one. Testing a runtime before releasing it goes
27
+ * through here.
28
+ * • **local workspace development** — `@uniweb/runtime` is a pnpm symlink to
29
+ * the working tree; there is no published artifact for the code you are
30
+ * editing.
31
+ * • **a deployment that cannot pull** — air-gapped or policy-restricted, or
32
+ * any environment without the egress the channel needs.
33
+ *
34
+ * ⇒ **If the version you are pushing is on npm, you almost certainly want the
35
+ * channel instead.** The command warns at runtime for that reason.
36
+ *
6
37
  * A foundation emits `dist/runtime-pin.json`. `uniweb register` now reads it and
7
38
  * ships it as the foundation's `info.runtime` — but **NOTHING ENFORCES IT** in
8
39
  * any lane. An earlier version of this comment claimed `uniweb register` of a
@@ -25,7 +56,7 @@
25
56
  * manifest-last. Wire + the two-half artifact set (SPA + ssr-edge isolate, the
26
57
  * orchestrator stays platform-owned): utils/runtime-upload.js.
27
58
  *
28
- * Usage:
59
+ * Usage (escape hatch — prefer publishing to npm; see above):
29
60
  * uniweb runtime register From framework/runtime (or --path <dir>)
30
61
  * uniweb runtime register --path <dir> The @uniweb/runtime package dir
31
62
  * uniweb runtime register --version <v> Override dist/app/manifest.json's version
@@ -95,6 +126,17 @@ export async function runtime(args = []) {
95
126
  const rest = args.slice(1)
96
127
  const dryRun = rest.includes('--dry-run')
97
128
 
129
+ // Say it at the moment of use, not only in the header. A verb that works
130
+ // fine is a verb people keep reaching for: this one succeeds quietly and
131
+ // leaves a version that exists on exactly one backend, unverifiable against
132
+ // any published digest.
133
+ say.warn('`runtime register` is an escape hatch, not the normal path.')
134
+ say.dim('A published runtime reaches a backend through the distribution channel — no push, no login.')
135
+ say.dim('Use this for a build npm does not have: an unreleased version, a local workspace tree,')
136
+ say.dim('or a deployment that cannot reach the channel. Pushing a version that IS on npm installs')
137
+ say.dim('bytes nothing else can verify, and a second environment will resolve something different.')
138
+ console.log('')
139
+
98
140
  const runtimeDir = resolveRuntimeDir(rest)
99
141
  if (!runtimeDir) {
100
142
  say.err('Not an @uniweb/runtime package.')
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-08-05T19:48:35.255Z",
3
+ "generatedAt": "2026-08-05T20:53:23.465Z",
4
4
  "packages": {
5
5
  "@uniweb/build": {
6
- "version": "0.16.21",
6
+ "version": "0.16.23",
7
7
  "path": "framework/build",
8
8
  "deps": [
9
9
  "@uniweb/content-reader",
@@ -73,7 +73,7 @@
73
73
  ]
74
74
  },
75
75
  "@uniweb/runtime": {
76
- "version": "0.9.9",
76
+ "version": "0.9.10",
77
77
  "path": "framework/runtime",
78
78
  "deps": [
79
79
  "@uniweb/core",
@@ -86,7 +86,7 @@
86
86
  "deps": []
87
87
  },
88
88
  "@uniweb/schemas": {
89
- "version": "0.2.9",
89
+ "version": "0.2.10",
90
90
  "path": "framework/schemas",
91
91
  "deps": []
92
92
  },
@@ -111,7 +111,7 @@
111
111
  "deps": []
112
112
  },
113
113
  "@uniweb/unipress": {
114
- "version": "0.6.19",
114
+ "version": "0.6.21",
115
115
  "path": "framework/unipress",
116
116
  "deps": [
117
117
  "@uniweb/build",
package/src/index.js CHANGED
@@ -1654,7 +1654,7 @@ ${colors.bright}Commands:${colors.reset}
1654
1654
  export Export a self-contained site for third-party hosting
1655
1655
  register Register a foundation + its data schemas with the backend registry
1656
1656
  release Release a foundation version (synonym of register)
1657
- runtime register Register an @uniweb/runtime version to the backend (@std only)
1657
+ runtime register Escape hatch: push a LOCAL/unreleased runtime build (@std only)
1658
1658
  push Push a site's content to the backend
1659
1659
  pull Pull a site's content from the backend
1660
1660
  refresh Catch up with the git remote AND the backend (never pushes)