faire-auth 1.0.3 → 1.0.4
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/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +1 -1
- package/dist/adapters/memory-adapter/index.d.cts +3 -3
- package/dist/adapters/memory-adapter/index.d.mts +3 -3
- package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
- package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +1 -1
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +1 -1
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/middleware/index.d.cts +3 -3
- package/dist/api/middleware/index.d.mts +3 -3
- package/dist/client/index.d.cts +1 -1
- package/dist/client/index.d.mts +1 -1
- package/dist/client/lynx/index.d.cts +1 -1
- package/dist/client/lynx/index.d.mts +26 -26
- package/dist/client/plugins/index.d.cts +1 -1
- package/dist/client/plugins/index.d.mts +1 -1
- package/dist/client/react/index.d.cts +26 -26
- package/dist/client/react/index.d.mts +26 -26
- package/dist/client/solid/index.d.cts +1 -1
- package/dist/client/solid/index.d.mts +5 -5
- package/dist/client/svelte/index.d.cts +26 -26
- package/dist/client/svelte/index.d.mts +26 -26
- package/dist/client/vue/index.d.cts +27 -27
- package/dist/client/vue/index.d.mts +27 -27
- package/dist/crypto/index.d.cts +2 -2
- package/dist/crypto/index.d.mts +2 -2
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/{index-Baarsq5J.d.mts → index--DLiUhEn.d.mts} +6 -6
- package/dist/{index-BCTFWP_o.d.mts → index-B4bqEDYG.d.mts} +1 -1
- package/dist/{index-f-5OJ9yV.d.cts → index-Boa0SV4h.d.cts} +300 -300
- package/dist/{index-rFv8Hxld.d.mts → index-Bykgiq3o.d.cts} +638 -638
- package/dist/{index-ztVZPQdV.d.mts → index-ClFGA8tb.d.mts} +6 -6
- package/dist/{index-By364WbF.d.cts → index-ClOM0wFf.d.cts} +15 -15
- package/dist/{index-CzidsAyA.d.mts → index-CsxNfGAV.d.mts} +354 -354
- package/dist/{index-BzWwMgxr.d.cts → index-DKnO_Zfm.d.cts} +9 -9
- package/dist/{index-CJD2yB-W.d.cts → index-DRYO4mGd.d.cts} +6 -6
- package/dist/{index-DvW-GCcI.d.cts → index-Dsua4U8w.d.cts} +6 -6
- package/dist/{index-CsWF3f7U.d.cts → index-DxXFCG2_.d.mts} +378 -378
- package/dist/{index-BVRfQy6L.d.mts → index-gtCVvDvC.d.mts} +15 -15
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/integrations/next-js.d.cts +1 -1
- package/dist/integrations/next-js.d.mts +5 -5
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +1 -1
- package/dist/integrations/react-start.d.cts +5 -5
- package/dist/integrations/react-start.d.mts +5 -5
- package/dist/integrations/svelte-kit.d.cts +5 -5
- package/dist/integrations/svelte-kit.d.mts +5 -5
- package/dist/oauth2/index.d.cts +1 -1
- package/dist/oauth2/index.d.mts +1 -1
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +2 -2
- package/dist/plugins/index.d.cts +348 -348
- package/dist/plugins/index.d.mts +181 -181
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +2 -2
- package/dist/test-utils/index.cjs +1 -1
- package/dist/test-utils/index.d.cts +743 -743
- package/dist/test-utils/index.mjs +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/utils/cookies.d.cts +1 -1
- package/dist/utils/cookies.d.mts +1 -1
- package/package.json +2 -2
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-Boa0SV4h.cjs";
|
|
2
2
|
import "../../hono-DOM31WQz.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _faire_auth_core_types39 from "@faire-auth/core/types";
|
|
4
4
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
5
|
-
import * as
|
|
5
|
+
import * as hono48 from "hono";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _faire_auth_core_db5 from "@faire-auth/core/db";
|
|
8
8
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
9
|
-
import * as
|
|
9
|
+
import * as _better_fetch_fetch39 from "@better-fetch/fetch";
|
|
10
10
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
11
|
-
import * as
|
|
11
|
+
import * as nanostores8 from "nanostores";
|
|
12
12
|
import { Atom } from "nanostores";
|
|
13
13
|
export * from "@better-fetch/fetch";
|
|
14
14
|
export * from "nanostores";
|
|
15
15
|
|
|
16
16
|
//#region src/client/svelte/index.d.ts
|
|
17
17
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Atoms[key] } : {} : {} : {} : {};
|
|
18
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
18
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono48.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
19
19
|
useSession: () => Atom<{
|
|
20
|
-
data: App extends Hono<any, infer S_1 extends
|
|
20
|
+
data: App extends Hono<any, infer S_1 extends hono48.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
21
21
|
success: true;
|
|
22
22
|
})["data"] : never;
|
|
23
23
|
error: BetterFetchError | null;
|
|
24
24
|
isPending: boolean;
|
|
25
25
|
isRefetching: boolean;
|
|
26
26
|
}>;
|
|
27
|
-
$fetch:
|
|
28
|
-
plugins: (
|
|
27
|
+
$fetch: _better_fetch_fetch39.BetterFetch<{
|
|
28
|
+
plugins: (_better_fetch_fetch39.BetterFetchPlugin | {
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
hooks: {};
|
|
32
32
|
})[];
|
|
33
33
|
method: string;
|
|
34
|
-
output?:
|
|
34
|
+
output?: _better_fetch_fetch39.StandardSchemaV1 | typeof Blob | typeof File;
|
|
35
35
|
query?: any;
|
|
36
36
|
baseURL: string;
|
|
37
37
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -65,42 +65,42 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
65
65
|
referrer?: string;
|
|
66
66
|
referrerPolicy?: ReferrerPolicy;
|
|
67
67
|
signal?: AbortSignal | null;
|
|
68
|
-
onRetry?: (response:
|
|
68
|
+
onRetry?: (response: _better_fetch_fetch39.ResponseContext) => Promise<void> | void;
|
|
69
69
|
hookOptions?: {
|
|
70
70
|
cloneResponse?: boolean;
|
|
71
71
|
};
|
|
72
72
|
timeout?: number;
|
|
73
73
|
duplex?: "full" | "half";
|
|
74
74
|
jsonParser: (text: string) => Promise<any> | any;
|
|
75
|
-
retry?:
|
|
75
|
+
retry?: _better_fetch_fetch39.RetryOptions;
|
|
76
76
|
retryAttempt?: number;
|
|
77
|
-
errorSchema?:
|
|
77
|
+
errorSchema?: _better_fetch_fetch39.StandardSchemaV1;
|
|
78
78
|
disableValidation?: boolean;
|
|
79
|
-
defaultOutput?:
|
|
80
|
-
defaultError?:
|
|
79
|
+
defaultOutput?: _better_fetch_fetch39.StandardSchemaV1;
|
|
80
|
+
defaultError?: _better_fetch_fetch39.StandardSchemaV1;
|
|
81
81
|
catchAllError?: boolean;
|
|
82
|
-
schema?:
|
|
82
|
+
schema?: _better_fetch_fetch39.Schema;
|
|
83
83
|
customFetchImpl: any;
|
|
84
|
-
}, unknown, unknown,
|
|
84
|
+
}, unknown, unknown, _better_fetch_fetch39.Schema>;
|
|
85
85
|
$store: {
|
|
86
|
-
notify: (signal?:
|
|
87
|
-
listen: (signal:
|
|
86
|
+
notify: (signal?: _faire_auth_core_types39.LiteralStringUnion<"$sessionSignal">) => void;
|
|
87
|
+
listen: (signal: _faire_auth_core_types39.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
88
88
|
atoms: {
|
|
89
|
-
session:
|
|
89
|
+
session: nanostores8.PreinitializedWritableAtom<{
|
|
90
90
|
data: {
|
|
91
|
-
user:
|
|
92
|
-
session:
|
|
91
|
+
user: _faire_auth_core_db5.User;
|
|
92
|
+
session: _faire_auth_core_db5.Session;
|
|
93
93
|
} | null;
|
|
94
94
|
error: BetterFetchError | null;
|
|
95
95
|
isPending: boolean;
|
|
96
96
|
isRefetching: boolean;
|
|
97
97
|
refetch: () => void;
|
|
98
98
|
}> & object;
|
|
99
|
-
$sessionSignal:
|
|
100
|
-
} & Record<string,
|
|
99
|
+
$sessionSignal: nanostores8.PreinitializedWritableAtom<boolean> & object;
|
|
100
|
+
} & Record<string, nanostores8.WritableAtom<any>>;
|
|
101
101
|
};
|
|
102
102
|
$Infer: {
|
|
103
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
103
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono48.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
104
104
|
success: true;
|
|
105
105
|
})["data"] : never>;
|
|
106
106
|
};
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-DxXFCG2_.mjs";
|
|
2
2
|
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono48 from "hono";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
6
|
+
import * as _faire_auth_core_db5 from "@faire-auth/core/db";
|
|
7
|
+
import * as _better_fetch_fetch39 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
|
-
import * as
|
|
9
|
+
import * as nanostores8 from "nanostores";
|
|
10
10
|
import { Atom } from "nanostores";
|
|
11
|
-
import * as
|
|
11
|
+
import * as _faire_auth_core_types39 from "@faire-auth/core/types";
|
|
12
12
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
13
13
|
export * from "@better-fetch/fetch";
|
|
14
14
|
export * from "nanostores";
|
|
15
15
|
|
|
16
16
|
//#region src/client/svelte/index.d.ts
|
|
17
17
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Atoms[key] } : {} : {} : {} : {};
|
|
18
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
18
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono48.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
19
19
|
useSession: () => Atom<{
|
|
20
|
-
data: App extends Hono<any, infer S_1 extends
|
|
20
|
+
data: App extends Hono<any, infer S_1 extends hono48.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
21
21
|
success: true;
|
|
22
22
|
})["data"] : never;
|
|
23
23
|
error: BetterFetchError | null;
|
|
24
24
|
isPending: boolean;
|
|
25
25
|
isRefetching: boolean;
|
|
26
26
|
}>;
|
|
27
|
-
$fetch:
|
|
28
|
-
plugins: (
|
|
27
|
+
$fetch: _better_fetch_fetch39.BetterFetch<{
|
|
28
|
+
plugins: (_better_fetch_fetch39.BetterFetchPlugin | {
|
|
29
29
|
id: string;
|
|
30
30
|
name: string;
|
|
31
31
|
hooks: {};
|
|
32
32
|
})[];
|
|
33
33
|
method: string;
|
|
34
|
-
output?:
|
|
34
|
+
output?: _better_fetch_fetch39.StandardSchemaV1 | typeof Blob | typeof File;
|
|
35
35
|
query?: any;
|
|
36
36
|
baseURL: string;
|
|
37
37
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -65,42 +65,42 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
65
65
|
referrer?: string;
|
|
66
66
|
referrerPolicy?: ReferrerPolicy;
|
|
67
67
|
signal?: AbortSignal | null;
|
|
68
|
-
onRetry?: (response:
|
|
68
|
+
onRetry?: (response: _better_fetch_fetch39.ResponseContext) => Promise<void> | void;
|
|
69
69
|
hookOptions?: {
|
|
70
70
|
cloneResponse?: boolean;
|
|
71
71
|
};
|
|
72
72
|
timeout?: number;
|
|
73
73
|
duplex?: "full" | "half";
|
|
74
74
|
jsonParser: (text: string) => Promise<any> | any;
|
|
75
|
-
retry?:
|
|
75
|
+
retry?: _better_fetch_fetch39.RetryOptions;
|
|
76
76
|
retryAttempt?: number;
|
|
77
|
-
errorSchema?:
|
|
77
|
+
errorSchema?: _better_fetch_fetch39.StandardSchemaV1;
|
|
78
78
|
disableValidation?: boolean;
|
|
79
|
-
defaultOutput?:
|
|
80
|
-
defaultError?:
|
|
79
|
+
defaultOutput?: _better_fetch_fetch39.StandardSchemaV1;
|
|
80
|
+
defaultError?: _better_fetch_fetch39.StandardSchemaV1;
|
|
81
81
|
catchAllError?: boolean;
|
|
82
|
-
schema?:
|
|
82
|
+
schema?: _better_fetch_fetch39.Schema;
|
|
83
83
|
customFetchImpl: any;
|
|
84
|
-
}, unknown, unknown,
|
|
84
|
+
}, unknown, unknown, _better_fetch_fetch39.Schema>;
|
|
85
85
|
$store: {
|
|
86
|
-
notify: (signal?:
|
|
87
|
-
listen: (signal:
|
|
86
|
+
notify: (signal?: _faire_auth_core_types39.LiteralStringUnion<"$sessionSignal">) => void;
|
|
87
|
+
listen: (signal: _faire_auth_core_types39.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
88
88
|
atoms: {
|
|
89
|
-
session:
|
|
89
|
+
session: nanostores8.PreinitializedWritableAtom<{
|
|
90
90
|
data: {
|
|
91
|
-
user:
|
|
92
|
-
session:
|
|
91
|
+
user: _faire_auth_core_db5.User;
|
|
92
|
+
session: _faire_auth_core_db5.Session;
|
|
93
93
|
} | null;
|
|
94
94
|
error: BetterFetchError | null;
|
|
95
95
|
isPending: boolean;
|
|
96
96
|
isRefetching: boolean;
|
|
97
97
|
refetch: () => void;
|
|
98
98
|
}> & object;
|
|
99
|
-
$sessionSignal:
|
|
100
|
-
} & Record<string,
|
|
99
|
+
$sessionSignal: nanostores8.PreinitializedWritableAtom<boolean> & object;
|
|
100
|
+
} & Record<string, nanostores8.WritableAtom<any>>;
|
|
101
101
|
};
|
|
102
102
|
$Infer: {
|
|
103
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
103
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono48.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
104
104
|
success: true;
|
|
105
105
|
})["data"] : never>;
|
|
106
106
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-Boa0SV4h.cjs";
|
|
2
2
|
import "../../hono-DOM31WQz.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _faire_auth_core_types37 from "@faire-auth/core/types";
|
|
4
4
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
5
|
-
import * as
|
|
5
|
+
import * as hono44 from "hono";
|
|
6
6
|
import { Hono } from "hono";
|
|
7
|
-
import * as
|
|
7
|
+
import * as _faire_auth_core_db3 from "@faire-auth/core/db";
|
|
8
8
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
9
|
-
import * as
|
|
9
|
+
import * as _better_fetch_fetch29 from "@better-fetch/fetch";
|
|
10
10
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
11
|
-
import * as
|
|
11
|
+
import * as nanostores5 from "nanostores";
|
|
12
12
|
import { DeepReadonly, Ref } from "vue";
|
|
13
13
|
export * from "@better-fetch/fetch";
|
|
14
14
|
export * from "nanostores";
|
|
15
15
|
|
|
16
16
|
//#region src/client/vue/index.d.ts
|
|
17
17
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => DeepReadonly<Ref<ReturnType<Atoms[key]["get"]>>> } : {} : {} : {} : {};
|
|
18
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
18
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono44.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
19
19
|
useSession: {
|
|
20
20
|
(): DeepReadonly<Ref<{
|
|
21
|
-
data: App extends Hono<any, infer S_1 extends
|
|
21
|
+
data: App extends Hono<any, infer S_1 extends hono44.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
22
22
|
success: true;
|
|
23
23
|
})["data"] : never;
|
|
24
24
|
isPending: boolean;
|
|
@@ -26,7 +26,7 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
26
26
|
error: BetterFetchError | null;
|
|
27
27
|
}>>;
|
|
28
28
|
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
29
|
-
data: Ref<App extends Hono<any, infer S_1 extends
|
|
29
|
+
data: Ref<App extends Hono<any, infer S_1 extends hono44.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
30
30
|
success: true;
|
|
31
31
|
})["data"] : never>;
|
|
32
32
|
isPending: false;
|
|
@@ -38,18 +38,18 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
38
38
|
}>;
|
|
39
39
|
};
|
|
40
40
|
$Infer: {
|
|
41
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
41
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono44.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
42
42
|
success: true;
|
|
43
43
|
})["data"] : never>;
|
|
44
44
|
};
|
|
45
|
-
$fetch:
|
|
46
|
-
plugins: (
|
|
45
|
+
$fetch: _better_fetch_fetch29.BetterFetch<{
|
|
46
|
+
plugins: (_better_fetch_fetch29.BetterFetchPlugin | {
|
|
47
47
|
id: string;
|
|
48
48
|
name: string;
|
|
49
49
|
hooks: {};
|
|
50
50
|
})[];
|
|
51
51
|
method: string;
|
|
52
|
-
output?:
|
|
52
|
+
output?: _better_fetch_fetch29.StandardSchemaV1 | typeof Blob | typeof File;
|
|
53
53
|
query?: any;
|
|
54
54
|
baseURL: string;
|
|
55
55
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -83,39 +83,39 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
83
83
|
referrer?: string;
|
|
84
84
|
referrerPolicy?: ReferrerPolicy;
|
|
85
85
|
signal?: AbortSignal | null;
|
|
86
|
-
onRetry?: (response:
|
|
86
|
+
onRetry?: (response: _better_fetch_fetch29.ResponseContext) => Promise<void> | void;
|
|
87
87
|
hookOptions?: {
|
|
88
88
|
cloneResponse?: boolean;
|
|
89
89
|
};
|
|
90
90
|
timeout?: number;
|
|
91
91
|
duplex?: "full" | "half";
|
|
92
92
|
jsonParser: (text: string) => Promise<any> | any;
|
|
93
|
-
retry?:
|
|
93
|
+
retry?: _better_fetch_fetch29.RetryOptions;
|
|
94
94
|
retryAttempt?: number;
|
|
95
|
-
errorSchema?:
|
|
95
|
+
errorSchema?: _better_fetch_fetch29.StandardSchemaV1;
|
|
96
96
|
disableValidation?: boolean;
|
|
97
|
-
defaultOutput?:
|
|
98
|
-
defaultError?:
|
|
97
|
+
defaultOutput?: _better_fetch_fetch29.StandardSchemaV1;
|
|
98
|
+
defaultError?: _better_fetch_fetch29.StandardSchemaV1;
|
|
99
99
|
catchAllError?: boolean;
|
|
100
|
-
schema?:
|
|
100
|
+
schema?: _better_fetch_fetch29.Schema;
|
|
101
101
|
customFetchImpl: any;
|
|
102
|
-
}, unknown, unknown,
|
|
102
|
+
}, unknown, unknown, _better_fetch_fetch29.Schema>;
|
|
103
103
|
$store: {
|
|
104
|
-
notify: (signal?:
|
|
105
|
-
listen: (signal:
|
|
104
|
+
notify: (signal?: _faire_auth_core_types37.LiteralStringUnion<"$sessionSignal">) => void;
|
|
105
|
+
listen: (signal: _faire_auth_core_types37.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
106
106
|
atoms: {
|
|
107
|
-
session:
|
|
107
|
+
session: nanostores5.PreinitializedWritableAtom<{
|
|
108
108
|
data: {
|
|
109
|
-
user:
|
|
110
|
-
session:
|
|
109
|
+
user: _faire_auth_core_db3.User;
|
|
110
|
+
session: _faire_auth_core_db3.Session;
|
|
111
111
|
} | null;
|
|
112
112
|
error: BetterFetchError | null;
|
|
113
113
|
isPending: boolean;
|
|
114
114
|
isRefetching: boolean;
|
|
115
115
|
refetch: () => void;
|
|
116
116
|
}> & object;
|
|
117
|
-
$sessionSignal:
|
|
118
|
-
} & Record<string,
|
|
117
|
+
$sessionSignal: nanostores5.PreinitializedWritableAtom<boolean> & object;
|
|
118
|
+
} & Record<string, nanostores5.WritableAtom<any>>;
|
|
119
119
|
};
|
|
120
120
|
$ERROR_CODES: Prettify<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
121
121
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-
|
|
1
|
+
import { $ as Client, B as DefaultApp, dt as IsSignal, et as ClientOptions, it as InferActions, nt as FaireAuthClientPlugin, st as InferErrorCodes } from "../../index-DxXFCG2_.mjs";
|
|
2
2
|
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { BASE_ERROR_CODES } from "@faire-auth/core/error";
|
|
4
|
-
import * as
|
|
4
|
+
import * as hono38 from "hono";
|
|
5
5
|
import { Hono } from "hono";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
6
|
+
import * as _faire_auth_core_db0 from "@faire-auth/core/db";
|
|
7
|
+
import * as _better_fetch_fetch9 from "@better-fetch/fetch";
|
|
8
8
|
import { BetterFetchError } from "@better-fetch/fetch";
|
|
9
|
-
import * as
|
|
9
|
+
import * as nanostores0 from "nanostores";
|
|
10
10
|
import { DeepReadonly, Ref } from "vue";
|
|
11
|
-
import * as
|
|
11
|
+
import * as _faire_auth_core_types33 from "@faire-auth/core/types";
|
|
12
12
|
import { AnyHono, Prettify, UnionToIntersection } from "@faire-auth/core/types";
|
|
13
13
|
export * from "@better-fetch/fetch";
|
|
14
14
|
export * from "nanostores";
|
|
15
15
|
|
|
16
16
|
//#region src/client/vue/index.d.ts
|
|
17
17
|
type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends FaireAuthClientPlugin ? Plugin["getAtoms"] extends ((fetch: any) => infer Atoms) ? Atoms extends Record<string, any> ? { [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => DeepReadonly<Ref<ReturnType<Atoms[key]["get"]>>> } : {} : {} : {} : {};
|
|
18
|
-
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends
|
|
18
|
+
declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option extends ClientOptions>(options: Option) => UnionToIntersection<InferResolvedHooks<Option>> & (App extends Hono<any, infer S extends hono38.Schema, infer P extends string> ? Client<S, P, Option> : never) & InferActions<Option> & {
|
|
19
19
|
useSession: {
|
|
20
20
|
(): DeepReadonly<Ref<{
|
|
21
|
-
data: App extends Hono<any, infer S_1 extends
|
|
21
|
+
data: App extends Hono<any, infer S_1 extends hono38.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
22
22
|
success: true;
|
|
23
23
|
})["data"] : never;
|
|
24
24
|
isPending: boolean;
|
|
@@ -26,7 +26,7 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
26
26
|
error: BetterFetchError | null;
|
|
27
27
|
}>>;
|
|
28
28
|
<F extends (...args: any) => any>(useFetch: F): Promise<{
|
|
29
|
-
data: Ref<App extends Hono<any, infer S_1 extends
|
|
29
|
+
data: Ref<App extends Hono<any, infer S_1 extends hono38.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
30
30
|
success: true;
|
|
31
31
|
})["data"] : never>;
|
|
32
32
|
isPending: false;
|
|
@@ -38,18 +38,18 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
38
38
|
}>;
|
|
39
39
|
};
|
|
40
40
|
$Infer: {
|
|
41
|
-
Session: NonNullable<App extends Hono<any, infer S_1 extends
|
|
41
|
+
Session: NonNullable<App extends Hono<any, infer S_1 extends hono38.Schema, infer P_1 extends string> ? (S_1[`${P_1}/get-session`]["$get"]["output"] & {
|
|
42
42
|
success: true;
|
|
43
43
|
})["data"] : never>;
|
|
44
44
|
};
|
|
45
|
-
$fetch:
|
|
46
|
-
plugins: (
|
|
45
|
+
$fetch: _better_fetch_fetch9.BetterFetch<{
|
|
46
|
+
plugins: (_better_fetch_fetch9.BetterFetchPlugin | {
|
|
47
47
|
id: string;
|
|
48
48
|
name: string;
|
|
49
49
|
hooks: {};
|
|
50
50
|
})[];
|
|
51
51
|
method: string;
|
|
52
|
-
output?:
|
|
52
|
+
output?: _better_fetch_fetch9.StandardSchemaV1 | typeof Blob | typeof File;
|
|
53
53
|
query?: any;
|
|
54
54
|
baseURL: string;
|
|
55
55
|
headers?: HeadersInit & (HeadersInit | {
|
|
@@ -83,39 +83,39 @@ declare const createAuthClient: <App extends AnyHono = DefaultApp>() => <Option
|
|
|
83
83
|
referrer?: string;
|
|
84
84
|
referrerPolicy?: ReferrerPolicy;
|
|
85
85
|
signal?: AbortSignal | null;
|
|
86
|
-
onRetry?: (response:
|
|
86
|
+
onRetry?: (response: _better_fetch_fetch9.ResponseContext) => Promise<void> | void;
|
|
87
87
|
hookOptions?: {
|
|
88
88
|
cloneResponse?: boolean;
|
|
89
89
|
};
|
|
90
90
|
timeout?: number;
|
|
91
91
|
duplex?: "full" | "half";
|
|
92
92
|
jsonParser: (text: string) => Promise<any> | any;
|
|
93
|
-
retry?:
|
|
93
|
+
retry?: _better_fetch_fetch9.RetryOptions;
|
|
94
94
|
retryAttempt?: number;
|
|
95
|
-
errorSchema?:
|
|
95
|
+
errorSchema?: _better_fetch_fetch9.StandardSchemaV1;
|
|
96
96
|
disableValidation?: boolean;
|
|
97
|
-
defaultOutput?:
|
|
98
|
-
defaultError?:
|
|
97
|
+
defaultOutput?: _better_fetch_fetch9.StandardSchemaV1;
|
|
98
|
+
defaultError?: _better_fetch_fetch9.StandardSchemaV1;
|
|
99
99
|
catchAllError?: boolean;
|
|
100
|
-
schema?:
|
|
100
|
+
schema?: _better_fetch_fetch9.Schema;
|
|
101
101
|
customFetchImpl: any;
|
|
102
|
-
}, unknown, unknown,
|
|
102
|
+
}, unknown, unknown, _better_fetch_fetch9.Schema>;
|
|
103
103
|
$store: {
|
|
104
|
-
notify: (signal?:
|
|
105
|
-
listen: (signal:
|
|
104
|
+
notify: (signal?: _faire_auth_core_types33.LiteralStringUnion<"$sessionSignal">) => void;
|
|
105
|
+
listen: (signal: _faire_auth_core_types33.LiteralStringUnion<"$sessionSignal">, listener: (value: boolean, oldValue?: boolean | undefined) => void) => void;
|
|
106
106
|
atoms: {
|
|
107
|
-
session:
|
|
107
|
+
session: nanostores0.PreinitializedWritableAtom<{
|
|
108
108
|
data: {
|
|
109
|
-
user:
|
|
110
|
-
session:
|
|
109
|
+
user: _faire_auth_core_db0.User;
|
|
110
|
+
session: _faire_auth_core_db0.Session;
|
|
111
111
|
} | null;
|
|
112
112
|
error: BetterFetchError | null;
|
|
113
113
|
isPending: boolean;
|
|
114
114
|
isRefetching: boolean;
|
|
115
115
|
refetch: () => void;
|
|
116
116
|
}> & object;
|
|
117
|
-
$sessionSignal:
|
|
118
|
-
} & Record<string,
|
|
117
|
+
$sessionSignal: nanostores0.PreinitializedWritableAtom<boolean> & object;
|
|
118
|
+
} & Record<string, nanostores0.WritableAtom<any>>;
|
|
119
119
|
};
|
|
120
120
|
$ERROR_CODES: Prettify<InferErrorCodes<Option> & typeof BASE_ERROR_CODES>;
|
|
121
121
|
};
|
package/dist/crypto/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ContextVars } from "../hono-DOM31WQz.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _faire_auth_core_types0 from "@faire-auth/core/types";
|
|
3
3
|
import { Context } from "hono";
|
|
4
4
|
export * from "@faire-auth/core/crypto";
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ declare const checkPassword: <T extends object>(userId: string, ctx: Context<Con
|
|
|
14
14
|
password?: string;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
}>) => Promise<true |
|
|
17
|
+
}>) => Promise<true | _faire_auth_core_types0.JSONRespondReturn<{
|
|
18
18
|
success: false;
|
|
19
19
|
message: string;
|
|
20
20
|
}, 400>>;
|
package/dist/crypto/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ContextVars } from "../hono-D0VqxVy1.mjs";
|
|
2
2
|
import { Context } from "hono";
|
|
3
|
-
import * as
|
|
3
|
+
import * as _faire_auth_core_types29 from "@faire-auth/core/types";
|
|
4
4
|
export * from "@faire-auth/core/crypto";
|
|
5
5
|
|
|
6
6
|
//#region src/crypto/index.d.ts
|
|
@@ -14,7 +14,7 @@ declare const checkPassword: <T extends object>(userId: string, ctx: Context<Con
|
|
|
14
14
|
password?: string;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
17
|
-
}>) => Promise<true |
|
|
17
|
+
}>) => Promise<true | _faire_auth_core_types29.JSONRespondReturn<{
|
|
18
18
|
success: false;
|
|
19
19
|
message: string;
|
|
20
20
|
}, 400>>;
|
package/dist/db/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as PluginFieldAttribute, At as mergeSchema, Bt as getAuthTables, Dt as getAdapter, Et as convertToDB, Ft as parseSessionInput, Gt as FieldAttributeToObject, Ht as getMigrations, It as parseSessionOutput, Jt as InferFieldsFromPlugins, Kt as InferAdditionalFieldsFromPluginOptions, Lt as parseUserInput, Mt as parseAccountOutput, Nt as parseAdditionalUserInput, Ot as FieldAttributeToSchema, Pt as parseInputData, Qt as InferValueType, Rt as parseUserOutput, Tt as convertFromDB, Ut as matchType, Vt as getSchema, Xt as InferFieldsInputClient, Yt as InferFieldsInput, Zt as InferFieldsOutput, en as createFieldAttribute, jt as parseAccountInput, kt as toZodSchema, qt as InferFieldsFromOptions, wt as getWithHooks, zt as createInternalAdapter } from "../index-
|
|
1
|
+
import { $t as PluginFieldAttribute, At as mergeSchema, Bt as getAuthTables, Dt as getAdapter, Et as convertToDB, Ft as parseSessionInput, Gt as FieldAttributeToObject, Ht as getMigrations, It as parseSessionOutput, Jt as InferFieldsFromPlugins, Kt as InferAdditionalFieldsFromPluginOptions, Lt as parseUserInput, Mt as parseAccountOutput, Nt as parseAdditionalUserInput, Ot as FieldAttributeToSchema, Pt as parseInputData, Qt as InferValueType, Rt as parseUserOutput, Tt as convertFromDB, Ut as matchType, Vt as getSchema, Xt as InferFieldsInputClient, Yt as InferFieldsInput, Zt as InferFieldsOutput, en as createFieldAttribute, jt as parseAccountInput, kt as toZodSchema, qt as InferFieldsFromOptions, wt as getWithHooks, zt as createInternalAdapter } from "../index-Boa0SV4h.cjs";
|
|
2
2
|
import "../hono-DOM31WQz.cjs";
|
|
3
3
|
export * from "@faire-auth/core/db";
|
|
4
4
|
export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as PluginFieldAttribute, At as mergeSchema, Bt as getAuthTables, Dt as getAdapter, Et as convertToDB, Ft as parseSessionInput, Gt as FieldAttributeToObject, Ht as getMigrations, It as parseSessionOutput, Jt as InferFieldsFromPlugins, Kt as InferAdditionalFieldsFromPluginOptions, Lt as parseUserInput, Mt as parseAccountOutput, Nt as parseAdditionalUserInput, Ot as FieldAttributeToSchema, Pt as parseInputData, Qt as InferValueType, Rt as parseUserOutput, Tt as convertFromDB, Ut as matchType, Vt as getSchema, Xt as InferFieldsInputClient, Yt as InferFieldsInput, Zt as InferFieldsOutput, en as createFieldAttribute, jt as parseAccountInput, kt as toZodSchema, qt as InferFieldsFromOptions, wt as getWithHooks, zt as createInternalAdapter } from "../index-
|
|
1
|
+
import { $t as PluginFieldAttribute, At as mergeSchema, Bt as getAuthTables, Dt as getAdapter, Et as convertToDB, Ft as parseSessionInput, Gt as FieldAttributeToObject, Ht as getMigrations, It as parseSessionOutput, Jt as InferFieldsFromPlugins, Kt as InferAdditionalFieldsFromPluginOptions, Lt as parseUserInput, Mt as parseAccountOutput, Nt as parseAdditionalUserInput, Ot as FieldAttributeToSchema, Pt as parseInputData, Qt as InferValueType, Rt as parseUserOutput, Tt as convertFromDB, Ut as matchType, Vt as getSchema, Xt as InferFieldsInputClient, Yt as InferFieldsInput, Zt as InferFieldsOutput, en as createFieldAttribute, jt as parseAccountInput, kt as toZodSchema, qt as InferFieldsFromOptions, wt as getWithHooks, zt as createInternalAdapter } from "../index-DxXFCG2_.mjs";
|
|
2
2
|
import "../hono-D0VqxVy1.mjs";
|
|
3
3
|
export * from "@faire-auth/core/db";
|
|
4
4
|
export { FieldAttributeToObject, FieldAttributeToSchema, InferAdditionalFieldsFromPluginOptions, InferFieldsFromOptions, InferFieldsFromPlugins, InferFieldsInput, InferFieldsInputClient, InferFieldsOutput, InferValueType, PluginFieldAttribute, convertFromDB, convertToDB, createFieldAttribute, createInternalAdapter, getAdapter, getAuthTables, getMigrations, getSchema, getWithHooks, matchType, mergeSchema, parseAccountInput, parseAccountOutput, parseAdditionalUserInput, parseInputData, parseSessionInput, parseSessionOutput, parseUserInput, parseUserOutput, toZodSchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as ContextVars } from "./hono-D0VqxVy1.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as hono51 from "hono";
|
|
3
|
+
import * as _faire_auth_core_types41 from "@faire-auth/core/types";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/bearer/index.d.ts
|
|
6
6
|
interface BearerOptions {
|
|
@@ -20,12 +20,12 @@ declare const bearer: (options?: BearerOptions) => {
|
|
|
20
20
|
id: "bearer";
|
|
21
21
|
hooks: {
|
|
22
22
|
before: {
|
|
23
|
-
matcher: (ctx:
|
|
24
|
-
handler: (_opts:
|
|
23
|
+
matcher: (ctx: hono51.Context<ContextVars<any>, any, {}>) => boolean;
|
|
24
|
+
handler: (_opts: _faire_auth_core_types41.FaireAuthOptions<any>) => (ctx: hono51.Context<ContextVars<object>, string, {}>) => Promise<void>;
|
|
25
25
|
}[];
|
|
26
26
|
after: {
|
|
27
|
-
matcher: (_ctx:
|
|
28
|
-
handler: (_opts:
|
|
27
|
+
matcher: (_ctx: hono51.Context<ContextVars<any>, any, {}>) => true;
|
|
28
|
+
handler: (_opts: _faire_auth_core_types41.FaireAuthOptions<any>) => (ctx: hono51.Context<ContextVars<object>, string, {}>) => Promise<void>;
|
|
29
29
|
}[];
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { tn as AuthEndpoint, vt as InferOptionSchema } from "./index-
|
|
1
|
+
import { tn as AuthEndpoint, vt as InferOptionSchema } from "./index-DxXFCG2_.mjs";
|
|
2
2
|
import { t as ContextVars } from "./hono-D0VqxVy1.mjs";
|
|
3
3
|
import * as hono55 from "hono";
|
|
4
4
|
import * as z$1 from "zod";
|