deesse 0.1.4 → 0.1.5
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/index.d.ts +20 -19
- package/dist/auth/index.js +4 -4
- package/dist/config/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Pool } from "pg";
|
|
2
|
-
|
|
2
|
+
import { Config } from "../config/types";
|
|
3
|
+
export declare const auth: (config: Config) => import("better-auth").Auth<{
|
|
3
4
|
secret: string | undefined;
|
|
4
|
-
appName?: string | undefined
|
|
5
|
-
baseURL?: string | undefined
|
|
6
|
-
basePath?: string | undefined
|
|
5
|
+
appName?: string | undefined;
|
|
6
|
+
baseURL?: string | undefined;
|
|
7
|
+
basePath?: string | undefined;
|
|
7
8
|
secondaryStorage?: import("better-auth").SecondaryStorage | undefined;
|
|
8
9
|
emailVerification?: {
|
|
9
10
|
sendVerificationEmail?: (data: {
|
|
@@ -17,7 +18,7 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
17
18
|
expiresIn?: number;
|
|
18
19
|
onEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
19
20
|
afterEmailVerification?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
20
|
-
} | undefined
|
|
21
|
+
} | undefined;
|
|
21
22
|
emailAndPassword?: {
|
|
22
23
|
enabled: boolean;
|
|
23
24
|
disableSignUp?: boolean;
|
|
@@ -42,9 +43,9 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
42
43
|
};
|
|
43
44
|
autoSignIn?: boolean;
|
|
44
45
|
revokeSessionsOnPasswordReset?: boolean;
|
|
45
|
-
} | undefined
|
|
46
|
+
} | undefined;
|
|
46
47
|
socialProviders?: import("@better-auth/core/dist/index-CVLGS-cz.mjs").w | undefined;
|
|
47
|
-
plugins?: ([] | import("better-auth").BetterAuthPlugin[]) | undefined
|
|
48
|
+
plugins?: ([] | import("better-auth").BetterAuthPlugin[]) | undefined;
|
|
48
49
|
user?: {
|
|
49
50
|
modelName?: string;
|
|
50
51
|
fields?: Partial<Record<"email" | "createdAt" | "updatedAt" | "emailVerified" | "name" | "image", string>>;
|
|
@@ -78,7 +79,7 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
78
79
|
afterDelete?: (user: import("better-auth").User, request?: Request) => Promise<void>;
|
|
79
80
|
deleteTokenExpiresIn?: number;
|
|
80
81
|
};
|
|
81
|
-
} | undefined
|
|
82
|
+
} | undefined;
|
|
82
83
|
session?: {
|
|
83
84
|
modelName?: string;
|
|
84
85
|
fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "expiresAt" | "token" | "ipAddress" | "userAgent", string>>;
|
|
@@ -100,7 +101,7 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
100
101
|
version?: string | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => string) | ((session: import("better-auth").Session & Record<string, any>, user: import("better-auth").User & Record<string, any>) => Promise<string>);
|
|
101
102
|
};
|
|
102
103
|
freshAge?: number;
|
|
103
|
-
} | undefined
|
|
104
|
+
} | undefined;
|
|
104
105
|
account?: {
|
|
105
106
|
modelName?: string;
|
|
106
107
|
fields?: Partial<Record<"createdAt" | "updatedAt" | "userId" | "refreshToken" | "idToken" | "accessToken" | "password" | "providerId" | "accountId" | "accessTokenExpiresAt" | "refreshTokenExpiresAt" | "scope", string>>;
|
|
@@ -119,13 +120,13 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
119
120
|
skipStateCookieCheck?: boolean;
|
|
120
121
|
storeStateStrategy?: "database" | "cookie";
|
|
121
122
|
storeAccountCookie?: boolean;
|
|
122
|
-
} | undefined
|
|
123
|
+
} | undefined;
|
|
123
124
|
verification?: {
|
|
124
125
|
modelName?: string;
|
|
125
126
|
fields?: Partial<Record<"createdAt" | "updatedAt" | "expiresAt" | "value" | "identifier", string>>;
|
|
126
127
|
disableCleanup?: boolean;
|
|
127
|
-
} | undefined
|
|
128
|
-
trustedOrigins?: (string[] | ((request: Request) => string[] | Promise<string[]>)) | undefined
|
|
128
|
+
} | undefined;
|
|
129
|
+
trustedOrigins?: (string[] | ((request: Request) => string[] | Promise<string[]>)) | undefined;
|
|
129
130
|
rateLimit?: import("better-auth").BetterAuthRateLimitOptions | undefined;
|
|
130
131
|
advanced?: import("better-auth").BetterAuthAdvancedOptions | undefined;
|
|
131
132
|
logger?: import("better-auth").Logger | undefined;
|
|
@@ -282,7 +283,7 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
282
283
|
after?: (verification: import("better-auth").Verification & Record<string, unknown>, context?: import("better-auth").GenericEndpointContext) => Promise<void>;
|
|
283
284
|
};
|
|
284
285
|
};
|
|
285
|
-
} | undefined
|
|
286
|
+
} | undefined;
|
|
286
287
|
onAPIError?: {
|
|
287
288
|
throw?: boolean;
|
|
288
289
|
onError?: (error: unknown, ctx: import("better-auth").AuthContext) => void | Promise<void>;
|
|
@@ -319,22 +320,22 @@ export declare const auth: import("better-auth").Auth<{
|
|
|
319
320
|
disableCornerDecorations?: boolean;
|
|
320
321
|
disableBackgroundGrid?: boolean;
|
|
321
322
|
};
|
|
322
|
-
} | undefined
|
|
323
|
+
} | undefined;
|
|
323
324
|
hooks?: {
|
|
324
325
|
before?: import("@better-auth/core/api").AuthMiddleware;
|
|
325
326
|
after?: import("@better-auth/core/api").AuthMiddleware;
|
|
326
|
-
} | undefined
|
|
327
|
-
disabledPaths?: string[] | undefined
|
|
327
|
+
} | undefined;
|
|
328
|
+
disabledPaths?: string[] | undefined;
|
|
328
329
|
telemetry?: {
|
|
329
330
|
enabled?: boolean;
|
|
330
331
|
debug?: boolean;
|
|
331
|
-
} | undefined
|
|
332
|
+
} | undefined;
|
|
332
333
|
experimental?: {
|
|
333
334
|
joins?: boolean;
|
|
334
|
-
}
|
|
335
|
+
};
|
|
335
336
|
database: Pool;
|
|
336
337
|
}>;
|
|
337
|
-
export declare const authClient: {
|
|
338
|
+
export declare const authClient: () => {
|
|
338
339
|
signIn: {
|
|
339
340
|
social: <FetchOptions extends import("better-auth").ClientFetchOption<Partial<{
|
|
340
341
|
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 & {});
|
package/dist/auth/index.js
CHANGED
|
@@ -18,15 +18,15 @@ exports.authClient = exports.auth = void 0;
|
|
|
18
18
|
const better_auth_1 = require("better-auth");
|
|
19
19
|
const react_1 = require("better-auth/react");
|
|
20
20
|
const pg_1 = require("pg");
|
|
21
|
-
const
|
|
22
|
-
const config = (0, config_1.getConfig)();
|
|
23
|
-
exports.auth = (0, better_auth_1.betterAuth)({
|
|
21
|
+
const auth = (config) => (0, better_auth_1.betterAuth)({
|
|
24
22
|
database: new pg_1.Pool({
|
|
25
23
|
connectionString: config.databaseUrl,
|
|
26
24
|
}),
|
|
27
25
|
...config.auth,
|
|
28
26
|
secret: process.env.DEESSE_SECRET,
|
|
29
27
|
});
|
|
30
|
-
exports.
|
|
28
|
+
exports.auth = auth;
|
|
29
|
+
const authClient = () => (0, react_1.createAuthClient)();
|
|
30
|
+
exports.authClient = authClient;
|
|
31
31
|
__exportStar(require("better-auth"), exports);
|
|
32
32
|
__exportStar(require("better-auth/next-js"), exports);
|
package/dist/config/types.d.ts
CHANGED