@rolder/kit 3.0.0-alpha.103 → 3.0.0-alpha.105

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,5 +1,5 @@
1
1
  import { type JwtOptions } from 'better-auth/plugins';
2
- export declare const defaultServerPluginOptions: {
2
+ export declare const defaultAuthServerPluginOptions: {
3
3
  admin: {
4
4
  bannedUserMessage: string;
5
5
  };
@@ -2,7 +2,7 @@ import { admin, jwt, username } from "better-auth/plugins";
2
2
  import { tanstackStartCookies } from "better-auth/tanstack-start";
3
3
  import { surrealDbAdapter } from "./surrealDbAdapter/index.js";
4
4
  const baseUrl = "/";
5
- const defaultServerPluginOptions = {
5
+ const defaultAuthServerPluginOptions = {
6
6
  admin: {
7
7
  bannedUserMessage: 'Доступ к приложению заблокирован. Обратитесь к администратору.'
8
8
  },
@@ -41,10 +41,10 @@ const defaultAuthServerConfig = {
41
41
  enabled: true
42
42
  },
43
43
  plugins: [
44
- admin(defaultServerPluginOptions.admin),
44
+ admin(defaultAuthServerPluginOptions.admin),
45
45
  username(),
46
- jwt(defaultServerPluginOptions.jwt),
46
+ jwt(defaultAuthServerPluginOptions.jwt),
47
47
  tanstackStartCookies()
48
48
  ]
49
49
  };
50
- export { defaultAuthServerConfig, defaultServerPluginOptions };
50
+ export { defaultAuthServerConfig, defaultAuthServerPluginOptions };
@@ -1,8 +1,5 @@
1
- export type * from 'better-auth/client/plugins';
2
1
  export * from 'better-auth/client/plugins';
3
- export type * from 'better-auth/minimal';
4
2
  export { betterAuth as betterAuthServer } from 'better-auth/minimal';
5
- export type * from 'better-auth/plugins';
6
3
  export * from 'better-auth/plugins';
7
4
  export * from 'better-auth/plugins/admin/access';
8
5
  export * from 'better-auth/react';
@@ -10,3 +7,4 @@ export { tanstackStartCookies } from 'better-auth/tanstack-start';
10
7
  export * from './defaultAuthServerConfig';
11
8
  export * from './getDBSession';
12
9
  export * from './getSessionUser';
10
+ export * from './types';
@@ -7,4 +7,5 @@ export * from "better-auth/react";
7
7
  export * from "./defaultAuthServerConfig.js";
8
8
  export * from "./getDBSession.js";
9
9
  export * from "./getSessionUser.js";
10
+ export * from "./types.js";
10
11
  export { betterAuth as betterAuthServer, tanstackStartCookies };
@@ -0,0 +1,8 @@
1
+ export type * from 'better-auth/client/plugins';
2
+ export type * from 'better-auth/minimal';
3
+ export type * from 'better-auth/plugins';
4
+ export type InferUserWithRoles<TInferredUser extends {
5
+ role?: string | null;
6
+ }, TRoles extends Record<string, unknown>> = Omit<TInferredUser, 'role'> & {
7
+ role: keyof TRoles;
8
+ };
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rolder/kit",
3
- "version": "3.0.0-alpha.103",
3
+ "version": "3.0.0-alpha.105",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./ai": {