faire-auth 1.0.3 → 1.1.0

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 (228) hide show
  1. package/dist/{adapter-factory-lKIOf2OR.mjs → adapter-factory-qPVW8x9-.mjs} +34 -36
  2. package/dist/{adapter-factory-D1I7joki.cjs → adapter-factory-u8r3oTez.cjs} +66 -68
  3. package/dist/adapters/drizzle-adapter/index.cjs +34 -40
  4. package/dist/adapters/drizzle-adapter/index.d.cts +4 -9
  5. package/dist/adapters/drizzle-adapter/index.d.mts +4 -9
  6. package/dist/adapters/drizzle-adapter/index.mjs +20 -26
  7. package/dist/adapters/index.cjs +11 -16
  8. package/dist/adapters/index.d.cts +11 -37
  9. package/dist/adapters/index.d.mts +11 -37
  10. package/dist/adapters/index.mjs +4 -13
  11. package/dist/adapters/kysely-adapter/index.cjs +270 -11
  12. package/dist/adapters/kysely-adapter/index.d.cts +9 -19
  13. package/dist/adapters/kysely-adapter/index.d.mts +9 -19
  14. package/dist/adapters/kysely-adapter/index.mjs +267 -9
  15. package/dist/adapters/memory-adapter/index.cjs +146 -9
  16. package/dist/adapters/memory-adapter/index.d.cts +4 -10
  17. package/dist/adapters/memory-adapter/index.d.mts +4 -10
  18. package/dist/adapters/memory-adapter/index.mjs +145 -9
  19. package/dist/adapters/mongodb-adapter/index.cjs +13 -21
  20. package/dist/adapters/mongodb-adapter/index.d.cts +3 -8
  21. package/dist/adapters/mongodb-adapter/index.d.mts +4 -9
  22. package/dist/adapters/mongodb-adapter/index.mjs +12 -20
  23. package/dist/adapters/prisma-adapter/index.cjs +12 -20
  24. package/dist/adapters/prisma-adapter/index.d.cts +4 -8
  25. package/dist/adapters/prisma-adapter/index.d.mts +4 -8
  26. package/dist/adapters/prisma-adapter/index.mjs +5 -13
  27. package/dist/adapters/test.cjs +86 -69
  28. package/dist/adapters/test.d.cts +7 -11
  29. package/dist/adapters/test.d.mts +7 -11
  30. package/dist/adapters/test.mjs +83 -66
  31. package/dist/api/index.cjs +3 -20
  32. package/dist/api/index.d.cts +2 -3
  33. package/dist/api/index.d.mts +2 -3
  34. package/dist/api/index.mjs +1 -20
  35. package/dist/api/middleware/index.cjs +4 -11
  36. package/dist/api/middleware/index.d.cts +3 -9
  37. package/dist/api/middleware/index.d.mts +3 -9
  38. package/dist/api/middleware/index.mjs +3 -11
  39. package/dist/{api-B4RDwBty.mjs → api-0f-F-Fi2.mjs} +292 -189
  40. package/dist/{api-CaRC1Gio.cjs → api-LjfH6hQi.cjs} +557 -452
  41. package/dist/{test-utils/bun-sqlite-dialect-BZBvHchL.cjs → bun-sqlite-dialect-BHkarnxN.cjs} +5 -9
  42. package/dist/{test-utils/bun-sqlite-dialect-BSWhhKNs.mjs → bun-sqlite-dialect-BiZBuEF6.mjs} +6 -9
  43. package/dist/client/index.cjs +8 -15
  44. package/dist/client/index.d.cts +9 -14
  45. package/dist/client/index.d.mts +9 -14
  46. package/dist/client/index.mjs +7 -15
  47. package/dist/client/lynx/index.cjs +10 -18
  48. package/dist/client/lynx/index.d.cts +402 -71
  49. package/dist/client/lynx/index.d.mts +402 -71
  50. package/dist/client/lynx/index.mjs +5 -13
  51. package/dist/client/plugins/index.cjs +3 -5
  52. package/dist/client/plugins/index.d.cts +5 -10
  53. package/dist/client/plugins/index.d.mts +5 -10
  54. package/dist/client/plugins/index.mjs +2 -4
  55. package/dist/client/react/index.cjs +6 -14
  56. package/dist/client/react/index.d.cts +402 -71
  57. package/dist/client/react/index.d.mts +402 -71
  58. package/dist/client/react/index.mjs +5 -13
  59. package/dist/client/solid/index.cjs +6 -14
  60. package/dist/client/solid/index.d.cts +393 -57
  61. package/dist/client/solid/index.d.mts +393 -57
  62. package/dist/client/solid/index.mjs +5 -13
  63. package/dist/client/svelte/index.cjs +5 -10
  64. package/dist/client/svelte/index.d.cts +400 -67
  65. package/dist/client/svelte/index.d.mts +400 -67
  66. package/dist/client/svelte/index.mjs +4 -10
  67. package/dist/client/vue/index.cjs +6 -14
  68. package/dist/client/vue/index.d.cts +401 -68
  69. package/dist/client/vue/index.d.mts +401 -68
  70. package/dist/client/vue/index.mjs +5 -13
  71. package/dist/{cookies-BTs1o992.mjs → cookies-D9aY_gJh.mjs} +25 -21
  72. package/dist/{cookies-BTl72THv.cjs → cookies-DQ52rcOy.cjs} +119 -115
  73. package/dist/crypto/index.cjs +10 -8
  74. package/dist/crypto/index.d.cts +5 -13
  75. package/dist/crypto/index.d.mts +5 -13
  76. package/dist/crypto/index.mjs +2 -5
  77. package/dist/{crypto-DH2Aa7jN.mjs → crypto-BH-hD0lJ.mjs} +7 -10
  78. package/dist/{crypto-DpSCnrTp.cjs → crypto-BITfWVwD.cjs} +24 -27
  79. package/dist/db/index.cjs +1135 -29
  80. package/dist/db/index.d.cts +1 -2
  81. package/dist/db/index.d.mts +1 -2
  82. package/dist/db/index.mjs +1115 -16
  83. package/dist/defu-D2h4S3X-.mjs +87 -0
  84. package/dist/defu-DWS5RPWt.cjs +134 -0
  85. package/dist/{email-verification-DI_0H4JC.cjs → email-verification-DOPnSgbI.cjs} +65 -71
  86. package/dist/{email-verification-C_lBu_JY.mjs → email-verification-YSR5n5lb.mjs} +23 -29
  87. package/dist/{hono-CO-zsqI-.mjs → hono-BAV2wQkK.mjs} +16 -33
  88. package/dist/hono-SVQuc5Ru.mjs +4 -0
  89. package/dist/hono-pgK4H_U1.cjs +9 -0
  90. package/dist/{hono-DnW5crl1.cjs → hono-tyFFJFdS.cjs} +42 -60
  91. package/dist/index-B86Cy0dE.d.cts +2 -0
  92. package/dist/index-B86Cy0dE.d.mts +2 -0
  93. package/dist/index.cjs +115 -150
  94. package/dist/index.d.cts +4 -5
  95. package/dist/index.d.mts +4 -5
  96. package/dist/index.mjs +46 -81
  97. package/dist/integrations/next-js.cjs +5 -9
  98. package/dist/integrations/next-js.d.cts +6 -14
  99. package/dist/integrations/next-js.d.mts +6 -14
  100. package/dist/integrations/next-js.mjs +4 -9
  101. package/dist/integrations/node.cjs +16 -14
  102. package/dist/integrations/node.d.cts +6 -14
  103. package/dist/integrations/node.d.mts +6 -14
  104. package/dist/integrations/node.mjs +15 -13
  105. package/dist/integrations/react-start.cjs +7 -11
  106. package/dist/integrations/react-start.d.cts +5 -13
  107. package/dist/integrations/react-start.d.mts +5 -13
  108. package/dist/integrations/react-start.mjs +6 -11
  109. package/dist/integrations/solid-start.cjs +3 -5
  110. package/dist/integrations/solid-start.d.cts +2 -5
  111. package/dist/integrations/solid-start.d.mts +2 -5
  112. package/dist/integrations/solid-start.mjs +2 -4
  113. package/dist/integrations/svelte-kit.cjs +6 -10
  114. package/dist/integrations/svelte-kit.d.cts +11 -23
  115. package/dist/integrations/svelte-kit.d.mts +11 -23
  116. package/dist/integrations/svelte-kit.mjs +5 -10
  117. package/dist/{ip-BjNYspCH.mjs → ip-6Lv2o42m.mjs} +4 -9
  118. package/dist/{ip-C17Qdq-G.cjs → ip-DPydExzV.cjs} +21 -27
  119. package/dist/{json--tl7Grvs.cjs → json-D3aq-nH2.cjs} +9 -13
  120. package/dist/{json-B1v2qRTQ.mjs → json-DooGMtnJ.mjs} +2 -5
  121. package/dist/{logged-CyGfp8_H.mjs → logged-B83SzMnJ.mjs} +6 -10
  122. package/dist/{logged-Dv3st5qc.cjs → logged-BIpCpnVY.cjs} +13 -18
  123. package/dist/{middleware-CE6OhDkq.mjs → middleware-Cakg4e1D.mjs} +2 -4
  124. package/dist/{middleware-CWvRH4EW.cjs → middleware-Cd-VkNxB.cjs} +17 -20
  125. package/dist/{node-sqlite-dialect-w4DAg0PH.mjs → node-sqlite-dialect-BMVOjEMh.mjs} +6 -9
  126. package/dist/{test-utils/node-sqlite-dialect-BgJqjBOu.cjs → node-sqlite-dialect-D3QPFROH.cjs} +5 -9
  127. package/dist/oauth2/index.cjs +166 -22
  128. package/dist/oauth2/index.d.cts +5 -17
  129. package/dist/oauth2/index.d.mts +5 -17
  130. package/dist/oauth2/index.mjs +156 -16
  131. package/dist/{origin-check-DjLTuZQ8.cjs → origin-check-BflGhEEN.cjs} +34 -38
  132. package/dist/{origin-check-8Gajklvh.mjs → origin-check-CRgs1M7k.mjs} +13 -16
  133. package/dist/{parser-B25ylT5u.mjs → parser-CqwvpF6l.cjs} +12 -10
  134. package/dist/{parser-B_wxvaAr.cjs → parser-DcKDjjHO.mjs} +7 -22
  135. package/dist/plugins/access/index.cjs +38 -4
  136. package/dist/plugins/access/index.d.cts +36 -2
  137. package/dist/plugins/access/index.d.mts +36 -2
  138. package/dist/plugins/access/index.mjs +36 -3
  139. package/dist/plugins/bearer/index.cjs +52 -7
  140. package/dist/plugins/bearer/index.d.cts +27 -4
  141. package/dist/plugins/bearer/index.d.mts +27 -4
  142. package/dist/plugins/bearer/index.mjs +51 -7
  143. package/dist/plugins/index.cjs +1385 -842
  144. package/dist/plugins/index.d.cts +489 -7566
  145. package/dist/plugins/index.d.mts +489 -7566
  146. package/dist/plugins/index.mjs +1118 -576
  147. package/dist/plugins/passkey/index.cjs +551 -15
  148. package/dist/plugins/passkey/index.d.cts +123 -4
  149. package/dist/plugins/passkey/index.d.mts +123 -4
  150. package/dist/plugins/passkey/index.mjs +547 -15
  151. package/dist/{chunk-BFnQceUY.mjs → rolldown-runtime-BKpuH2hG.mjs} +6 -7
  152. package/dist/{chunk-fPmz2rbM.cjs → rolldown-runtime-C_Pgydhf.cjs} +22 -24
  153. package/dist/{schema-DTIwLLmf.mjs → schema-CFCpv0tK.mjs} +3 -6
  154. package/dist/{schema-CirKflVs.cjs → schema-b-lKhMkG.cjs} +51 -55
  155. package/dist/{session-CM3rmOYF.mjs → session-BGjJgihS.mjs} +51 -74
  156. package/dist/{session-Cwrj4GfV.cjs → session-CzZSMmQC.cjs} +197 -219
  157. package/dist/shared.d.cts +1581 -0
  158. package/dist/shared.d.mts +1581 -0
  159. package/dist/social-providers/index.cjs +9 -9
  160. package/dist/social-providers/index.d.cts +1 -1
  161. package/dist/social-providers/index.d.mts +1 -1
  162. package/dist/social-providers/index.mjs +3 -5
  163. package/dist/social-providers-CjPww-qf.mjs +6 -0
  164. package/dist/social-providers-D7w_7Ym8.cjs +10 -0
  165. package/dist/{state-CvSihlVT.cjs → state-2OrNjOO-.cjs} +24 -24
  166. package/dist/{state-CQghgH9I.mjs → state-Dooeisfq.mjs} +17 -17
  167. package/dist/{bun-sqlite-dialect-DPgTzc0w.cjs → test-utils/bun-sqlite-dialect-BHkarnxN.cjs} +5 -9
  168. package/dist/{bun-sqlite-dialect-6NqeV3px.mjs → test-utils/bun-sqlite-dialect-BiZBuEF6.mjs} +6 -9
  169. package/dist/test-utils/index.cjs +8831 -7941
  170. package/dist/test-utils/index.d.cts +310 -12440
  171. package/dist/test-utils/index.d.mts +313 -12440
  172. package/dist/test-utils/index.mjs +8591 -7701
  173. package/dist/test-utils/{node-sqlite-dialect-DAQXiobH.mjs → node-sqlite-dialect-BMVOjEMh.mjs} +6 -9
  174. package/dist/{node-sqlite-dialect-DP11CB0y.cjs → test-utils/node-sqlite-dialect-D3QPFROH.cjs} +5 -9
  175. package/dist/types/index.d.cts +2 -3
  176. package/dist/types/index.d.mts +2 -3
  177. package/dist/types/index.mjs +1 -1
  178. package/dist/{url-BoUuoIwZ.mjs → url-CJtdrrUu.mjs} +12 -13
  179. package/dist/{url-Ce7CVaQD.cjs → url-DjCmCUHS.cjs} +42 -44
  180. package/dist/utils/cookies.cjs +29 -30
  181. package/dist/utils/cookies.d.cts +21 -25
  182. package/dist/utils/cookies.d.mts +20 -24
  183. package/dist/utils/cookies.mjs +2 -7
  184. package/dist/utils-C7OHyfHa.mjs +4 -0
  185. package/dist/utils-iX0Vy_UL.cjs +3 -0
  186. package/package.json +40 -30
  187. package/dist/access-BZ7-AbTM.cjs +0 -51
  188. package/dist/access-D0DRqUKC.mjs +0 -39
  189. package/dist/bearer-DDzrp5M7.cjs +0 -60
  190. package/dist/bearer-WZcs7gxL.mjs +0 -54
  191. package/dist/db-4tUsQJXd.mjs +0 -1119
  192. package/dist/db-ChMbb_U-.cjs +0 -1180
  193. package/dist/defu-BmOYq4PU.cjs +0 -34
  194. package/dist/defu-D9ZTXqlo.mjs +0 -28
  195. package/dist/hono-C14rpOEa.cjs +0 -13
  196. package/dist/hono-CoKYWnXA.mjs +0 -7
  197. package/dist/hono-D0VqxVy1.d.mts +0 -18
  198. package/dist/hono-DOM31WQz.d.cts +0 -18
  199. package/dist/index-BCTFWP_o.d.mts +0 -992
  200. package/dist/index-BDhhaE6Y.d.cts +0 -3
  201. package/dist/index-BVRfQy6L.d.mts +0 -992
  202. package/dist/index-Baarsq5J.d.mts +0 -33
  203. package/dist/index-By364WbF.d.cts +0 -992
  204. package/dist/index-BzWwMgxr.d.cts +0 -992
  205. package/dist/index-CF9iq55a.d.mts +0 -3
  206. package/dist/index-CJD2yB-W.d.cts +0 -33
  207. package/dist/index-CRt_fppq.d.mts +0 -41
  208. package/dist/index-CdLyn7qP.d.cts +0 -41
  209. package/dist/index-CsWF3f7U.d.cts +0 -13350
  210. package/dist/index-CzidsAyA.d.mts +0 -13350
  211. package/dist/index-DvW-GCcI.d.cts +0 -33
  212. package/dist/index-f-5OJ9yV.d.cts +0 -13350
  213. package/dist/index-rFv8Hxld.d.mts +0 -13350
  214. package/dist/index-ztVZPQdV.d.mts +0 -33
  215. package/dist/kysely-adapter-CtIdoHa8.mjs +0 -270
  216. package/dist/kysely-adapter-QZTx077T.cjs +0 -288
  217. package/dist/memory-adapter-17RZd5df.cjs +0 -154
  218. package/dist/memory-adapter-Dp4XdCZK.mjs +0 -148
  219. package/dist/oauth2-5RL4cVNS.cjs +0 -177
  220. package/dist/oauth2-C56wz-n9.mjs +0 -159
  221. package/dist/passkey-BTT-v5c-.cjs +0 -512
  222. package/dist/passkey-CzY_W2us.mjs +0 -505
  223. package/dist/request-1NL_1lyJ.mjs +0 -58
  224. package/dist/request-CPNlp-DK.cjs +0 -100
  225. package/dist/social-providers-B8RK5yqI.mjs +0 -9
  226. package/dist/social-providers-BmFOIIPk.cjs +0 -13
  227. package/dist/utils-44aDDP8f.cjs +0 -2
  228. package/dist/utils-D4vZd1-9.mjs +0 -4
@@ -1,7 +1,5 @@
1
- const require_index = require('./index.cjs');
2
1
  let kysely = require("kysely");
3
-
4
- //#region src/adapters/kysely-adapter/bun-sqlite-dialect.ts
2
+ // src/adapters/kysely-adapter/bun-sqlite-dialect.ts
5
3
  var BunSqliteAdapter = class {
6
4
  get supportsCreateIfNotExists() {
7
5
  return true;
@@ -57,8 +55,8 @@ var BunSqliteConnection = class {
57
55
  this.#db = db;
58
56
  }
59
57
  executeQuery(compiledQuery) {
60
- const { sql: sql$1, parameters } = compiledQuery;
61
- const stmt = this.#db.prepare(sql$1);
58
+ const { sql, parameters } = compiledQuery;
59
+ const stmt = this.#db.prepare(sql);
62
60
  return Promise.resolve({ rows: stmt.all(parameters) });
63
61
  }
64
62
  async *streamQuery() {
@@ -69,7 +67,7 @@ var ConnectionMutex = class {
69
67
  #promise;
70
68
  #resolve;
71
69
  async lock() {
72
- while (this.#promise) await this.#promise;
70
+ while (this.#promise !== void 0) await this.#promise;
73
71
  this.#promise = new Promise((resolve) => {
74
72
  this.#resolve = resolve;
75
73
  });
@@ -151,6 +149,4 @@ var BunSqliteDialect = class {
151
149
  return new BunSqliteIntrospector(db);
152
150
  }
153
151
  };
154
-
155
- //#endregion
156
- exports.BunSqliteDialect = BunSqliteDialect;
152
+ exports.BunSqliteDialect = BunSqliteDialect;
@@ -1,6 +1,5 @@
1
- import { CompiledQuery, DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, DefaultQueryCompiler, Kysely, sql } from "kysely";
2
-
3
- //#region src/adapters/kysely-adapter/bun-sqlite-dialect.ts
1
+ import { CompiledQuery, DEFAULT_MIGRATION_LOCK_TABLE, DEFAULT_MIGRATION_TABLE, DefaultQueryCompiler, sql } from "kysely";
2
+ // src/adapters/kysely-adapter/bun-sqlite-dialect.ts
4
3
  var BunSqliteAdapter = class {
5
4
  get supportsCreateIfNotExists() {
6
5
  return true;
@@ -56,8 +55,8 @@ var BunSqliteConnection = class {
56
55
  this.#db = db;
57
56
  }
58
57
  executeQuery(compiledQuery) {
59
- const { sql: sql$1, parameters } = compiledQuery;
60
- const stmt = this.#db.prepare(sql$1);
58
+ const { sql, parameters } = compiledQuery;
59
+ const stmt = this.#db.prepare(sql);
61
60
  return Promise.resolve({ rows: stmt.all(parameters) });
62
61
  }
63
62
  async *streamQuery() {
@@ -68,7 +67,7 @@ var ConnectionMutex = class {
68
67
  #promise;
69
68
  #resolve;
70
69
  async lock() {
71
- while (this.#promise) await this.#promise;
70
+ while (this.#promise !== void 0) await this.#promise;
72
71
  this.#promise = new Promise((resolve) => {
73
72
  this.#resolve = resolve;
74
73
  });
@@ -150,6 +149,4 @@ var BunSqliteDialect = class {
150
149
  return new BunSqliteIntrospector(db);
151
150
  }
152
151
  };
153
-
154
- //#endregion
155
- export { BunSqliteAdapter, BunSqliteDialect, BunSqliteDriver, BunSqliteIntrospector, BunSqliteQueryCompiler };
152
+ export { BunSqliteDialect };
@@ -1,11 +1,8 @@
1
- const require_logged = require('../logged-Dv3st5qc.cjs');
2
- const require_url = require('../url-Ce7CVaQD.cjs');
3
- require('../request-CPNlp-DK.cjs');
4
- require('../defu-BmOYq4PU.cjs');
5
- const require_hono = require('../hono-DnW5crl1.cjs');
6
- require('../parser-B_wxvaAr.cjs');
7
-
8
- //#region src/client/vanilla.ts
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_url = require("../url-DjCmCUHS.cjs");
3
+ const require_hono = require("../hono-tyFFJFdS.cjs");
4
+ const require_logged = require("../logged-BIpCpnVY.cjs");
5
+ // src/client/vanilla.ts
9
6
  const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
10
7
  const createAuthClient = () => (options) => {
11
8
  const baseURL = require_url.getBaseURL(options.baseURL, options.basePath);
@@ -21,11 +18,9 @@ const createAuthClient = () => (options) => {
21
18
  return require_hono.createHonoClient({
22
19
  baseURL,
23
20
  createFetchOptions: options.fetchOptions
24
- }, routes, require_logged.logged_default.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
21
+ }, routes, require_logged.LoggerAPI.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
25
22
  };
26
-
27
- //#endregion
28
- //#region src/client/index.ts
23
+ // src/client/index.ts
29
24
  const InferPlugin = () => ({
30
25
  id: "infer-server-plugin",
31
26
  $InferServerPlugin: {}
@@ -33,9 +28,7 @@ const InferPlugin = () => ({
33
28
  function InferAuth() {
34
29
  return {};
35
30
  }
36
-
37
- //#endregion
38
31
  exports.InferAuth = InferAuth;
39
32
  exports.InferPlugin = InferPlugin;
40
33
  exports.createAuthClient = createAuthClient;
41
- exports.useAuthQuery = require_hono.useAuthQuery;
34
+ exports.useAuthQuery = require_hono.useAuthQuery;
@@ -1,13 +1,10 @@
1
- import { $ as Client, I as FaireAuthOptions, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, _t as FaireAuthPlugin, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-CsWF3f7U.cjs";
2
- import "../hono-DOM31WQz.cjs";
3
- import { t as index_d_exports } from "../index-BDhhaE6Y.cjs";
1
+ import { $ as FaireAuthClientPlugin, J as AtomListener, K as InferResolvedHooks, Q as CreateSchemaType, X as Client, Y as CamelCase, Z as ClientOptions, at as InferPluginsFromClient, bt as FaireAuthPlugin, ct as IsSignal, dt as Store, et as Inc, ft as FetchOptions, ht as FaireAuthOptions, it as InferErrorCodes, lt as RevalidateOptions, nt as InferAdditionalAsClient, ot as InferSessionFromClient, q as createAuthClient, rt as InferAdditionalFromClient, st as InferUserFromClient, tt as InferActions, ut as SessionQueryParams } from "../shared.cjs";
2
+ import { t as index_d_exports } from "../index-B86Cy0dE.cjs";
4
3
  import { BetterFetch, BetterFetchError, BetterFetchOption } from "@better-fetch/fetch";
5
4
  import { PreinitializedWritableAtom } from "nanostores";
6
- export * from "@better-fetch/fetch";
7
- export * from "nanostores";
8
-
9
- //#region src/client/query.d.ts
10
- declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
5
+ export type * from "@better-fetch/fetch";
6
+ export type * from "nanostores";
7
+ export declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
11
8
  data: null | T;
12
9
  error: BetterFetchError | null;
13
10
  isPending: boolean;
@@ -18,14 +15,12 @@ declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any>
18
15
  isRefetching: boolean;
19
16
  refetch: () => void;
20
17
  }> & object;
21
- //#endregion
22
- //#region src/client/index.d.ts
23
- declare const InferPlugin: <T extends FaireAuthPlugin>() => {
24
- id: "infer-server-plugin";
18
+ export declare const InferPlugin: <T extends FaireAuthPlugin>() => {
19
+ id: string;
25
20
  $InferServerPlugin: T;
26
21
  };
27
- declare function InferAuth<O extends {
22
+ export declare function InferAuth<O extends {
28
23
  options: FaireAuthOptions;
29
24
  }>(): O["options"];
30
25
  type SocialProvider = index_d_exports.SocialProvider;
31
- export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, type FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, type SocialProvider, Store, createAuthClient, useAuthQuery };
26
+ export { type AtomListener, type CamelCase, type Client, type ClientOptions, type CreateSchemaType, type FaireAuthClientPlugin, type FetchOptions, type Inc, type InferActions, type InferAdditionalAsClient, type InferAdditionalFromClient, type InferErrorCodes, type InferPluginsFromClient, InferResolvedHooks, type InferSessionFromClient, type InferUserFromClient, type IsSignal, type RevalidateOptions, type SessionQueryParams, type SocialProvider, type Store, createAuthClient };
@@ -1,13 +1,10 @@
1
- import { $ as Client, I as FaireAuthOptions, Q as CamelCase, X as createAuthClient, Y as InferResolvedHooks, Z as AtomListener, _t as FaireAuthPlugin, at as InferAdditionalAsClient, ct as InferPluginsFromClient, dt as IsSignal, et as ClientOptions, ft as RevalidateOptions, ht as FetchOptions, it as InferActions, lt as InferSessionFromClient, mt as Store, nt as FaireAuthClientPlugin, ot as InferAdditionalFromClient, pt as SessionQueryParams, rt as Inc, st as InferErrorCodes, tt as CreateSchemaType, ut as InferUserFromClient } from "../index-rFv8Hxld.mjs";
2
- import "../hono-D0VqxVy1.mjs";
3
- import { t as index_d_exports } from "../index-CF9iq55a.mjs";
1
+ import { $ as CreateSchemaType, J as createAuthClient, Q as ClientOptions, X as CamelCase, Y as AtomListener, Z as Client, at as InferErrorCodes, ct as InferUserFromClient, dt as SessionQueryParams, et as FaireAuthClientPlugin, ft as Store, gt as FaireAuthOptions, it as InferAdditionalFromClient, lt as IsSignal, nt as InferActions, ot as InferPluginsFromClient, pt as FetchOptions, q as InferResolvedHooks, rt as InferAdditionalAsClient, st as InferSessionFromClient, tt as Inc, ut as RevalidateOptions, xt as FaireAuthPlugin } from "../shared.mjs";
2
+ import { t as index_d_exports } from "../index-B86Cy0dE.mjs";
4
3
  import { BetterFetch, BetterFetchError, BetterFetchOption } from "@better-fetch/fetch";
5
4
  import { PreinitializedWritableAtom } from "nanostores";
6
- export * from "@better-fetch/fetch";
7
- export * from "nanostores";
8
-
9
- //#region src/client/query.d.ts
10
- declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
5
+ export type * from "@better-fetch/fetch";
6
+ export type * from "nanostores";
7
+ export declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any> | PreinitializedWritableAtom<any>[], path: string, $fetch: BetterFetch, options?: ((value: {
11
8
  data: null | T;
12
9
  error: BetterFetchError | null;
13
10
  isPending: boolean;
@@ -18,14 +15,12 @@ declare const useAuthQuery: <T>(initializedAtom: PreinitializedWritableAtom<any>
18
15
  isRefetching: boolean;
19
16
  refetch: () => void;
20
17
  }> & object;
21
- //#endregion
22
- //#region src/client/index.d.ts
23
- declare const InferPlugin: <T extends FaireAuthPlugin>() => {
24
- id: "infer-server-plugin";
18
+ export declare const InferPlugin: <T extends FaireAuthPlugin>() => {
19
+ id: string;
25
20
  $InferServerPlugin: T;
26
21
  };
27
- declare function InferAuth<O extends {
22
+ export declare function InferAuth<O extends {
28
23
  options: FaireAuthOptions;
29
24
  }>(): O["options"];
30
25
  type SocialProvider = index_d_exports.SocialProvider;
31
- export { AtomListener, CamelCase, Client, ClientOptions, CreateSchemaType, FaireAuthClientPlugin, type FetchOptions, Inc, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferAuth, InferErrorCodes, InferPlugin, InferPluginsFromClient, InferResolvedHooks, InferSessionFromClient, InferUserFromClient, IsSignal, RevalidateOptions, SessionQueryParams, type SocialProvider, Store, createAuthClient, useAuthQuery };
26
+ export { type AtomListener, type CamelCase, type Client, type ClientOptions, type CreateSchemaType, type FaireAuthClientPlugin, type FetchOptions, type Inc, type InferActions, type InferAdditionalAsClient, type InferAdditionalFromClient, type InferErrorCodes, type InferPluginsFromClient, InferResolvedHooks, type InferSessionFromClient, type InferUserFromClient, type IsSignal, type RevalidateOptions, type SessionQueryParams, type SocialProvider, type Store, createAuthClient };
@@ -1,11 +1,7 @@
1
- import { t as logged_default } from "../logged-CyGfp8_H.mjs";
2
- import { t as getBaseURL } from "../url-BoUuoIwZ.mjs";
3
- import "../request-1NL_1lyJ.mjs";
4
- import "../defu-D9ZTXqlo.mjs";
5
- import { n as getClientConfig, r as useAuthQuery, t as createHonoClient } from "../hono-CO-zsqI-.mjs";
6
- import "../parser-B25ylT5u.mjs";
7
-
8
- //#region src/client/vanilla.ts
1
+ import { t as getBaseURL } from "../url-CJtdrrUu.mjs";
2
+ import { n as getClientConfig, r as useAuthQuery, t as createHonoClient } from "../hono-BAV2wQkK.mjs";
3
+ import { t as LoggerAPI } from "../logged-B83SzMnJ.mjs";
4
+ // src/client/vanilla.ts
9
5
  const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
10
6
  const createAuthClient = () => (options) => {
11
7
  const baseURL = getBaseURL(options.baseURL, options.basePath);
@@ -21,11 +17,9 @@ const createAuthClient = () => (options) => {
21
17
  return createHonoClient({
22
18
  baseURL,
23
19
  createFetchOptions: options.fetchOptions
24
- }, routes, logged_default.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
20
+ }, routes, LoggerAPI.wrap($fetch, "fetch", "immediate"), pluginsAtoms, atomListeners);
25
21
  };
26
-
27
- //#endregion
28
- //#region src/client/index.ts
22
+ // src/client/index.ts
29
23
  const InferPlugin = () => ({
30
24
  id: "infer-server-plugin",
31
25
  $InferServerPlugin: {}
@@ -33,6 +27,4 @@ const InferPlugin = () => ({
33
27
  function InferAuth() {
34
28
  return {};
35
29
  }
36
-
37
- //#endregion
38
- export { InferAuth, InferPlugin, createAuthClient, useAuthQuery };
30
+ export { InferAuth, InferPlugin, createAuthClient, useAuthQuery };
@@ -1,13 +1,9 @@
1
- const require_chunk = require('../../chunk-fPmz2rbM.cjs');
2
- const require_url = require('../../url-Ce7CVaQD.cjs');
3
- require('../../request-CPNlp-DK.cjs');
4
- require('../../defu-BmOYq4PU.cjs');
5
- const require_hono = require('../../hono-DnW5crl1.cjs');
6
- require('../../parser-B_wxvaAr.cjs');
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_url = require("../../url-DjCmCUHS.cjs");
3
+ const require_hono = require("../../hono-tyFFJFdS.cjs");
7
4
  let nanostores = require("nanostores");
8
- let __lynx_js_react = require("@lynx-js/react");
9
-
10
- //#region src/client/lynx/lynx-store.ts
5
+ let _lynx_js_react = require("@lynx-js/react");
6
+ // src/client/lynx/lynx-store.ts
11
7
  /**
12
8
  * Subscribe to store changes and get store's value.
13
9
  *
@@ -32,9 +28,9 @@ let __lynx_js_react = require("@lynx-js/react");
32
28
  * @returns Store value.
33
29
  */
34
30
  function useStore(store, options = {}) {
35
- let snapshotRef = (0, __lynx_js_react.useRef)(store.get());
31
+ let snapshotRef = (0, _lynx_js_react.useRef)(store.get());
36
32
  const { keys, deps = [store, keys] } = options;
37
- let subscribe = (0, __lynx_js_react.useCallback)((onChange) => {
33
+ let subscribe = (0, _lynx_js_react.useCallback)((onChange) => {
38
34
  const emitChange = (value) => {
39
35
  if (snapshotRef.current === value) return;
40
36
  snapshotRef.current = value;
@@ -45,11 +41,9 @@ function useStore(store, options = {}) {
45
41
  return store.listen(emitChange);
46
42
  }, deps);
47
43
  let get = () => snapshotRef.current;
48
- return (0, __lynx_js_react.useSyncExternalStore)(subscribe, get, get);
44
+ return (0, _lynx_js_react.useSyncExternalStore)(subscribe, get, get);
49
45
  }
50
-
51
- //#endregion
52
- //#region src/client/lynx/index.ts
46
+ // src/client/lynx/index.ts
53
47
  function getAtomKey(str) {
54
48
  return `use${capitalizeFirstLetter(str)}`;
55
49
  }
@@ -72,8 +66,6 @@ const createAuthClient = () => (options) => {
72
66
  createFetchOptions: options.fetchOptions
73
67
  }, routes, $fetch, pluginsAtoms, atomListeners);
74
68
  };
75
-
76
- //#endregion
77
69
  exports.capitalizeFirstLetter = capitalizeFirstLetter;
78
70
  exports.createAuthClient = createAuthClient;
79
- exports.useStore = useStore;
71
+ exports.useStore = useStore;