@zeyolabs/kit 2026.11.6 → 2026.11.7

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
@@ -18,13 +18,11 @@ Peer dependencies: `@sveltejs/kit` 3, `drizzle-orm`, `zod`, `@sentry/sveltekit`;
18
18
 
19
19
  ## Versions
20
20
 
21
- Date versions: `YYYY.M.D` (the release day in London; semver forbids leading zeros, so
22
- `2026.11.5`). One release per day.
23
-
24
- ```
25
- pnpm release # sets the version, commits, tags vYYYY.M.D
26
- git push origin HEAD vYYYY.M.D # the tag publishes to npm (publish.yaml)
27
- ```
21
+ Every merge to `main` publishes a new version (`.github/workflows/publish.yaml`). There is no
22
+ release step. Versions are `YYYY.M.N` in London time: `N` counts that month's releases and resets
23
+ each month (`2026.11.7`, `2026.11.8`, then `2026.12.0`). CI sets the version and pushes the
24
+ `vYYYY.M.N` tag; `package.json`'s version in the repo is not updated. Changes to only docs or CI
25
+ don't publish.
28
26
 
29
27
  Publishing uses npm trusted publishing: the package's npmjs.com settings trust this repo's
30
28
  `publish.yaml`, so no npm token is stored anywhere.
package/auth/config.ts CHANGED
@@ -22,6 +22,11 @@ export type AuthConfig = {
22
22
  accounts: PermissionCatalogue;
23
23
  /** Shown by the browser's passkey prompt and in the magic-link email. */
24
24
  appName: string;
25
+ /** Share the session cookie with every subdomain of this domain (e.g. `example.com` for
26
+ * `app.example.com` and `mcp.example.com`), so one sign-in covers them all. Every subdomain's
27
+ * server then receives the cookie, so only set it when you control all of them. Default:
28
+ * host-only. Changing it signs everyone out once (the old cookie no longer matches). */
29
+ cookieDomain?: string;
25
30
  db: () => AuthDb;
26
31
  /** Sends the sign-in email (`magicLinkEmail`): any `IEmailClient`, e.g. `SmtpClient`, or
27
32
  * `DevEmailClient` locally (it prints the link). Called per request. */
@@ -93,12 +93,13 @@ function createAuthHandle(options: AuthHandleOptions = {}): Handle {
93
93
  locals.session = { ...live.session, expiresAt };
94
94
  event.cookies.set(config.cookieName, token, {
95
95
  ...Sessions.cookieAttributes,
96
+ domain: config.cookieDomain,
96
97
  expires: new Date(expiresAt),
97
98
  });
98
99
  }
99
100
  } else {
100
101
  if (live) await Sessions.delete(db, live.session.id);
101
- event.cookies.delete(config.cookieName, { path: '/' });
102
+ event.cookies.delete(config.cookieName, { domain: config.cookieDomain, path: '/' });
102
103
  }
103
104
  }
104
105
 
@@ -13,7 +13,8 @@ import { sessions, users } from '../schema';
13
13
  const SESSION_LIFETIME_MS = 30 * 24 * 60 * 60 * 1000;
14
14
  const SESSION_RENEW_BELOW_MS = 15 * 24 * 60 * 60 * 1000;
15
15
 
16
- /** Session cookie: host-only (no `domain`), `secure` always (browsers treat localhost as secure). */
16
+ /** Session cookie: host-only unless the app sets `cookieDomain`, `secure` always (browsers treat
17
+ * localhost as secure). */
17
18
  const sessionCookieAttributes = {
18
19
  httpOnly: true,
19
20
  path: '/',
@@ -73,6 +73,7 @@ async function signIn(event: RequestEvent, user: AuthUser): Promise<void> {
73
73
  const { expiresAt, token } = await Sessions.create(Auth.config().db(), user.id);
74
74
  event.cookies.set(Auth.config().cookieName, token, {
75
75
  ...Sessions.cookieAttributes,
76
+ domain: Auth.config().cookieDomain,
76
77
  expires: new Date(expiresAt),
77
78
  });
78
79
  await Auth.config().onSignIn?.(user);
@@ -154,7 +155,7 @@ async function verifyLink(event: RequestEvent): Promise<never> {
154
155
  async function logout(event: RequestEvent): Promise<never> {
155
156
  const { session } = AuthHandle.locals(event);
156
157
  if (session) await Sessions.delete(Auth.config().db(), session.id);
157
- event.cookies.delete(Auth.config().cookieName, { path: '/' });
158
+ event.cookies.delete(Auth.config().cookieName, { domain: Auth.config().cookieDomain, path: '/' });
158
159
  redirect(303, Auth.config().loginPath);
159
160
  }
160
161
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeyolabs/kit",
3
- "version": "2026.11.6",
3
+ "version": "2026.11.7",
4
4
  "description": "Shared SvelteKit-on-Cloudflare server toolkit: remote-function wrappers, passwordless auth (magic link + passkeys), email over a send_email binding or SMTP, Cloudflare context, monitoring, storage clients, utils and the ESLint config.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -38,8 +38,7 @@
38
38
  "test": "vitest run",
39
39
  "test:integration": "vitest run --config vitest.config.integration.ts",
40
40
  "check": "prettier --check . && pnpm lint && pnpm typecheck && pnpm test",
41
- "fmt": "prettier --write .",
42
- "release": "node scripts/release.mjs"
41
+ "fmt": "prettier --write ."
43
42
  },
44
43
  "exports": {
45
44
  "./eslint-config": "./eslint-config.js",