@pylonsync/react 0.14.0 → 0.15.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/dist/ssr.d.ts CHANGED
@@ -176,6 +176,21 @@ export interface PageProps<TParams extends Record<string, string> = Record<strin
176
176
  * existing pages keep working; it will be removed in a later release.
177
177
  */
178
178
  url: string;
179
+ /**
180
+ * The host this request was made to, lowercased (e.g. `feedback.acme.com`),
181
+ * when the server trusts it: the app's own URL (`PYLON_PUBLIC_URL`,
182
+ * `PYLON_CANONICAL_HOST`), a `PYLON_TRUSTED_HOSTS` entry, a ready platform
183
+ * domain attached with `ctx.domains`, or loopback in dev (with its port).
184
+ * Any other `Host` header reads as `""`, so a forged header cannot pick
185
+ * what the page renders.
186
+ *
187
+ * It is the same value as the host part of the SSR cache key, so a page
188
+ * may render differently per host (one app serving each customer on their
189
+ * own domain) and stay cacheable: each host gets its own entry. It is also
190
+ * sent to the browser, so hydration and client navigation see the same
191
+ * value the server rendered with.
192
+ */
193
+ host: string;
179
194
  /** Dynamic-segment matches keyed by name (e.g. `{ slug: "hello-world" }`). */
180
195
  params: TParams;
181
196
  /** Parsed query string (e.g. `?start=10` → `{ start: "10" }`). */
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.14.0",
6
+ "version": "0.15.0",
7
7
  "type": "module",
8
8
  "main": "./src/index.ts",
9
9
  "types": "./dist/index.d.ts",
@@ -14,9 +14,9 @@
14
14
  "prepack": "bun run build"
15
15
  },
16
16
  "dependencies": {
17
- "@pylonsync/realtime": "0.14.0",
18
- "@pylonsync/sdk": "0.14.0",
19
- "@pylonsync/sync": "0.14.0"
17
+ "@pylonsync/realtime": "0.15.0",
18
+ "@pylonsync/sdk": "0.15.0",
19
+ "@pylonsync/sync": "0.15.0"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=19.0.0"
package/src/ssr.ts CHANGED
@@ -207,6 +207,21 @@ export interface PageProps<
207
207
  * existing pages keep working; it will be removed in a later release.
208
208
  */
209
209
  url: string;
210
+ /**
211
+ * The host this request was made to, lowercased (e.g. `feedback.acme.com`),
212
+ * when the server trusts it: the app's own URL (`PYLON_PUBLIC_URL`,
213
+ * `PYLON_CANONICAL_HOST`), a `PYLON_TRUSTED_HOSTS` entry, a ready platform
214
+ * domain attached with `ctx.domains`, or loopback in dev (with its port).
215
+ * Any other `Host` header reads as `""`, so a forged header cannot pick
216
+ * what the page renders.
217
+ *
218
+ * It is the same value as the host part of the SSR cache key, so a page
219
+ * may render differently per host (one app serving each customer on their
220
+ * own domain) and stay cacheable: each host gets its own entry. It is also
221
+ * sent to the browser, so hydration and client navigation see the same
222
+ * value the server rendered with.
223
+ */
224
+ host: string;
210
225
  /** Dynamic-segment matches keyed by name (e.g. `{ slug: "hello-world" }`). */
211
226
  params: TParams;
212
227
  /** Parsed query string (e.g. `?start=10` → `{ start: "10" }`). */