@rio.js/enterprise 1.4.5 → 1.4.7
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/better-auth-C0OyhbaH.d.mts +11 -0
- package/dist/{better-auth-BPBF8tkn.mjs → better-auth-DcLpU_ff.mjs} +36 -4
- package/dist/better-auth.d.mts +2 -2
- package/dist/better-auth.mjs +2 -2
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +2 -0
- package/dist/{db-CXaQH2-a.d.mts → db-BO4CGoP4.d.mts} +238 -0
- package/dist/{db-Bv5KZYeF.mjs → db-CZhOn-9W.mjs} +1 -1
- package/dist/{db-schema.generated-D2dEC1DO.mjs → db-schema.generated-t7hCTMF5.mjs} +8 -1
- package/dist/db.d.mts +1 -1
- package/dist/db.mjs +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/server.mjs +3 -3
- package/package.json +6 -3
- package/dist/better-auth-DNCc730p.d.mts +0 -10
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { t as Connection } from "./db-BO4CGoP4.mjs";
|
|
2
|
+
import { BetterAuthOptions, BetterAuthPlugin, betterAuth } from "better-auth";
|
|
3
|
+
|
|
4
|
+
//#region src/better-auth.d.ts
|
|
5
|
+
declare function createAuthSystem(options: {
|
|
6
|
+
plugins?: BetterAuthPlugin[];
|
|
7
|
+
db: Connection;
|
|
8
|
+
options?: BetterAuthOptions;
|
|
9
|
+
}): ReturnType<typeof betterAuth>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { createAuthSystem as t };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { $ as teamRoleRelations, A as oauthApplication, B as person, C as memberOrganizationRole, D as memberTeamRoleRelations, E as memberTeamRole, F as objectRelations, G as schemaDefinitionRelations, H as relationship, I as organization$1, J as team, K as session, L as organizationRelations, M as oauthConsent, N as oauthConsentRelations, O as oauthAccessToken, P as object, Q as teamRole, R as organizationRole, S as memberAssetRoleRelations, T as memberRelations, U as relationshipRelations, V as platformRole, W as schemaDefinition, X as teamMemberRelations, Y as teamMember, Z as teamRelations, a as apikey, at as enterpriseSchema, b as member, c as assetRelations, d as assetShare, et as twoFactor$1, f as assetShareLink, g as assetTypeRelations, h as assetType, i as agentRelations, it as verification, j as oauthApplicationRelations, k as oauthAccessTokenRelations, l as assetRole, m as assetShareRelations, n as accountRelations, nt as user, o as apikeyRelations, ot as __export, p as assetShareLinkRelations, q as sessionRelations, r as agent, rt as userRelations, s as asset, t as account, tt as twoFactorRelations, u as assetRoleRelations, v as invitation, w as memberOrganizationRoleRelations, x as memberAssetRole, y as invitationRelations, z as organizationRoleRelations } from "./db-schema.generated-
|
|
1
|
+
import { $ as teamRoleRelations, A as oauthApplication, B as person, C as memberOrganizationRole, D as memberTeamRoleRelations, E as memberTeamRole, F as objectRelations, G as schemaDefinitionRelations, H as relationship, I as organization$1, J as team, K as session, L as organizationRelations, M as oauthConsent, N as oauthConsentRelations, O as oauthAccessToken, P as object, Q as teamRole, R as organizationRole, S as memberAssetRoleRelations, T as memberRelations, U as relationshipRelations, V as platformRole, W as schemaDefinition, X as teamMemberRelations, Y as teamMember, Z as teamRelations, a as apikey, at as enterpriseSchema, b as member, c as assetRelations, d as assetShare, et as twoFactor$1, f as assetShareLink, g as assetTypeRelations, h as assetType, i as agentRelations, it as verification, j as oauthApplicationRelations, k as oauthAccessTokenRelations, l as assetRole, m as assetShareRelations, n as accountRelations, nt as user, o as apikeyRelations, ot as __export, p as assetShareLinkRelations, q as sessionRelations, r as agent, rt as userRelations, s as asset, t as account, tt as twoFactorRelations, u as assetRoleRelations, v as invitation, w as memberOrganizationRoleRelations, x as memberAssetRole, y as invitationRelations, z as organizationRoleRelations } from "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
2
|
import { G as getCurrentTransactionAdapter, W as getCurrentGraphContext } from "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import { f as logger, g as BetterAuthError, v as invariant } from "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
|
-
import { A as apiKey, E as admin, K as graph, R as lastLoginMethod, U as organization, a as openAPI, it as APIError$1, j as assets, k as agents, rt as twoFactor, z as mcp } from "./plugins-4UnCRez7.mjs";
|
|
4
|
+
import { A as apiKey, E as admin, K as graph, R as lastLoginMethod, T as anonymous, U as organization, a as openAPI, i as phoneNumber, it as APIError$1, j as assets, k as agents, rt as twoFactor, z as mcp } from "./plugins-4UnCRez7.mjs";
|
|
5
5
|
import { t as betterAuth } from "./dist-Dt0ifDbX.mjs";
|
|
6
6
|
import { t as createAdapterFactory } from "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
7
7
|
import { and, asc, count, desc, eq, gt, gte, inArray, like, lt, lte, ne, notInArray, or, sql } from "drizzle-orm";
|
|
8
8
|
import cuid from "cuid";
|
|
9
|
+
import bcrypt from "bcrypt";
|
|
9
10
|
|
|
10
11
|
//#region ../better-auth/dist/adapters/drizzle-adapter/index.mjs
|
|
11
12
|
const drizzleAdapter = (db, config) => {
|
|
@@ -505,6 +506,8 @@ function createAuthSystem(options) {
|
|
|
505
506
|
return betterAuth({
|
|
506
507
|
plugins: [
|
|
507
508
|
admin({ adminUserIds: ["user_cmhz0nka100003xv322cn6ffp"] }),
|
|
509
|
+
anonymous(),
|
|
510
|
+
phoneNumber(),
|
|
508
511
|
apiKey(),
|
|
509
512
|
organization({
|
|
510
513
|
teams: { enabled: true },
|
|
@@ -552,6 +555,14 @@ function createAuthSystem(options) {
|
|
|
552
555
|
emailAndPassword: {
|
|
553
556
|
enabled: true,
|
|
554
557
|
requireEmailVerification: true,
|
|
558
|
+
password: {
|
|
559
|
+
hash: async (password) => {
|
|
560
|
+
return await bcrypt.hash(password, 10);
|
|
561
|
+
},
|
|
562
|
+
verify: async ({ hash, password }) => {
|
|
563
|
+
return await bcrypt.compare(password, hash);
|
|
564
|
+
}
|
|
565
|
+
},
|
|
555
566
|
sendResetPassword: async ({ user: user$1, url, token }, request) => {
|
|
556
567
|
await sendEmail({
|
|
557
568
|
to: user$1.email,
|
|
@@ -595,7 +606,27 @@ function createAuthSystem(options) {
|
|
|
595
606
|
type: "string",
|
|
596
607
|
defaultValue: "person"
|
|
597
608
|
},
|
|
598
|
-
actorId: { type: "string" }
|
|
609
|
+
actorId: { type: "string" },
|
|
610
|
+
userMetadata: {
|
|
611
|
+
type: "json",
|
|
612
|
+
required: false,
|
|
613
|
+
input: false
|
|
614
|
+
},
|
|
615
|
+
appMetadata: {
|
|
616
|
+
type: "json",
|
|
617
|
+
required: false,
|
|
618
|
+
input: false
|
|
619
|
+
},
|
|
620
|
+
invitedAt: {
|
|
621
|
+
type: "date",
|
|
622
|
+
required: false,
|
|
623
|
+
input: false
|
|
624
|
+
},
|
|
625
|
+
lastSignInAt: {
|
|
626
|
+
type: "date",
|
|
627
|
+
required: false,
|
|
628
|
+
input: false
|
|
629
|
+
}
|
|
599
630
|
} },
|
|
600
631
|
advanced: { database: { generateId: (options$1) => {
|
|
601
632
|
return generatePrefixedId(options$1.model);
|
|
@@ -617,7 +648,8 @@ function createAuthSystem(options) {
|
|
|
617
648
|
transaction: true
|
|
618
649
|
}),
|
|
619
650
|
experimental: { joins: true },
|
|
620
|
-
graph: { enabled: true }
|
|
651
|
+
graph: { enabled: true },
|
|
652
|
+
...options
|
|
621
653
|
});
|
|
622
654
|
}
|
|
623
655
|
|
package/dist/better-auth.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./db-
|
|
2
|
-
import { t as createAuthSystem } from "./better-auth-
|
|
1
|
+
import "./db-BO4CGoP4.mjs";
|
|
2
|
+
import { t as createAuthSystem } from "./better-auth-C0OyhbaH.mjs";
|
|
3
3
|
export { createAuthSystem };
|
package/dist/better-auth.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./db-schema.generated-
|
|
1
|
+
import "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
2
|
import "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
4
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -12,6 +12,6 @@ import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
13
|
import "./dist-Dt0ifDbX.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { t as createAuthSystem } from "./better-auth-
|
|
15
|
+
import { t as createAuthSystem } from "./better-auth-DcLpU_ff.mjs";
|
|
16
16
|
|
|
17
17
|
export { createAuthSystem };
|
package/dist/client.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthClient } from "better-auth/react";
|
|
2
|
-
import { adminClient, apiKeyClient, lastLoginMethodClient, organizationClient, twoFactorClient } from "better-auth/client/plugins";
|
|
2
|
+
import { adminClient, anonymousClient, apiKeyClient, lastLoginMethodClient, organizationClient, phoneNumberClient, twoFactorClient } from "better-auth/client/plugins";
|
|
3
3
|
import { ssoClient } from "@better-auth/sso/client";
|
|
4
4
|
export * from "better-auth/client/plugins";
|
|
5
5
|
|
|
@@ -11,7 +11,7 @@ declare const createEnterpriseClient: ({
|
|
|
11
11
|
baseURL: string;
|
|
12
12
|
}) => AuthClient<{
|
|
13
13
|
baseURL: string;
|
|
14
|
-
plugins: [ReturnType<typeof organizationClient>, ReturnType<typeof adminClient>, ReturnType<typeof apiKeyClient>, ReturnType<typeof ssoClient>, ReturnType<typeof twoFactorClient>, ReturnType<typeof lastLoginMethodClient>];
|
|
14
|
+
plugins: [ReturnType<typeof organizationClient>, ReturnType<typeof adminClient>, ReturnType<typeof apiKeyClient>, ReturnType<typeof ssoClient>, ReturnType<typeof twoFactorClient>, ReturnType<typeof anonymousClient>, ReturnType<typeof phoneNumberClient>, ReturnType<typeof lastLoginMethodClient>];
|
|
15
15
|
}>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { createEnterpriseClient };
|
package/dist/client.mjs
CHANGED
|
@@ -179,6 +179,57 @@ declare const schema: {
|
|
|
179
179
|
identity: undefined;
|
|
180
180
|
generated: undefined;
|
|
181
181
|
}, {}, {}>;
|
|
182
|
+
isAnonymous: drizzle_orm_pg_core0.PgColumn<{
|
|
183
|
+
name: "is_anonymous";
|
|
184
|
+
tableName: "user";
|
|
185
|
+
dataType: "boolean";
|
|
186
|
+
columnType: "PgBoolean";
|
|
187
|
+
data: boolean;
|
|
188
|
+
driverParam: boolean;
|
|
189
|
+
notNull: false;
|
|
190
|
+
hasDefault: true;
|
|
191
|
+
isPrimaryKey: false;
|
|
192
|
+
isAutoincrement: false;
|
|
193
|
+
hasRuntimeDefault: false;
|
|
194
|
+
enumValues: undefined;
|
|
195
|
+
baseColumn: never;
|
|
196
|
+
identity: undefined;
|
|
197
|
+
generated: undefined;
|
|
198
|
+
}, {}, {}>;
|
|
199
|
+
phoneNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
200
|
+
name: "phone_number";
|
|
201
|
+
tableName: "user";
|
|
202
|
+
dataType: "string";
|
|
203
|
+
columnType: "PgText";
|
|
204
|
+
data: string;
|
|
205
|
+
driverParam: string;
|
|
206
|
+
notNull: false;
|
|
207
|
+
hasDefault: false;
|
|
208
|
+
isPrimaryKey: false;
|
|
209
|
+
isAutoincrement: false;
|
|
210
|
+
hasRuntimeDefault: false;
|
|
211
|
+
enumValues: [string, ...string[]];
|
|
212
|
+
baseColumn: never;
|
|
213
|
+
identity: undefined;
|
|
214
|
+
generated: undefined;
|
|
215
|
+
}, {}, {}>;
|
|
216
|
+
phoneNumberVerified: drizzle_orm_pg_core0.PgColumn<{
|
|
217
|
+
name: "phone_number_verified";
|
|
218
|
+
tableName: "user";
|
|
219
|
+
dataType: "boolean";
|
|
220
|
+
columnType: "PgBoolean";
|
|
221
|
+
data: boolean;
|
|
222
|
+
driverParam: boolean;
|
|
223
|
+
notNull: false;
|
|
224
|
+
hasDefault: false;
|
|
225
|
+
isPrimaryKey: false;
|
|
226
|
+
isAutoincrement: false;
|
|
227
|
+
hasRuntimeDefault: false;
|
|
228
|
+
enumValues: undefined;
|
|
229
|
+
baseColumn: never;
|
|
230
|
+
identity: undefined;
|
|
231
|
+
generated: undefined;
|
|
232
|
+
}, {}, {}>;
|
|
182
233
|
twoFactorEnabled: drizzle_orm_pg_core0.PgColumn<{
|
|
183
234
|
name: "two_factor_enabled";
|
|
184
235
|
tableName: "user";
|
|
@@ -230,6 +281,74 @@ declare const schema: {
|
|
|
230
281
|
identity: undefined;
|
|
231
282
|
generated: undefined;
|
|
232
283
|
}, {}, {}>;
|
|
284
|
+
userMetadata: drizzle_orm_pg_core0.PgColumn<{
|
|
285
|
+
name: "user_metadata";
|
|
286
|
+
tableName: "user";
|
|
287
|
+
dataType: "json";
|
|
288
|
+
columnType: "PgJsonb";
|
|
289
|
+
data: unknown;
|
|
290
|
+
driverParam: unknown;
|
|
291
|
+
notNull: false;
|
|
292
|
+
hasDefault: false;
|
|
293
|
+
isPrimaryKey: false;
|
|
294
|
+
isAutoincrement: false;
|
|
295
|
+
hasRuntimeDefault: false;
|
|
296
|
+
enumValues: undefined;
|
|
297
|
+
baseColumn: never;
|
|
298
|
+
identity: undefined;
|
|
299
|
+
generated: undefined;
|
|
300
|
+
}, {}, {}>;
|
|
301
|
+
appMetadata: drizzle_orm_pg_core0.PgColumn<{
|
|
302
|
+
name: "app_metadata";
|
|
303
|
+
tableName: "user";
|
|
304
|
+
dataType: "json";
|
|
305
|
+
columnType: "PgJsonb";
|
|
306
|
+
data: unknown;
|
|
307
|
+
driverParam: unknown;
|
|
308
|
+
notNull: false;
|
|
309
|
+
hasDefault: false;
|
|
310
|
+
isPrimaryKey: false;
|
|
311
|
+
isAutoincrement: false;
|
|
312
|
+
hasRuntimeDefault: false;
|
|
313
|
+
enumValues: undefined;
|
|
314
|
+
baseColumn: never;
|
|
315
|
+
identity: undefined;
|
|
316
|
+
generated: undefined;
|
|
317
|
+
}, {}, {}>;
|
|
318
|
+
invitedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
319
|
+
name: "invited_at";
|
|
320
|
+
tableName: "user";
|
|
321
|
+
dataType: "date";
|
|
322
|
+
columnType: "PgTimestamp";
|
|
323
|
+
data: Date;
|
|
324
|
+
driverParam: string;
|
|
325
|
+
notNull: false;
|
|
326
|
+
hasDefault: false;
|
|
327
|
+
isPrimaryKey: false;
|
|
328
|
+
isAutoincrement: false;
|
|
329
|
+
hasRuntimeDefault: false;
|
|
330
|
+
enumValues: undefined;
|
|
331
|
+
baseColumn: never;
|
|
332
|
+
identity: undefined;
|
|
333
|
+
generated: undefined;
|
|
334
|
+
}, {}, {}>;
|
|
335
|
+
lastSignInAt: drizzle_orm_pg_core0.PgColumn<{
|
|
336
|
+
name: "last_sign_in_at";
|
|
337
|
+
tableName: "user";
|
|
338
|
+
dataType: "date";
|
|
339
|
+
columnType: "PgTimestamp";
|
|
340
|
+
data: Date;
|
|
341
|
+
driverParam: string;
|
|
342
|
+
notNull: false;
|
|
343
|
+
hasDefault: false;
|
|
344
|
+
isPrimaryKey: false;
|
|
345
|
+
isAutoincrement: false;
|
|
346
|
+
hasRuntimeDefault: false;
|
|
347
|
+
enumValues: undefined;
|
|
348
|
+
baseColumn: never;
|
|
349
|
+
identity: undefined;
|
|
350
|
+
generated: undefined;
|
|
351
|
+
}, {}, {}>;
|
|
233
352
|
};
|
|
234
353
|
dialect: "pg";
|
|
235
354
|
}>;
|
|
@@ -4945,6 +5064,57 @@ declare const connection: (url: string) => drizzle_orm_node_postgres0.NodePgData
|
|
|
4945
5064
|
identity: undefined;
|
|
4946
5065
|
generated: undefined;
|
|
4947
5066
|
}, {}, {}>;
|
|
5067
|
+
isAnonymous: drizzle_orm_pg_core0.PgColumn<{
|
|
5068
|
+
name: "is_anonymous";
|
|
5069
|
+
tableName: "user";
|
|
5070
|
+
dataType: "boolean";
|
|
5071
|
+
columnType: "PgBoolean";
|
|
5072
|
+
data: boolean;
|
|
5073
|
+
driverParam: boolean;
|
|
5074
|
+
notNull: false;
|
|
5075
|
+
hasDefault: true;
|
|
5076
|
+
isPrimaryKey: false;
|
|
5077
|
+
isAutoincrement: false;
|
|
5078
|
+
hasRuntimeDefault: false;
|
|
5079
|
+
enumValues: undefined;
|
|
5080
|
+
baseColumn: never;
|
|
5081
|
+
identity: undefined;
|
|
5082
|
+
generated: undefined;
|
|
5083
|
+
}, {}, {}>;
|
|
5084
|
+
phoneNumber: drizzle_orm_pg_core0.PgColumn<{
|
|
5085
|
+
name: "phone_number";
|
|
5086
|
+
tableName: "user";
|
|
5087
|
+
dataType: "string";
|
|
5088
|
+
columnType: "PgText";
|
|
5089
|
+
data: string;
|
|
5090
|
+
driverParam: string;
|
|
5091
|
+
notNull: false;
|
|
5092
|
+
hasDefault: false;
|
|
5093
|
+
isPrimaryKey: false;
|
|
5094
|
+
isAutoincrement: false;
|
|
5095
|
+
hasRuntimeDefault: false;
|
|
5096
|
+
enumValues: [string, ...string[]];
|
|
5097
|
+
baseColumn: never;
|
|
5098
|
+
identity: undefined;
|
|
5099
|
+
generated: undefined;
|
|
5100
|
+
}, {}, {}>;
|
|
5101
|
+
phoneNumberVerified: drizzle_orm_pg_core0.PgColumn<{
|
|
5102
|
+
name: "phone_number_verified";
|
|
5103
|
+
tableName: "user";
|
|
5104
|
+
dataType: "boolean";
|
|
5105
|
+
columnType: "PgBoolean";
|
|
5106
|
+
data: boolean;
|
|
5107
|
+
driverParam: boolean;
|
|
5108
|
+
notNull: false;
|
|
5109
|
+
hasDefault: false;
|
|
5110
|
+
isPrimaryKey: false;
|
|
5111
|
+
isAutoincrement: false;
|
|
5112
|
+
hasRuntimeDefault: false;
|
|
5113
|
+
enumValues: undefined;
|
|
5114
|
+
baseColumn: never;
|
|
5115
|
+
identity: undefined;
|
|
5116
|
+
generated: undefined;
|
|
5117
|
+
}, {}, {}>;
|
|
4948
5118
|
twoFactorEnabled: drizzle_orm_pg_core0.PgColumn<{
|
|
4949
5119
|
name: "two_factor_enabled";
|
|
4950
5120
|
tableName: "user";
|
|
@@ -4996,6 +5166,74 @@ declare const connection: (url: string) => drizzle_orm_node_postgres0.NodePgData
|
|
|
4996
5166
|
identity: undefined;
|
|
4997
5167
|
generated: undefined;
|
|
4998
5168
|
}, {}, {}>;
|
|
5169
|
+
userMetadata: drizzle_orm_pg_core0.PgColumn<{
|
|
5170
|
+
name: "user_metadata";
|
|
5171
|
+
tableName: "user";
|
|
5172
|
+
dataType: "json";
|
|
5173
|
+
columnType: "PgJsonb";
|
|
5174
|
+
data: unknown;
|
|
5175
|
+
driverParam: unknown;
|
|
5176
|
+
notNull: false;
|
|
5177
|
+
hasDefault: false;
|
|
5178
|
+
isPrimaryKey: false;
|
|
5179
|
+
isAutoincrement: false;
|
|
5180
|
+
hasRuntimeDefault: false;
|
|
5181
|
+
enumValues: undefined;
|
|
5182
|
+
baseColumn: never;
|
|
5183
|
+
identity: undefined;
|
|
5184
|
+
generated: undefined;
|
|
5185
|
+
}, {}, {}>;
|
|
5186
|
+
appMetadata: drizzle_orm_pg_core0.PgColumn<{
|
|
5187
|
+
name: "app_metadata";
|
|
5188
|
+
tableName: "user";
|
|
5189
|
+
dataType: "json";
|
|
5190
|
+
columnType: "PgJsonb";
|
|
5191
|
+
data: unknown;
|
|
5192
|
+
driverParam: unknown;
|
|
5193
|
+
notNull: false;
|
|
5194
|
+
hasDefault: false;
|
|
5195
|
+
isPrimaryKey: false;
|
|
5196
|
+
isAutoincrement: false;
|
|
5197
|
+
hasRuntimeDefault: false;
|
|
5198
|
+
enumValues: undefined;
|
|
5199
|
+
baseColumn: never;
|
|
5200
|
+
identity: undefined;
|
|
5201
|
+
generated: undefined;
|
|
5202
|
+
}, {}, {}>;
|
|
5203
|
+
invitedAt: drizzle_orm_pg_core0.PgColumn<{
|
|
5204
|
+
name: "invited_at";
|
|
5205
|
+
tableName: "user";
|
|
5206
|
+
dataType: "date";
|
|
5207
|
+
columnType: "PgTimestamp";
|
|
5208
|
+
data: Date;
|
|
5209
|
+
driverParam: string;
|
|
5210
|
+
notNull: false;
|
|
5211
|
+
hasDefault: false;
|
|
5212
|
+
isPrimaryKey: false;
|
|
5213
|
+
isAutoincrement: false;
|
|
5214
|
+
hasRuntimeDefault: false;
|
|
5215
|
+
enumValues: undefined;
|
|
5216
|
+
baseColumn: never;
|
|
5217
|
+
identity: undefined;
|
|
5218
|
+
generated: undefined;
|
|
5219
|
+
}, {}, {}>;
|
|
5220
|
+
lastSignInAt: drizzle_orm_pg_core0.PgColumn<{
|
|
5221
|
+
name: "last_sign_in_at";
|
|
5222
|
+
tableName: "user";
|
|
5223
|
+
dataType: "date";
|
|
5224
|
+
columnType: "PgTimestamp";
|
|
5225
|
+
data: Date;
|
|
5226
|
+
driverParam: string;
|
|
5227
|
+
notNull: false;
|
|
5228
|
+
hasDefault: false;
|
|
5229
|
+
isPrimaryKey: false;
|
|
5230
|
+
isAutoincrement: false;
|
|
5231
|
+
hasRuntimeDefault: false;
|
|
5232
|
+
enumValues: undefined;
|
|
5233
|
+
baseColumn: never;
|
|
5234
|
+
identity: undefined;
|
|
5235
|
+
generated: undefined;
|
|
5236
|
+
}, {}, {}>;
|
|
4999
5237
|
};
|
|
5000
5238
|
dialect: "pg";
|
|
5001
5239
|
}>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as db_schema_generated_exports, ot as __export, st as __reExport } from "./db-schema.generated-
|
|
1
|
+
import { _ as db_schema_generated_exports, ot as __export, st as __reExport } from "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
2
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
3
3
|
|
|
4
4
|
//#region src/db.ts
|
|
@@ -117,9 +117,16 @@ const user = enterpriseSchema.table("user", {
|
|
|
117
117
|
banned: boolean("banned").default(false),
|
|
118
118
|
banReason: text("ban_reason"),
|
|
119
119
|
banExpires: timestamp("ban_expires"),
|
|
120
|
+
isAnonymous: boolean("is_anonymous").default(false),
|
|
121
|
+
phoneNumber: text("phone_number").unique(),
|
|
122
|
+
phoneNumberVerified: boolean("phone_number_verified"),
|
|
120
123
|
twoFactorEnabled: boolean("two_factor_enabled").default(false),
|
|
121
124
|
actorType: text("actor_type").default("person"),
|
|
122
|
-
actorId: text("actor_id")
|
|
125
|
+
actorId: text("actor_id"),
|
|
126
|
+
userMetadata: jsonb("user_metadata"),
|
|
127
|
+
appMetadata: jsonb("app_metadata"),
|
|
128
|
+
invitedAt: timestamp("invited_at"),
|
|
129
|
+
lastSignInAt: timestamp("last_sign_in_at")
|
|
123
130
|
});
|
|
124
131
|
const session = enterpriseSchema.table("session", {
|
|
125
132
|
id: text("id").primaryKey(),
|
package/dist/db.d.mts
CHANGED
package/dist/db.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./db-schema.generated-
|
|
2
|
-
import { r as schema, t as connection } from "./db-
|
|
1
|
+
import "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
|
+
import { r as schema, t as connection } from "./db-CZhOn-9W.mjs";
|
|
3
3
|
|
|
4
4
|
export * from "drizzle-orm/node-postgres"
|
|
5
5
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "./db-
|
|
2
|
-
import { t as createAuthSystem } from "./better-auth-
|
|
1
|
+
import "./db-BO4CGoP4.mjs";
|
|
2
|
+
import { t as createAuthSystem } from "./better-auth-C0OyhbaH.mjs";
|
|
3
3
|
import { parseSetCookieHeader } from "better-auth/cookies";
|
|
4
4
|
export * from "better-auth";
|
|
5
5
|
export * from "better-auth/crypto";
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./db-schema.generated-
|
|
1
|
+
import "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
2
|
import { C as symmetricEncodeJWT, G as getCurrentTransactionAdapter, H as getCurrentAdapter, S as symmetricDecodeJWT, W as getCurrentGraphContext, _ as symmetricEncrypt, c as generateId, d as constantTimeEqual, g as symmetricDecrypt, h as hashPassword, l as generateState, m as generateRandomString, s as HIDE_METADATA, u as parseState, v as verifyPassword, w as verifyJWT, x as signJWT } from "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import { _ as defineErrorCodes, a as getBooleanEnvVar, c as isDevelopment, d as levels, f as logger, g as BetterAuthError, h as BASE_ERROR_CODES, i as env, l as isProduction, m as shouldPublishLog, n as TTY_COLORS, o as getColorDepth, p as nodeENV, r as createLogger, s as getEnvVar, t as ENV, u as isTest, v as invariant } from "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
4
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -12,6 +12,6 @@ import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
13
|
import { n as createTelemetry, r as getTelemetryAuthConfig, t as betterAuth } from "./dist-Dt0ifDbX.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { t as createAuthSystem } from "./better-auth-
|
|
15
|
+
import { t as createAuthSystem } from "./better-auth-DcLpU_ff.mjs";
|
|
16
16
|
|
|
17
17
|
export { APIError$1 as APIError, BASE_ERROR_CODES, BetterAuthError, ENV, HIDE_METADATA, TTY_COLORS, accountSchema, betterAuth, capitalizeFirstLetter, clientCredentialsToken, constantTimeEqual, coreSchema, createAuthSystem, createAuthorizationCodeRequest, createAuthorizationURL, createClientCredentialsTokenRequest, createLogger, createRefreshAccessTokenRequest, createTelemetry, defineErrorCodes, env, generateCodeChallenge, generateId, generateRandomString, generateState, getBooleanEnvVar, getColorDepth, getCurrentAdapter, getCurrentGraphContext, getCurrentTransactionAdapter, getEnvVar, getOAuth2Tokens, getTelemetryAuthConfig, hashPassword, initializeGraph, invariant, isDevelopment, isProduction, isTest, levels, logger, nodeENV, parseSetCookieHeader, parseState, rateLimitSchema, refreshAccessToken, sessionSchema, shouldPublishLog, signJWT, symmetricDecodeJWT, symmetricDecrypt, symmetricEncodeJWT, symmetricEncrypt, userSchema, validateAuthorizationCode, validateToken, verificationSchema, verifyJWT, verifyPassword };
|
package/dist/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./db-schema.generated-
|
|
1
|
+
import "./db-schema.generated-t7hCTMF5.mjs";
|
|
2
2
|
import "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
4
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -12,8 +12,8 @@ import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
13
|
import "./dist-Dt0ifDbX.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { t as createAuthSystem } from "./better-auth-
|
|
16
|
-
import { n as db_exports, r as schema } from "./db-
|
|
15
|
+
import { t as createAuthSystem } from "./better-auth-DcLpU_ff.mjs";
|
|
16
|
+
import { n as db_exports, r as schema } from "./db-CZhOn-9W.mjs";
|
|
17
17
|
import "dotenv/config";
|
|
18
18
|
import { cors } from "@elysiajs/cors";
|
|
19
19
|
import { jwt } from "@elysiajs/jwt";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rio.js/enterprise",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "srvx --import=jiti/register --port 3001",
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
"@elysiajs/cors": "^1.4.0",
|
|
16
16
|
"@elysiajs/jwt": "^1.4.0",
|
|
17
17
|
"@elysiajs/openapi": "^1.4.11",
|
|
18
|
+
"bcrypt": "^6.0.0",
|
|
18
19
|
"better-call": "^1.0.26",
|
|
19
20
|
"cuid": "^3.0.0",
|
|
20
21
|
"dotenv": "^17.2.3",
|
|
21
22
|
"drizzle-orm": "^0.44.7",
|
|
22
23
|
"elysia": "latest",
|
|
23
24
|
"nanostores": "^1.0.1",
|
|
25
|
+
"npm": "^11.7.0",
|
|
24
26
|
"pg": "^8.16.3",
|
|
25
27
|
"resend": "^6.4.2",
|
|
26
28
|
"zod": "^4.1.12",
|
|
@@ -29,12 +31,13 @@
|
|
|
29
31
|
"devDependencies": {
|
|
30
32
|
"@better-auth/cli": "workspace:*",
|
|
31
33
|
"@better-auth/core": "workspace:*",
|
|
32
|
-
"jiti": "^2.6.1",
|
|
33
34
|
"@better-auth/sso": "workspace:*",
|
|
34
|
-
"
|
|
35
|
+
"@types/bcrypt": "^6.0.0",
|
|
35
36
|
"@types/pg": "^8.15.6",
|
|
37
|
+
"better-auth": "workspace:*",
|
|
36
38
|
"bun-types": "latest",
|
|
37
39
|
"drizzle-kit": "^0.31.6",
|
|
40
|
+
"jiti": "^2.6.1",
|
|
38
41
|
"srvx": "^0.9.6",
|
|
39
42
|
"tsdown": "latest"
|
|
40
43
|
},
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t as Connection } from "./db-CXaQH2-a.mjs";
|
|
2
|
-
import { BetterAuthPlugin, betterAuth } from "better-auth";
|
|
3
|
-
|
|
4
|
-
//#region src/better-auth.d.ts
|
|
5
|
-
declare function createAuthSystem(options: {
|
|
6
|
-
plugins?: BetterAuthPlugin[];
|
|
7
|
-
db: Connection;
|
|
8
|
-
}): ReturnType<typeof betterAuth>;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { createAuthSystem as t };
|