better-auth 1.2.8-beta.8 → 1.2.9-beta.1

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.
Files changed (227) hide show
  1. package/dist/adapters/drizzle-adapter/index.cjs +1 -1
  2. package/dist/adapters/drizzle-adapter/index.d.cts +3 -2
  3. package/dist/adapters/drizzle-adapter/index.d.mts +3 -2
  4. package/dist/adapters/drizzle-adapter/index.d.ts +3 -2
  5. package/dist/adapters/drizzle-adapter/index.mjs +1 -1
  6. package/dist/adapters/index.cjs +1 -1
  7. package/dist/adapters/index.d.cts +4 -3
  8. package/dist/adapters/index.d.mts +4 -3
  9. package/dist/adapters/index.d.ts +4 -3
  10. package/dist/adapters/index.mjs +1 -1
  11. package/dist/adapters/kysely-adapter/index.cjs +2 -2
  12. package/dist/adapters/kysely-adapter/index.d.cts +3 -2
  13. package/dist/adapters/kysely-adapter/index.d.mts +3 -2
  14. package/dist/adapters/kysely-adapter/index.d.ts +3 -2
  15. package/dist/adapters/kysely-adapter/index.mjs +2 -2
  16. package/dist/adapters/memory-adapter/index.cjs +2 -2
  17. package/dist/adapters/memory-adapter/index.d.cts +3 -2
  18. package/dist/adapters/memory-adapter/index.d.mts +3 -2
  19. package/dist/adapters/memory-adapter/index.d.ts +3 -2
  20. package/dist/adapters/memory-adapter/index.mjs +2 -2
  21. package/dist/adapters/mongodb-adapter/index.d.cts +2 -1
  22. package/dist/adapters/mongodb-adapter/index.d.mts +2 -1
  23. package/dist/adapters/mongodb-adapter/index.d.ts +2 -1
  24. package/dist/adapters/prisma-adapter/index.cjs +1 -1
  25. package/dist/adapters/prisma-adapter/index.d.cts +3 -2
  26. package/dist/adapters/prisma-adapter/index.d.mts +3 -2
  27. package/dist/adapters/prisma-adapter/index.d.ts +3 -2
  28. package/dist/adapters/prisma-adapter/index.mjs +1 -1
  29. package/dist/adapters/test.d.cts +2 -1
  30. package/dist/adapters/test.d.mts +2 -1
  31. package/dist/adapters/test.d.ts +2 -1
  32. package/dist/api/index.cjs +1 -1
  33. package/dist/api/index.d.cts +2 -1
  34. package/dist/api/index.d.mts +2 -1
  35. package/dist/api/index.d.ts +2 -1
  36. package/dist/api/index.mjs +2 -2
  37. package/dist/chunks/bun-sqlite-dialect.cjs +170 -0
  38. package/dist/chunks/bun-sqlite-dialect.mjs +164 -0
  39. package/dist/client/index.d.cts +2 -1
  40. package/dist/client/index.d.mts +2 -1
  41. package/dist/client/index.d.ts +2 -1
  42. package/dist/client/plugins/index.d.cts +3 -2
  43. package/dist/client/plugins/index.d.mts +3 -2
  44. package/dist/client/plugins/index.d.ts +3 -2
  45. package/dist/client/react/index.d.cts +2 -1
  46. package/dist/client/react/index.d.mts +2 -1
  47. package/dist/client/react/index.d.ts +2 -1
  48. package/dist/client/solid/index.d.cts +2 -1
  49. package/dist/client/solid/index.d.mts +2 -1
  50. package/dist/client/solid/index.d.ts +2 -1
  51. package/dist/client/svelte/index.d.cts +2 -1
  52. package/dist/client/svelte/index.d.mts +2 -1
  53. package/dist/client/svelte/index.d.ts +2 -1
  54. package/dist/client/vue/index.d.cts +2 -1
  55. package/dist/client/vue/index.d.mts +2 -1
  56. package/dist/client/vue/index.d.ts +2 -1
  57. package/dist/cookies/index.d.cts +2 -1
  58. package/dist/cookies/index.d.mts +2 -1
  59. package/dist/cookies/index.d.ts +2 -1
  60. package/dist/db/index.cjs +4 -4
  61. package/dist/db/index.d.cts +3 -2
  62. package/dist/db/index.d.mts +3 -2
  63. package/dist/db/index.d.ts +3 -2
  64. package/dist/db/index.mjs +4 -4
  65. package/dist/index.cjs +5 -5
  66. package/dist/index.d.cts +3 -2
  67. package/dist/index.d.mts +3 -2
  68. package/dist/index.d.ts +3 -2
  69. package/dist/index.mjs +6 -6
  70. package/dist/integrations/next-js.cjs +2 -2
  71. package/dist/integrations/next-js.d.cts +2 -1
  72. package/dist/integrations/next-js.d.mts +2 -1
  73. package/dist/integrations/next-js.d.ts +2 -1
  74. package/dist/integrations/next-js.mjs +2 -2
  75. package/dist/integrations/node.d.cts +2 -1
  76. package/dist/integrations/node.d.mts +2 -1
  77. package/dist/integrations/node.d.ts +2 -1
  78. package/dist/integrations/react-start.cjs +2 -2
  79. package/dist/integrations/react-start.d.cts +2 -1
  80. package/dist/integrations/react-start.d.mts +2 -1
  81. package/dist/integrations/react-start.d.ts +2 -1
  82. package/dist/integrations/react-start.mjs +2 -2
  83. package/dist/integrations/svelte-kit.d.cts +2 -1
  84. package/dist/integrations/svelte-kit.d.mts +2 -1
  85. package/dist/integrations/svelte-kit.d.ts +2 -1
  86. package/dist/oauth2/index.d.cts +3 -2
  87. package/dist/oauth2/index.d.mts +3 -2
  88. package/dist/oauth2/index.d.ts +3 -2
  89. package/dist/plugins/admin/index.cjs +2 -2
  90. package/dist/plugins/admin/index.d.cts +2 -1
  91. package/dist/plugins/admin/index.d.mts +2 -1
  92. package/dist/plugins/admin/index.d.ts +2 -1
  93. package/dist/plugins/admin/index.mjs +2 -2
  94. package/dist/plugins/anonymous/index.cjs +1 -1
  95. package/dist/plugins/anonymous/index.d.cts +2 -1
  96. package/dist/plugins/anonymous/index.d.mts +2 -1
  97. package/dist/plugins/anonymous/index.d.ts +2 -1
  98. package/dist/plugins/anonymous/index.mjs +1 -1
  99. package/dist/plugins/bearer/index.cjs +1 -1
  100. package/dist/plugins/bearer/index.d.cts +2 -1
  101. package/dist/plugins/bearer/index.d.mts +2 -1
  102. package/dist/plugins/bearer/index.d.ts +2 -1
  103. package/dist/plugins/bearer/index.mjs +1 -1
  104. package/dist/plugins/captcha/index.d.cts +2 -1
  105. package/dist/plugins/captcha/index.d.mts +2 -1
  106. package/dist/plugins/captcha/index.d.ts +2 -1
  107. package/dist/plugins/custom-session/index.cjs +1 -1
  108. package/dist/plugins/custom-session/index.d.cts +2 -1
  109. package/dist/plugins/custom-session/index.d.mts +2 -1
  110. package/dist/plugins/custom-session/index.d.ts +2 -1
  111. package/dist/plugins/custom-session/index.mjs +1 -1
  112. package/dist/plugins/email-otp/index.cjs +1 -1
  113. package/dist/plugins/email-otp/index.d.cts +2 -1
  114. package/dist/plugins/email-otp/index.d.mts +2 -1
  115. package/dist/plugins/email-otp/index.d.ts +2 -1
  116. package/dist/plugins/email-otp/index.mjs +1 -1
  117. package/dist/plugins/generic-oauth/index.cjs +1 -1
  118. package/dist/plugins/generic-oauth/index.d.cts +2 -1
  119. package/dist/plugins/generic-oauth/index.d.mts +2 -1
  120. package/dist/plugins/generic-oauth/index.d.ts +2 -1
  121. package/dist/plugins/generic-oauth/index.mjs +1 -1
  122. package/dist/plugins/haveibeenpwned/index.cjs +1 -1
  123. package/dist/plugins/haveibeenpwned/index.d.cts +2 -1
  124. package/dist/plugins/haveibeenpwned/index.d.mts +2 -1
  125. package/dist/plugins/haveibeenpwned/index.d.ts +2 -1
  126. package/dist/plugins/haveibeenpwned/index.mjs +1 -1
  127. package/dist/plugins/index.cjs +994 -14
  128. package/dist/plugins/index.d.cts +556 -5
  129. package/dist/plugins/index.d.mts +556 -5
  130. package/dist/plugins/index.d.ts +556 -5
  131. package/dist/plugins/index.mjs +993 -17
  132. package/dist/plugins/jwt/index.cjs +1 -1
  133. package/dist/plugins/jwt/index.d.cts +2 -1
  134. package/dist/plugins/jwt/index.d.mts +2 -1
  135. package/dist/plugins/jwt/index.d.ts +2 -1
  136. package/dist/plugins/jwt/index.mjs +1 -1
  137. package/dist/plugins/magic-link/index.cjs +1 -1
  138. package/dist/plugins/magic-link/index.mjs +1 -1
  139. package/dist/plugins/multi-session/index.cjs +1 -1
  140. package/dist/plugins/multi-session/index.d.cts +2 -1
  141. package/dist/plugins/multi-session/index.d.mts +2 -1
  142. package/dist/plugins/multi-session/index.d.ts +2 -1
  143. package/dist/plugins/multi-session/index.mjs +1 -1
  144. package/dist/plugins/oauth-proxy/index.cjs +1 -1
  145. package/dist/plugins/oauth-proxy/index.d.cts +2 -1
  146. package/dist/plugins/oauth-proxy/index.d.mts +2 -1
  147. package/dist/plugins/oauth-proxy/index.d.ts +2 -1
  148. package/dist/plugins/oauth-proxy/index.mjs +1 -1
  149. package/dist/plugins/oidc-provider/index.cjs +12 -1314
  150. package/dist/plugins/oidc-provider/index.d.cts +12 -2
  151. package/dist/plugins/oidc-provider/index.d.mts +12 -2
  152. package/dist/plugins/oidc-provider/index.d.ts +12 -2
  153. package/dist/plugins/oidc-provider/index.mjs +10 -1317
  154. package/dist/plugins/one-tap/index.cjs +1 -1
  155. package/dist/plugins/one-tap/index.mjs +1 -1
  156. package/dist/plugins/one-time-token/index.cjs +3 -3
  157. package/dist/plugins/one-time-token/index.d.cts +10 -2
  158. package/dist/plugins/one-time-token/index.d.mts +10 -2
  159. package/dist/plugins/one-time-token/index.d.ts +10 -2
  160. package/dist/plugins/one-time-token/index.mjs +3 -3
  161. package/dist/plugins/open-api/index.cjs +1 -1
  162. package/dist/plugins/open-api/index.d.cts +2 -1
  163. package/dist/plugins/open-api/index.d.mts +2 -1
  164. package/dist/plugins/open-api/index.d.ts +2 -1
  165. package/dist/plugins/open-api/index.mjs +1 -1
  166. package/dist/plugins/organization/index.cjs +2 -2
  167. package/dist/plugins/organization/index.d.cts +2 -1
  168. package/dist/plugins/organization/index.d.mts +2 -1
  169. package/dist/plugins/organization/index.d.ts +2 -1
  170. package/dist/plugins/organization/index.mjs +2 -2
  171. package/dist/plugins/passkey/index.cjs +1 -1
  172. package/dist/plugins/passkey/index.d.cts +2 -1
  173. package/dist/plugins/passkey/index.d.mts +2 -1
  174. package/dist/plugins/passkey/index.d.ts +2 -1
  175. package/dist/plugins/passkey/index.mjs +1 -1
  176. package/dist/plugins/phone-number/index.cjs +1 -1
  177. package/dist/plugins/phone-number/index.d.cts +2 -1
  178. package/dist/plugins/phone-number/index.d.mts +2 -1
  179. package/dist/plugins/phone-number/index.d.ts +2 -1
  180. package/dist/plugins/phone-number/index.mjs +1 -1
  181. package/dist/plugins/sso/index.cjs +1 -1
  182. package/dist/plugins/sso/index.d.cts +2 -1
  183. package/dist/plugins/sso/index.d.mts +2 -1
  184. package/dist/plugins/sso/index.d.ts +2 -1
  185. package/dist/plugins/sso/index.mjs +1 -1
  186. package/dist/plugins/two-factor/index.cjs +1 -1
  187. package/dist/plugins/two-factor/index.d.cts +2 -1
  188. package/dist/plugins/two-factor/index.d.mts +2 -1
  189. package/dist/plugins/two-factor/index.d.ts +2 -1
  190. package/dist/plugins/two-factor/index.mjs +1 -1
  191. package/dist/plugins/username/index.cjs +1 -1
  192. package/dist/plugins/username/index.d.cts +2 -1
  193. package/dist/plugins/username/index.d.mts +2 -1
  194. package/dist/plugins/username/index.d.ts +2 -1
  195. package/dist/plugins/username/index.mjs +1 -1
  196. package/dist/shared/{better-auth.CgEPhLNr.mjs → better-auth.B-orlLFy.mjs} +10 -1
  197. package/dist/shared/{better-auth.B3ZXE0oB.mjs → better-auth.B5gC5Szw.mjs} +1 -1
  198. package/dist/shared/{better-auth.DXUYIjOt.d.ts → better-auth.B7NH8D_Q.d.ts} +3 -6
  199. package/dist/shared/{better-auth.Wb53qlm3.d.mts → better-auth.B9518la0.d.mts} +1 -1
  200. package/dist/shared/{better-auth.BTUGOLUq.d.cts → better-auth.BIYNWcaQ.d.cts} +1 -1
  201. package/dist/shared/{better-auth.B-ocr-ln.d.ts → better-auth.BJfF6T3s.d.ts} +1 -1
  202. package/dist/shared/{better-auth.p_mQdMUn.cjs → better-auth.BMyxOUuq.cjs} +2 -2
  203. package/dist/shared/{better-auth.CzLUJNv1.d.cts → better-auth.BVyTlGJD.d.cts} +1 -1
  204. package/dist/shared/{better-auth.CPOwNdce.mjs → better-auth.Bdaq9Lqn.mjs} +1 -1
  205. package/dist/shared/{better-auth.DMCUDVmi.mjs → better-auth.Bdf76d5Z.mjs} +2 -2
  206. package/dist/shared/{better-auth.BrXeWT2a.cjs → better-auth.Be27qhjB.cjs} +1 -1
  207. package/dist/shared/{better-auth.BkJyKRM6.cjs → better-auth.BgyblbhF.cjs} +5 -3
  208. package/dist/shared/{better-auth.D6MP7VJj.d.mts → better-auth.Bt3Neoqa.d.mts} +1 -1
  209. package/dist/shared/{better-auth.EgKeYREg.d.cts → better-auth.Bx-sj0KL.d.cts} +1 -1
  210. package/dist/shared/{better-auth.HA3dco6D.cjs → better-auth.CPnVs39B.cjs} +1 -1
  211. package/dist/shared/better-auth.CQcCOgHC.mjs +1329 -0
  212. package/dist/shared/{better-auth.C9KjeMo8.d.cts → better-auth.CUQGT7zI.d.cts} +3 -6
  213. package/dist/shared/better-auth.Ch9yQZRY.cjs +1333 -0
  214. package/dist/shared/{better-auth.CAq98Tua.d.mts → better-auth.Cm5_Oaun.d.mts} +1 -1
  215. package/dist/shared/{better-auth.CLbbPMHp.d.ts → better-auth.CsujSPu3.d.ts} +1 -1
  216. package/dist/shared/{better-auth.BsOAMBV9.mjs → better-auth.Cwb6DfVs.mjs} +5 -3
  217. package/dist/shared/{better-auth.y_xA3ejd.cjs → better-auth.DNzJK3VH.cjs} +1 -1
  218. package/dist/shared/{better-auth.C_VD3jey.mjs → better-auth.Dpv9J4ny.mjs} +1 -1
  219. package/dist/shared/{better-auth.C71dI2-S.mjs → better-auth.Dvh-YFwT.mjs} +0 -1
  220. package/dist/shared/{better-auth.DTt7BAHr.cjs → better-auth.DxtzDaxH.cjs} +0 -1
  221. package/dist/shared/{better-auth.C11tXt6H.d.mts → better-auth.ZI2NxmSV.d.mts} +3 -6
  222. package/dist/shared/{better-auth.DtsqDHx1.d.ts → better-auth.jp32bTkx.d.ts} +1 -1
  223. package/dist/shared/{better-auth.DTdU3ncH.cjs → better-auth.xK-w0Rah.cjs} +10 -1
  224. package/dist/types/index.d.cts +3 -2
  225. package/dist/types/index.d.mts +3 -2
  226. package/dist/types/index.d.ts +3 -2
  227. package/package.json +16 -15
@@ -0,0 +1,170 @@
1
+ 'use strict';
2
+
3
+ const kysely = require('kysely');
4
+
5
+ class BunSqliteAdapter {
6
+ get supportsCreateIfNotExists() {
7
+ return true;
8
+ }
9
+ get supportsTransactionalDdl() {
10
+ return false;
11
+ }
12
+ get supportsReturning() {
13
+ return true;
14
+ }
15
+ async acquireMigrationLock() {
16
+ }
17
+ async releaseMigrationLock() {
18
+ }
19
+ get supportsOutput() {
20
+ return true;
21
+ }
22
+ }
23
+ class BunSqliteDriver {
24
+ #config;
25
+ #connectionMutex = new ConnectionMutex();
26
+ #db;
27
+ #connection;
28
+ constructor(config) {
29
+ this.#config = { ...config };
30
+ }
31
+ async init() {
32
+ this.#db = this.#config.database;
33
+ this.#connection = new BunSqliteConnection(this.#db);
34
+ if (this.#config.onCreateConnection) {
35
+ await this.#config.onCreateConnection(this.#connection);
36
+ }
37
+ }
38
+ async acquireConnection() {
39
+ await this.#connectionMutex.lock();
40
+ return this.#connection;
41
+ }
42
+ async beginTransaction(connection) {
43
+ await connection.executeQuery(kysely.CompiledQuery.raw("begin"));
44
+ }
45
+ async commitTransaction(connection) {
46
+ await connection.executeQuery(kysely.CompiledQuery.raw("commit"));
47
+ }
48
+ async rollbackTransaction(connection) {
49
+ await connection.executeQuery(kysely.CompiledQuery.raw("rollback"));
50
+ }
51
+ async releaseConnection() {
52
+ this.#connectionMutex.unlock();
53
+ }
54
+ async destroy() {
55
+ this.#db?.close();
56
+ }
57
+ }
58
+ class BunSqliteConnection {
59
+ #db;
60
+ constructor(db) {
61
+ this.#db = db;
62
+ }
63
+ executeQuery(compiledQuery) {
64
+ const { sql: sql2, parameters } = compiledQuery;
65
+ const stmt = this.#db.prepare(sql2);
66
+ return Promise.resolve({
67
+ rows: stmt.all(parameters)
68
+ });
69
+ }
70
+ async *streamQuery() {
71
+ throw new Error("Streaming query is not supported by SQLite driver.");
72
+ }
73
+ }
74
+ class ConnectionMutex {
75
+ #promise;
76
+ #resolve;
77
+ async lock() {
78
+ while (this.#promise) {
79
+ await this.#promise;
80
+ }
81
+ this.#promise = new Promise((resolve) => {
82
+ this.#resolve = resolve;
83
+ });
84
+ }
85
+ unlock() {
86
+ const resolve = this.#resolve;
87
+ this.#promise = void 0;
88
+ this.#resolve = void 0;
89
+ resolve?.();
90
+ }
91
+ }
92
+ class BunSqliteIntrospector {
93
+ #db;
94
+ constructor(db) {
95
+ this.#db = db;
96
+ }
97
+ async getSchemas() {
98
+ return [];
99
+ }
100
+ async getTables(options = { withInternalKyselyTables: false }) {
101
+ let query = this.#db.selectFrom("sqlite_schema").where("type", "=", "table").where("name", "not like", "sqlite_%").select("name").$castTo();
102
+ if (!options.withInternalKyselyTables) {
103
+ query = query.where("name", "!=", kysely.DEFAULT_MIGRATION_TABLE).where("name", "!=", kysely.DEFAULT_MIGRATION_LOCK_TABLE);
104
+ }
105
+ const tables = await query.execute();
106
+ return Promise.all(tables.map(({ name }) => this.#getTableMetadata(name)));
107
+ }
108
+ async getMetadata(options) {
109
+ return {
110
+ tables: await this.getTables(options)
111
+ };
112
+ }
113
+ async #getTableMetadata(table) {
114
+ const db = this.#db;
115
+ const createSql = await db.selectFrom("sqlite_master").where("name", "=", table).select("sql").$castTo().execute();
116
+ const autoIncrementCol = createSql[0]?.sql?.split(/[\(\),]/)?.find((it) => it.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g, "");
117
+ const columns = await db.selectFrom(
118
+ kysely.sql`pragma_table_info(${table})`.as("table_info")
119
+ ).select(["name", "type", "notnull", "dflt_value"]).execute();
120
+ return {
121
+ name: table,
122
+ columns: columns.map((col) => ({
123
+ name: col.name,
124
+ dataType: col.type,
125
+ isNullable: !col.notnull,
126
+ isAutoIncrementing: col.name === autoIncrementCol,
127
+ hasDefaultValue: col.dflt_value != null
128
+ })),
129
+ isView: true
130
+ };
131
+ }
132
+ }
133
+ class BunSqliteQueryCompiler extends kysely.DefaultQueryCompiler {
134
+ getCurrentParameterPlaceholder() {
135
+ return "?";
136
+ }
137
+ getLeftIdentifierWrapper() {
138
+ return '"';
139
+ }
140
+ getRightIdentifierWrapper() {
141
+ return '"';
142
+ }
143
+ getAutoIncrement() {
144
+ return "autoincrement";
145
+ }
146
+ }
147
+ class BunSqliteDialect {
148
+ #config;
149
+ constructor(config) {
150
+ this.#config = { ...config };
151
+ }
152
+ createDriver() {
153
+ return new BunSqliteDriver(this.#config);
154
+ }
155
+ createQueryCompiler() {
156
+ return new BunSqliteQueryCompiler();
157
+ }
158
+ createAdapter() {
159
+ return new BunSqliteAdapter();
160
+ }
161
+ createIntrospector(db) {
162
+ return new BunSqliteIntrospector(db);
163
+ }
164
+ }
165
+
166
+ exports.BunSqliteAdapter = BunSqliteAdapter;
167
+ exports.BunSqliteDialect = BunSqliteDialect;
168
+ exports.BunSqliteDriver = BunSqliteDriver;
169
+ exports.BunSqliteIntrospector = BunSqliteIntrospector;
170
+ exports.BunSqliteQueryCompiler = BunSqliteQueryCompiler;
@@ -0,0 +1,164 @@
1
+ import { CompiledQuery, DefaultQueryCompiler, DEFAULT_MIGRATION_TABLE, DEFAULT_MIGRATION_LOCK_TABLE, sql } from 'kysely';
2
+
3
+ class BunSqliteAdapter {
4
+ get supportsCreateIfNotExists() {
5
+ return true;
6
+ }
7
+ get supportsTransactionalDdl() {
8
+ return false;
9
+ }
10
+ get supportsReturning() {
11
+ return true;
12
+ }
13
+ async acquireMigrationLock() {
14
+ }
15
+ async releaseMigrationLock() {
16
+ }
17
+ get supportsOutput() {
18
+ return true;
19
+ }
20
+ }
21
+ class BunSqliteDriver {
22
+ #config;
23
+ #connectionMutex = new ConnectionMutex();
24
+ #db;
25
+ #connection;
26
+ constructor(config) {
27
+ this.#config = { ...config };
28
+ }
29
+ async init() {
30
+ this.#db = this.#config.database;
31
+ this.#connection = new BunSqliteConnection(this.#db);
32
+ if (this.#config.onCreateConnection) {
33
+ await this.#config.onCreateConnection(this.#connection);
34
+ }
35
+ }
36
+ async acquireConnection() {
37
+ await this.#connectionMutex.lock();
38
+ return this.#connection;
39
+ }
40
+ async beginTransaction(connection) {
41
+ await connection.executeQuery(CompiledQuery.raw("begin"));
42
+ }
43
+ async commitTransaction(connection) {
44
+ await connection.executeQuery(CompiledQuery.raw("commit"));
45
+ }
46
+ async rollbackTransaction(connection) {
47
+ await connection.executeQuery(CompiledQuery.raw("rollback"));
48
+ }
49
+ async releaseConnection() {
50
+ this.#connectionMutex.unlock();
51
+ }
52
+ async destroy() {
53
+ this.#db?.close();
54
+ }
55
+ }
56
+ class BunSqliteConnection {
57
+ #db;
58
+ constructor(db) {
59
+ this.#db = db;
60
+ }
61
+ executeQuery(compiledQuery) {
62
+ const { sql: sql2, parameters } = compiledQuery;
63
+ const stmt = this.#db.prepare(sql2);
64
+ return Promise.resolve({
65
+ rows: stmt.all(parameters)
66
+ });
67
+ }
68
+ async *streamQuery() {
69
+ throw new Error("Streaming query is not supported by SQLite driver.");
70
+ }
71
+ }
72
+ class ConnectionMutex {
73
+ #promise;
74
+ #resolve;
75
+ async lock() {
76
+ while (this.#promise) {
77
+ await this.#promise;
78
+ }
79
+ this.#promise = new Promise((resolve) => {
80
+ this.#resolve = resolve;
81
+ });
82
+ }
83
+ unlock() {
84
+ const resolve = this.#resolve;
85
+ this.#promise = void 0;
86
+ this.#resolve = void 0;
87
+ resolve?.();
88
+ }
89
+ }
90
+ class BunSqliteIntrospector {
91
+ #db;
92
+ constructor(db) {
93
+ this.#db = db;
94
+ }
95
+ async getSchemas() {
96
+ return [];
97
+ }
98
+ async getTables(options = { withInternalKyselyTables: false }) {
99
+ let query = this.#db.selectFrom("sqlite_schema").where("type", "=", "table").where("name", "not like", "sqlite_%").select("name").$castTo();
100
+ if (!options.withInternalKyselyTables) {
101
+ query = query.where("name", "!=", DEFAULT_MIGRATION_TABLE).where("name", "!=", DEFAULT_MIGRATION_LOCK_TABLE);
102
+ }
103
+ const tables = await query.execute();
104
+ return Promise.all(tables.map(({ name }) => this.#getTableMetadata(name)));
105
+ }
106
+ async getMetadata(options) {
107
+ return {
108
+ tables: await this.getTables(options)
109
+ };
110
+ }
111
+ async #getTableMetadata(table) {
112
+ const db = this.#db;
113
+ const createSql = await db.selectFrom("sqlite_master").where("name", "=", table).select("sql").$castTo().execute();
114
+ const autoIncrementCol = createSql[0]?.sql?.split(/[\(\),]/)?.find((it) => it.toLowerCase().includes("autoincrement"))?.split(/\s+/)?.[0]?.replace(/["`]/g, "");
115
+ const columns = await db.selectFrom(
116
+ sql`pragma_table_info(${table})`.as("table_info")
117
+ ).select(["name", "type", "notnull", "dflt_value"]).execute();
118
+ return {
119
+ name: table,
120
+ columns: columns.map((col) => ({
121
+ name: col.name,
122
+ dataType: col.type,
123
+ isNullable: !col.notnull,
124
+ isAutoIncrementing: col.name === autoIncrementCol,
125
+ hasDefaultValue: col.dflt_value != null
126
+ })),
127
+ isView: true
128
+ };
129
+ }
130
+ }
131
+ class BunSqliteQueryCompiler extends DefaultQueryCompiler {
132
+ getCurrentParameterPlaceholder() {
133
+ return "?";
134
+ }
135
+ getLeftIdentifierWrapper() {
136
+ return '"';
137
+ }
138
+ getRightIdentifierWrapper() {
139
+ return '"';
140
+ }
141
+ getAutoIncrement() {
142
+ return "autoincrement";
143
+ }
144
+ }
145
+ class BunSqliteDialect {
146
+ #config;
147
+ constructor(config) {
148
+ this.#config = { ...config };
149
+ }
150
+ createDriver() {
151
+ return new BunSqliteDriver(this.#config);
152
+ }
153
+ createQueryCompiler() {
154
+ return new BunSqliteQueryCompiler();
155
+ }
156
+ createAdapter() {
157
+ return new BunSqliteAdapter();
158
+ }
159
+ createIntrospector(db) {
160
+ return new BunSqliteIntrospector(db);
161
+ }
162
+ }
163
+
164
+ export { BunSqliteAdapter, BunSqliteDialect, BunSqliteDriver, BunSqliteIntrospector, BunSqliteQueryCompiler };
@@ -1,4 +1,4 @@
1
- import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.C9KjeMo8.cjs';
1
+ import { c as BASE_ERROR_CODES, e as BetterAuthPlugin } from '../shared/better-auth.CUQGT7zI.cjs';
2
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
4
4
  export * from '@better-fetch/fetch';
@@ -14,6 +14,7 @@ import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-call';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
19
20
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
@@ -1,4 +1,4 @@
1
- import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.C11tXt6H.mjs';
1
+ import { c as BASE_ERROR_CODES, e as BetterAuthPlugin } from '../shared/better-auth.ZI2NxmSV.mjs';
2
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
4
4
  export * from '@better-fetch/fetch';
@@ -14,6 +14,7 @@ import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-call';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
19
20
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
@@ -1,4 +1,4 @@
1
- import { j as BASE_ERROR_CODES, B as BetterAuthPlugin } from '../shared/better-auth.DXUYIjOt.js';
1
+ import { c as BASE_ERROR_CODES, e as BetterAuthPlugin } from '../shared/better-auth.B7NH8D_Q.js';
2
2
  import * as _better_fetch_fetch from '@better-fetch/fetch';
3
3
  import { BetterFetchError, BetterFetch, BetterFetchOption } from '@better-fetch/fetch';
4
4
  export * from '@better-fetch/fetch';
@@ -14,6 +14,7 @@ import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-call';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
19
20
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: Atoms[key];
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.cjs';
11
11
  import { magicLink } from '../../plugins/magic-link/index.cjs';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.cjs';
13
13
  import { anonymous } from '../../plugins/anonymous/index.cjs';
14
- import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.C9KjeMo8.cjs';
14
+ import { F as FieldAttribute, B as BetterAuthOptions, e as BetterAuthPlugin } from '../../shared/better-auth.CUQGT7zI.cjs';
15
15
  import { admin } from '../../plugins/admin/index.cjs';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.cjs';
17
17
  import { jwt } from '../../plugins/jwt/index.cjs';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.cjs';
20
20
  import { Store } from '../../types/index.cjs';
21
21
  import { sso } from '../../plugins/sso/index.cjs';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.cjs';
23
- import { a as apiKey } from '../../shared/better-auth.CzLUJNv1.cjs';
23
+ import { a as apiKey } from '../../shared/better-auth.BVyTlGJD.cjs';
24
24
  import { oneTimeToken } from '../../plugins/one-time-token/index.cjs';
25
25
  export * from '@simplewebauthn/server';
26
26
  import 'zod';
@@ -30,6 +30,7 @@ import '../../shared/better-auth._rXvQlMG.cjs';
30
30
  import 'jose';
31
31
  import 'kysely';
32
32
  import 'better-sqlite3';
33
+ import 'bun:sqlite';
33
34
 
34
35
  interface OrganizationClientOptions {
35
36
  ac?: AccessControl;
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.mjs';
11
11
  import { magicLink } from '../../plugins/magic-link/index.mjs';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.mjs';
13
13
  import { anonymous } from '../../plugins/anonymous/index.mjs';
14
- import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.C11tXt6H.mjs';
14
+ import { F as FieldAttribute, B as BetterAuthOptions, e as BetterAuthPlugin } from '../../shared/better-auth.ZI2NxmSV.mjs';
15
15
  import { admin } from '../../plugins/admin/index.mjs';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.mjs';
17
17
  import { jwt } from '../../plugins/jwt/index.mjs';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.mjs';
20
20
  import { Store } from '../../types/index.mjs';
21
21
  import { sso } from '../../plugins/sso/index.mjs';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.mjs';
23
- import { a as apiKey } from '../../shared/better-auth.CAq98Tua.mjs';
23
+ import { a as apiKey } from '../../shared/better-auth.Cm5_Oaun.mjs';
24
24
  import { oneTimeToken } from '../../plugins/one-time-token/index.mjs';
25
25
  export * from '@simplewebauthn/server';
26
26
  import 'zod';
@@ -30,6 +30,7 @@ import '../../shared/better-auth.BTXFetzv.mjs';
30
30
  import 'jose';
31
31
  import 'kysely';
32
32
  import 'better-sqlite3';
33
+ import 'bun:sqlite';
33
34
 
34
35
  interface OrganizationClientOptions {
35
36
  ac?: AccessControl;
@@ -11,7 +11,7 @@ export { twoFactorClient } from '../../plugins/two-factor/index.js';
11
11
  import { magicLink } from '../../plugins/magic-link/index.js';
12
12
  import { phoneNumber } from '../../plugins/phone-number/index.js';
13
13
  import { anonymous } from '../../plugins/anonymous/index.js';
14
- import { F as FieldAttribute, f as BetterAuthOptions, B as BetterAuthPlugin } from '../../shared/better-auth.DXUYIjOt.js';
14
+ import { F as FieldAttribute, B as BetterAuthOptions, e as BetterAuthPlugin } from '../../shared/better-auth.B7NH8D_Q.js';
15
15
  import { admin } from '../../plugins/admin/index.js';
16
16
  import { genericOAuth } from '../../plugins/generic-oauth/index.js';
17
17
  import { jwt } from '../../plugins/jwt/index.js';
@@ -20,7 +20,7 @@ import { emailOTP } from '../../plugins/email-otp/index.js';
20
20
  import { Store } from '../../types/index.js';
21
21
  import { sso } from '../../plugins/sso/index.js';
22
22
  import { oidcProvider } from '../../plugins/oidc-provider/index.js';
23
- import { a as apiKey } from '../../shared/better-auth.DtsqDHx1.js';
23
+ import { a as apiKey } from '../../shared/better-auth.jp32bTkx.js';
24
24
  import { oneTimeToken } from '../../plugins/one-time-token/index.js';
25
25
  export * from '@simplewebauthn/server';
26
26
  import 'zod';
@@ -30,6 +30,7 @@ import '../../shared/better-auth.Bzjh9zg_.js';
30
30
  import 'jose';
31
31
  import 'kysely';
32
32
  import 'better-sqlite3';
33
+ import 'bun:sqlite';
33
34
 
34
35
  interface OrganizationClientOptions {
35
36
  ac?: AccessControl;
@@ -7,13 +7,14 @@ export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
9
9
  import { DependencyList } from 'react';
10
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C9KjeMo8.cjs';
10
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.CUQGT7zI.cjs';
11
11
  import 'better-call';
12
12
  import 'zod';
13
13
  import '../../shared/better-auth._rXvQlMG.cjs';
14
14
  import 'jose';
15
15
  import 'kysely';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type StoreKeys<T> = T extends {
19
20
  setKey: (k: infer K, v: any) => unknown;
@@ -7,13 +7,14 @@ export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
9
9
  import { DependencyList } from 'react';
10
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C11tXt6H.mjs';
10
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.ZI2NxmSV.mjs';
11
11
  import 'better-call';
12
12
  import 'zod';
13
13
  import '../../shared/better-auth.BTXFetzv.mjs';
14
14
  import 'jose';
15
15
  import 'kysely';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type StoreKeys<T> = T extends {
19
20
  setKey: (k: infer K, v: any) => unknown;
@@ -7,13 +7,14 @@ export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
9
9
  import { DependencyList } from 'react';
10
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DXUYIjOt.js';
10
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.B7NH8D_Q.js';
11
11
  import 'better-call';
12
12
  import 'zod';
13
13
  import '../../shared/better-auth.Bzjh9zg_.js';
14
14
  import 'jose';
15
15
  import 'kysely';
16
16
  import 'better-sqlite3';
17
+ import 'bun:sqlite';
17
18
 
18
19
  type StoreKeys<T> = T extends {
19
20
  setKey: (k: infer K, v: any) => unknown;
@@ -4,7 +4,7 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
7
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C9KjeMo8.cjs';
7
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.CUQGT7zI.cjs';
8
8
  export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
@@ -12,6 +12,7 @@ import '../../shared/better-auth._rXvQlMG.cjs';
12
12
  import 'jose';
13
13
  import 'kysely';
14
14
  import 'better-sqlite3';
15
+ import 'bun:sqlite';
15
16
 
16
17
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
17
18
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
@@ -4,7 +4,7 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
7
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C11tXt6H.mjs';
7
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.ZI2NxmSV.mjs';
8
8
  export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
@@ -12,6 +12,7 @@ import '../../shared/better-auth.BTXFetzv.mjs';
12
12
  import 'jose';
13
13
  import 'kysely';
14
14
  import 'better-sqlite3';
15
+ import 'bun:sqlite';
15
16
 
16
17
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
17
18
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
@@ -4,7 +4,7 @@ export * from '@better-fetch/fetch';
4
4
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
5
5
  import { Accessor } from 'solid-js';
6
6
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
7
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DXUYIjOt.js';
7
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.B7NH8D_Q.js';
8
8
  export * from 'nanostores';
9
9
  import 'better-call';
10
10
  import 'zod';
@@ -12,6 +12,7 @@ import '../../shared/better-auth.Bzjh9zg_.js';
12
12
  import 'jose';
13
13
  import 'kysely';
14
14
  import 'better-sqlite3';
15
+ import 'bun:sqlite';
15
16
 
16
17
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
17
18
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Accessor<ReturnType<Atoms[key]["get"]>>;
@@ -6,13 +6,14 @@ import { BetterFetchError } from '@better-fetch/fetch';
6
6
  export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
9
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C9KjeMo8.cjs';
9
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.CUQGT7zI.cjs';
10
10
  import 'better-call';
11
11
  import 'zod';
12
12
  import '../../shared/better-auth._rXvQlMG.cjs';
13
13
  import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-sqlite3';
16
+ import 'bun:sqlite';
16
17
 
17
18
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
18
19
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Atoms[key];
@@ -6,13 +6,14 @@ import { BetterFetchError } from '@better-fetch/fetch';
6
6
  export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
9
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C11tXt6H.mjs';
9
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.ZI2NxmSV.mjs';
10
10
  import 'better-call';
11
11
  import 'zod';
12
12
  import '../../shared/better-auth.BTXFetzv.mjs';
13
13
  import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-sqlite3';
16
+ import 'bun:sqlite';
16
17
 
17
18
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
18
19
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Atoms[key];
@@ -6,13 +6,14 @@ import { BetterFetchError } from '@better-fetch/fetch';
6
6
  export * from '@better-fetch/fetch';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.js';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.js';
9
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.DXUYIjOt.js';
9
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.B7NH8D_Q.js';
10
10
  import 'better-call';
11
11
  import 'zod';
12
12
  import '../../shared/better-auth.Bzjh9zg_.js';
13
13
  import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-sqlite3';
16
+ import 'bun:sqlite';
16
17
 
17
18
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
18
19
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => Atoms[key];
@@ -6,13 +6,14 @@ export * from '@better-fetch/fetch';
6
6
  import { DeepReadonly, Ref } from 'vue';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.cjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.cjs';
9
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C9KjeMo8.cjs';
9
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.CUQGT7zI.cjs';
10
10
  import 'better-call';
11
11
  import 'zod';
12
12
  import '../../shared/better-auth._rXvQlMG.cjs';
13
13
  import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-sqlite3';
16
+ import 'bun:sqlite';
16
17
 
17
18
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
18
19
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => DeepReadonly<Ref<ReturnType<Atoms[key]["get"]>>>;
@@ -6,13 +6,14 @@ export * from '@better-fetch/fetch';
6
6
  import { DeepReadonly, Ref } from 'vue';
7
7
  import { ClientOptions, BetterAuthClientPlugin, IsSignal, InferClientAPI, InferActions, InferErrorCodes } from '../../types/index.mjs';
8
8
  import { U as UnionToIntersection, a as PrettifyDeep } from '../../shared/better-auth.CYegVoq1.mjs';
9
- import { j as BASE_ERROR_CODES } from '../../shared/better-auth.C11tXt6H.mjs';
9
+ import { c as BASE_ERROR_CODES } from '../../shared/better-auth.ZI2NxmSV.mjs';
10
10
  import 'better-call';
11
11
  import 'zod';
12
12
  import '../../shared/better-auth.BTXFetzv.mjs';
13
13
  import 'jose';
14
14
  import 'kysely';
15
15
  import 'better-sqlite3';
16
+ import 'bun:sqlite';
16
17
 
17
18
  type InferResolvedHooks<O extends ClientOptions> = O["plugins"] extends Array<infer Plugin> ? Plugin extends BetterAuthClientPlugin ? Plugin["getAtoms"] extends (fetch: any) => infer Atoms ? Atoms extends Record<string, any> ? {
18
19
  [key in keyof Atoms as IsSignal<key> extends true ? never : key extends string ? `use${Capitalize<key>}` : never]: () => DeepReadonly<Ref<ReturnType<Atoms[key]["get"]>>>;