@rio.js/enterprise 1.4.2 → 1.4.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/{better-auth-CIRYXm77.mjs → better-auth-CgVuDqHf.mjs} +83 -20
- package/dist/{better-auth-D2WGpedB.d.mts → better-auth-dl6JU4vx.d.mts} +2 -0
- package/dist/better-auth.d.mts +2 -1
- package/dist/better-auth.mjs +3 -3
- package/dist/{db-DCIm6th7.d.mts → db-BQg74X-T.d.mts} +3 -3
- package/dist/{db-Bd2Dgk3D.mjs → db-Bu7FlEtc.mjs} +2 -7
- package/dist/db.d.mts +3 -2
- package/dist/db.mjs +4 -2
- package/dist/{db-schema.final-U_UYOH47.mjs → dist-DGeBMuXr.mjs} +3 -67
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/init.mjs +1 -2
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as teamRole, A as oauthAccessTokenRelations, B as organizationRoleRelations, C as memberAssetRoleRelations, D as memberTeamRole, E as memberRelations, F as object, G as schemaDefinition, H as platformRole, I as objectRelations, J as sessionRelations, K as schemaDefinitionRelations, L as organization$1, M as oauthApplicationRelations, N as oauthConsent, O as memberTeamRoleRelations, P as oauthConsentRelations, Q as teamRelations, R as organizationRelations, S as memberAssetRole, T as memberOrganizationRoleRelations, U as relationship, V as person, W as relationshipRelations, X as teamMember, Y as team, Z as teamMemberRelations, _ as assetType, a as agent, at as verification, b as invitationRelations, c as apikeyRelations, d as assetRole, et as teamRoleRelations, f as assetRoleRelations, g as assetShareRelations, h as assetShareLinkRelations, i as accountRelations, it as userRelations, j as oauthApplication, k as oauthAccessToken, l as asset, m as assetShareLink, nt as twoFactorRelations, o as agentRelations, ot as enterpriseSchema, p as assetShare, q as session, r as account, rt as user, s as apikey, st as __export, t as db, tt as twoFactor$1, u as assetRelations, v as assetTypeRelations, w as memberOrganizationRole, x as member, y as invitation, z as organizationRole } from "./db-Bu7FlEtc.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
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-C_-kHHzW.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { t as betterAuth } from "./dist-DGeBMuXr.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";
|
|
@@ -295,6 +295,69 @@ const drizzleAdapter = (db$1, config) => {
|
|
|
295
295
|
};
|
|
296
296
|
};
|
|
297
297
|
|
|
298
|
+
//#endregion
|
|
299
|
+
//#region src/db-schema.final.ts
|
|
300
|
+
var db_schema_final_exports = /* @__PURE__ */ __export({
|
|
301
|
+
account: () => account,
|
|
302
|
+
accountRelations: () => accountRelations,
|
|
303
|
+
agent: () => agent,
|
|
304
|
+
agentRelations: () => agentRelations,
|
|
305
|
+
apikey: () => apikey,
|
|
306
|
+
apikeyRelations: () => apikeyRelations,
|
|
307
|
+
asset: () => asset,
|
|
308
|
+
assetRelations: () => assetRelations,
|
|
309
|
+
assetRole: () => assetRole,
|
|
310
|
+
assetRoleRelations: () => assetRoleRelations,
|
|
311
|
+
assetShare: () => assetShare,
|
|
312
|
+
assetShareLink: () => assetShareLink,
|
|
313
|
+
assetShareLinkRelations: () => assetShareLinkRelations,
|
|
314
|
+
assetShareRelations: () => assetShareRelations,
|
|
315
|
+
assetType: () => assetType,
|
|
316
|
+
assetTypeRelations: () => assetTypeRelations,
|
|
317
|
+
enterpriseSchema: () => enterpriseSchema,
|
|
318
|
+
invitation: () => invitation,
|
|
319
|
+
invitationRelations: () => invitationRelations,
|
|
320
|
+
member: () => member,
|
|
321
|
+
memberAssetRole: () => memberAssetRole,
|
|
322
|
+
memberAssetRoleRelations: () => memberAssetRoleRelations,
|
|
323
|
+
memberOrganizationRole: () => memberOrganizationRole,
|
|
324
|
+
memberOrganizationRoleRelations: () => memberOrganizationRoleRelations,
|
|
325
|
+
memberRelations: () => memberRelations,
|
|
326
|
+
memberTeamRole: () => memberTeamRole,
|
|
327
|
+
memberTeamRoleRelations: () => memberTeamRoleRelations,
|
|
328
|
+
oauthAccessToken: () => oauthAccessToken,
|
|
329
|
+
oauthAccessTokenRelations: () => oauthAccessTokenRelations,
|
|
330
|
+
oauthApplication: () => oauthApplication,
|
|
331
|
+
oauthApplicationRelations: () => oauthApplicationRelations,
|
|
332
|
+
oauthConsent: () => oauthConsent,
|
|
333
|
+
oauthConsentRelations: () => oauthConsentRelations,
|
|
334
|
+
object: () => object,
|
|
335
|
+
objectRelations: () => objectRelations,
|
|
336
|
+
organization: () => organization$1,
|
|
337
|
+
organizationRelations: () => organizationRelations,
|
|
338
|
+
organizationRole: () => organizationRole,
|
|
339
|
+
organizationRoleRelations: () => organizationRoleRelations,
|
|
340
|
+
person: () => person,
|
|
341
|
+
platformRole: () => platformRole,
|
|
342
|
+
relationship: () => relationship,
|
|
343
|
+
relationshipRelations: () => relationshipRelations,
|
|
344
|
+
schemaDefinition: () => schemaDefinition,
|
|
345
|
+
schemaDefinitionRelations: () => schemaDefinitionRelations,
|
|
346
|
+
session: () => session,
|
|
347
|
+
sessionRelations: () => sessionRelations,
|
|
348
|
+
team: () => team,
|
|
349
|
+
teamMember: () => teamMember,
|
|
350
|
+
teamMemberRelations: () => teamMemberRelations,
|
|
351
|
+
teamRelations: () => teamRelations,
|
|
352
|
+
teamRole: () => teamRole,
|
|
353
|
+
teamRoleRelations: () => teamRoleRelations,
|
|
354
|
+
twoFactor: () => twoFactor$1,
|
|
355
|
+
twoFactorRelations: () => twoFactorRelations,
|
|
356
|
+
user: () => user,
|
|
357
|
+
userRelations: () => userRelations,
|
|
358
|
+
verification: () => verification
|
|
359
|
+
});
|
|
360
|
+
|
|
298
361
|
//#endregion
|
|
299
362
|
//#region src/utils/email.ts
|
|
300
363
|
/**
|
|
@@ -365,11 +428,11 @@ async function getOrCreatePersonalOrganization(userId, userName) {
|
|
|
365
428
|
value: userId
|
|
366
429
|
}]
|
|
367
430
|
});
|
|
368
|
-
for (const member of existingMembers) if (await adapter.findOne({
|
|
431
|
+
for (const member$1 of existingMembers) if (await adapter.findOne({
|
|
369
432
|
model: "organization",
|
|
370
433
|
where: [{
|
|
371
434
|
field: "id",
|
|
372
|
-
value: member.organizationId
|
|
435
|
+
value: member$1.organizationId
|
|
373
436
|
}, {
|
|
374
437
|
field: "slug",
|
|
375
438
|
value: `user-${userId}`
|
|
@@ -489,9 +552,9 @@ function createAuthSystem(options) {
|
|
|
489
552
|
emailAndPassword: {
|
|
490
553
|
enabled: true,
|
|
491
554
|
requireEmailVerification: true,
|
|
492
|
-
sendResetPassword: async ({ user, url, token }, request) => {
|
|
555
|
+
sendResetPassword: async ({ user: user$1, url, token }, request) => {
|
|
493
556
|
await sendEmail({
|
|
494
|
-
to: user.email,
|
|
557
|
+
to: user$1.email,
|
|
495
558
|
subject: "Reset your password",
|
|
496
559
|
text: `Click the link to reset your password: ${url}`
|
|
497
560
|
});
|
|
@@ -499,32 +562,32 @@ function createAuthSystem(options) {
|
|
|
499
562
|
},
|
|
500
563
|
hooks: {},
|
|
501
564
|
databaseHooks: { user: { create: {
|
|
502
|
-
async before(user, options$1) {
|
|
503
|
-
if (user.actorType === "agent") {} else {
|
|
565
|
+
async before(user$1, options$1) {
|
|
566
|
+
if (user$1.actorType === "agent") {} else {
|
|
504
567
|
invariant(!!options$1?.context.adapter, "Adapter is required");
|
|
505
|
-
if (!user.id) user.id = generatePrefixedId("user");
|
|
568
|
+
if (!user$1.id) user$1.id = generatePrefixedId("user");
|
|
506
569
|
const adapter = await getCurrentTransactionAdapter();
|
|
507
570
|
const graphAdapter = await getCurrentGraphContext();
|
|
508
|
-
const person = await adapter.create({
|
|
571
|
+
const person$1 = await adapter.create({
|
|
509
572
|
model: "person",
|
|
510
|
-
data: { name: user.name },
|
|
573
|
+
data: { name: user$1.name },
|
|
511
574
|
select: ["id"]
|
|
512
575
|
});
|
|
513
576
|
await graphAdapter.addRelationship({
|
|
514
|
-
subjectId: person.id,
|
|
577
|
+
subjectId: person$1.id,
|
|
515
578
|
subjectType: "person",
|
|
516
|
-
objectId: user.id,
|
|
579
|
+
objectId: user$1.id,
|
|
517
580
|
objectType: "user",
|
|
518
581
|
relationshipType: "person_profile"
|
|
519
582
|
});
|
|
520
|
-
if (!person) throw new Error("Failed to create person");
|
|
521
|
-
user.actorType = "person";
|
|
522
|
-
user.actorId = person.id;
|
|
583
|
+
if (!person$1) throw new Error("Failed to create person");
|
|
584
|
+
user$1.actorType = "person";
|
|
585
|
+
user$1.actorId = person$1.id;
|
|
523
586
|
}
|
|
524
|
-
return { data: user };
|
|
587
|
+
return { data: user$1 };
|
|
525
588
|
},
|
|
526
|
-
async after(user, context) {
|
|
527
|
-
if (user.actorType === "person" && user.id) await getOrCreatePersonalOrganization(user.id, user.name || "User");
|
|
589
|
+
async after(user$1, context) {
|
|
590
|
+
if (user$1.actorType === "person" && user$1.id) await getOrCreatePersonalOrganization(user$1.id, user$1.name || "User");
|
|
528
591
|
}
|
|
529
592
|
} } },
|
|
530
593
|
user: { additionalFields: {
|
|
@@ -547,7 +610,7 @@ function createAuthSystem(options) {
|
|
|
547
610
|
});
|
|
548
611
|
}
|
|
549
612
|
},
|
|
550
|
-
database: drizzleAdapter(db, {
|
|
613
|
+
database: drizzleAdapter(options.db ?? db, {
|
|
551
614
|
provider: "pg",
|
|
552
615
|
schema: db_schema_final_exports,
|
|
553
616
|
usePlural: false,
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { t as db } from "./db-BQg74X-T.mjs";
|
|
1
2
|
import * as better_auth0 from "better-auth";
|
|
2
3
|
import { BetterAuthPlugin, betterAuth } from "better-auth";
|
|
3
4
|
|
|
4
5
|
//#region src/better-auth.d.ts
|
|
5
6
|
declare function createAuthSystem(options: {
|
|
6
7
|
plugins?: BetterAuthPlugin[];
|
|
8
|
+
db?: typeof db;
|
|
7
9
|
}): ReturnType<typeof betterAuth>;
|
|
8
10
|
declare const auth: better_auth0.Auth<better_auth0.BetterAuthOptions>;
|
|
9
11
|
//#endregion
|
package/dist/better-auth.d.mts
CHANGED
package/dist/better-auth.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./db-
|
|
1
|
+
import "./db-Bu7FlEtc.mjs";
|
|
2
2
|
import "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
4
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -10,8 +10,8 @@ import "./dist-BidhxJQx.mjs";
|
|
|
10
10
|
import "./misc-CbURQDlR-Dpe-5X_i.mjs";
|
|
11
11
|
import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
|
-
import "./
|
|
13
|
+
import "./dist-DGeBMuXr.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { n as createAuthSystem, t as auth } from "./better-auth-
|
|
15
|
+
import { n as createAuthSystem, t as auth } from "./better-auth-CgVuDqHf.mjs";
|
|
16
16
|
|
|
17
17
|
export { auth, createAuthSystem };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as drizzle_orm0 from "drizzle-orm";
|
|
2
|
-
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
3
2
|
import * as drizzle_orm_node_postgres0 from "drizzle-orm/node-postgres";
|
|
3
|
+
import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
|
|
4
4
|
import * as pg0 from "pg";
|
|
5
5
|
|
|
6
6
|
//#region src/db.d.ts
|
|
7
|
-
declare const
|
|
7
|
+
declare const schema: {
|
|
8
8
|
user: drizzle_orm_pg_core0.PgTableWithColumns<{
|
|
9
9
|
name: "user";
|
|
10
10
|
schema: "enterprise";
|
|
@@ -9539,4 +9539,4 @@ declare const db: drizzle_orm_node_postgres0.NodePgDatabase<{
|
|
|
9539
9539
|
$client: pg0.Pool;
|
|
9540
9540
|
};
|
|
9541
9541
|
//#endregion
|
|
9542
|
-
export {
|
|
9542
|
+
export { schema as n, db as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
1
|
import { relations } from "drizzle-orm";
|
|
2
|
+
import { drizzle } from "drizzle-orm/node-postgres";
|
|
3
3
|
import { boolean, index, integer, jsonb, pgSchema, text, timestamp } from "drizzle-orm/pg-core";
|
|
4
4
|
|
|
5
5
|
//#region rolldown:runtime
|
|
@@ -17,7 +17,6 @@ var __export = (all, symbols) => {
|
|
|
17
17
|
}
|
|
18
18
|
return target;
|
|
19
19
|
};
|
|
20
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
21
20
|
|
|
22
21
|
//#endregion
|
|
23
22
|
//#region src/db-schema.default.ts
|
|
@@ -671,11 +670,7 @@ const schemaDefinitionRelations = relations(schemaDefinition, ({ one }) => ({ us
|
|
|
671
670
|
//#endregion
|
|
672
671
|
//#region src/db.ts
|
|
673
672
|
const schema = { ...db_schema_generated_exports };
|
|
674
|
-
const databaseSchema = schema;
|
|
675
|
-
let drizzle;
|
|
676
|
-
if (process.env.BUN) drizzle = __require("drizzle-orm/bun-sql").drizzle;
|
|
677
|
-
else drizzle = __require("drizzle-orm/node-postgres").drizzle;
|
|
678
673
|
const db = drizzle(process.env.DATABASE_URL + "?options=-c search_path=enterprise", { schema });
|
|
679
674
|
|
|
680
675
|
//#endregion
|
|
681
|
-
export { teamRole as $, oauthAccessTokenRelations as A, organizationRoleRelations as B, memberAssetRoleRelations as C, memberTeamRole as D, memberRelations as E, object as F, schemaDefinition as G, platformRole as H, objectRelations as I, sessionRelations as J, schemaDefinitionRelations as K, organization as L, oauthApplicationRelations as M, oauthConsent as N, memberTeamRoleRelations as O, oauthConsentRelations as P, teamRelations as Q, organizationRelations as R, memberAssetRole as S, memberOrganizationRoleRelations as T, relationship as U, person as V, relationshipRelations as W, teamMember as X, team as Y, teamMemberRelations as Z, assetType as _, agent as a, verification as at, invitationRelations as b, apikeyRelations as c, assetRole as d, teamRoleRelations as et, assetRoleRelations as f, assetShareRelations as g, assetShareLinkRelations as h, accountRelations as i, userRelations as it, oauthApplication as j, oauthAccessToken as k, asset as l, assetShareLink as m,
|
|
676
|
+
export { teamRole as $, oauthAccessTokenRelations as A, organizationRoleRelations as B, memberAssetRoleRelations as C, memberTeamRole as D, memberRelations as E, object as F, schemaDefinition as G, platformRole as H, objectRelations as I, sessionRelations as J, schemaDefinitionRelations as K, organization as L, oauthApplicationRelations as M, oauthConsent as N, memberTeamRoleRelations as O, oauthConsentRelations as P, teamRelations as Q, organizationRelations as R, memberAssetRole as S, memberOrganizationRoleRelations as T, relationship as U, person as V, relationshipRelations as W, teamMember as X, team as Y, teamMemberRelations as Z, assetType as _, agent as a, verification as at, invitationRelations as b, apikeyRelations as c, assetRole as d, teamRoleRelations as et, assetRoleRelations as f, assetShareRelations as g, assetShareLinkRelations as h, accountRelations as i, userRelations as it, oauthApplication as j, oauthAccessToken as k, asset as l, assetShareLink as m, schema as n, twoFactorRelations as nt, agentRelations as o, enterpriseSchema as ot, assetShare as p, session as q, account as r, user as rt, apikey as s, __export as st, db as t, twoFactor as tt, assetRelations as u, assetTypeRelations as v, memberOrganizationRole as w, member as x, invitation as y, organizationRole as z };
|
package/dist/db.d.mts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
export
|
|
1
|
+
import { n as schema, t as db } from "./db-BQg74X-T.mjs";
|
|
2
|
+
export * from "drizzle-orm/node-postgres";
|
|
3
|
+
export { db, schema };
|
package/dist/db.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { $ as teamRole, A as oauthAccessTokenRelations, B as organizationRoleRelations, C as memberAssetRoleRelations, D as memberTeamRole, E as memberRelations, F as object, G as schemaDefinition, H as platformRole, I as objectRelations, J as sessionRelations, K as schemaDefinitionRelations, L as organization, M as oauthApplicationRelations, N as oauthConsent, O as memberTeamRoleRelations, P as oauthConsentRelations, Q as teamRelations, R as organizationRelations, S as memberAssetRole, T as memberOrganizationRoleRelations, U as relationship, V as person, W as relationshipRelations, X as teamMember, Y as team, Z as teamMemberRelations, _ as assetType, a as agent, at as verification, b as invitationRelations, c as apikeyRelations, d as assetRole, et as teamRoleRelations, f as assetRoleRelations, g as assetShareRelations, h as assetShareLinkRelations, i as accountRelations, it as userRelations, j as oauthApplication, k as oauthAccessToken, l as asset, m as assetShareLink, nt as twoFactorRelations, o as agentRelations, ot as enterpriseSchema, p as assetShare, q as session, r as account, rt as user, s as apikey, st as __export, tt as twoFactor, u as assetRelations, v as assetTypeRelations, w as memberOrganizationRole, x as member, y as invitation, z as organizationRole } from "./db-Bd2Dgk3D.mjs";
|
|
2
1
|
import { c as generateId, f as createHash, h as hashPassword, n as getAuthTables, p as createRandomStringGenerator, q as runWithAdapter, v as verifyPassword } from "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
2
|
import { a as getBooleanEnvVar, f as logger, g as BetterAuthError, h as BASE_ERROR_CODES, i as env, l as isProduction, r as createLogger, s as getEnvVar, t as ENV, u as isTest } from "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
3
|
import { H as base64 } from "./verify-BmFXks5a.mjs";
|
|
@@ -636,8 +635,8 @@ async function createAuthContext(adapter, options, getDatabaseType) {
|
|
|
636
635
|
},
|
|
637
636
|
checkPassword
|
|
638
637
|
},
|
|
639
|
-
setNewSession(session
|
|
640
|
-
this.newSession = session
|
|
638
|
+
setNewSession(session) {
|
|
639
|
+
this.newSession = session;
|
|
641
640
|
},
|
|
642
641
|
newSession: null,
|
|
643
642
|
adapter,
|
|
@@ -719,67 +718,4 @@ const betterAuth = (options) => {
|
|
|
719
718
|
};
|
|
720
719
|
|
|
721
720
|
//#endregion
|
|
722
|
-
|
|
723
|
-
var db_schema_final_exports = /* @__PURE__ */ __export({
|
|
724
|
-
account: () => account,
|
|
725
|
-
accountRelations: () => accountRelations,
|
|
726
|
-
agent: () => agent,
|
|
727
|
-
agentRelations: () => agentRelations,
|
|
728
|
-
apikey: () => apikey,
|
|
729
|
-
apikeyRelations: () => apikeyRelations,
|
|
730
|
-
asset: () => asset,
|
|
731
|
-
assetRelations: () => assetRelations,
|
|
732
|
-
assetRole: () => assetRole,
|
|
733
|
-
assetRoleRelations: () => assetRoleRelations,
|
|
734
|
-
assetShare: () => assetShare,
|
|
735
|
-
assetShareLink: () => assetShareLink,
|
|
736
|
-
assetShareLinkRelations: () => assetShareLinkRelations,
|
|
737
|
-
assetShareRelations: () => assetShareRelations,
|
|
738
|
-
assetType: () => assetType,
|
|
739
|
-
assetTypeRelations: () => assetTypeRelations,
|
|
740
|
-
enterpriseSchema: () => enterpriseSchema,
|
|
741
|
-
invitation: () => invitation,
|
|
742
|
-
invitationRelations: () => invitationRelations,
|
|
743
|
-
member: () => member,
|
|
744
|
-
memberAssetRole: () => memberAssetRole,
|
|
745
|
-
memberAssetRoleRelations: () => memberAssetRoleRelations,
|
|
746
|
-
memberOrganizationRole: () => memberOrganizationRole,
|
|
747
|
-
memberOrganizationRoleRelations: () => memberOrganizationRoleRelations,
|
|
748
|
-
memberRelations: () => memberRelations,
|
|
749
|
-
memberTeamRole: () => memberTeamRole,
|
|
750
|
-
memberTeamRoleRelations: () => memberTeamRoleRelations,
|
|
751
|
-
oauthAccessToken: () => oauthAccessToken,
|
|
752
|
-
oauthAccessTokenRelations: () => oauthAccessTokenRelations,
|
|
753
|
-
oauthApplication: () => oauthApplication,
|
|
754
|
-
oauthApplicationRelations: () => oauthApplicationRelations,
|
|
755
|
-
oauthConsent: () => oauthConsent,
|
|
756
|
-
oauthConsentRelations: () => oauthConsentRelations,
|
|
757
|
-
object: () => object,
|
|
758
|
-
objectRelations: () => objectRelations,
|
|
759
|
-
organization: () => organization,
|
|
760
|
-
organizationRelations: () => organizationRelations,
|
|
761
|
-
organizationRole: () => organizationRole,
|
|
762
|
-
organizationRoleRelations: () => organizationRoleRelations,
|
|
763
|
-
person: () => person,
|
|
764
|
-
platformRole: () => platformRole,
|
|
765
|
-
relationship: () => relationship,
|
|
766
|
-
relationshipRelations: () => relationshipRelations,
|
|
767
|
-
schemaDefinition: () => schemaDefinition,
|
|
768
|
-
schemaDefinitionRelations: () => schemaDefinitionRelations,
|
|
769
|
-
session: () => session,
|
|
770
|
-
sessionRelations: () => sessionRelations,
|
|
771
|
-
team: () => team,
|
|
772
|
-
teamMember: () => teamMember,
|
|
773
|
-
teamMemberRelations: () => teamMemberRelations,
|
|
774
|
-
teamRelations: () => teamRelations,
|
|
775
|
-
teamRole: () => teamRole,
|
|
776
|
-
teamRoleRelations: () => teamRoleRelations,
|
|
777
|
-
twoFactor: () => twoFactor,
|
|
778
|
-
twoFactorRelations: () => twoFactorRelations,
|
|
779
|
-
user: () => user,
|
|
780
|
-
userRelations: () => userRelations,
|
|
781
|
-
verification: () => verification
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
//#endregion
|
|
785
|
-
export { getTelemetryAuthConfig as i, betterAuth as n, createTelemetry as r, db_schema_final_exports as t };
|
|
721
|
+
export { createTelemetry as n, getTelemetryAuthConfig as r, betterAuth as t };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
1
|
+
import { t as db } from "./db-BQg74X-T.mjs";
|
|
2
|
+
import { n as createAuthSystem } from "./better-auth-dl6JU4vx.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 {
|
|
1
|
+
import { t as db } from "./db-Bu7FlEtc.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";
|
|
@@ -10,8 +10,8 @@ import "./dist-BidhxJQx.mjs";
|
|
|
10
10
|
import { t as capitalizeFirstLetter } from "./misc-CbURQDlR-Dpe-5X_i.mjs";
|
|
11
11
|
import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
|
-
import {
|
|
13
|
+
import { n as createTelemetry, r as getTelemetryAuthConfig, t as betterAuth } from "./dist-DGeBMuXr.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { n as createAuthSystem } from "./better-auth-
|
|
15
|
+
import { n as createAuthSystem } from "./better-auth-CgVuDqHf.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, db as enterpriseDB, 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/init.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "./db-Bd2Dgk3D.mjs";
|
|
2
1
|
import "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
2
|
import "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
3
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -10,7 +9,7 @@ import "./dist-BidhxJQx.mjs";
|
|
|
10
9
|
import "./misc-CbURQDlR-Dpe-5X_i.mjs";
|
|
11
10
|
import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
12
11
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
|
-
import "./
|
|
12
|
+
import "./dist-DGeBMuXr.mjs";
|
|
14
13
|
import { readFile } from "fs/promises";
|
|
15
14
|
|
|
16
15
|
//#region src/init.ts
|
package/dist/server.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as db } from "./db-Bu7FlEtc.mjs";
|
|
2
2
|
import "./json-oFuWgANh-CZSe35mm.mjs";
|
|
3
3
|
import "./env-DwlNAN_D-C1zHd0cf-DcFsKQM_.mjs";
|
|
4
4
|
import "./verify-BmFXks5a.mjs";
|
|
@@ -10,9 +10,9 @@ import "./dist-BidhxJQx.mjs";
|
|
|
10
10
|
import "./misc-CbURQDlR-Dpe-5X_i.mjs";
|
|
11
11
|
import "./parser-bL7W2mQ0-JPVS1FmJ.mjs";
|
|
12
12
|
import "./client--1_AEBPu-Dl2Y0Yen.mjs";
|
|
13
|
-
import "./
|
|
13
|
+
import "./dist-DGeBMuXr.mjs";
|
|
14
14
|
import "./adapter-factory-BTRALCLD-Bv_0fQx-.mjs";
|
|
15
|
-
import { t as auth } from "./better-auth-
|
|
15
|
+
import { t as auth } from "./better-auth-CgVuDqHf.mjs";
|
|
16
16
|
import "dotenv/config";
|
|
17
17
|
import { cors } from "@elysiajs/cors";
|
|
18
18
|
import { jwt } from "@elysiajs/jwt";
|