uniweb 0.43.0 → 0.44.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniweb",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
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.1.0",
42
42
  "prompts": "^2.4.2",
43
43
  "tar": "^7.0.0",
44
- "@uniweb/core": "^0.21.0",
45
- "@uniweb/kit": "^0.15.8",
46
- "@uniweb/runtime": "^0.16.0",
44
+ "@uniweb/core": "^0.22.0",
45
+ "@uniweb/kit": "^0.16.0",
46
+ "@uniweb/runtime": "^0.17.0",
47
47
  "@uniweb/semantic-parser": "^1.4.0"
48
48
  },
49
49
  "peerDependencies": {
50
- "@uniweb/build": "^0.39.0",
51
- "@uniweb/semantic-parser": "^1.4.0",
52
- "@uniweb/content-reader": "^1.2.4"
50
+ "@uniweb/build": "^0.40.0",
51
+ "@uniweb/content-reader": "^1.2.4",
52
+ "@uniweb/semantic-parser": "^1.4.0"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@uniweb/build": {
@@ -952,7 +952,7 @@ function MyComponent({ content, params, block }) {
952
952
  }
953
953
  ```
954
954
 
955
- Frontmatter becomes `params`, minus the keys the framework consumes outright: `type` (and its legacy alias `component`), `preset`, `input`, `props`, `fetch`, `data`, `id`. `props:` is the one that isn't dropped but merged *into* params.
955
+ Frontmatter becomes `params`, minus the keys the framework consumes outright: `type`, `preset`, `input`, `props`, `fetch`, `data`, `id`. `props:` is the one that isn't dropped but merged *into* params.
956
956
 
957
957
  **Framework fields you'd expect to be stripped are not.** `background`, `theme`, `source`, `where`, and `vars` are acted on by the runtime *and* passed through — so `params.theme` is readable when a component needs logic beyond CSS tokens (a light vs. dark logo, say). Components ignore the keys they don't use, the same way they ignore unused `content.data` keys.
958
958
 
@@ -1844,10 +1844,10 @@ search:
1844
1844
  ```yaml
1845
1845
  search:
1846
1846
  provider: endpoint
1847
- endpoint: _search # optional; base-RELATIVE, so one spelling works everywhere
1847
+ endpoint: _search # REQUIRED there is no default
1848
1848
  ```
1849
1849
 
1850
- `endpoint:` resolves against the site's base path — `/` → `/_search`, `base: /docs/` → `/docs/_search`, a subpath-served site follows its subpath. An absolute `https://…` URL points at another origin.
1850
+ `endpoint:` is **required** with `provider: endpoint`; omit it and the provider refuses the query rather than guessing a path. It resolves against the site's base path — `/` → `/_search`, `base: /docs/` → `/docs/_search`, a subpath-served site follows its subpath. An absolute `https://…` URL points at another origin. A host that serves the site may offer search itself, supplying the address so the site declares none.
1851
1851
 
1852
1852
  **Results have one shape, whatever the provider.** Always present: `id`, `type`, `route`, `href`, `title`, `pageTitle`, `excerpt`, `snippetHtml`. Provider-optional (`null` when absent): `sectionId`, `anchor`, `description`, `component`, `snippetText`, `matches`, `collection`, `item`. Whether an optional field arrives is a deployment fact, not a content fact — the same site yields `item` from a server provider and `null` from the local index — so guard them: `result.item?.image`.
1853
1853
 
@@ -8,7 +8,7 @@
8
8
  * owns the three things that were previously scattered across a dozen files:
9
9
  *
10
10
  * 1. ORIGIN — where the backend is. resolveBackendOrigin(): an explicit
11
- * flag (`--backend` / `--registry`) > UNIWEB_REGISTER_URL >
11
+ * flag (`--backend`) > UNIWEB_REGISTER_URL >
12
12
  * the local default. Any full URL is reduced to its origin.
13
13
  * 2. AUTH — the opaque session bearer (utils/registry-auth.js). Resolved
14
14
  * LAZILY on the first authed call, so dry-runs and fully-local
@@ -46,7 +46,7 @@ import { uploadSiteAssets } from '../utils/asset-upload.js'
46
46
  * first). A full URL is reduced to its origin, so callers may pass a whole
47
47
  * endpoint URL; an unparseable value falls through to the next tier.
48
48
  *
49
- * 1. `flag` — the raw --backend / --registry value (this command)
49
+ * 1. `flag` — the raw --backend value (this command)
50
50
  * 2. UNIWEB_REGISTER_URL env — session-wide override (CI / local dev)
51
51
  * 3. `siteScope` — the project's `site.yml::$backend` (site verbs)
52
52
  * 4. `siteBackend` — the site's bound backend from deploy.yml (site verbs)
@@ -70,7 +70,7 @@ import { uploadSiteAssets } from '../utils/asset-upload.js'
70
70
  * be able to veto a flag the user just typed. A wrong aim is then caught by the guard
71
71
  * rather than silently redirected.
72
72
  *
73
- * @param {string} [flag] - the raw value of --backend / --registry, if supplied
73
+ * @param {string} [flag] - the raw value of --backend, if supplied
74
74
  * @param {object} [opts]
75
75
  * @param {string} [opts.siteScope] - the project's `site.yml::$backend`
76
76
  * @param {string} [opts.siteBackend] - a site's deploy.yml-bound backend origin
@@ -143,7 +143,7 @@ export class BackendClient {
143
143
  /**
144
144
  * @param {object} [opts]
145
145
  * @param {string} [opts.origin] - explicit origin (wins over originFlag/env)
146
- * @param {string} [opts.originFlag] - raw --backend/--registry value to resolve
146
+ * @param {string} [opts.originFlag] - raw --backend value to resolve
147
147
  * @param {string} [opts.siteScope] - the project's `site.yml::$backend` (site verbs)
148
148
  * @param {string} [opts.siteBackend] - a site's deploy.yml-bound backend (site verbs)
149
149
  * @param {string} [opts.token] - explicit bearer (wins over env + stored session)
@@ -148,7 +148,7 @@ function readPkgField(dir, field) {
148
148
  // hits the SAME backend with the SAME session as the publish that called it.
149
149
  function forwardedFlags(args) {
150
150
  const out = []
151
- for (const name of ['--backend', '--registry', '--token']) {
151
+ for (const name of ['--backend', '--token']) {
152
152
  const v = readFlagValue(args, name)
153
153
  if (v) out.push(name, v)
154
154
  }
@@ -40,7 +40,7 @@
40
40
  * uniweb clone <uuid> --no-records Pull pages only; skip records
41
41
  *
42
42
  * Backend: via BackendClient (the site-content pull lane). Origin from
43
- * --registry > UNIWEB_REGISTER_URL > the local default (internal dev overrides;
43
+ * UNIWEB_REGISTER_URL > the local default (internal dev overrides;
44
44
  * not the user-facing path — `uniweb login` determines the origin).
45
45
  * Auth: --token > UNIWEB_TOKEN > `uniweb login` session.
46
46
  */
@@ -190,7 +190,7 @@ export async function clone(args = [], deps = {}) {
190
190
  const projectFlag = flagValue(args, '--project')
191
191
  const tokenFlag = flagValue(args, '--token')
192
192
  const explicitBackend =
193
- flagValue(args, '--backend') || flagValue(args, '--registry')
193
+ flagValue(args, '--backend')
194
194
  const client = new BackendClient({
195
195
  originFlag: explicitBackend,
196
196
  token: tokenFlag,
@@ -20,7 +20,7 @@
20
20
  * Distinct from `uniweb deploy` (third-party hosts) and `uniweb register`
21
21
  * (foundation code → catalog). For a self-contained artifact, see `uniweb export`.
22
22
  *
23
- * Backend: BackendClient. Origin from --backend/--registry > UNIWEB_REGISTER_URL
23
+ * Backend: BackendClient. Origin from --backend > UNIWEB_REGISTER_URL
24
24
  * > default. Auth: --token > UNIWEB_TOKEN > `uniweb login` session.
25
25
  *
26
26
  * Usage:
@@ -214,7 +214,7 @@ export async function publish(args = []) {
214
214
 
215
215
  const client = new BackendClient({
216
216
  originFlag:
217
- readFlagValue(args, '--backend') || readFlagValue(args, '--registry'),
217
+ readFlagValue(args, '--backend'),
218
218
  siteScope,
219
219
  siteBackend,
220
220
  token: readFlagValue(args, '--token') || undefined,
@@ -41,12 +41,11 @@
41
41
  * uniweb pull --merge Three-way merge local changes with the backend's
42
42
  * uniweb pull --force Pull over uncommitted local changes (discards them)
43
43
  * uniweb pull --dry-run Report what it would GET; write nothing
44
- * uniweb pull --registry <url> Override the backend origin
45
44
  * uniweb pull --token <bearer> Read with this bearer; skips `uniweb login`
46
45
  *
47
46
  * Backend: via BackendClient (the content + folder pull lanes), both keyed by
48
47
  * `site.yml::$uuid`. Origin from
49
- * --registry > UNIWEB_REGISTER_URL > the local default.
48
+ * UNIWEB_REGISTER_URL > the local default.
50
49
  * Auth: --token > UNIWEB_TOKEN > `uniweb login` session.
51
50
  *
52
51
  * A project that never pushed has no `$uuid` to pull by — pull is a no-op with a
@@ -562,7 +561,7 @@ export async function pull(args = [], deps = {}) {
562
561
  const siteScope = readSiteIdentity(siteDir).backend
563
562
  const siteBackend = await resolveSiteBackend(siteDir)
564
563
  const client = new BackendClient({
565
- originFlag: flagValue(args, '--backend') || flagValue(args, '--registry'),
564
+ originFlag: flagValue(args, '--backend'),
566
565
  siteScope,
567
566
  siteBackend,
568
567
  token: tokenFlag,
@@ -37,7 +37,6 @@
37
37
  * this prompt existed. First push only.
38
38
  * uniweb push --dry-run Report what would be pushed; submit nothing
39
39
  * uniweb push -o out.uwx Write the .uwx file(s) per lane; submit nothing
40
- * uniweb push --registry <url> Override the backend origin
41
40
  * uniweb push --token <bearer> Submit with this bearer; skips `uniweb login`
42
41
  * uniweb push --foundation <dir> Use this local foundation for the Model schema
43
42
  * uniweb push --all Send every record (bypass the changed-only cache)
@@ -51,7 +50,7 @@
51
50
  * would be hard-deleted). `--force` omits the token and restores last-push-wins.
52
51
  *
53
52
  * Backend: via BackendClient (the content + folder sync lanes). Origin from
54
- * --registry > UNIWEB_REGISTER_URL > the local default.
53
+ * UNIWEB_REGISTER_URL > the local default.
55
54
  * Auth: --token > UNIWEB_TOKEN > `uniweb login` session.
56
55
  *
57
56
  * The two-lane SUBMISSION (POST both lanes, back-fill uuids, persist the
@@ -168,7 +167,7 @@ export async function push(args = [], deps = {}) {
168
167
  // (the `offline` flag below), so it never authenticates — even when a collection
169
168
  // references a Model the local foundation doesn't define.
170
169
  const client = new BackendClient({
171
- originFlag: flagValue(args, '--backend') || flagValue(args, '--registry'),
170
+ originFlag: flagValue(args, '--backend'),
172
171
  siteScope,
173
172
  siteBackend,
174
173
  token: tokenFlag,
@@ -166,7 +166,6 @@ export async function refresh(args = [], deps = {}) {
166
166
  // same section is not a conflict, and should not be presented as one.
167
167
  const passthrough = collectPassthrough(args, [
168
168
  '--backend',
169
- '--registry',
170
169
  '--token'
171
170
  ])
172
171
  const res = await pull(['--merge', ...passthrough])
@@ -30,10 +30,10 @@
30
30
  * uniweb register --json Porcelain: ONE compact JSON line on stdout
31
31
  * ({ok,scope,origin,entities:[{name,uuid,version,unchanged}]}),
32
32
  * all human output to stderr — for scripted callers
33
- * uniweb register --backend <url> Override the backend origin (alias: --registry)
33
+ * uniweb register --backend <url> Override the backend origin
34
34
  * uniweb register --token <bearer> Submit with this bearer; skips `uniweb login`
35
35
  *
36
- * Endpoint resolution: --backend <url> (alias --registry) > UNIWEB_REGISTER_URL >
36
+ * Endpoint resolution: --backend <url> > UNIWEB_REGISTER_URL >
37
37
  * the logged-in session origin > ~/.uniweb/config.json > the default (uniweb.app).
38
38
  * Auth (submit only): --token <bearer> > UNIWEB_TOKEN > `uniweb login` session.
39
39
  */
@@ -389,10 +389,10 @@ async function runRegister(args = []) {
389
389
  const output = flagValue(args, '-o') || flagValue(args, '--output')
390
390
  const scopeFlag = flagValue(args, '--scope')
391
391
  const tokenFlag = flagValue(args, '--token')
392
- // Origin: --backend and --registry are aliases (matches deploy/publish + the
392
+ // Origin: --backend (matches deploy/publish + the
393
393
  // origin-selection convention); either overrides UNIWEB_REGISTER_URL / default.
394
394
  const client = new BackendClient({
395
- originFlag: flagValue(args, '--backend') || flagValue(args, '--registry'),
395
+ originFlag: flagValue(args, '--backend'),
396
396
  token: tokenFlag,
397
397
  args,
398
398
  command: 'Registering'
@@ -615,7 +615,7 @@ async function runRegister(args = []) {
615
615
  } catch (err) {
616
616
  error(`Could not reach the registry at ${client.origin}: ${err.message}`)
617
617
  log(
618
- ` ${colors.dim}Set the endpoint with --backend/--registry <url> or UNIWEB_REGISTER_URL.${colors.reset}`
618
+ ` ${colors.dim}Set the endpoint with --backend <url> or UNIWEB_REGISTER_URL.${colors.reset}`
619
619
  )
620
620
  return { exitCode: 2 }
621
621
  }
@@ -109,7 +109,7 @@ export async function status(args = []) {
109
109
  try {
110
110
  const client = new BackendClient({
111
111
  originFlag:
112
- readFlagValue(args, '--backend') || readFlagValue(args, '--registry'),
112
+ readFlagValue(args, '--backend'),
113
113
  siteScope: readSiteIdentity(siteDir).backend,
114
114
  siteBackend: await resolveSiteBackend(siteDir),
115
115
  token: readFlagValue(args, '--token') || undefined,
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-09-05T21:35:23.203Z",
3
+ "generatedAt": "2026-09-06T17:33:37.422Z",
4
4
  "packages": {
5
5
  "@uniweb/api": {
6
- "version": "0.2.7",
6
+ "version": "0.2.8",
7
7
  "path": "framework/api",
8
8
  "deps": [
9
9
  "@uniweb/core"
10
10
  ]
11
11
  },
12
12
  "@uniweb/build": {
13
- "version": "0.39.0",
13
+ "version": "0.40.0",
14
14
  "path": "framework/build",
15
15
  "deps": [
16
16
  "@uniweb/content-reader",
@@ -34,7 +34,7 @@
34
34
  "deps": []
35
35
  },
36
36
  "@uniweb/core": {
37
- "version": "0.21.0",
37
+ "version": "0.22.0",
38
38
  "path": "framework/core",
39
39
  "deps": [
40
40
  "@uniweb/semantic-parser",
@@ -47,14 +47,14 @@
47
47
  "deps": []
48
48
  },
49
49
  "@uniweb/icons": {
50
- "version": "0.4.12",
50
+ "version": "0.4.13",
51
51
  "path": "framework/icons",
52
52
  "deps": [
53
53
  "@uniweb/core"
54
54
  ]
55
55
  },
56
56
  "@uniweb/kit": {
57
- "version": "0.15.8",
57
+ "version": "0.16.0",
58
58
  "path": "framework/kit",
59
59
  "deps": [
60
60
  "@uniweb/core",
@@ -73,7 +73,7 @@
73
73
  "deps": []
74
74
  },
75
75
  "@uniweb/projections": {
76
- "version": "0.5.9",
76
+ "version": "0.5.10",
77
77
  "path": "framework/projections",
78
78
  "deps": [
79
79
  "@uniweb/content-writer",
@@ -81,7 +81,7 @@
81
81
  ]
82
82
  },
83
83
  "@uniweb/runtime": {
84
- "version": "0.16.0",
84
+ "version": "0.17.0",
85
85
  "path": "framework/runtime",
86
86
  "deps": [
87
87
  "@uniweb/core",
@@ -119,7 +119,7 @@
119
119
  "deps": []
120
120
  },
121
121
  "@uniweb/unipress": {
122
- "version": "0.9.5",
122
+ "version": "0.9.6",
123
123
  "path": "framework/unipress",
124
124
  "deps": [
125
125
  "@uniweb/build",
package/src/index.js CHANGED
@@ -803,7 +803,7 @@ async function main() {
803
803
  }
804
804
 
805
805
  // Handle login command — the backend (username/password · paste a token ·
806
- // --token <bearer>). Origin from --backend/--registry > UNIWEB_REGISTER_URL >
806
+ // --token <bearer>). Origin from --backend > UNIWEB_REGISTER_URL >
807
807
  // default, the SAME resolver register/push/pull/deploy use, so a session and
808
808
  // the commands that reuse it always target one backend.
809
809
  if (command === 'login') {
@@ -812,8 +812,7 @@ async function main() {
812
812
  const { readFlagValue } = await import('./utils/args.js')
813
813
  const { runRegistryLogin } = await import('./utils/registry-auth.js')
814
814
  const originFlag =
815
- readFlagValue(loginArgs, '--backend') ||
816
- readFlagValue(loginArgs, '--registry')
815
+ readFlagValue(loginArgs, '--backend')
817
816
  const apiBase = resolveBackendOrigin(originFlag)
818
817
 
819
818
  // ⭐ The project says where it belongs — say so BEFORE authenticating elsewhere.
@@ -826,7 +825,7 @@ async function main() {
826
825
  // routed-not-nagged case `$backend` was added for, missing at the one command a
827
826
  // teammate runs FIRST after cloning.
828
827
  //
829
- // ⛔ Silent when the origin was named explicitly (--backend / --registry /
828
+ // ⛔ Silent when the origin was named explicitly (--backend /
830
829
  // UNIWEB_REGISTER_URL). A deliberate aim is not a mistake to warn about; a genuinely
831
830
  // wrong one is still caught by the session-mismatch guard in BackendClient.token().
832
831
  if (!originFlag && !process.env.UNIWEB_REGISTER_URL) {
@@ -1520,7 +1519,7 @@ ${colors.bright}Options:${colors.reset}
1520
1519
  --scope @org Publish under @org (resolves @/x -> @org/x); default: package.json uniweb.scope
1521
1520
  --dry-run Print the .uwx; submit nothing
1522
1521
  -o, --output <f> Write the .uwx to a file; submit nothing
1523
- --backend <url> Backend origin (alias: --registry; default: \$UNIWEB_REGISTER_URL or a local URL)
1522
+ --backend <url> Backend origin (default: \$UNIWEB_REGISTER_URL or a local URL)
1524
1523
  --token <bearer> Submit with this bearer; skips \`uniweb login\` (or set UNIWEB_TOKEN)
1525
1524
  --non-interactive Fail with usage info instead of prompting
1526
1525
 
package/src/utils/args.js CHANGED
@@ -30,7 +30,7 @@
30
30
  * said `--as-unit` and a second reader said `--org`; nobody produced `--as-org`.
31
31
  * Since the flag's main job is answering *who owns this site*, `--org` is the name
32
32
  * that matches the question, and the alias costs one `||` (the same shape
33
- * `--backend` / `--registry` already uses).
33
+ * `--backend` already uses).
34
34
  *
35
35
  * `||`, not `??`, on purpose: a valueless `--org` falls through to `--as-org`
36
36
  * rather than shadowing it.
@@ -55,7 +55,7 @@ const VIA_DEPLOY = ['--target', '--host', '--no-save']
55
55
  const VERBS = {
56
56
  push: [
57
57
  '--all', '--as-org', '--org', '--backend', '--dry-run', '--force',
58
- '--foundation', '--output', '-o', '--personal', '--registry', '--token',
58
+ '--foundation', '--output', '-o', '--personal', '--token',
59
59
  // read in utils/conformance.js and backend/site-sync.js respectively —
60
60
  // neither appears in push.js
61
61
  '--no-validate', '--yes',
@@ -69,7 +69,7 @@ const VERBS = {
69
69
  ],
70
70
  publish: [
71
71
  '--as-org', '--org', '--backend', '--dry-run', '--force', '--foundation',
72
- '--personal', '--registry', '--token',
72
+ '--personal', '--token',
73
73
  // read in utils/conformance.js, backend/site-sync.js, and
74
74
  // backend/foundation-bring-along.js — none appear in publish.js
75
75
  '--no-validate', '--yes', '--no-verify', '--no-release', ...VIA_DEPLOY
@@ -77,20 +77,20 @@ const VERBS = {
77
77
  pull: [
78
78
  '--backend', '--content-only', '--dry-run', '--force', '--merge',
79
79
  '--no-assets',
80
- '--no-records', '--no-delete', '--no-prune', '--registry', '--token',
80
+ '--no-records', '--no-delete', '--no-prune', '--token',
81
81
  // via backend/site-sync.js (the owner resolver) and utils/conformance.js
82
82
  '--yes', '--org', '--as-org', '--no-validate', ...VIA_DEPLOY
83
83
  ],
84
84
  clone: [
85
85
  '--backend', '--content-only', '--no-assets', '--no-records', '--path',
86
- '--project', '--registry', '--token', '--org', '--as-org'
86
+ '--project', '--token', '--org', '--as-org'
87
87
  ],
88
88
  register: [
89
- '--backend', '--dry-run', '--json', '--output', '-o', '--registry',
89
+ '--backend', '--dry-run', '--json', '--output', '-o',
90
90
  '--schema-only', '--scope', '--token', '--org', '--as-org'
91
91
  ],
92
92
  status: [
93
- '--backend', '--json', '--registry', '--remote', '--token', '--dry-run',
93
+ '--backend', '--json', '--remote', '--token', '--dry-run',
94
94
  '--force', '--no-verify', '--no-validate', '--yes', '--org', '--as-org',
95
95
  // inert here, reachable through the bring-along module status imports for
96
96
  // `resolveLocalFoundation` — listed per the over-approximation note above
@@ -99,7 +99,7 @@ const VERBS = {
99
99
  /**
100
100
  * `refresh` = `git pull`, then a DELEGATED `pull --merge`.
101
101
  *
102
- * It forwards exactly three flags to that pull — `--backend` / `--registry` /
102
+ * It forwards exactly two flags to that pull — `--backend` /
103
103
  * `--token`, via its own `collectPassthrough` — and constructs the rest of the
104
104
  * argv itself. So pull's own flags (`--merge`, `--force`, `--no-delete`,
105
105
  * `--no-prune`, `--content-only`, …) are NOT reachable from a `refresh` argv and
@@ -111,7 +111,7 @@ const VERBS = {
111
111
  * the VIA_DEPLOY note above, and required by `flag-guard-coverage.test.js`.
112
112
  */
113
113
  refresh: [
114
- '--backend', '--no-backend', '--no-git', '--registry', '--token',
114
+ '--backend', '--no-backend', '--no-git', '--token',
115
115
  '--as-org', '--org', '--dry-run', '--no-validate', '--yes', ...VIA_DEPLOY
116
116
  ]
117
117
  }