@ultimat3/cli 22.8.0 → 22.8.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/cli",
3
- "version": "22.8.0",
3
+ "version": "22.8.2",
4
4
  "description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -38,33 +38,33 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@babel/core": "^8.0.1",
41
- "@ultimat3/action": "22.8.0",
42
- "@ultimat3/admin": "22.8.0",
43
- "@ultimat3/ai": "22.8.0",
44
- "@ultimat3/auth": "22.8.0",
45
- "@ultimat3/cache": "22.8.0",
46
- "@ultimat3/core": "22.8.0",
47
- "@ultimat3/db": "22.8.0",
48
- "@ultimat3/entity": "22.8.0",
49
- "@ultimat3/flags": "22.8.0",
50
- "@ultimat3/http": "22.8.0",
51
- "@ultimat3/i18n": "22.8.0",
52
- "@ultimat3/jobs": "22.8.0",
53
- "@ultimat3/mail": "22.8.0",
54
- "@ultimat3/manifest": "22.8.0",
55
- "@ultimat3/mcp": "22.8.0",
56
- "@ultimat3/money": "22.8.0",
57
- "@ultimat3/notify": "22.8.0",
58
- "@ultimat3/policy": "22.8.0",
59
- "@ultimat3/pwa": "22.8.0",
60
- "@ultimat3/query": "22.8.0",
61
- "@ultimat3/realtime": "22.8.0",
62
- "@ultimat3/render": "22.8.0",
63
- "@ultimat3/schema": "22.8.0",
64
- "@ultimat3/seo": "22.8.0",
65
- "@ultimat3/storage": "22.8.0",
66
- "@ultimat3/testing": "22.8.0",
67
- "@ultimat3/time": "22.8.0",
41
+ "@ultimat3/action": "22.8.2",
42
+ "@ultimat3/admin": "22.8.2",
43
+ "@ultimat3/ai": "22.8.2",
44
+ "@ultimat3/auth": "22.8.2",
45
+ "@ultimat3/cache": "22.8.2",
46
+ "@ultimat3/core": "22.8.2",
47
+ "@ultimat3/db": "22.8.2",
48
+ "@ultimat3/entity": "22.8.2",
49
+ "@ultimat3/flags": "22.8.2",
50
+ "@ultimat3/http": "22.8.2",
51
+ "@ultimat3/i18n": "22.8.2",
52
+ "@ultimat3/jobs": "22.8.2",
53
+ "@ultimat3/mail": "22.8.2",
54
+ "@ultimat3/manifest": "22.8.2",
55
+ "@ultimat3/mcp": "22.8.2",
56
+ "@ultimat3/money": "22.8.2",
57
+ "@ultimat3/notify": "22.8.2",
58
+ "@ultimat3/policy": "22.8.2",
59
+ "@ultimat3/pwa": "22.8.2",
60
+ "@ultimat3/query": "22.8.2",
61
+ "@ultimat3/realtime": "22.8.2",
62
+ "@ultimat3/render": "22.8.2",
63
+ "@ultimat3/schema": "22.8.2",
64
+ "@ultimat3/seo": "22.8.2",
65
+ "@ultimat3/storage": "22.8.2",
66
+ "@ultimat3/testing": "22.8.2",
67
+ "@ultimat3/time": "22.8.2",
68
68
  "babel-preset-solid": "^1.9.15"
69
69
  }
70
70
  }
@@ -13,7 +13,7 @@ import { clientScopeOf } from '@ultimat3/auth';
13
13
  import type { Ctx, NavigationSurface } from '@ultimat3/core';
14
14
  import { CLIENT_NAVIGATION_SCOPE_HEADER, NAVIGATION_SURFACES } from '@ultimat3/core';
15
15
  import type { Route, RouteNavigation, UltimateRequest } from '@ultimat3/http';
16
- import { navigationPurpose, relocate } from '@ultimat3/http';
16
+ import { locationFor, navigationPurpose, relocate } from '@ultimat3/http';
17
17
  import type { ClientNavigationHead, HeadTag, RouteEntry } from '@ultimat3/render';
18
18
  import {
19
19
  clientNavigationTags,
@@ -142,12 +142,20 @@ export function navigationHeadFor(
142
142
  return { surface: surfaceKey(head, surface), buildId: head.buildId, scriptUrl: head.scriptUrl };
143
143
  }
144
144
 
145
- /** The router's meta, build and script — only on a surface that opted in. */
145
+ /**
146
+ * The router's meta, build and script — only on a page of a surface that opted in, and never on a
147
+ * `navigation: 'document'` page. That page is a document by declaration: every link to it is a real
148
+ * load, and it is where an app puts a 0 kB page (a recipient's evidence page, a magic link, an
149
+ * unsubscribe, a payment return — `budget.js: '0b'`, `hydrate: 'never'`). With no router on it, its
150
+ * own links and forms are the browser's, which is what a document page means; `budgets.ts` weighs
151
+ * the emitted document, so a page that names no router is charged none.
152
+ */
146
153
  export function navigationTagsOf(
147
154
  head: NavigationDocumentHead | undefined,
148
- surface: string,
155
+ entry: Pick<RouteEntry, 'surface' | 'config'>,
149
156
  ): readonly HeadTag[] {
150
- const tags = navigationHeadFor(head, surface);
157
+ if (entry.config.navigation === 'document') return [];
158
+ const tags = navigationHeadFor(head, entry.surface);
151
159
  return tags === undefined ? [] : clientNavigationTags(tags);
152
160
  }
153
161
 
@@ -202,5 +210,7 @@ export function principalRelocation(
202
210
  ): Response | undefined {
203
211
  if (navigationPurpose(request.raw) === null) return undefined;
204
212
  const said = request.header(CLIENT_NAVIGATION_SCOPE_HEADER);
205
- return said === scopeOf(entry, ctx, buildId) ? undefined : relocate(request.url.href);
213
+ return said === scopeOf(entry, ctx, buildId)
214
+ ? undefined
215
+ : relocate(locationFor(request.url.href, request.url));
206
216
  }
@@ -177,7 +177,7 @@ const headFor = async (
177
177
  }),
178
178
  [
179
179
  ...(options.sync === undefined ? [] : clientSyncTags(options.sync)),
180
- ...navigationTagsOf(options.navigation, entry.surface),
180
+ ...navigationTagsOf(options.navigation, entry),
181
181
  // The page boot rides the scope tag: its whole job — restoring a principal's persisted
182
182
  // records and replaying its queued writes — is per principal, and a shareable document
183
183
  // (no scope tag) has neither. Cheaper than walking the page's islands, and exact.