talizen 0.2.18 → 0.2.19

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/README.md CHANGED
@@ -157,23 +157,24 @@ await invoke("booking", { email: "hi@talizen.com" });
157
157
 
158
158
  ### Server-side page context
159
159
 
160
- In `getServerSideProps`, use the injected server context for request metadata,
161
- cookies, and auth. Do not import `talizen/auth` or `talizen/func`, and do not
162
- call Func from server-side page code:
160
+ In `getServerSideProps`, use the injected server context for request metadata
161
+ and cookies. Do not import `talizen/auth` or `talizen/func`, and do not read
162
+ auth state or call Func from server-side page code:
163
163
 
164
164
  ```ts
165
165
  import type { TalizenServerSideContext } from "talizen/server-runtime";
166
166
 
167
167
  export async function getServerSideProps(ctx: TalizenServerSideContext) {
168
- const user = ctx.auth.currentUser();
169
- return { props: { path: ctx.request.path, user } };
168
+ return { props: { path: ctx.request.path } };
170
169
  }
171
170
  ```
172
171
 
173
- Server-side context supports `ctx.request`, `ctx.cookies`, and `ctx.auth`.
174
- It intentionally does not expose `ctx.db`, `ctx.cache`, or `ctx.func`; put
175
- login UI, private business data writes, and custom backend actions in
176
- browser-side SDK/Func/API flows.
172
+ Server-side context supports `ctx.request` and `ctx.cookies`. It intentionally
173
+ does not expose `ctx.auth`, `ctx.db`, `ctx.cache`, or `ctx.func`. This keeps
174
+ HTML render caching predictable: cookie reads can use cookie-vary, cookie
175
+ writes are no-store, and user-specific auth/Func reads do not become hidden SSR
176
+ cache dependencies. Put login UI, private business data access, writes, and
177
+ custom backend actions in browser-side SDK/Func/API flows.
177
178
 
178
179
  ### Write function runtime code
179
180
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "talizen",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "description": "Talizen frontend SDK types for cms, form and core.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,4 +1,3 @@
1
- import type { AuthUser } from "./auth.js";
2
1
  export interface ServerReadonlyStringMap {
3
2
  get(name: string): string | null;
4
3
  }
@@ -28,10 +27,6 @@ export interface TalizenServerCookieRuntime {
28
27
  ok?: boolean;
29
28
  };
30
29
  }
31
- export interface TalizenServerAuthRuntime {
32
- currentUser(): AuthUser | null;
33
- requireUser(): AuthUser;
34
- }
35
30
  export interface TalizenServerSideContext {
36
31
  query: Record<string, string | string[]>;
37
32
  searchParams: Record<string, string | string[]>;
@@ -42,5 +37,4 @@ export interface TalizenServerSideContext {
42
37
  request: TalizenServerRequestRuntime;
43
38
  req: TalizenServerRequestRuntime;
44
39
  cookies: TalizenServerCookieRuntime;
45
- auth: TalizenServerAuthRuntime;
46
40
  }