@pylonsync/react 0.7.0 → 0.8.1
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 +17 -1
- package/package.json +3 -3
- package/src/ssr.ts +17 -1
package/dist/ssr.d.ts
CHANGED
|
@@ -131,7 +131,23 @@ export interface ServerData {
|
|
|
131
131
|
* Read request-derived data through `serverData` or a server function.
|
|
132
132
|
*/
|
|
133
133
|
export interface PageProps<TParams extends Record<string, string> = Record<string, string>, TSearchParams extends Record<string, string> = Record<string, string>> {
|
|
134
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* The incoming request PATH — no query string, no origin
|
|
136
|
+
* (e.g. `/blog/hello-world`). The query arrives separately, already
|
|
137
|
+
* parsed, as `searchParams`.
|
|
138
|
+
*/
|
|
139
|
+
pathname: string;
|
|
140
|
+
/**
|
|
141
|
+
* The request path. Same value as `pathname`.
|
|
142
|
+
*
|
|
143
|
+
* @deprecated Use `pathname`, or `searchParams` for the query. The name is
|
|
144
|
+
* a trap: a prop called `url` reads as if it carries the query string, so
|
|
145
|
+
* `new URL(props.url).searchParams.get("next")` looks correct, compiles,
|
|
146
|
+
* and silently returns null on every request — the runtime split the query
|
|
147
|
+
* off before the render. That exact mistake shipped a production auth bug
|
|
148
|
+
* (a login page dropped `?next=`, stranding every OIDC sign-in). Kept so
|
|
149
|
+
* existing pages keep working; it will be removed in a later release.
|
|
150
|
+
*/
|
|
135
151
|
url: string;
|
|
136
152
|
/** Dynamic-segment matches keyed by name (e.g. `{ slug: "hello-world" }`). */
|
|
137
153
|
params: TParams;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.8.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"prepack": "bun run build"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pylonsync/sdk": "0.
|
|
18
|
-
"@pylonsync/sync": "0.
|
|
17
|
+
"@pylonsync/sdk": "0.8.1",
|
|
18
|
+
"@pylonsync/sync": "0.8.1"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=19.0.0"
|
package/src/ssr.ts
CHANGED
|
@@ -162,7 +162,23 @@ export interface PageProps<
|
|
|
162
162
|
TParams extends Record<string, string> = Record<string, string>,
|
|
163
163
|
TSearchParams extends Record<string, string> = Record<string, string>,
|
|
164
164
|
> {
|
|
165
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* The incoming request PATH — no query string, no origin
|
|
167
|
+
* (e.g. `/blog/hello-world`). The query arrives separately, already
|
|
168
|
+
* parsed, as `searchParams`.
|
|
169
|
+
*/
|
|
170
|
+
pathname: string;
|
|
171
|
+
/**
|
|
172
|
+
* The request path. Same value as `pathname`.
|
|
173
|
+
*
|
|
174
|
+
* @deprecated Use `pathname`, or `searchParams` for the query. The name is
|
|
175
|
+
* a trap: a prop called `url` reads as if it carries the query string, so
|
|
176
|
+
* `new URL(props.url).searchParams.get("next")` looks correct, compiles,
|
|
177
|
+
* and silently returns null on every request — the runtime split the query
|
|
178
|
+
* off before the render. That exact mistake shipped a production auth bug
|
|
179
|
+
* (a login page dropped `?next=`, stranding every OIDC sign-in). Kept so
|
|
180
|
+
* existing pages keep working; it will be removed in a later release.
|
|
181
|
+
*/
|
|
166
182
|
url: string;
|
|
167
183
|
/** Dynamic-segment matches keyed by name (e.g. `{ slug: "hello-world" }`). */
|
|
168
184
|
params: TParams;
|