@nekm/svelte-core 1.7.8 → 1.7.9

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.
@@ -1,13 +1,13 @@
1
1
  import type { Handle, RequestEvent } from "@sveltejs/kit";
2
- export interface ProtectTokens<TAuthToken = unknown, TIdToken = unknown, TAccessToken = unknown> {
3
- readonly auth: TAuthToken;
4
- readonly id: TIdToken;
5
- readonly access: TAccessToken;
2
+ export interface ProtectTokens {
3
+ readonly auth: unknown;
4
+ readonly id: unknown;
5
+ readonly access: unknown;
6
6
  }
7
- export interface ProtectConfig<TAuthToken = unknown, TIdToken = unknown, TAccessToken = unknown> {
7
+ export interface ProtectConfig {
8
8
  readonly protect?: (event: RequestEvent) => Promise<boolean> | boolean;
9
- readonly jwtDecodeAndVerifyIdToken: (token: string) => Promise<TIdToken> | TIdToken;
10
- readonly jwtDecodeAndVerifyAccessToken: (token: string) => Promise<TAccessToken> | TAccessToken;
9
+ readonly jwtDecodeAndVerifyIdToken: (token: string) => Promise<unknown> | unknown;
10
+ readonly jwtDecodeAndVerifyAccessToken: (token: string) => Promise<unknown> | unknown;
11
11
  readonly session: {
12
12
  readonly exists: (event: RequestEvent) => Promise<boolean> | boolean;
13
13
  readonly stateGenerate: (event: RequestEvent) => Promise<string> | string;
@@ -15,7 +15,7 @@ export interface ProtectConfig<TAuthToken = unknown, TIdToken = unknown, TAccess
15
15
  };
16
16
  readonly hooks?: {
17
17
  readonly onLogout?: (event: RequestEvent) => Promise<void> | void;
18
- readonly onLogin?: (event: RequestEvent, tokens: ProtectTokens<TAuthToken, TIdToken, TAccessToken>) => Promise<void> | void;
18
+ readonly onLogin?: (event: RequestEvent, tokens: ProtectTokens) => Promise<void> | void;
19
19
  };
20
20
  readonly oauth: {
21
21
  readonly clientId: string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@nekm/svelte-core",
3
3
  "description": "Code I find myself re-writing over-and-over, Svelte edition.",
4
4
  "license": "MIT",
5
- "version": "1.7.8",
5
+ "version": "1.7.9",
6
6
  "scripts": {
7
7
  "dev": "vite dev",
8
8
  "build": "vite build && npm run prepack",