faire-auth 1.0.4 → 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.
- package/dist/{adapter-factory-lKIOf2OR.mjs → adapter-factory-qPVW8x9-.mjs} +34 -36
- package/dist/{adapter-factory-D1I7joki.cjs → adapter-factory-u8r3oTez.cjs} +66 -68
- package/dist/adapters/drizzle-adapter/index.cjs +34 -40
- package/dist/adapters/drizzle-adapter/index.d.cts +4 -9
- package/dist/adapters/drizzle-adapter/index.d.mts +4 -9
- package/dist/adapters/drizzle-adapter/index.mjs +20 -26
- package/dist/adapters/index.cjs +11 -16
- package/dist/adapters/index.d.cts +11 -37
- package/dist/adapters/index.d.mts +11 -37
- package/dist/adapters/index.mjs +4 -13
- package/dist/adapters/kysely-adapter/index.cjs +270 -11
- package/dist/adapters/kysely-adapter/index.d.cts +9 -19
- package/dist/adapters/kysely-adapter/index.d.mts +9 -19
- package/dist/adapters/kysely-adapter/index.mjs +267 -9
- package/dist/adapters/memory-adapter/index.cjs +146 -9
- package/dist/adapters/memory-adapter/index.d.cts +4 -10
- package/dist/adapters/memory-adapter/index.d.mts +4 -10
- package/dist/adapters/memory-adapter/index.mjs +145 -9
- package/dist/adapters/mongodb-adapter/index.cjs +13 -21
- package/dist/adapters/mongodb-adapter/index.d.cts +3 -8
- package/dist/adapters/mongodb-adapter/index.d.mts +4 -9
- package/dist/adapters/mongodb-adapter/index.mjs +12 -20
- package/dist/adapters/prisma-adapter/index.cjs +12 -20
- package/dist/adapters/prisma-adapter/index.d.cts +4 -8
- package/dist/adapters/prisma-adapter/index.d.mts +4 -8
- package/dist/adapters/prisma-adapter/index.mjs +5 -13
- package/dist/adapters/test.cjs +86 -69
- package/dist/adapters/test.d.cts +7 -11
- package/dist/adapters/test.d.mts +7 -11
- package/dist/adapters/test.mjs +83 -66
- package/dist/api/index.cjs +3 -20
- package/dist/api/index.d.cts +2 -3
- package/dist/api/index.d.mts +2 -3
- package/dist/api/index.mjs +1 -20
- package/dist/api/middleware/index.cjs +4 -11
- package/dist/api/middleware/index.d.cts +3 -9
- package/dist/api/middleware/index.d.mts +3 -9
- package/dist/api/middleware/index.mjs +3 -11
- package/dist/{api-B4RDwBty.mjs → api-0f-F-Fi2.mjs} +292 -189
- package/dist/{api-CaRC1Gio.cjs → api-LjfH6hQi.cjs} +557 -452
- package/dist/{test-utils/bun-sqlite-dialect-BZBvHchL.cjs → bun-sqlite-dialect-BHkarnxN.cjs} +5 -9
- package/dist/{test-utils/bun-sqlite-dialect-BSWhhKNs.mjs → bun-sqlite-dialect-BiZBuEF6.mjs} +6 -9
- package/dist/client/index.cjs +8 -15
- package/dist/client/index.d.cts +9 -14
- package/dist/client/index.d.mts +9 -14
- package/dist/client/index.mjs +7 -15
- package/dist/client/lynx/index.cjs +10 -18
- package/dist/client/lynx/index.d.cts +402 -71
- package/dist/client/lynx/index.d.mts +402 -71
- package/dist/client/lynx/index.mjs +5 -13
- package/dist/client/plugins/index.cjs +3 -5
- package/dist/client/plugins/index.d.cts +5 -10
- package/dist/client/plugins/index.d.mts +5 -10
- package/dist/client/plugins/index.mjs +2 -4
- package/dist/client/react/index.cjs +6 -14
- package/dist/client/react/index.d.cts +402 -71
- package/dist/client/react/index.d.mts +402 -71
- package/dist/client/react/index.mjs +5 -13
- package/dist/client/solid/index.cjs +6 -14
- package/dist/client/solid/index.d.cts +393 -57
- package/dist/client/solid/index.d.mts +393 -57
- package/dist/client/solid/index.mjs +5 -13
- package/dist/client/svelte/index.cjs +5 -10
- package/dist/client/svelte/index.d.cts +400 -67
- package/dist/client/svelte/index.d.mts +400 -67
- package/dist/client/svelte/index.mjs +4 -10
- package/dist/client/vue/index.cjs +6 -14
- package/dist/client/vue/index.d.cts +401 -68
- package/dist/client/vue/index.d.mts +401 -68
- package/dist/client/vue/index.mjs +5 -13
- package/dist/{cookies-BTs1o992.mjs → cookies-D9aY_gJh.mjs} +25 -21
- package/dist/{cookies-BTl72THv.cjs → cookies-DQ52rcOy.cjs} +119 -115
- package/dist/crypto/index.cjs +10 -8
- package/dist/crypto/index.d.cts +5 -13
- package/dist/crypto/index.d.mts +5 -13
- package/dist/crypto/index.mjs +2 -5
- package/dist/{crypto-DH2Aa7jN.mjs → crypto-BH-hD0lJ.mjs} +7 -10
- package/dist/{crypto-DpSCnrTp.cjs → crypto-BITfWVwD.cjs} +24 -27
- package/dist/db/index.cjs +1135 -29
- package/dist/db/index.d.cts +1 -2
- package/dist/db/index.d.mts +1 -2
- package/dist/db/index.mjs +1115 -16
- package/dist/defu-D2h4S3X-.mjs +87 -0
- package/dist/defu-DWS5RPWt.cjs +134 -0
- package/dist/{email-verification-DI_0H4JC.cjs → email-verification-DOPnSgbI.cjs} +65 -71
- package/dist/{email-verification-C_lBu_JY.mjs → email-verification-YSR5n5lb.mjs} +23 -29
- package/dist/{hono-CO-zsqI-.mjs → hono-BAV2wQkK.mjs} +16 -33
- package/dist/hono-SVQuc5Ru.mjs +4 -0
- package/dist/hono-pgK4H_U1.cjs +9 -0
- package/dist/{hono-DnW5crl1.cjs → hono-tyFFJFdS.cjs} +42 -60
- package/dist/index-B86Cy0dE.d.cts +2 -0
- package/dist/index-B86Cy0dE.d.mts +2 -0
- package/dist/index.cjs +115 -150
- package/dist/index.d.cts +4 -5
- package/dist/index.d.mts +4 -5
- package/dist/index.mjs +45 -80
- package/dist/integrations/next-js.cjs +5 -9
- package/dist/integrations/next-js.d.cts +6 -14
- package/dist/integrations/next-js.d.mts +6 -14
- package/dist/integrations/next-js.mjs +4 -9
- package/dist/integrations/node.cjs +16 -14
- package/dist/integrations/node.d.cts +6 -14
- package/dist/integrations/node.d.mts +6 -14
- package/dist/integrations/node.mjs +15 -13
- package/dist/integrations/react-start.cjs +7 -11
- package/dist/integrations/react-start.d.cts +5 -13
- package/dist/integrations/react-start.d.mts +5 -13
- package/dist/integrations/react-start.mjs +6 -11
- package/dist/integrations/solid-start.cjs +3 -5
- package/dist/integrations/solid-start.d.cts +2 -5
- package/dist/integrations/solid-start.d.mts +2 -5
- package/dist/integrations/solid-start.mjs +2 -4
- package/dist/integrations/svelte-kit.cjs +6 -10
- package/dist/integrations/svelte-kit.d.cts +11 -23
- package/dist/integrations/svelte-kit.d.mts +11 -23
- package/dist/integrations/svelte-kit.mjs +5 -10
- package/dist/{ip-BjNYspCH.mjs → ip-6Lv2o42m.mjs} +4 -9
- package/dist/{ip-C17Qdq-G.cjs → ip-DPydExzV.cjs} +21 -27
- package/dist/{json--tl7Grvs.cjs → json-D3aq-nH2.cjs} +9 -13
- package/dist/{json-B1v2qRTQ.mjs → json-DooGMtnJ.mjs} +2 -5
- package/dist/{logged-CyGfp8_H.mjs → logged-B83SzMnJ.mjs} +6 -10
- package/dist/{logged-Dv3st5qc.cjs → logged-BIpCpnVY.cjs} +13 -18
- package/dist/{middleware-CE6OhDkq.mjs → middleware-Cakg4e1D.mjs} +2 -4
- package/dist/{middleware-CWvRH4EW.cjs → middleware-Cd-VkNxB.cjs} +17 -20
- package/dist/{node-sqlite-dialect-w4DAg0PH.mjs → node-sqlite-dialect-BMVOjEMh.mjs} +6 -9
- package/dist/{test-utils/node-sqlite-dialect-BgJqjBOu.cjs → node-sqlite-dialect-D3QPFROH.cjs} +5 -9
- package/dist/oauth2/index.cjs +166 -22
- package/dist/oauth2/index.d.cts +5 -17
- package/dist/oauth2/index.d.mts +5 -17
- package/dist/oauth2/index.mjs +156 -16
- package/dist/{origin-check-DjLTuZQ8.cjs → origin-check-BflGhEEN.cjs} +34 -38
- package/dist/{origin-check-8Gajklvh.mjs → origin-check-CRgs1M7k.mjs} +13 -16
- package/dist/{parser-B25ylT5u.mjs → parser-CqwvpF6l.cjs} +12 -10
- package/dist/{parser-B_wxvaAr.cjs → parser-DcKDjjHO.mjs} +7 -22
- package/dist/plugins/access/index.cjs +38 -4
- package/dist/plugins/access/index.d.cts +36 -2
- package/dist/plugins/access/index.d.mts +36 -2
- package/dist/plugins/access/index.mjs +36 -3
- package/dist/plugins/bearer/index.cjs +52 -7
- package/dist/plugins/bearer/index.d.cts +27 -4
- package/dist/plugins/bearer/index.d.mts +27 -4
- package/dist/plugins/bearer/index.mjs +51 -7
- package/dist/plugins/index.cjs +1385 -842
- package/dist/plugins/index.d.cts +489 -7566
- package/dist/plugins/index.d.mts +489 -7566
- package/dist/plugins/index.mjs +1118 -576
- package/dist/plugins/passkey/index.cjs +551 -15
- package/dist/plugins/passkey/index.d.cts +123 -4
- package/dist/plugins/passkey/index.d.mts +123 -4
- package/dist/plugins/passkey/index.mjs +547 -15
- package/dist/{chunk-BFnQceUY.mjs → rolldown-runtime-BKpuH2hG.mjs} +6 -7
- package/dist/{chunk-fPmz2rbM.cjs → rolldown-runtime-C_Pgydhf.cjs} +22 -24
- package/dist/{schema-DTIwLLmf.mjs → schema-CFCpv0tK.mjs} +3 -6
- package/dist/{schema-CirKflVs.cjs → schema-b-lKhMkG.cjs} +51 -55
- package/dist/{session-CM3rmOYF.mjs → session-BGjJgihS.mjs} +51 -74
- package/dist/{session-Cwrj4GfV.cjs → session-CzZSMmQC.cjs} +197 -219
- package/dist/shared.d.cts +1581 -0
- package/dist/shared.d.mts +1581 -0
- package/dist/social-providers/index.cjs +9 -9
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.mjs +3 -5
- package/dist/social-providers-CjPww-qf.mjs +6 -0
- package/dist/social-providers-D7w_7Ym8.cjs +10 -0
- package/dist/{state-CvSihlVT.cjs → state-2OrNjOO-.cjs} +24 -24
- package/dist/{state-CQghgH9I.mjs → state-Dooeisfq.mjs} +17 -17
- package/dist/{bun-sqlite-dialect-DPgTzc0w.cjs → test-utils/bun-sqlite-dialect-BHkarnxN.cjs} +5 -9
- package/dist/{bun-sqlite-dialect-6NqeV3px.mjs → test-utils/bun-sqlite-dialect-BiZBuEF6.mjs} +6 -9
- package/dist/test-utils/index.cjs +8831 -7941
- package/dist/test-utils/index.d.cts +310 -12440
- package/dist/test-utils/index.d.mts +313 -12440
- package/dist/test-utils/index.mjs +8591 -7701
- package/dist/test-utils/{node-sqlite-dialect-DAQXiobH.mjs → node-sqlite-dialect-BMVOjEMh.mjs} +6 -9
- package/dist/{node-sqlite-dialect-DP11CB0y.cjs → test-utils/node-sqlite-dialect-D3QPFROH.cjs} +5 -9
- package/dist/types/index.d.cts +2 -3
- package/dist/types/index.d.mts +2 -3
- package/dist/types/index.mjs +1 -1
- package/dist/{url-BoUuoIwZ.mjs → url-CJtdrrUu.mjs} +12 -13
- package/dist/{url-Ce7CVaQD.cjs → url-DjCmCUHS.cjs} +42 -44
- package/dist/utils/cookies.cjs +29 -30
- package/dist/utils/cookies.d.cts +21 -25
- package/dist/utils/cookies.d.mts +20 -24
- package/dist/utils/cookies.mjs +2 -7
- package/dist/utils-C7OHyfHa.mjs +4 -0
- package/dist/utils-iX0Vy_UL.cjs +3 -0
- package/package.json +40 -30
- package/dist/access-BZ7-AbTM.cjs +0 -51
- package/dist/access-D0DRqUKC.mjs +0 -39
- package/dist/bearer-DDzrp5M7.cjs +0 -60
- package/dist/bearer-WZcs7gxL.mjs +0 -54
- package/dist/db-4tUsQJXd.mjs +0 -1119
- package/dist/db-ChMbb_U-.cjs +0 -1180
- package/dist/defu-BmOYq4PU.cjs +0 -34
- package/dist/defu-D9ZTXqlo.mjs +0 -28
- package/dist/hono-C14rpOEa.cjs +0 -13
- package/dist/hono-CoKYWnXA.mjs +0 -7
- package/dist/hono-D0VqxVy1.d.mts +0 -18
- package/dist/hono-DOM31WQz.d.cts +0 -18
- package/dist/index--DLiUhEn.d.mts +0 -33
- package/dist/index-B4bqEDYG.d.mts +0 -992
- package/dist/index-BDhhaE6Y.d.cts +0 -3
- package/dist/index-Boa0SV4h.d.cts +0 -13350
- package/dist/index-Bykgiq3o.d.cts +0 -13350
- package/dist/index-CF9iq55a.d.mts +0 -3
- package/dist/index-CRt_fppq.d.mts +0 -41
- package/dist/index-CdLyn7qP.d.cts +0 -41
- package/dist/index-ClFGA8tb.d.mts +0 -33
- package/dist/index-ClOM0wFf.d.cts +0 -992
- package/dist/index-CsxNfGAV.d.mts +0 -13350
- package/dist/index-DKnO_Zfm.d.cts +0 -992
- package/dist/index-DRYO4mGd.d.cts +0 -33
- package/dist/index-Dsua4U8w.d.cts +0 -33
- package/dist/index-DxXFCG2_.d.mts +0 -13350
- package/dist/index-gtCVvDvC.d.mts +0 -992
- package/dist/kysely-adapter-CtIdoHa8.mjs +0 -270
- package/dist/kysely-adapter-QZTx077T.cjs +0 -288
- package/dist/memory-adapter-17RZd5df.cjs +0 -154
- package/dist/memory-adapter-Dp4XdCZK.mjs +0 -148
- package/dist/oauth2-5RL4cVNS.cjs +0 -177
- package/dist/oauth2-C56wz-n9.mjs +0 -159
- package/dist/passkey-BTT-v5c-.cjs +0 -512
- package/dist/passkey-CzY_W2us.mjs +0 -505
- package/dist/request-1NL_1lyJ.mjs +0 -58
- package/dist/request-CPNlp-DK.cjs +0 -100
- package/dist/social-providers-B8RK5yqI.mjs +0 -9
- package/dist/social-providers-BmFOIIPk.cjs +0 -13
- package/dist/utils-44aDDP8f.cjs +0 -2
- package/dist/utils-D4vZd1-9.mjs +0 -4
package/dist/index.cjs
CHANGED
|
@@ -1,35 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
require(
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
require(
|
|
6
|
-
const
|
|
7
|
-
require(
|
|
8
|
-
const
|
|
9
|
-
require(
|
|
10
|
-
require(
|
|
11
|
-
require(
|
|
12
|
-
require(
|
|
13
|
-
require(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
require(
|
|
19
|
-
require(
|
|
20
|
-
|
|
21
|
-
const require_adapter_factory = require('./adapter-factory-D1I7joki.cjs');
|
|
22
|
-
const require_db = require('./db-ChMbb_U-.cjs');
|
|
23
|
-
require('./memory-adapter-17RZd5df.cjs');
|
|
24
|
-
const require_defu = require('./defu-BmOYq4PU.cjs');
|
|
25
|
-
let __faire_auth_core_env = require("@faire-auth/core/env");
|
|
26
|
-
let __faire_auth_core_error = require("@faire-auth/core/error");
|
|
27
|
-
let __faire_auth_core_static = require("@faire-auth/core/static");
|
|
28
|
-
let __faire_auth_core_datatypes = require("@faire-auth/core/datatypes");
|
|
29
|
-
let __better_fetch_fetch = require("@better-fetch/fetch");
|
|
30
|
-
let __faire_auth_core_crypto = require("@faire-auth/core/crypto");
|
|
31
|
-
|
|
32
|
-
//#region src/context/cloudflare.ts
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_ip = require("./ip-DPydExzV.cjs");
|
|
3
|
+
const require_api = require("./api-LjfH6hQi.cjs");
|
|
4
|
+
const require_adapters_kysely_adapter_index = require("./adapters/kysely-adapter/index.cjs");
|
|
5
|
+
const require_crypto = require("./crypto-BITfWVwD.cjs");
|
|
6
|
+
const require_state = require("./state-2OrNjOO-.cjs");
|
|
7
|
+
const require_db_index = require("./db/index.cjs");
|
|
8
|
+
const require_adapter_factory = require("./adapter-factory-u8r3oTez.cjs");
|
|
9
|
+
const require_social_providers = require("./social-providers-D7w_7Ym8.cjs");
|
|
10
|
+
require("./utils-iX0Vy_UL.cjs");
|
|
11
|
+
const require_cookies = require("./cookies-DQ52rcOy.cjs");
|
|
12
|
+
const require_defu = require("./defu-DWS5RPWt.cjs");
|
|
13
|
+
const require_url = require("./url-DjCmCUHS.cjs");
|
|
14
|
+
let _faire_auth_core_env = require("@faire-auth/core/env");
|
|
15
|
+
let _faire_auth_core_error = require("@faire-auth/core/error");
|
|
16
|
+
let _faire_auth_core_static = require("@faire-auth/core/static");
|
|
17
|
+
let _faire_auth_core_datatypes = require("@faire-auth/core/datatypes");
|
|
18
|
+
let _better_fetch_fetch = require("@better-fetch/fetch");
|
|
19
|
+
let _faire_auth_core_crypto = require("@faire-auth/core/crypto");
|
|
20
|
+
// src/context/cloudflare.ts
|
|
33
21
|
/**
|
|
34
22
|
* Symbol used as an index in the global scope to set and retrieve the Cloudflare context
|
|
35
23
|
*
|
|
@@ -44,9 +32,7 @@ const cloudflareContextSymbol = Symbol.for("__cloudflare-context__");
|
|
|
44
32
|
function getCloudflareContext() {
|
|
45
33
|
return globalThis[cloudflareContextSymbol];
|
|
46
34
|
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
//#region src/telemetry/detectors/detect-auth-config.ts
|
|
35
|
+
// src/telemetry/detectors/detect-auth-config.ts
|
|
50
36
|
function getTelemetryAuthConfig(options, context) {
|
|
51
37
|
return {
|
|
52
38
|
database: context?.database,
|
|
@@ -232,9 +218,7 @@ function getTelemetryAuthConfig(options, context) {
|
|
|
232
218
|
}
|
|
233
219
|
};
|
|
234
220
|
}
|
|
235
|
-
|
|
236
|
-
//#endregion
|
|
237
|
-
//#region src/utils/package-json.ts
|
|
221
|
+
// src/utils/package-json.ts
|
|
238
222
|
let packageJSONCache;
|
|
239
223
|
async function readRootPackageJson() {
|
|
240
224
|
if (packageJSONCache) return packageJSONCache;
|
|
@@ -273,9 +257,7 @@ async function getVersionFromLocalPackageJson(pkg) {
|
|
|
273
257
|
async function getNameFromLocalPackageJson() {
|
|
274
258
|
return (await readRootPackageJson())?.name;
|
|
275
259
|
}
|
|
276
|
-
|
|
277
|
-
//#endregion
|
|
278
|
-
//#region src/telemetry/detectors/detect-database.ts
|
|
260
|
+
// src/telemetry/detectors/detect-database.ts
|
|
279
261
|
const DATABASES = {
|
|
280
262
|
pg: "postgresql",
|
|
281
263
|
mysql: "mysql",
|
|
@@ -296,9 +278,7 @@ async function detectDatabase() {
|
|
|
296
278
|
};
|
|
297
279
|
}
|
|
298
280
|
}
|
|
299
|
-
|
|
300
|
-
//#endregion
|
|
301
|
-
//#region src/telemetry/detectors/detect-framework.ts
|
|
281
|
+
// src/telemetry/detectors/detect-framework.ts
|
|
302
282
|
const FRAMEWORKS = {
|
|
303
283
|
next: "next",
|
|
304
284
|
nuxt: "nuxt",
|
|
@@ -321,9 +301,7 @@ async function detectFramework() {
|
|
|
321
301
|
};
|
|
322
302
|
}
|
|
323
303
|
}
|
|
324
|
-
|
|
325
|
-
//#endregion
|
|
326
|
-
//#region src/telemetry/detectors/detect-project-info.ts
|
|
304
|
+
// src/telemetry/detectors/detect-project-info.ts
|
|
327
305
|
function detectPackageManager() {
|
|
328
306
|
const userAgent = process.env.npm_config_user_agent;
|
|
329
307
|
if (!userAgent) return;
|
|
@@ -335,11 +313,9 @@ function detectPackageManager() {
|
|
|
335
313
|
version: pmSpec.substring(separatorPos + 1)
|
|
336
314
|
};
|
|
337
315
|
}
|
|
338
|
-
|
|
339
|
-
//#endregion
|
|
340
|
-
//#region src/telemetry/detectors/detect-system-info.ts
|
|
316
|
+
// src/telemetry/detectors/detect-system-info.ts
|
|
341
317
|
function getVendor() {
|
|
342
|
-
const hasAny = (...keys) => keys.some((k) => Boolean(
|
|
318
|
+
const hasAny = (...keys) => keys.some((k) => Boolean(_faire_auth_core_env.env[k]));
|
|
343
319
|
if (hasAny("CF_PAGES", "CF_PAGES_URL", "CF_ACCOUNT_ID") || typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") return "cloudflare";
|
|
344
320
|
if (hasAny("VERCEL", "VERCEL_URL", "VERCEL_ENV")) return "vercel";
|
|
345
321
|
if (hasAny("NETLIFY", "NETLIFY_URL")) return "netlify";
|
|
@@ -449,11 +425,9 @@ async function isInsideContainer() {
|
|
|
449
425
|
return isInsideContainerCached;
|
|
450
426
|
}
|
|
451
427
|
function isCI() {
|
|
452
|
-
return
|
|
428
|
+
return _faire_auth_core_env.env.CI !== "false" && ("BUILD_ID" in _faire_auth_core_env.env || "BUILD_NUMBER" in _faire_auth_core_env.env || "CI" in _faire_auth_core_env.env || "CI_APP_ID" in _faire_auth_core_env.env || "CI_BUILD_ID" in _faire_auth_core_env.env || "CI_BUILD_NUMBER" in _faire_auth_core_env.env || "CI_NAME" in _faire_auth_core_env.env || "CONTINUOUS_INTEGRATION" in _faire_auth_core_env.env || "RUN_ID" in _faire_auth_core_env.env);
|
|
453
429
|
}
|
|
454
|
-
|
|
455
|
-
//#endregion
|
|
456
|
-
//#region src/telemetry/detectors/detect-runtime.ts
|
|
430
|
+
// src/telemetry/detectors/detect-runtime.ts
|
|
457
431
|
function detectRuntime() {
|
|
458
432
|
if (typeof Deno !== "undefined") return {
|
|
459
433
|
name: "deno",
|
|
@@ -473,37 +447,33 @@ function detectRuntime() {
|
|
|
473
447
|
};
|
|
474
448
|
}
|
|
475
449
|
function detectEnvironment() {
|
|
476
|
-
return (0,
|
|
450
|
+
return (0, _faire_auth_core_env.getEnvVar)("NODE_ENV") === "production" ? "production" : isCI() ? "ci" : (0, _faire_auth_core_env.isTest)() ? "test" : "development";
|
|
477
451
|
}
|
|
478
|
-
|
|
479
|
-
//#endregion
|
|
480
|
-
//#region src/telemetry/project-id.ts
|
|
452
|
+
// src/telemetry/project-id.ts
|
|
481
453
|
let projectIdCached = null;
|
|
482
454
|
async function getProjectId(baseUrl) {
|
|
483
455
|
if (projectIdCached) return projectIdCached;
|
|
484
456
|
const projectName = await getNameFromLocalPackageJson();
|
|
485
457
|
if (projectName) {
|
|
486
|
-
projectIdCached = await (0,
|
|
458
|
+
projectIdCached = await (0, _faire_auth_core_datatypes.hashToBase64)(baseUrl ? baseUrl + projectName : projectName);
|
|
487
459
|
return projectIdCached;
|
|
488
460
|
}
|
|
489
461
|
if (baseUrl) {
|
|
490
|
-
projectIdCached = await (0,
|
|
462
|
+
projectIdCached = await (0, _faire_auth_core_datatypes.hashToBase64)(baseUrl);
|
|
491
463
|
return projectIdCached;
|
|
492
464
|
}
|
|
493
|
-
projectIdCached = (0,
|
|
465
|
+
projectIdCached = (0, _faire_auth_core_crypto.generateId)(32);
|
|
494
466
|
return projectIdCached;
|
|
495
467
|
}
|
|
496
|
-
|
|
497
|
-
//#endregion
|
|
498
|
-
//#region src/telemetry/index.ts
|
|
468
|
+
// src/telemetry/index.ts
|
|
499
469
|
function createTelemetry(options, context) {
|
|
500
|
-
const debugEnabled = options.telemetry?.debug || (0,
|
|
501
|
-
const TELEMETRY_ENDPOINT =
|
|
470
|
+
const debugEnabled = options.telemetry?.debug || (0, _faire_auth_core_env.getBooleanEnvVar)("FAIRE_AUTH_TELEMETRY_DEBUG", false);
|
|
471
|
+
const TELEMETRY_ENDPOINT = _faire_auth_core_env.ENV.FAIRE_AUTH_TELEMETRY_ENDPOINT;
|
|
502
472
|
const track = async (event) => {
|
|
503
473
|
try {
|
|
504
474
|
if (context?.customTrack) await context.customTrack(event);
|
|
505
|
-
else if (debugEnabled) await Promise.resolve(
|
|
506
|
-
else await (0,
|
|
475
|
+
else if (debugEnabled) await Promise.resolve(_faire_auth_core_env.logger.info("telemetry event", JSON.stringify(event, null, 2)));
|
|
476
|
+
else await (0, _better_fetch_fetch.betterFetch)(TELEMETRY_ENDPOINT, {
|
|
507
477
|
method: "POST",
|
|
508
478
|
body: event
|
|
509
479
|
});
|
|
@@ -511,14 +481,14 @@ function createTelemetry(options, context) {
|
|
|
511
481
|
};
|
|
512
482
|
const isEnabled = () => {
|
|
513
483
|
const telemetryEnabled = options.telemetry?.enabled !== void 0 ? options.telemetry.enabled : false;
|
|
514
|
-
return ((0,
|
|
484
|
+
return ((0, _faire_auth_core_env.getBooleanEnvVar)("FAIRE_AUTH_TELEMETRY", false) || telemetryEnabled) && (context?.skipTestCheck || !(0, _faire_auth_core_env.isTest)());
|
|
515
485
|
};
|
|
516
486
|
let initDone;
|
|
517
487
|
let anonymousId;
|
|
518
488
|
let payload;
|
|
519
489
|
const enabled = isEnabled();
|
|
520
490
|
async function ensureInitialized() {
|
|
521
|
-
if (initDone) return initDone;
|
|
491
|
+
if (initDone !== void 0) return initDone;
|
|
522
492
|
initDone = (async () => {
|
|
523
493
|
anonymousId = await getProjectId(options.baseURL);
|
|
524
494
|
payload = {
|
|
@@ -550,18 +520,16 @@ function createTelemetry(options, context) {
|
|
|
550
520
|
}
|
|
551
521
|
};
|
|
552
522
|
}
|
|
553
|
-
|
|
554
|
-
//#endregion
|
|
555
|
-
//#region src/init.ts
|
|
523
|
+
// src/init.ts
|
|
556
524
|
const getInternalPlugins = (options) => {
|
|
557
525
|
const plugins = [];
|
|
558
526
|
if (options.advanced?.crossSubDomainCookies?.enabled === true) {}
|
|
559
527
|
return plugins;
|
|
560
528
|
};
|
|
561
|
-
const loadSecret = (options, logger
|
|
562
|
-
const secret = options.secret ??
|
|
563
|
-
if (secret ===
|
|
564
|
-
if ((0,
|
|
529
|
+
const loadSecret = (options, logger) => {
|
|
530
|
+
const secret = options.secret ?? _faire_auth_core_env.env["FAIRE_AUTH_SECRET"] ?? _faire_auth_core_env.env["AUTH_SECRET"] ?? _faire_auth_core_static.DEFAULT_SECRET;
|
|
531
|
+
if (secret === _faire_auth_core_static.DEFAULT_SECRET) {
|
|
532
|
+
if ((0, _faire_auth_core_env.isProduction)()) logger.error("You are using the default secret. Please set `FAIRE_AUTH_SECRET` in your environment variables or pass `secret` in your auth config.");
|
|
565
533
|
}
|
|
566
534
|
return secret;
|
|
567
535
|
};
|
|
@@ -572,7 +540,7 @@ const runPluginInit = (ctx, options) => {
|
|
|
572
540
|
const result = plugin.init(context);
|
|
573
541
|
if (typeof result === "object") {
|
|
574
542
|
if (result.options) {
|
|
575
|
-
const { databaseHooks
|
|
543
|
+
const { databaseHooks, ...restOpts } = result.options;
|
|
576
544
|
if (result.options.databaseHooks) dbHooks.push(result.options.databaseHooks);
|
|
577
545
|
options = require_defu.defu(options, restOpts);
|
|
578
546
|
}
|
|
@@ -583,7 +551,7 @@ const runPluginInit = (ctx, options) => {
|
|
|
583
551
|
}
|
|
584
552
|
}
|
|
585
553
|
if (options.databaseHooks) dbHooks.push(options.databaseHooks);
|
|
586
|
-
context.internalAdapter =
|
|
554
|
+
context.internalAdapter = require_db_index.createInternalAdapter(ctx.adapter, options, context, dbHooks);
|
|
587
555
|
return [context, options];
|
|
588
556
|
};
|
|
589
557
|
const initGenerateId = (options) => {
|
|
@@ -593,22 +561,22 @@ const initGenerateId = (options) => {
|
|
|
593
561
|
model,
|
|
594
562
|
...size != null ? { size } : {}
|
|
595
563
|
});
|
|
596
|
-
return (0,
|
|
564
|
+
return (0, _faire_auth_core_crypto.generateId)(size);
|
|
597
565
|
};
|
|
598
566
|
};
|
|
599
567
|
const init = (options) => {
|
|
600
568
|
const baseURL = require_url.getBaseURL(options.baseURL, options.basePath);
|
|
601
|
-
if (baseURL == null && !(0,
|
|
602
|
-
const adapter =
|
|
569
|
+
if (baseURL == null && !(0, _faire_auth_core_env.isDevelopment)() && !(0, _faire_auth_core_env.isTest)()) throw new Error("baseURL is required for auth context");
|
|
570
|
+
const adapter = require_db_index.getAdapter(options);
|
|
603
571
|
const internalPlugins = getInternalPlugins(options);
|
|
604
|
-
const logger
|
|
605
|
-
const secret = loadSecret(options, logger
|
|
606
|
-
const generateId
|
|
572
|
+
const logger = (0, _faire_auth_core_env.createLogger)(options.logger);
|
|
573
|
+
const secret = loadSecret(options, logger);
|
|
574
|
+
const generateId = initGenerateId(options);
|
|
607
575
|
const secondaryStorage = options.secondaryStorage;
|
|
608
576
|
const sessionConfig = {
|
|
609
|
-
updateAge: options.session?.updateAge ??
|
|
610
|
-
expiresIn: options.session?.expiresIn ??
|
|
611
|
-
freshAge: options.session?.freshAge ??
|
|
577
|
+
updateAge: options.session?.updateAge ?? 86400,
|
|
578
|
+
expiresIn: options.session?.expiresIn ?? 604800,
|
|
579
|
+
freshAge: options.session?.freshAge ?? 86400,
|
|
612
580
|
cookieRefreshCache: (() => {
|
|
613
581
|
const refreshCache = options.session?.cookieCache?.refreshCache;
|
|
614
582
|
const maxAge = options.session?.cookieCache?.maxAge ?? 300;
|
|
@@ -625,7 +593,7 @@ const init = (options) => {
|
|
|
625
593
|
};
|
|
626
594
|
const rateLimit = {
|
|
627
595
|
...options.rateLimit,
|
|
628
|
-
enabled: options.rateLimit?.enabled ?? (0,
|
|
596
|
+
enabled: options.rateLimit?.enabled ?? (0, _faire_auth_core_env.isProduction)(),
|
|
629
597
|
window: options.rateLimit?.window ?? 10,
|
|
630
598
|
max: options.rateLimit?.max ?? 100,
|
|
631
599
|
storage: options.rateLimit?.storage ?? (options.secondaryStorage ? "secondary-storage" : "memory")
|
|
@@ -635,12 +603,12 @@ const init = (options) => {
|
|
|
635
603
|
options.basePath ??= "/api/auth";
|
|
636
604
|
options.plugins ??= [];
|
|
637
605
|
options.plugins.push(...internalPlugins);
|
|
638
|
-
|
|
606
|
+
const context = {
|
|
639
607
|
appName: options.appName ?? "Faire Auth",
|
|
640
608
|
socialProviders: Object.entries(options.socialProviders ?? {}).map(([key, value]) => {
|
|
641
609
|
if (value == null) return null;
|
|
642
610
|
if (value.enabled === false) return null;
|
|
643
|
-
if (!value.clientId) logger
|
|
611
|
+
if (!value.clientId) logger.warn(`Social provider ${key} is missing clientId or clientSecret`);
|
|
644
612
|
if (!(key in require_social_providers.social_providers_exports.socialProviders)) throw new Error(`${key} does not exist in known social providers`);
|
|
645
613
|
const provider = require_social_providers.social_providers_exports.socialProviders[key](value);
|
|
646
614
|
if (value.disableImplicitSignUp) provider.disableImplicitSignUp = value.disableImplicitSignUp;
|
|
@@ -652,9 +620,9 @@ const init = (options) => {
|
|
|
652
620
|
sessionConfig,
|
|
653
621
|
secret,
|
|
654
622
|
authCookies: require_cookies.getCookies(options),
|
|
655
|
-
logger
|
|
623
|
+
logger,
|
|
656
624
|
rateLimit,
|
|
657
|
-
generateId
|
|
625
|
+
generateId,
|
|
658
626
|
password: {
|
|
659
627
|
hash: options.emailAndPassword?.password?.hash ?? require_crypto.crypto_exports.hashPassword,
|
|
660
628
|
verify: options.emailAndPassword?.password?.verify ?? require_crypto.crypto_exports.verifyPassword,
|
|
@@ -666,28 +634,27 @@ const init = (options) => {
|
|
|
666
634
|
},
|
|
667
635
|
newSession: null,
|
|
668
636
|
adapter,
|
|
669
|
-
internalAdapter:
|
|
670
|
-
logger
|
|
671
|
-
generateId
|
|
637
|
+
internalAdapter: require_db_index.createInternalAdapter(adapter, options, {
|
|
638
|
+
logger,
|
|
639
|
+
generateId,
|
|
672
640
|
sessionConfig,
|
|
673
641
|
...secondaryStorage && { secondaryStorage }
|
|
674
642
|
}, options.databaseHooks ? [options.databaseHooks] : []),
|
|
675
643
|
createAuthCookie: require_cookies.createCookieCreator(options),
|
|
676
644
|
runMigrations: async () => {
|
|
677
|
-
if (!options.database || "updateMany" in options.database) throw new
|
|
678
|
-
const { runMigrations } = await
|
|
645
|
+
if (!options.database || "updateMany" in options.database) throw new _faire_auth_core_error.FaireAuthError("Database is not provided or it's an adapter. Migrations are only supported with a database instance.");
|
|
646
|
+
const { runMigrations } = await require_db_index.getMigrations(options);
|
|
679
647
|
await runMigrations();
|
|
680
648
|
},
|
|
681
649
|
publishTelemetry: createTelemetry(options, {
|
|
682
650
|
adapter: adapter.id,
|
|
683
|
-
database: typeof options.database === "function" ? "adapter" :
|
|
651
|
+
database: typeof options.database === "function" ? "adapter" : require_adapters_kysely_adapter_index.getKyselyDatabaseType(options.database) || "unknown"
|
|
684
652
|
}).publish,
|
|
685
653
|
...secondaryStorage && { secondaryStorage }
|
|
686
|
-
}
|
|
654
|
+
};
|
|
655
|
+
return runPluginInit(context, options);
|
|
687
656
|
};
|
|
688
|
-
|
|
689
|
-
//#endregion
|
|
690
|
-
//#region src/auth.ts
|
|
657
|
+
// src/auth.ts
|
|
691
658
|
function defineOptions(config) {
|
|
692
659
|
return config;
|
|
693
660
|
}
|
|
@@ -697,7 +664,7 @@ const faireAuth = (options) => {
|
|
|
697
664
|
return {
|
|
698
665
|
handler: (request, Env, executionCtx) => {
|
|
699
666
|
const cfCtx = getCloudflareContext();
|
|
700
|
-
return app.fetch(request, Env ?? cfCtx?.env ??
|
|
667
|
+
return app.fetch(request, Env ?? cfCtx?.env ?? _faire_auth_core_env.ENV, executionCtx ?? cfCtx?.ctx);
|
|
701
668
|
},
|
|
702
669
|
app,
|
|
703
670
|
api,
|
|
@@ -715,65 +682,63 @@ const faireAuth = (options) => {
|
|
|
715
682
|
};
|
|
716
683
|
return acc;
|
|
717
684
|
}, {}),
|
|
718
|
-
...
|
|
685
|
+
..._faire_auth_core_error.BASE_ERROR_CODES
|
|
719
686
|
}
|
|
720
687
|
};
|
|
721
688
|
};
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
return __faire_auth_core_error.APIError;
|
|
728
|
-
}
|
|
689
|
+
Object.defineProperty(exports, "APIError", {
|
|
690
|
+
enumerable: true,
|
|
691
|
+
get: function() {
|
|
692
|
+
return _faire_auth_core_error.APIError;
|
|
693
|
+
}
|
|
729
694
|
});
|
|
730
|
-
Object.defineProperty(exports,
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
695
|
+
Object.defineProperty(exports, "ENV", {
|
|
696
|
+
enumerable: true,
|
|
697
|
+
get: function() {
|
|
698
|
+
return _faire_auth_core_env.ENV;
|
|
699
|
+
}
|
|
735
700
|
});
|
|
736
|
-
Object.defineProperty(exports,
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
701
|
+
Object.defineProperty(exports, "FaireAuthError", {
|
|
702
|
+
enumerable: true,
|
|
703
|
+
get: function() {
|
|
704
|
+
return _faire_auth_core_error.FaireAuthError;
|
|
705
|
+
}
|
|
741
706
|
});
|
|
742
|
-
Object.defineProperty(exports,
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
707
|
+
Object.defineProperty(exports, "MissingDependencyError", {
|
|
708
|
+
enumerable: true,
|
|
709
|
+
get: function() {
|
|
710
|
+
return _faire_auth_core_error.MissingDependencyError;
|
|
711
|
+
}
|
|
747
712
|
});
|
|
748
|
-
Object.defineProperty(exports,
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
713
|
+
Object.defineProperty(exports, "createLogger", {
|
|
714
|
+
enumerable: true,
|
|
715
|
+
get: function() {
|
|
716
|
+
return _faire_auth_core_env.createLogger;
|
|
717
|
+
}
|
|
753
718
|
});
|
|
754
719
|
exports.createTelemetry = createTelemetry;
|
|
755
720
|
exports.defineOptions = defineOptions;
|
|
756
721
|
exports.faireAuth = faireAuth;
|
|
757
|
-
Object.defineProperty(exports,
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
722
|
+
Object.defineProperty(exports, "generateId", {
|
|
723
|
+
enumerable: true,
|
|
724
|
+
get: function() {
|
|
725
|
+
return _faire_auth_core_crypto.generateId;
|
|
726
|
+
}
|
|
762
727
|
});
|
|
763
|
-
Object.defineProperty(exports,
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
728
|
+
Object.defineProperty(exports, "generateRandomString", {
|
|
729
|
+
enumerable: true,
|
|
730
|
+
get: function() {
|
|
731
|
+
return _faire_auth_core_crypto.generateRandomString;
|
|
732
|
+
}
|
|
768
733
|
});
|
|
769
734
|
exports.generateState = require_state.generateState;
|
|
770
735
|
exports.getCurrentAdapter = require_ip.getCurrentAdapter;
|
|
771
736
|
exports.getTelemetryAuthConfig = getTelemetryAuthConfig;
|
|
772
|
-
Object.defineProperty(exports,
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
737
|
+
Object.defineProperty(exports, "logger", {
|
|
738
|
+
enumerable: true,
|
|
739
|
+
get: function() {
|
|
740
|
+
return _faire_auth_core_env.logger;
|
|
741
|
+
}
|
|
777
742
|
});
|
|
778
|
-
exports.mergeHeaders =
|
|
779
|
-
exports.parseState = require_state.parseState;
|
|
743
|
+
exports.mergeHeaders = require_defu.mergeHeaders;
|
|
744
|
+
exports.parseState = require_state.parseState;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
|
|
3
|
-
export * from "zod";
|
|
4
|
-
export
|
|
5
|
-
export { APIError, Adapter, AdapterInstance, AdapterSchemaCreation, AdditionalSessionFieldsInput, AdditionalSessionFieldsOutput, AdditionalUserFieldsInput, AdditionalUserFieldsOutput, AtomListener, Auth, AuthContext, AuthEndpoint, AuthFactory, AuthPluginSchema, AuthProperties, CamelCase, Client, ClientOptions, ContextVars, CreateSchemaType, CustomRules, DBAdapter, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, DTO, ENV, Execute, FaireAuthClientPlugin, FaireAuthError, FaireAuthOptions, FaireAuthPlugin, FaireAuthRateLimitOptions, Hooks, Inc, InferAPI, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferApp, InferClient, InferErrorCodes, InferOptionSchema, InferPluginDTO, InferPluginErrorCodes, InferPluginHooks, InferPluginMiddleware, InferPluginRateLimit, InferPluginTypes, InferPluginsFromClient, InferSession, InferSessionFromClient, InferUser, InferUserFromClient, InternalLogger, IsSignal, LogHandlerParams, LogLevel, Logger, Middleware, MissingDependencyError, Models, OpenAPIHono, RateLimit, RevalidateOptions, SessionQueryParams, Store, TelemetryEvent, ToExecFull, TransactionAdapter, Where, WithJsDoc, createLogger, createTelemetry, defineOptions, faireAuth, generateId, generateRandomString, generateState, getCurrentAdapter, getTelemetryAuthConfig, init, logger, mergeHeaders, parseState };
|
|
1
|
+
import { $ as FaireAuthClientPlugin, A as InferSession, B as InferClient, C as faireAuth, Ct as InferPluginErrorCodes, D as AdditionalUserFieldsInput, E as AdditionalSessionFieldsOutput, Et as InferPluginRateLimit, F as Execute, I as ToExecFull, J as AtomListener, M as Models, N as RateLimit, O as AdditionalUserFieldsOutput, P as ContextVars, Q as CreateSchemaType, R as InferAPI, S as defineOptions, St as InferPluginDTO, T as AdditionalSessionFieldsInput, Tt as InferPluginMiddleware, X as Client, Y as CamelCase, Z as ClientOptions, _ as mergeHeaders, _n as TransactionAdapter, _t as Hooks, a as getTelemetryAuthConfig, an as AuthFactory, at as InferPluginsFromClient, b as Auth, bt as FaireAuthPlugin, c as ENV, cn as AuthContext, ct as IsSignal, d as LogLevel, dn as AdapterInstance, dt as Store, et as Inc, f as Logger, fn as AdapterSchemaCreation, g as logger, gn as DBTransactionAdapter, gt as FaireAuthRateLimitOptions, h as generateRandomString, hn as DBAdapterSchemaCreation, ht as FaireAuthOptions, i as OpenAPIHono, in as AuthEndpoint, it as InferErrorCodes, j as InferUser, k as InferPluginTypes, l as InternalLogger, ln as init, lt as RevalidateOptions, m as generateId, mn as DBAdapterInstance, mt as DTO, n as FaireAuthError, nt as InferAdditionalAsClient, o as createTelemetry, on as AuthProperties, ot as InferSessionFromClient, p as createLogger, pn as DBAdapter, pt as CustomRules, r as MissingDependencyError, rt as InferAdditionalFromClient, s as TelemetryEvent, st as InferUserFromClient, t as APIError, tt as InferActions, u as LogHandlerParams, un as Adapter, ut as SessionQueryParams, v as generateState, vn as Where, vt as Middleware, wt as InferPluginHooks, x as WithJsDoc, xt as InferOptionSchema, y as parseState, yn as getCurrentAdapter, yt as AuthPluginSchema, z as InferApp } from "./shared.cjs";
|
|
2
|
+
export type * from "zod";
|
|
3
|
+
export type * from "zod/v4/core";
|
|
4
|
+
export { APIError, type Adapter, type AdapterInstance, type AdapterSchemaCreation, type AdditionalSessionFieldsInput, type AdditionalSessionFieldsOutput, type AdditionalUserFieldsInput, type AdditionalUserFieldsOutput, type AtomListener, Auth, type AuthContext, type AuthEndpoint, type AuthFactory, type AuthPluginSchema, type AuthProperties, type CamelCase, type Client, type ClientOptions, type ContextVars, type CreateSchemaType, type CustomRules, type DBAdapter, type DBAdapterInstance, type DBAdapterSchemaCreation, type DBTransactionAdapter, type DTO, ENV, type Execute, type FaireAuthClientPlugin, FaireAuthError, type FaireAuthOptions, type FaireAuthPlugin, type FaireAuthRateLimitOptions, type Hooks, type Inc, type InferAPI, type InferActions, type InferAdditionalAsClient, type InferAdditionalFromClient, type InferApp, type InferClient, type InferErrorCodes, type InferOptionSchema, type InferPluginDTO, type InferPluginErrorCodes, type InferPluginHooks, type InferPluginMiddleware, type InferPluginRateLimit, type InferPluginTypes, type InferPluginsFromClient, type InferSession, type InferSessionFromClient, type InferUser, type InferUserFromClient, type InternalLogger, type IsSignal, type LogHandlerParams, type LogLevel, type Logger, type Middleware, MissingDependencyError, type Models, type OpenAPIHono, type RateLimit, type RevalidateOptions, type SessionQueryParams, type Store, type TelemetryEvent, type ToExecFull, type TransactionAdapter, type Where, WithJsDoc, createLogger, createTelemetry, defineOptions, faireAuth, generateId, generateRandomString, generateState, getCurrentAdapter, getTelemetryAuthConfig, type init, logger, mergeHeaders, parseState };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
|
|
3
|
-
export * from "zod";
|
|
4
|
-
export
|
|
5
|
-
export { APIError, Adapter, AdapterInstance, AdapterSchemaCreation, AdditionalSessionFieldsInput, AdditionalSessionFieldsOutput, AdditionalUserFieldsInput, AdditionalUserFieldsOutput, AtomListener, Auth, AuthContext, AuthEndpoint, AuthFactory, AuthPluginSchema, AuthProperties, CamelCase, Client, ClientOptions, ContextVars, CreateSchemaType, CustomRules, DBAdapter, DBAdapterInstance, DBAdapterSchemaCreation, DBTransactionAdapter, DTO, ENV, Execute, FaireAuthClientPlugin, FaireAuthError, FaireAuthOptions, FaireAuthPlugin, FaireAuthRateLimitOptions, Hooks, Inc, InferAPI, InferActions, InferAdditionalAsClient, InferAdditionalFromClient, InferApp, InferClient, InferErrorCodes, InferOptionSchema, InferPluginDTO, InferPluginErrorCodes, InferPluginHooks, InferPluginMiddleware, InferPluginRateLimit, InferPluginTypes, InferPluginsFromClient, InferSession, InferSessionFromClient, InferUser, InferUserFromClient, InternalLogger, IsSignal, LogHandlerParams, LogLevel, Logger, Middleware, MissingDependencyError, Models, OpenAPIHono, RateLimit, RevalidateOptions, SessionQueryParams, Store, TelemetryEvent, ToExecFull, TransactionAdapter, Where, WithJsDoc, createLogger, createTelemetry, defineOptions, faireAuth, generateId, generateRandomString, generateState, getCurrentAdapter, getTelemetryAuthConfig, init, logger, mergeHeaders, parseState };
|
|
1
|
+
import { $ as CreateSchemaType, A as generateState, B as InferPluginTypes, C as LogLevel, Ct as InferPluginDTO, D as generateRandomString, Dt as InferPluginRateLimit, E as generateId, Et as InferPluginMiddleware, F as faireAuth, H as InferUser, I as AdditionalSessionFieldsInput, K as getCurrentAdapter, L as AdditionalSessionFieldsOutput, M as Auth, N as WithJsDoc, O as logger, P as defineOptions, Q as ClientOptions, R as AdditionalUserFieldsInput, S as LogHandlerParams, St as InferOptionSchema, T as createLogger, Tt as InferPluginHooks, U as Models, V as InferSession, W as RateLimit, X as CamelCase, Y as AtomListener, Z as Client, _ as getTelemetryAuthConfig, _n as DBTransactionAdapter, _t as FaireAuthRateLimitOptions, a as InferAPI, an as AuthEndpoint, at as InferErrorCodes, b as ENV, bt as AuthPluginSchema, ct as InferUserFromClient, dn as Adapter, dt as SessionQueryParams, et as FaireAuthClientPlugin, fn as AdapterInstance, ft as Store, g as OpenAPIHono, gn as DBAdapterSchemaCreation, gt as FaireAuthOptions, h as MissingDependencyError, hn as DBAdapterInstance, ht as DTO, it as InferAdditionalFromClient, j as parseState, k as mergeHeaders, ln as AuthContext, lt as IsSignal, m as FaireAuthError, mn as DBAdapter, mt as CustomRules, n as Execute, nt as InferActions, o as InferApp, on as AuthFactory, ot as InferPluginsFromClient, p as APIError, pn as AdapterSchemaCreation, r as ToExecFull, rt as InferAdditionalAsClient, s as InferClient, sn as AuthProperties, st as InferSessionFromClient, t as ContextVars, tt as Inc, un as init, ut as RevalidateOptions, v as createTelemetry, vn as TransactionAdapter, vt as Hooks, w as Logger, wt as InferPluginErrorCodes, x as InternalLogger, xt as FaireAuthPlugin, y as TelemetryEvent, yn as Where, yt as Middleware, z as AdditionalUserFieldsOutput } from "./shared.mjs";
|
|
2
|
+
export type * from "zod";
|
|
3
|
+
export type * from "zod/v4/core";
|
|
4
|
+
export { APIError, type Adapter, type AdapterInstance, type AdapterSchemaCreation, type AdditionalSessionFieldsInput, type AdditionalSessionFieldsOutput, type AdditionalUserFieldsInput, type AdditionalUserFieldsOutput, type AtomListener, Auth, type AuthContext, type AuthEndpoint, type AuthFactory, type AuthPluginSchema, type AuthProperties, type CamelCase, type Client, type ClientOptions, type ContextVars, type CreateSchemaType, type CustomRules, type DBAdapter, type DBAdapterInstance, type DBAdapterSchemaCreation, type DBTransactionAdapter, type DTO, ENV, type Execute, type FaireAuthClientPlugin, FaireAuthError, type FaireAuthOptions, type FaireAuthPlugin, type FaireAuthRateLimitOptions, type Hooks, type Inc, type InferAPI, type InferActions, type InferAdditionalAsClient, type InferAdditionalFromClient, type InferApp, type InferClient, type InferErrorCodes, type InferOptionSchema, type InferPluginDTO, type InferPluginErrorCodes, type InferPluginHooks, type InferPluginMiddleware, type InferPluginRateLimit, type InferPluginTypes, type InferPluginsFromClient, type InferSession, type InferSessionFromClient, type InferUser, type InferUserFromClient, type InternalLogger, type IsSignal, type LogHandlerParams, type LogLevel, type Logger, type Middleware, MissingDependencyError, type Models, type OpenAPIHono, type RateLimit, type RevalidateOptions, type SessionQueryParams, type Store, type TelemetryEvent, type ToExecFull, type TransactionAdapter, type Where, WithJsDoc, createLogger, createTelemetry, defineOptions, faireAuth, generateId, generateRandomString, generateState, getCurrentAdapter, getTelemetryAuthConfig, type init, logger, mergeHeaders, parseState };
|