deesse 0.1.10 → 0.1.12
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/auth/react/index.d.ts +166 -166
- package/dist/auth/react/index.js +2 -3
- package/dist/auth/server.d.ts +5 -6
- package/dist/auth/server.js +2 -4
- package/dist/config/define.d.ts +2 -3
- package/dist/config/define.js +6 -11
- package/dist/config/types.d.ts +7 -2
- package/package.json +2 -1
|
@@ -1,63 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
signIn: {
|
|
3
|
-
social: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
4
|
-
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
5
|
-
callbackURL?: string | undefined;
|
|
6
|
-
newUserCallbackURL?: string | undefined;
|
|
7
|
-
errorCallbackURL?: string | undefined;
|
|
8
|
-
disableRedirect?: boolean | undefined;
|
|
9
|
-
idToken?: {
|
|
10
|
-
token: string;
|
|
11
|
-
nonce?: string | undefined;
|
|
12
|
-
accessToken?: string | undefined;
|
|
13
|
-
refreshToken?: string | undefined;
|
|
14
|
-
expiresAt?: number | undefined;
|
|
15
|
-
} | undefined;
|
|
16
|
-
scopes?: string[] | undefined;
|
|
17
|
-
requestSignUp?: boolean | undefined;
|
|
18
|
-
loginHint?: string | undefined;
|
|
19
|
-
additionalData?: Record<string, any> | undefined;
|
|
20
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
21
|
-
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
22
|
-
callbackURL?: string | undefined;
|
|
23
|
-
newUserCallbackURL?: string | undefined;
|
|
24
|
-
errorCallbackURL?: string | undefined;
|
|
25
|
-
disableRedirect?: boolean | undefined;
|
|
26
|
-
idToken?: {
|
|
27
|
-
token: string;
|
|
28
|
-
nonce?: string | undefined;
|
|
29
|
-
accessToken?: string | undefined;
|
|
30
|
-
refreshToken?: string | undefined;
|
|
31
|
-
expiresAt?: number | undefined;
|
|
32
|
-
} | undefined;
|
|
33
|
-
scopes?: string[] | undefined;
|
|
34
|
-
requestSignUp?: boolean | undefined;
|
|
35
|
-
loginHint?: string | undefined;
|
|
36
|
-
additionalData?: Record<string, any> | undefined;
|
|
37
|
-
} & {
|
|
38
|
-
fetchOptions?: FetchOptions | undefined;
|
|
39
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
|
40
|
-
redirect: boolean;
|
|
41
|
-
url: string;
|
|
42
|
-
} | {
|
|
43
|
-
redirect: boolean;
|
|
44
|
-
token: string;
|
|
45
|
-
url: undefined;
|
|
46
|
-
user: {
|
|
47
|
-
id: string;
|
|
48
|
-
createdAt: Date;
|
|
49
|
-
updatedAt: Date;
|
|
50
|
-
email: string;
|
|
51
|
-
emailVerified: boolean;
|
|
52
|
-
name: string;
|
|
53
|
-
image?: string | null | undefined | undefined;
|
|
54
|
-
};
|
|
55
|
-
}>, {
|
|
56
|
-
code?: string | undefined;
|
|
57
|
-
message?: string | undefined;
|
|
58
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
59
|
-
};
|
|
60
|
-
} & {
|
|
1
|
+
export declare const authClient: {
|
|
61
2
|
signOut: <FetchOptions extends import("better-auth/*").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
|
|
62
3
|
query?: Record<string, any> | undefined;
|
|
63
4
|
fetchOptions?: FetchOptions | undefined;
|
|
@@ -67,81 +8,6 @@ export declare const createAuthClient: () => {
|
|
|
67
8
|
code?: string | undefined;
|
|
68
9
|
message?: string | undefined;
|
|
69
10
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
70
|
-
} & {
|
|
71
|
-
signUp: {
|
|
72
|
-
email: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
73
|
-
name: string;
|
|
74
|
-
email: string;
|
|
75
|
-
password: string;
|
|
76
|
-
image?: string | undefined;
|
|
77
|
-
callbackURL?: string | undefined;
|
|
78
|
-
rememberMe?: boolean | undefined;
|
|
79
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
80
|
-
email: string;
|
|
81
|
-
name: string;
|
|
82
|
-
password: string;
|
|
83
|
-
image?: string | undefined;
|
|
84
|
-
callbackURL?: string | undefined;
|
|
85
|
-
fetchOptions?: FetchOptions | undefined;
|
|
86
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
|
87
|
-
token: null;
|
|
88
|
-
user: {
|
|
89
|
-
id: string;
|
|
90
|
-
createdAt: Date;
|
|
91
|
-
updatedAt: Date;
|
|
92
|
-
email: string;
|
|
93
|
-
emailVerified: boolean;
|
|
94
|
-
name: string;
|
|
95
|
-
image?: string | null | undefined | undefined;
|
|
96
|
-
};
|
|
97
|
-
} | {
|
|
98
|
-
token: string;
|
|
99
|
-
user: {
|
|
100
|
-
id: string;
|
|
101
|
-
createdAt: Date;
|
|
102
|
-
updatedAt: Date;
|
|
103
|
-
email: string;
|
|
104
|
-
emailVerified: boolean;
|
|
105
|
-
name: string;
|
|
106
|
-
image?: string | null | undefined | undefined;
|
|
107
|
-
};
|
|
108
|
-
}>, {
|
|
109
|
-
code?: string | undefined;
|
|
110
|
-
message?: string | undefined;
|
|
111
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
112
|
-
};
|
|
113
|
-
} & {
|
|
114
|
-
signIn: {
|
|
115
|
-
email: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
116
|
-
email: string;
|
|
117
|
-
password: string;
|
|
118
|
-
callbackURL?: string | undefined;
|
|
119
|
-
rememberMe?: boolean | undefined;
|
|
120
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
121
|
-
email: string;
|
|
122
|
-
password: string;
|
|
123
|
-
callbackURL?: string | undefined;
|
|
124
|
-
rememberMe?: boolean | undefined;
|
|
125
|
-
} & {
|
|
126
|
-
fetchOptions?: FetchOptions | undefined;
|
|
127
|
-
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
|
128
|
-
redirect: boolean;
|
|
129
|
-
token: string;
|
|
130
|
-
url?: string | undefined;
|
|
131
|
-
user: {
|
|
132
|
-
id: string;
|
|
133
|
-
createdAt: Date;
|
|
134
|
-
updatedAt: Date;
|
|
135
|
-
email: string;
|
|
136
|
-
emailVerified: boolean;
|
|
137
|
-
name: string;
|
|
138
|
-
image?: string | null | undefined | undefined;
|
|
139
|
-
};
|
|
140
|
-
}, {
|
|
141
|
-
code?: string | undefined;
|
|
142
|
-
message?: string | undefined;
|
|
143
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
144
|
-
};
|
|
145
11
|
} & {
|
|
146
12
|
resetPassword: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
147
13
|
newPassword: string;
|
|
@@ -231,20 +97,6 @@ export declare const createAuthClient: () => {
|
|
|
231
97
|
code?: string | undefined;
|
|
232
98
|
message?: string | undefined;
|
|
233
99
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
234
|
-
} & {
|
|
235
|
-
updateUser: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<Partial<{}> & {
|
|
236
|
-
name?: string | undefined;
|
|
237
|
-
image?: string | undefined;
|
|
238
|
-
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
|
|
239
|
-
image?: (string | null) | undefined;
|
|
240
|
-
name?: string | undefined;
|
|
241
|
-
fetchOptions?: FetchOptions | undefined;
|
|
242
|
-
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
|
243
|
-
status: boolean;
|
|
244
|
-
}, {
|
|
245
|
-
code?: string | undefined;
|
|
246
|
-
message?: string | undefined;
|
|
247
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
248
100
|
} & {
|
|
249
101
|
deleteUser: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
250
102
|
callbackURL?: string | undefined;
|
|
@@ -295,23 +147,6 @@ export declare const createAuthClient: () => {
|
|
|
295
147
|
message?: string | undefined;
|
|
296
148
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
297
149
|
};
|
|
298
|
-
} & {
|
|
299
|
-
listSessions: <FetchOptions extends import("better-auth/*").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
|
|
300
|
-
query?: Record<string, any> | undefined;
|
|
301
|
-
fetchOptions?: FetchOptions | undefined;
|
|
302
|
-
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth/react").Prettify<{
|
|
303
|
-
id: string;
|
|
304
|
-
createdAt: Date;
|
|
305
|
-
updatedAt: Date;
|
|
306
|
-
userId: string;
|
|
307
|
-
expiresAt: Date;
|
|
308
|
-
token: string;
|
|
309
|
-
ipAddress?: string | null | undefined | undefined;
|
|
310
|
-
userAgent?: string | null | undefined | undefined;
|
|
311
|
-
}>[], {
|
|
312
|
-
code?: string | undefined;
|
|
313
|
-
message?: string | undefined;
|
|
314
|
-
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
315
150
|
} & {
|
|
316
151
|
revokeSession: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
317
152
|
token: string;
|
|
@@ -494,6 +329,171 @@ export declare const createAuthClient: () => {
|
|
|
494
329
|
code?: string | undefined;
|
|
495
330
|
message?: string | undefined;
|
|
496
331
|
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
332
|
+
} & {
|
|
333
|
+
signIn: {
|
|
334
|
+
social: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
335
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
336
|
+
callbackURL?: string | undefined;
|
|
337
|
+
newUserCallbackURL?: string | undefined;
|
|
338
|
+
errorCallbackURL?: string | undefined;
|
|
339
|
+
disableRedirect?: boolean | undefined;
|
|
340
|
+
idToken?: {
|
|
341
|
+
token: string;
|
|
342
|
+
nonce?: string | undefined;
|
|
343
|
+
accessToken?: string | undefined;
|
|
344
|
+
refreshToken?: string | undefined;
|
|
345
|
+
expiresAt?: number | undefined;
|
|
346
|
+
} | undefined;
|
|
347
|
+
scopes?: string[] | undefined;
|
|
348
|
+
requestSignUp?: boolean | undefined;
|
|
349
|
+
loginHint?: string | undefined;
|
|
350
|
+
additionalData?: Record<string, any> | undefined;
|
|
351
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
352
|
+
provider: "github" | "apple" | "atlassian" | "cognito" | "discord" | "facebook" | "figma" | "microsoft" | "google" | "huggingface" | "slack" | "spotify" | "twitch" | "twitter" | "dropbox" | "kick" | "linear" | "linkedin" | "gitlab" | "tiktok" | "reddit" | "roblox" | "salesforce" | "vk" | "zoom" | "notion" | "kakao" | "naver" | "line" | "paybin" | "paypal" | "polar" | "vercel" | (string & {});
|
|
353
|
+
callbackURL?: string | undefined;
|
|
354
|
+
newUserCallbackURL?: string | undefined;
|
|
355
|
+
errorCallbackURL?: string | undefined;
|
|
356
|
+
disableRedirect?: boolean | undefined;
|
|
357
|
+
idToken?: {
|
|
358
|
+
token: string;
|
|
359
|
+
nonce?: string | undefined;
|
|
360
|
+
accessToken?: string | undefined;
|
|
361
|
+
refreshToken?: string | undefined;
|
|
362
|
+
expiresAt?: number | undefined;
|
|
363
|
+
} | undefined;
|
|
364
|
+
scopes?: string[] | undefined;
|
|
365
|
+
requestSignUp?: boolean | undefined;
|
|
366
|
+
loginHint?: string | undefined;
|
|
367
|
+
additionalData?: Record<string, any> | undefined;
|
|
368
|
+
} & {
|
|
369
|
+
fetchOptions?: FetchOptions | undefined;
|
|
370
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
|
371
|
+
redirect: boolean;
|
|
372
|
+
url: string;
|
|
373
|
+
} | {
|
|
374
|
+
redirect: boolean;
|
|
375
|
+
token: string;
|
|
376
|
+
url: undefined;
|
|
377
|
+
user: {
|
|
378
|
+
id: string;
|
|
379
|
+
createdAt: Date;
|
|
380
|
+
updatedAt: Date;
|
|
381
|
+
email: string;
|
|
382
|
+
emailVerified: boolean;
|
|
383
|
+
name: string;
|
|
384
|
+
image?: string | null | undefined | undefined;
|
|
385
|
+
};
|
|
386
|
+
}>, {
|
|
387
|
+
code?: string | undefined;
|
|
388
|
+
message?: string | undefined;
|
|
389
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
390
|
+
};
|
|
391
|
+
} & {
|
|
392
|
+
signUp: {
|
|
393
|
+
email: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
394
|
+
name: string;
|
|
395
|
+
email: string;
|
|
396
|
+
password: string;
|
|
397
|
+
image?: string | undefined;
|
|
398
|
+
callbackURL?: string | undefined;
|
|
399
|
+
rememberMe?: boolean | undefined;
|
|
400
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
401
|
+
email: string;
|
|
402
|
+
name: string;
|
|
403
|
+
password: string;
|
|
404
|
+
image?: string | undefined;
|
|
405
|
+
callbackURL?: string | undefined;
|
|
406
|
+
fetchOptions?: FetchOptions | undefined;
|
|
407
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<{
|
|
408
|
+
token: null;
|
|
409
|
+
user: {
|
|
410
|
+
id: string;
|
|
411
|
+
createdAt: Date;
|
|
412
|
+
updatedAt: Date;
|
|
413
|
+
email: string;
|
|
414
|
+
emailVerified: boolean;
|
|
415
|
+
name: string;
|
|
416
|
+
image?: string | null | undefined | undefined;
|
|
417
|
+
};
|
|
418
|
+
} | {
|
|
419
|
+
token: string;
|
|
420
|
+
user: {
|
|
421
|
+
id: string;
|
|
422
|
+
createdAt: Date;
|
|
423
|
+
updatedAt: Date;
|
|
424
|
+
email: string;
|
|
425
|
+
emailVerified: boolean;
|
|
426
|
+
name: string;
|
|
427
|
+
image?: string | null | undefined | undefined;
|
|
428
|
+
};
|
|
429
|
+
}>, {
|
|
430
|
+
code?: string | undefined;
|
|
431
|
+
message?: string | undefined;
|
|
432
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
433
|
+
};
|
|
434
|
+
} & {
|
|
435
|
+
signIn: {
|
|
436
|
+
email: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<{
|
|
437
|
+
email: string;
|
|
438
|
+
password: string;
|
|
439
|
+
callbackURL?: string | undefined;
|
|
440
|
+
rememberMe?: boolean | undefined;
|
|
441
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0: import("better-auth/react").Prettify<{
|
|
442
|
+
email: string;
|
|
443
|
+
password: string;
|
|
444
|
+
callbackURL?: string | undefined;
|
|
445
|
+
rememberMe?: boolean | undefined;
|
|
446
|
+
} & {
|
|
447
|
+
fetchOptions?: FetchOptions | undefined;
|
|
448
|
+
}>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
|
449
|
+
redirect: boolean;
|
|
450
|
+
token: string;
|
|
451
|
+
url?: string | undefined;
|
|
452
|
+
user: {
|
|
453
|
+
id: string;
|
|
454
|
+
createdAt: Date;
|
|
455
|
+
updatedAt: Date;
|
|
456
|
+
email: string;
|
|
457
|
+
emailVerified: boolean;
|
|
458
|
+
name: string;
|
|
459
|
+
image?: string | null | undefined | undefined;
|
|
460
|
+
};
|
|
461
|
+
}, {
|
|
462
|
+
code?: string | undefined;
|
|
463
|
+
message?: string | undefined;
|
|
464
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
465
|
+
};
|
|
466
|
+
} & {
|
|
467
|
+
updateUser: <FetchOptions extends import("better-auth/*").ClientFetchOption<Partial<Partial<{}> & {
|
|
468
|
+
name?: string | undefined;
|
|
469
|
+
image?: string | undefined;
|
|
470
|
+
}> & Record<string, any>, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
|
|
471
|
+
image?: (string | null) | undefined;
|
|
472
|
+
name?: string | undefined;
|
|
473
|
+
fetchOptions?: FetchOptions | undefined;
|
|
474
|
+
} & Partial<{}>> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
|
|
475
|
+
status: boolean;
|
|
476
|
+
}, {
|
|
477
|
+
code?: string | undefined;
|
|
478
|
+
message?: string | undefined;
|
|
479
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
480
|
+
} & {
|
|
481
|
+
listSessions: <FetchOptions extends import("better-auth/*").ClientFetchOption<never, Partial<Record<string, any>> & Record<string, any>, Record<string, any> | undefined>>(data_0?: import("better-auth/react").Prettify<{
|
|
482
|
+
query?: Record<string, any> | undefined;
|
|
483
|
+
fetchOptions?: FetchOptions | undefined;
|
|
484
|
+
}> | undefined, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth/react").Prettify<{
|
|
485
|
+
id: string;
|
|
486
|
+
createdAt: Date;
|
|
487
|
+
updatedAt: Date;
|
|
488
|
+
userId: string;
|
|
489
|
+
expiresAt: Date;
|
|
490
|
+
token: string;
|
|
491
|
+
ipAddress?: string | null | undefined | undefined;
|
|
492
|
+
userAgent?: string | null | undefined | undefined;
|
|
493
|
+
}>[], {
|
|
494
|
+
code?: string | undefined;
|
|
495
|
+
message?: string | undefined;
|
|
496
|
+
}, FetchOptions["throw"] extends true ? true : false>>;
|
|
497
497
|
} & {
|
|
498
498
|
getSession: <FetchOptions extends import("better-auth/*").ClientFetchOption<never, Partial<{
|
|
499
499
|
disableCookieCache?: unknown;
|
package/dist/auth/react/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.authClient = void 0;
|
|
4
4
|
const react_1 = require("better-auth/react");
|
|
5
|
-
|
|
6
|
-
exports.createAuthClient = createAuthClient;
|
|
5
|
+
exports.authClient = (0, react_1.createAuthClient)();
|
package/dist/auth/server.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Pool } from "pg";
|
|
2
1
|
import { Config } from "../config/types";
|
|
3
2
|
export declare const createAuth: (config: Config) => import("better-auth").Auth<{
|
|
4
3
|
secret: string | undefined;
|
|
@@ -48,7 +47,7 @@ export declare const createAuth: (config: Config) => import("better-auth").Auth<
|
|
|
48
47
|
plugins?: ([] | import("better-auth").BetterAuthPlugin[]) | undefined;
|
|
49
48
|
user?: {
|
|
50
49
|
modelName?: string;
|
|
51
|
-
fields?: Partial<Record<"
|
|
50
|
+
fields?: Partial<Record<"name" | "email" | "createdAt" | "updatedAt" | "emailVerified" | "image", string>>;
|
|
52
51
|
additionalFields?: {
|
|
53
52
|
[key: string]: import("better-auth").DBFieldAttribute;
|
|
54
53
|
};
|
|
@@ -82,7 +81,7 @@ export declare const createAuth: (config: Config) => import("better-auth").Auth<
|
|
|
82
81
|
} | undefined;
|
|
83
82
|
session?: {
|
|
84
83
|
modelName?: string;
|
|
85
|
-
fields?: Partial<Record<"
|
|
84
|
+
fields?: Partial<Record<"token" | "expiresAt" | "userId" | "createdAt" | "updatedAt" | "ipAddress" | "userAgent", string>>;
|
|
86
85
|
expiresIn?: number;
|
|
87
86
|
updateAge?: number;
|
|
88
87
|
disableSessionRefresh?: boolean;
|
|
@@ -104,7 +103,7 @@ export declare const createAuth: (config: Config) => import("better-auth").Auth<
|
|
|
104
103
|
} | undefined;
|
|
105
104
|
account?: {
|
|
106
105
|
modelName?: string;
|
|
107
|
-
fields?: Partial<Record<"
|
|
106
|
+
fields?: Partial<Record<"refreshToken" | "idToken" | "accessToken" | "password" | "providerId" | "accountId" | "userId" | "createdAt" | "updatedAt" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope", string>>;
|
|
108
107
|
additionalFields?: {
|
|
109
108
|
[key: string]: import("better-auth").DBFieldAttribute;
|
|
110
109
|
};
|
|
@@ -123,7 +122,7 @@ export declare const createAuth: (config: Config) => import("better-auth").Auth<
|
|
|
123
122
|
} | undefined;
|
|
124
123
|
verification?: {
|
|
125
124
|
modelName?: string;
|
|
126
|
-
fields?: Partial<Record<"
|
|
125
|
+
fields?: Partial<Record<"expiresAt" | "createdAt" | "updatedAt" | "value" | "identifier", string>>;
|
|
127
126
|
disableCleanup?: boolean;
|
|
128
127
|
} | undefined;
|
|
129
128
|
trustedOrigins?: (string[] | ((request: Request) => string[] | Promise<string[]>)) | undefined;
|
|
@@ -333,5 +332,5 @@ export declare const createAuth: (config: Config) => import("better-auth").Auth<
|
|
|
333
332
|
experimental?: {
|
|
334
333
|
joins?: boolean;
|
|
335
334
|
};
|
|
336
|
-
database:
|
|
335
|
+
database: (options: import("better-auth").BetterAuthOptions) => import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
|
|
337
336
|
}>;
|
package/dist/auth/server.js
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createAuth = void 0;
|
|
4
4
|
const better_auth_1 = require("better-auth");
|
|
5
|
-
const
|
|
5
|
+
const drizzle_1 = require("better-auth/adapters/drizzle");
|
|
6
6
|
const createAuth = (config) => (0, better_auth_1.betterAuth)({
|
|
7
|
-
database:
|
|
8
|
-
connectionString: config.databaseUrl,
|
|
9
|
-
}),
|
|
7
|
+
database: (0, drizzle_1.drizzleAdapter)(config.database, { provider: "pg" }),
|
|
10
8
|
...config.auth,
|
|
11
9
|
secret: process.env.DEESSE_SECRET,
|
|
12
10
|
});
|
package/dist/config/define.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import type { Config } from "./types";
|
|
2
|
-
export declare const defineConfig: (config: Config) =>
|
|
3
|
-
export declare const getConfig: () => Config;
|
|
1
|
+
import type { Config, FinalConfig } from "./types";
|
|
2
|
+
export declare const defineConfig: (config: Config) => FinalConfig;
|
package/dist/config/define.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
3
|
+
exports.defineConfig = void 0;
|
|
4
|
+
const auth_1 = require("../auth");
|
|
5
5
|
const defineConfig = (config) => {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
return {
|
|
7
|
+
...config,
|
|
8
|
+
auth: (0, auth_1.createAuth)(config),
|
|
9
|
+
};
|
|
8
10
|
};
|
|
9
11
|
exports.defineConfig = defineConfig;
|
|
10
|
-
const getConfig = () => {
|
|
11
|
-
if (!_config) {
|
|
12
|
-
throw new Error("Config not defined. Call defineConfig() first.");
|
|
13
|
-
}
|
|
14
|
-
return _config;
|
|
15
|
-
};
|
|
16
|
-
exports.getConfig = getConfig;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import { BetterAuthOptions } from "better-auth";
|
|
1
|
+
import { betterAuth, BetterAuthOptions } from "better-auth";
|
|
2
|
+
import { drizzle as createDrizzle } from "drizzle-orm/node-postgres";
|
|
2
3
|
export type Config = {
|
|
3
|
-
|
|
4
|
+
database: ReturnType<typeof createDrizzle>;
|
|
4
5
|
auth?: Omit<BetterAuthOptions, "secret" | "database">;
|
|
5
6
|
};
|
|
7
|
+
export type FinalConfig = Config & {
|
|
8
|
+
auth: ReturnType<typeof betterAuth>;
|
|
9
|
+
database: ReturnType<typeof createDrizzle>;
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "deesse",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "The fullstack web framework",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@vitest/coverage-istanbul": "^4.0.14",
|
|
53
53
|
"@vitest/coverage-v8": "^4.0.13",
|
|
54
54
|
"@vitest/ui": "^4.0.13",
|
|
55
|
+
"drizzle-orm": "^0.45.0",
|
|
55
56
|
"eslint": "^8.0.0",
|
|
56
57
|
"jsdom": "^27.2.0",
|
|
57
58
|
"sinon": "^21.0.0",
|