faire-auth 1.0.0 → 1.0.2
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/{access-Crt-IJ2P.cjs → access-BZ7-AbTM.cjs} +1 -1
- package/dist/{adapter-factory-DT-_2aHJ.cjs → adapter-factory-D1I7joki.cjs} +2 -2
- package/dist/adapters/drizzle-adapter/index.cjs +5 -5
- package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
- package/dist/adapters/drizzle-adapter/index.d.mts +2 -2
- package/dist/adapters/drizzle-adapter/index.mjs +3 -3
- package/dist/adapters/index.cjs +4 -4
- package/dist/adapters/index.d.cts +1 -1
- package/dist/adapters/index.d.mts +2 -2
- package/dist/adapters/index.mjs +3 -3
- package/dist/adapters/kysely-adapter/index.cjs +5 -5
- package/dist/adapters/kysely-adapter/index.d.cts +1 -1
- package/dist/adapters/kysely-adapter/index.d.mts +2 -2
- package/dist/adapters/kysely-adapter/index.mjs +4 -4
- package/dist/adapters/memory-adapter/index.cjs +5 -5
- package/dist/adapters/memory-adapter/index.d.cts +1 -1
- package/dist/adapters/memory-adapter/index.d.mts +2 -2
- package/dist/adapters/memory-adapter/index.mjs +4 -4
- package/dist/adapters/mongodb-adapter/index.cjs +294 -6
- package/dist/adapters/mongodb-adapter/index.d.cts +34 -2
- package/dist/adapters/mongodb-adapter/index.d.mts +35 -3
- package/dist/adapters/mongodb-adapter/index.mjs +291 -4
- package/dist/adapters/prisma-adapter/index.cjs +5 -5
- package/dist/adapters/prisma-adapter/index.d.cts +1 -1
- package/dist/adapters/prisma-adapter/index.d.mts +2 -2
- package/dist/adapters/prisma-adapter/index.mjs +3 -3
- package/dist/adapters/test.cjs +3 -3
- package/dist/adapters/test.d.cts +1 -1
- package/dist/adapters/test.d.mts +2 -2
- package/dist/adapters/test.mjs +2 -2
- package/dist/api/index.cjs +15 -15
- package/dist/api/index.d.cts +1 -1
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.mjs +8 -8
- package/dist/api/middleware/index.cjs +8 -8
- package/dist/api/middleware/index.d.cts +3 -3
- package/dist/api/middleware/index.d.mts +4 -4
- package/dist/api/middleware/index.mjs +3 -3
- package/dist/{api-_B7qO28y.mjs → api-B4RDwBty.mjs} +7 -7
- package/dist/{api-Bm89BLgN.cjs → api-CaRC1Gio.cjs} +12 -12
- package/dist/{bearer-CHeREcGT.cjs → bearer-DDzrp5M7.cjs} +2 -2
- package/dist/{bearer-0SeEmaS4.mjs → bearer-WZcs7gxL.mjs} +1 -1
- package/dist/{bun-sqlite-dialect-wuaC2-gh.cjs → bun-sqlite-dialect-DPgTzc0w.cjs} +1 -1
- package/dist/{chunk-Ceigfy4P.mjs → chunk-BFnQceUY.mjs} +1 -13
- package/dist/{chunk-oakRccI5.cjs → chunk-fPmz2rbM.cjs} +0 -9
- package/dist/client/index.cjs +26 -7
- package/dist/client/index.d.cts +27 -4
- package/dist/client/index.d.mts +28 -5
- package/dist/client/index.mjs +25 -6
- package/dist/client/lynx/index.cjs +5 -5
- package/dist/client/lynx/index.d.cts +15 -15
- package/dist/client/lynx/index.d.mts +27 -27
- package/dist/client/lynx/index.mjs +3 -3
- package/dist/client/plugins/index.d.cts +1 -1
- package/dist/client/plugins/index.d.mts +2 -2
- package/dist/client/react/index.cjs +5 -5
- package/dist/client/react/index.d.cts +26 -26
- package/dist/client/react/index.d.mts +16 -16
- package/dist/client/react/index.mjs +3 -3
- package/dist/client/solid/index.cjs +5 -5
- package/dist/client/solid/index.d.cts +16 -16
- package/dist/client/solid/index.d.mts +17 -17
- package/dist/client/solid/index.mjs +3 -3
- package/dist/client/svelte/index.cjs +4 -4
- package/dist/client/svelte/index.d.cts +11 -11
- package/dist/client/svelte/index.d.mts +16 -16
- package/dist/client/svelte/index.mjs +3 -3
- package/dist/client/vue/index.cjs +5 -5
- package/dist/client/vue/index.d.cts +27 -27
- package/dist/client/vue/index.d.mts +28 -28
- package/dist/client/vue/index.mjs +3 -3
- package/dist/{cookies-B5xeA6i8.cjs → cookies-BTl72THv.cjs} +3 -3
- package/dist/{cookies-Ch1JfQIz.mjs → cookies-BTs1o992.mjs} +2 -2
- package/dist/crypto/index.cjs +1 -1
- package/dist/crypto/index.d.cts +2 -2
- package/dist/crypto/index.d.mts +3 -3
- package/dist/crypto/index.mjs +1 -1
- package/dist/{crypto-CyQRFtkq.mjs → crypto-DH2Aa7jN.mjs} +1 -1
- package/dist/{crypto-CcTxYH82.cjs → crypto-DpSCnrTp.cjs} +1 -1
- package/dist/db/index.cjs +10 -10
- package/dist/db/index.d.cts +1 -1
- package/dist/db/index.d.mts +2 -2
- package/dist/db/index.mjs +6 -6
- package/dist/{db-xiJtoDgz.mjs → db-4tUsQJXd.mjs} +3 -3
- package/dist/{db-BTKyYu-_.cjs → db-ChMbb_U-.cjs} +8 -8
- package/dist/{email-verification-CWhj2qfb.mjs → email-verification-C_lBu_JY.mjs} +3 -3
- package/dist/{email-verification-C-AsfJsb.cjs → email-verification-DI_0H4JC.cjs} +5 -5
- package/dist/{hono-Cdukwu5K.cjs → hono-C14rpOEa.cjs} +1 -1
- package/dist/{hono-Covz10jU.mjs → hono-CO-zsqI-.mjs} +2 -2
- package/dist/{hono-BEq1NYVX.cjs → hono-DnW5crl1.cjs} +4 -4
- package/dist/{index-BVHscLQl.d.cts → index-4PEF72Mq.d.cts} +20 -20
- package/dist/{index-B-WeOMzg.d.cts → index-BCzB3uDD.d.cts} +833 -833
- package/dist/{index-B09P9p5_.d.cts → index-Bw8dyZTc.d.cts} +6 -6
- package/dist/{index-Qu-iJGNr.d.mts → index-C0b8eC8h.d.mts} +16 -16
- package/dist/{index-jlessPI0.d.mts → index-CrmLTEj8.d.mts} +382 -382
- package/dist/index-Dfgobqa-.d.mts +33 -0
- package/dist/index.cjs +721 -27
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +711 -16
- package/dist/integrations/next-js.cjs +3 -3
- package/dist/integrations/next-js.d.cts +5 -5
- package/dist/integrations/next-js.d.mts +6 -6
- package/dist/integrations/next-js.mjs +2 -2
- package/dist/integrations/node.d.cts +1 -1
- package/dist/integrations/node.d.mts +2 -2
- package/dist/integrations/react-start.cjs +3 -3
- package/dist/integrations/react-start.d.cts +5 -5
- package/dist/integrations/react-start.d.mts +5 -5
- package/dist/integrations/react-start.mjs +2 -2
- package/dist/integrations/svelte-kit.cjs +3 -3
- package/dist/integrations/svelte-kit.d.cts +5 -5
- package/dist/integrations/svelte-kit.d.mts +6 -6
- package/dist/integrations/svelte-kit.mjs +2 -2
- package/dist/{ip-B5SwXaMB.cjs → ip-C17Qdq-G.cjs} +2 -2
- package/dist/{json-CcJ2HjGo.cjs → json--tl7Grvs.cjs} +1 -1
- package/dist/{kysely-adapter-DRuoT_X8.mjs → kysely-adapter-CtIdoHa8.mjs} +3 -3
- package/dist/{kysely-adapter-Bxi7sPdG.cjs → kysely-adapter-QZTx077T.cjs} +4 -4
- package/dist/{logged-DQK3C64b.cjs → logged-Dv3st5qc.cjs} +1 -1
- package/dist/{memory-adapter-BlnDIAAX.cjs → memory-adapter-17RZd5df.cjs} +2 -2
- package/dist/{memory-adapter-Db3tsJTn.mjs → memory-adapter-Dp4XdCZK.mjs} +1 -1
- package/dist/{node-sqlite-dialect-mJWC8LWQ.cjs → node-sqlite-dialect-DP11CB0y.cjs} +1 -1
- package/dist/oauth2/index.cjs +11 -11
- package/dist/oauth2/index.d.cts +1 -1
- package/dist/oauth2/index.d.mts +2 -2
- package/dist/oauth2/index.mjs +6 -6
- package/dist/{oauth2-BLeOEi7Y.cjs → oauth2-5RL4cVNS.cjs} +3 -3
- package/dist/{oauth2-B8M0lW9l.mjs → oauth2-C56wz-n9.mjs} +2 -2
- package/dist/{origin-check-id9lTnqZ.cjs → origin-check-DjLTuZQ8.cjs} +2 -2
- package/dist/{passkey-B6N20LSS.cjs → passkey-BTT-v5c-.cjs} +4 -4
- package/dist/{passkey-DJsR_GX3.mjs → passkey-CzY_W2us.mjs} +2 -2
- package/dist/plugins/access/index.cjs +1 -1
- package/dist/plugins/access/index.d.cts +1 -1
- package/dist/plugins/access/index.d.mts +1 -1
- package/dist/plugins/access/index.mjs +1 -1
- package/dist/plugins/bearer/index.cjs +4 -4
- package/dist/plugins/bearer/index.d.cts +2 -2
- package/dist/plugins/bearer/index.d.mts +3 -3
- package/dist/plugins/bearer/index.mjs +3 -3
- package/dist/plugins/index.cjs +5215 -31
- package/dist/plugins/index.d.cts +351 -351
- package/dist/plugins/index.d.mts +268 -268
- package/dist/plugins/index.mjs +5202 -19
- package/dist/plugins/passkey/index.cjs +10 -10
- package/dist/plugins/passkey/index.d.cts +2 -2
- package/dist/plugins/passkey/index.d.mts +3 -3
- package/dist/plugins/passkey/index.mjs +5 -5
- package/dist/{schema-D-qjygfE.cjs → schema-CirKflVs.cjs} +2 -2
- package/dist/{session-rH8ougDl.mjs → session-CM3rmOYF.mjs} +1 -1
- package/dist/{session-De9POJTW.cjs → session-Cwrj4GfV.cjs} +5 -5
- package/dist/social-providers/index.cjs +1 -1
- package/dist/social-providers/index.d.cts +1 -1
- package/dist/social-providers/index.d.mts +1 -1
- package/dist/social-providers/index.mjs +1 -1
- package/dist/{social-providers-DoYJhBe3.mjs → social-providers-B8RK5yqI.mjs} +1 -1
- package/dist/{social-providers-DcFNUT0S.cjs → social-providers-BmFOIIPk.cjs} +1 -1
- package/dist/{state-CqJfCIl9.mjs → state-CQghgH9I.mjs} +1 -1
- package/dist/{state--f7fwIGh.cjs → state-CvSihlVT.cjs} +2 -2
- package/dist/test-utils/bun-sqlite-dialect-BSWhhKNs.mjs +155 -0
- package/dist/test-utils/bun-sqlite-dialect-BZBvHchL.cjs +156 -0
- package/dist/test-utils/index.cjs +8927 -482
- package/dist/test-utils/index.d.cts +8395 -337
- package/dist/test-utils/index.d.mts +8394 -334
- package/dist/test-utils/index.mjs +8712 -265
- package/dist/test-utils/node-sqlite-dialect-BgJqjBOu.cjs +156 -0
- package/dist/test-utils/node-sqlite-dialect-DAQXiobH.mjs +155 -0
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/{url-D2yvKaM7.cjs → url-Ce7CVaQD.cjs} +1 -1
- package/dist/utils/cookies.cjs +4 -4
- package/dist/utils/cookies.d.cts +1 -1
- package/dist/utils/cookies.d.mts +2 -2
- package/dist/utils/cookies.mjs +2 -2
- package/package.json +2 -2
- package/dist/auth-Bo9PDt5j.cjs +0 -739
- package/dist/auth-Ds4AG4h4.mjs +0 -709
- package/dist/index-C2-2QDyS.d.cts +0 -35
- package/dist/index-CWAqWfoZ.d.cts +0 -27
- package/dist/index-CYSShrFx.d.mts +0 -27
- package/dist/index-ppgcFe12.d.mts +0 -33
- package/dist/index-to0RO38U.d.mts +0 -35
- package/dist/mongodb-adapter-C_qGQED5.mjs +0 -291
- package/dist/mongodb-adapter-C_qfK87x.cjs +0 -297
- package/dist/plugins-C1lm2Wj3.cjs +0 -5254
- package/dist/plugins-Dai1QkRU.mjs +0 -5199
- package/dist/vanilla-Bu2PmFzE.cjs +0 -30
- package/dist/vanilla-TfHqeiC7.mjs +0 -25
- /package/dist/{access-B5bBI4uT.mjs → access-D0DRqUKC.mjs} +0 -0
- /package/dist/{adapter-factory-BXei1QRX.mjs → adapter-factory-lKIOf2OR.mjs} +0 -0
- /package/dist/{bun-sqlite-dialect-CfkBo2v5.mjs → bun-sqlite-dialect-6NqeV3px.mjs} +0 -0
- /package/dist/{defu-B0Svx_x4.cjs → defu-BmOYq4PU.cjs} +0 -0
- /package/dist/{defu-SZkpHhbR.mjs → defu-D9ZTXqlo.mjs} +0 -0
- /package/dist/{hono-DuE14mmj.d.mts → hono-D0VqxVy1.d.mts} +0 -0
- /package/dist/{index-B5_0QTLg.d.mts → index-BDhhaE6Y.d.cts} +0 -0
- /package/dist/{index-B7SKyR_a.d.cts → index-CF9iq55a.d.mts} +0 -0
- /package/dist/{index-CTwrVluH.d.mts → index-CRt_fppq.d.mts} +0 -0
- /package/dist/{index-cs4Sh0En.d.cts → index-CdLyn7qP.d.cts} +0 -0
- /package/dist/{node-sqlite-dialect-BfBzyOAg.mjs → node-sqlite-dialect-w4DAg0PH.mjs} +0 -0
- /package/dist/{parser-CeAer-RM.mjs → parser-B25ylT5u.mjs} +0 -0
- /package/dist/{parser-CdncAl9i.cjs → parser-B_wxvaAr.cjs} +0 -0
|
@@ -1,9 +1,296 @@
|
|
|
1
|
-
import "../../crypto-
|
|
1
|
+
import "../../crypto-DH2Aa7jN.mjs";
|
|
2
2
|
import "../../json-B1v2qRTQ.mjs";
|
|
3
|
-
import "../../state-
|
|
3
|
+
import "../../state-CQghgH9I.mjs";
|
|
4
4
|
import "../../request-1NL_1lyJ.mjs";
|
|
5
5
|
import "../../utils-D4vZd1-9.mjs";
|
|
6
|
-
import "../../adapter-factory-
|
|
7
|
-
import {
|
|
6
|
+
import { t as createAdapterFactory } from "../../adapter-factory-lKIOf2OR.mjs";
|
|
7
|
+
import { ObjectId } from "mongodb";
|
|
8
8
|
|
|
9
|
+
//#region src/adapters/mongodb-adapter/mongodb-adapter.ts
|
|
10
|
+
const mongodbAdapter = (db, config) => {
|
|
11
|
+
let lazyOptions;
|
|
12
|
+
const createCustomAdapter = (db$1, session) => ({ options, getFieldName, schema, getDefaultModelName }) => {
|
|
13
|
+
function serializeID({ field, value, model }) {
|
|
14
|
+
model = getDefaultModelName(model);
|
|
15
|
+
if (field === "id" || field === "_id" || schema[model].fields[field]?.references?.field === "id") {
|
|
16
|
+
if (typeof value !== "string") {
|
|
17
|
+
if (value instanceof ObjectId) return value;
|
|
18
|
+
if (Array.isArray(value)) return value.map((v) => {
|
|
19
|
+
if (typeof v === "string") try {
|
|
20
|
+
return new ObjectId(v);
|
|
21
|
+
} catch (e) {
|
|
22
|
+
return v;
|
|
23
|
+
}
|
|
24
|
+
if (v instanceof ObjectId) return v;
|
|
25
|
+
throw new Error("Invalid id value");
|
|
26
|
+
});
|
|
27
|
+
throw new Error("Invalid id value");
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
return new ObjectId(value);
|
|
31
|
+
} catch (e) {
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return value;
|
|
36
|
+
}
|
|
37
|
+
function convertWhereClause({ where, model }) {
|
|
38
|
+
if (!where.length) return {};
|
|
39
|
+
const conditions = where.map((w) => {
|
|
40
|
+
const { field: field_, value, operator = "eq", connector = "AND" } = w;
|
|
41
|
+
let condition;
|
|
42
|
+
let field = getFieldName({
|
|
43
|
+
model,
|
|
44
|
+
field: field_
|
|
45
|
+
});
|
|
46
|
+
if (field === "id") field = "_id";
|
|
47
|
+
switch (operator.toLowerCase()) {
|
|
48
|
+
case "eq":
|
|
49
|
+
condition = { [field]: serializeID({
|
|
50
|
+
field,
|
|
51
|
+
value,
|
|
52
|
+
model
|
|
53
|
+
}) };
|
|
54
|
+
break;
|
|
55
|
+
case "in":
|
|
56
|
+
condition = { [field]: { $in: Array.isArray(value) ? value.map((v) => serializeID({
|
|
57
|
+
field,
|
|
58
|
+
value: v,
|
|
59
|
+
model
|
|
60
|
+
})) : [serializeID({
|
|
61
|
+
field,
|
|
62
|
+
value,
|
|
63
|
+
model
|
|
64
|
+
})] } };
|
|
65
|
+
break;
|
|
66
|
+
case "not_in":
|
|
67
|
+
condition = { [field]: { $nin: Array.isArray(value) ? value.map((v) => serializeID({
|
|
68
|
+
field,
|
|
69
|
+
value: v,
|
|
70
|
+
model
|
|
71
|
+
})) : [serializeID({
|
|
72
|
+
field,
|
|
73
|
+
value,
|
|
74
|
+
model
|
|
75
|
+
})] } };
|
|
76
|
+
break;
|
|
77
|
+
case "gt":
|
|
78
|
+
condition = { [field]: { $gt: value } };
|
|
79
|
+
break;
|
|
80
|
+
case "gte":
|
|
81
|
+
condition = { [field]: { $gte: value } };
|
|
82
|
+
break;
|
|
83
|
+
case "lt":
|
|
84
|
+
condition = { [field]: { $lt: value } };
|
|
85
|
+
break;
|
|
86
|
+
case "lte":
|
|
87
|
+
condition = { [field]: { $lte: value } };
|
|
88
|
+
break;
|
|
89
|
+
case "ne":
|
|
90
|
+
condition = { [field]: { $ne: value } };
|
|
91
|
+
break;
|
|
92
|
+
case "contains":
|
|
93
|
+
condition = { [field]: { $regex: `.*${escapeForMongoRegex(value)}.*` } };
|
|
94
|
+
break;
|
|
95
|
+
case "starts_with":
|
|
96
|
+
condition = { [field]: { $regex: `^${escapeForMongoRegex(value)}` } };
|
|
97
|
+
break;
|
|
98
|
+
case "ends_with":
|
|
99
|
+
condition = { [field]: { $regex: `${escapeForMongoRegex(value)}$` } };
|
|
100
|
+
break;
|
|
101
|
+
default: throw new Error(`Unsupported operator: ${operator}`);
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
condition,
|
|
105
|
+
connector
|
|
106
|
+
};
|
|
107
|
+
});
|
|
108
|
+
if (conditions.length === 1) return conditions[0].condition;
|
|
109
|
+
const andConditions = conditions.filter((c) => c.connector === "AND").map((c) => c.condition);
|
|
110
|
+
const orConditions = conditions.filter((c) => c.connector === "OR").map((c) => c.condition);
|
|
111
|
+
let clause = {};
|
|
112
|
+
if (andConditions.length) clause = {
|
|
113
|
+
...clause,
|
|
114
|
+
$and: andConditions
|
|
115
|
+
};
|
|
116
|
+
if (orConditions.length) clause = {
|
|
117
|
+
...clause,
|
|
118
|
+
$or: orConditions
|
|
119
|
+
};
|
|
120
|
+
return clause;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
async create({ model, data: values }) {
|
|
124
|
+
return {
|
|
125
|
+
_id: (await db$1.collection(model).insertOne(values, { ...session && { session } })).insertedId.toString(),
|
|
126
|
+
...values
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
async findOne({ model, where, select }) {
|
|
130
|
+
const clause = convertWhereClause({
|
|
131
|
+
where,
|
|
132
|
+
model
|
|
133
|
+
});
|
|
134
|
+
const projection = select ? Object.fromEntries(select.map((field) => [getFieldName({
|
|
135
|
+
field,
|
|
136
|
+
model
|
|
137
|
+
}), 1])) : void 0;
|
|
138
|
+
const res = await db$1.collection(model).findOne(clause, {
|
|
139
|
+
...session && { session },
|
|
140
|
+
...projection && { projection }
|
|
141
|
+
});
|
|
142
|
+
if (!res) return null;
|
|
143
|
+
return res;
|
|
144
|
+
},
|
|
145
|
+
async findMany({ model, where, limit, offset, sortBy }) {
|
|
146
|
+
const clause = where ? convertWhereClause({
|
|
147
|
+
where,
|
|
148
|
+
model
|
|
149
|
+
}) : {};
|
|
150
|
+
const cursor = db$1.collection(model).find(clause, { ...session && { session } });
|
|
151
|
+
if (limit) cursor.limit(limit);
|
|
152
|
+
if (offset) cursor.skip(offset);
|
|
153
|
+
if (sortBy) cursor.sort(getFieldName({
|
|
154
|
+
field: sortBy.field,
|
|
155
|
+
model
|
|
156
|
+
}), sortBy.direction === "desc" ? -1 : 1);
|
|
157
|
+
return await cursor.toArray();
|
|
158
|
+
},
|
|
159
|
+
async count({ model, where }) {
|
|
160
|
+
const clause = where ? convertWhereClause({
|
|
161
|
+
where,
|
|
162
|
+
model
|
|
163
|
+
}) : {};
|
|
164
|
+
return await db$1.collection(model).countDocuments(clause, { ...session && { session } });
|
|
165
|
+
},
|
|
166
|
+
async update({ model, where, update: values }) {
|
|
167
|
+
const clause = convertWhereClause({
|
|
168
|
+
where,
|
|
169
|
+
model
|
|
170
|
+
});
|
|
171
|
+
const res = await db$1.collection(model).findOneAndUpdate(clause, { $set: values }, {
|
|
172
|
+
...session && { session },
|
|
173
|
+
returnDocument: "after"
|
|
174
|
+
});
|
|
175
|
+
if (!res) return null;
|
|
176
|
+
return res;
|
|
177
|
+
},
|
|
178
|
+
async updateMany({ model, where, update: values }) {
|
|
179
|
+
const clause = convertWhereClause({
|
|
180
|
+
where,
|
|
181
|
+
model
|
|
182
|
+
});
|
|
183
|
+
return (await db$1.collection(model).updateMany(clause, { $set: values }, { ...session && { session } })).modifiedCount;
|
|
184
|
+
},
|
|
185
|
+
async delete({ model, where }) {
|
|
186
|
+
const clause = convertWhereClause({
|
|
187
|
+
where,
|
|
188
|
+
model
|
|
189
|
+
});
|
|
190
|
+
await db$1.collection(model).deleteOne(clause, { ...session && { session } });
|
|
191
|
+
},
|
|
192
|
+
async deleteMany({ model, where }) {
|
|
193
|
+
const clause = convertWhereClause({
|
|
194
|
+
where,
|
|
195
|
+
model
|
|
196
|
+
});
|
|
197
|
+
return (await db$1.collection(model).deleteMany(clause, { ...session && { session } })).deletedCount;
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
let lazyAdapter = null;
|
|
202
|
+
let adapterOptions = null;
|
|
203
|
+
adapterOptions = {
|
|
204
|
+
config: {
|
|
205
|
+
adapterId: "mongodb-adapter",
|
|
206
|
+
adapterName: "MongoDB Adapter",
|
|
207
|
+
usePlural: config?.usePlural ?? false,
|
|
208
|
+
debugLogs: config?.debugLogs ?? false,
|
|
209
|
+
mapKeysTransformInput: { id: "_id" },
|
|
210
|
+
mapKeysTransformOutput: { _id: "id" },
|
|
211
|
+
supportsNumericIds: false,
|
|
212
|
+
transaction: config?.client && (config?.transaction ?? true) ? async (cb) => {
|
|
213
|
+
if (!config.client) return cb(lazyAdapter(lazyOptions));
|
|
214
|
+
const session = config.client.startSession();
|
|
215
|
+
try {
|
|
216
|
+
session.startTransaction();
|
|
217
|
+
const result = await cb(createAdapterFactory({
|
|
218
|
+
config: adapterOptions.config,
|
|
219
|
+
adapter: createCustomAdapter(db, session)
|
|
220
|
+
})(lazyOptions));
|
|
221
|
+
await session.commitTransaction();
|
|
222
|
+
return result;
|
|
223
|
+
} catch (err) {
|
|
224
|
+
await session.abortTransaction();
|
|
225
|
+
throw err;
|
|
226
|
+
} finally {
|
|
227
|
+
await session.endSession();
|
|
228
|
+
}
|
|
229
|
+
} : false,
|
|
230
|
+
customTransformInput({ action, data, field, fieldAttributes, schema, model, options }) {
|
|
231
|
+
if (field === "_id" || fieldAttributes.references?.field === "id") {
|
|
232
|
+
if (action === "update") {
|
|
233
|
+
if (typeof data === "string") try {
|
|
234
|
+
return new ObjectId(data);
|
|
235
|
+
} catch (error) {
|
|
236
|
+
return data;
|
|
237
|
+
}
|
|
238
|
+
return data;
|
|
239
|
+
}
|
|
240
|
+
if (Array.isArray(data)) return data.map((v) => {
|
|
241
|
+
if (typeof v === "string") try {
|
|
242
|
+
return new ObjectId(v);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
return v;
|
|
245
|
+
}
|
|
246
|
+
return v;
|
|
247
|
+
});
|
|
248
|
+
if (typeof data === "string") try {
|
|
249
|
+
return new ObjectId(data);
|
|
250
|
+
} catch (error) {
|
|
251
|
+
return new ObjectId();
|
|
252
|
+
}
|
|
253
|
+
if (data === null && fieldAttributes.references?.field === "id") return null;
|
|
254
|
+
return new ObjectId();
|
|
255
|
+
}
|
|
256
|
+
return data;
|
|
257
|
+
},
|
|
258
|
+
customTransformOutput({ data, field, fieldAttributes }) {
|
|
259
|
+
if (field === "id" || fieldAttributes.references?.field === "id") {
|
|
260
|
+
if (data instanceof ObjectId) return data.toHexString();
|
|
261
|
+
if (Array.isArray(data)) return data.map((v) => {
|
|
262
|
+
if (v instanceof ObjectId) return v.toHexString();
|
|
263
|
+
return v;
|
|
264
|
+
});
|
|
265
|
+
return data;
|
|
266
|
+
}
|
|
267
|
+
return data;
|
|
268
|
+
},
|
|
269
|
+
customIdGenerator(props) {
|
|
270
|
+
return new ObjectId().toString();
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
adapter: createCustomAdapter(db)
|
|
274
|
+
};
|
|
275
|
+
lazyAdapter = createAdapterFactory(adapterOptions);
|
|
276
|
+
return (options) => {
|
|
277
|
+
lazyOptions = options;
|
|
278
|
+
return lazyAdapter(options);
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
/**
|
|
282
|
+
* Safely escape user input for use in a MongoDB regex.
|
|
283
|
+
* This ensures the resulting pattern is treated as literal text,
|
|
284
|
+
* and not as a regex with special syntax.
|
|
285
|
+
*
|
|
286
|
+
* @param input - The input string to escape. Any type that isn't a string will be converted to an empty string.
|
|
287
|
+
* @param maxLength - The maximum length of the input string to escape. Defaults to 256. This is to prevent DOS attacks.
|
|
288
|
+
* @returns The escaped string.
|
|
289
|
+
*/
|
|
290
|
+
function escapeForMongoRegex(input, maxLength = 256) {
|
|
291
|
+
if (typeof input !== "string") return "";
|
|
292
|
+
return input.slice(0, maxLength).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
//#endregion
|
|
9
296
|
export { mongodbAdapter };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const require_chunk = require('../../chunk-
|
|
2
|
-
require('../../crypto-
|
|
3
|
-
require('../../json
|
|
4
|
-
require('../../state
|
|
1
|
+
const require_chunk = require('../../chunk-fPmz2rbM.cjs');
|
|
2
|
+
require('../../crypto-DpSCnrTp.cjs');
|
|
3
|
+
require('../../json--tl7Grvs.cjs');
|
|
4
|
+
require('../../state-CvSihlVT.cjs');
|
|
5
5
|
require('../../request-CPNlp-DK.cjs');
|
|
6
6
|
require('../../utils-44aDDP8f.cjs');
|
|
7
|
-
const require_adapter_factory = require('../../adapter-factory-
|
|
7
|
+
const require_adapter_factory = require('../../adapter-factory-D1I7joki.cjs');
|
|
8
8
|
let __faire_auth_core_error = require("@faire-auth/core/error");
|
|
9
9
|
|
|
10
10
|
//#region src/adapters/prisma-adapter/prisma-adapter.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as FaireAuthOptions } from "../../index-
|
|
2
|
-
import "../../hono-
|
|
1
|
+
import { I as FaireAuthOptions } from "../../index-CrmLTEj8.mjs";
|
|
2
|
+
import "../../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { DBAdapter, DBAdapterDebugLogOption } from "@faire-auth/core/db/adapter";
|
|
4
4
|
|
|
5
5
|
//#region src/adapters/prisma-adapter/prisma-adapter.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "../../crypto-
|
|
1
|
+
import "../../crypto-DH2Aa7jN.mjs";
|
|
2
2
|
import "../../json-B1v2qRTQ.mjs";
|
|
3
|
-
import "../../state-
|
|
3
|
+
import "../../state-CQghgH9I.mjs";
|
|
4
4
|
import "../../request-1NL_1lyJ.mjs";
|
|
5
5
|
import "../../utils-D4vZd1-9.mjs";
|
|
6
|
-
import { t as createAdapterFactory } from "../../adapter-factory-
|
|
6
|
+
import { t as createAdapterFactory } from "../../adapter-factory-lKIOf2OR.mjs";
|
|
7
7
|
import { FaireAuthError } from "@faire-auth/core/error";
|
|
8
8
|
|
|
9
9
|
//#region src/adapters/prisma-adapter/prisma-adapter.ts
|
package/dist/adapters/test.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_chunk = require('../chunk-
|
|
2
|
-
require('../crypto-
|
|
3
|
-
require('../state
|
|
1
|
+
const require_chunk = require('../chunk-fPmz2rbM.cjs');
|
|
2
|
+
require('../crypto-DpSCnrTp.cjs');
|
|
3
|
+
require('../state-CvSihlVT.cjs');
|
|
4
4
|
require('../request-CPNlp-DK.cjs');
|
|
5
5
|
require('../utils-44aDDP8f.cjs');
|
|
6
6
|
let vitest = require("vitest");
|
package/dist/adapters/test.d.cts
CHANGED
package/dist/adapters/test.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as FaireAuthOptions } from "../index-
|
|
2
|
-
import "../hono-
|
|
1
|
+
import { I as FaireAuthOptions } from "../index-CrmLTEj8.mjs";
|
|
2
|
+
import "../hono-D0VqxVy1.mjs";
|
|
3
3
|
import { DBAdapter } from "@faire-auth/core/db/adapter";
|
|
4
4
|
|
|
5
5
|
//#region src/adapters/test.d.ts
|
package/dist/adapters/test.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../crypto-
|
|
2
|
-
import "../state-
|
|
1
|
+
import "../crypto-DH2Aa7jN.mjs";
|
|
2
|
+
import "../state-CQghgH9I.mjs";
|
|
3
3
|
import "../request-1NL_1lyJ.mjs";
|
|
4
4
|
import { r as generateId } from "../utils-D4vZd1-9.mjs";
|
|
5
5
|
import { beforeAll, describe, expect, test } from "vitest";
|
package/dist/api/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
require('../hono-
|
|
2
|
-
require('../ip-
|
|
3
|
-
require('../crypto-
|
|
4
|
-
require('../json
|
|
5
|
-
require('../cookies-
|
|
6
|
-
require('../logged-
|
|
7
|
-
require('../url-
|
|
1
|
+
require('../hono-C14rpOEa.cjs');
|
|
2
|
+
require('../ip-C17Qdq-G.cjs');
|
|
3
|
+
require('../crypto-DpSCnrTp.cjs');
|
|
4
|
+
require('../json--tl7Grvs.cjs');
|
|
5
|
+
require('../cookies-BTl72THv.cjs');
|
|
6
|
+
require('../logged-Dv3st5qc.cjs');
|
|
7
|
+
require('../url-Ce7CVaQD.cjs');
|
|
8
8
|
require('../middleware-CWvRH4EW.cjs');
|
|
9
|
-
require('../session-
|
|
10
|
-
require('../origin-check-
|
|
11
|
-
require('../email-verification-
|
|
12
|
-
require('../oauth2-
|
|
13
|
-
require('../state
|
|
14
|
-
require('../social-providers-
|
|
15
|
-
const require_api = require('../api-
|
|
9
|
+
require('../session-Cwrj4GfV.cjs');
|
|
10
|
+
require('../origin-check-DjLTuZQ8.cjs');
|
|
11
|
+
require('../email-verification-DI_0H4JC.cjs');
|
|
12
|
+
require('../oauth2-5RL4cVNS.cjs');
|
|
13
|
+
require('../state-CvSihlVT.cjs');
|
|
14
|
+
require('../social-providers-BmFOIIPk.cjs');
|
|
15
|
+
const require_api = require('../api-CaRC1Gio.cjs');
|
|
16
16
|
require('../request-CPNlp-DK.cjs');
|
|
17
17
|
require('../utils-44aDDP8f.cjs');
|
|
18
|
-
require('../schema-
|
|
18
|
+
require('../schema-CirKflVs.cjs');
|
|
19
19
|
|
|
20
20
|
exports.router = require_api.router;
|
package/dist/api/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { H as InferApp, U as InferClient, V as InferAPI, m as router } from "../index-
|
|
1
|
+
import { H as InferApp, U as InferClient, V as InferAPI, m as router } from "../index-BCzB3uDD.cjs";
|
|
2
2
|
import "../hono-DOM31WQz.cjs";
|
|
3
3
|
export { InferAPI, InferApp, InferClient, router };
|
package/dist/api/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { H as InferApp, U as InferClient, V as InferAPI, m as router } from "../index-
|
|
2
|
-
import "../hono-
|
|
1
|
+
import { H as InferApp, U as InferClient, V as InferAPI, m as router } from "../index-CrmLTEj8.mjs";
|
|
2
|
+
import "../hono-D0VqxVy1.mjs";
|
|
3
3
|
export { InferAPI, InferApp, InferClient, router };
|
package/dist/api/index.mjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import "../hono-CoKYWnXA.mjs";
|
|
2
2
|
import "../ip-BjNYspCH.mjs";
|
|
3
|
-
import "../crypto-
|
|
3
|
+
import "../crypto-DH2Aa7jN.mjs";
|
|
4
4
|
import "../json-B1v2qRTQ.mjs";
|
|
5
|
-
import "../cookies-
|
|
5
|
+
import "../cookies-BTs1o992.mjs";
|
|
6
6
|
import "../logged-CyGfp8_H.mjs";
|
|
7
7
|
import "../url-BoUuoIwZ.mjs";
|
|
8
8
|
import "../middleware-CE6OhDkq.mjs";
|
|
9
|
-
import "../session-
|
|
9
|
+
import "../session-CM3rmOYF.mjs";
|
|
10
10
|
import "../origin-check-8Gajklvh.mjs";
|
|
11
|
-
import "../email-verification-
|
|
12
|
-
import "../oauth2-
|
|
13
|
-
import "../state-
|
|
14
|
-
import "../social-providers-
|
|
15
|
-
import { t as router } from "../api-
|
|
11
|
+
import "../email-verification-C_lBu_JY.mjs";
|
|
12
|
+
import "../oauth2-C56wz-n9.mjs";
|
|
13
|
+
import "../state-CQghgH9I.mjs";
|
|
14
|
+
import "../social-providers-B8RK5yqI.mjs";
|
|
15
|
+
import { t as router } from "../api-B4RDwBty.mjs";
|
|
16
16
|
import "../request-1NL_1lyJ.mjs";
|
|
17
17
|
import "../utils-D4vZd1-9.mjs";
|
|
18
18
|
import "../schema-DTIwLLmf.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
require('../../hono-
|
|
2
|
-
require('../../crypto-
|
|
3
|
-
require('../../json
|
|
4
|
-
require('../../cookies-
|
|
5
|
-
require('../../logged-
|
|
6
|
-
require('../../url-
|
|
1
|
+
require('../../hono-C14rpOEa.cjs');
|
|
2
|
+
require('../../crypto-DpSCnrTp.cjs');
|
|
3
|
+
require('../../json--tl7Grvs.cjs');
|
|
4
|
+
require('../../cookies-BTl72THv.cjs');
|
|
5
|
+
require('../../logged-Dv3st5qc.cjs');
|
|
6
|
+
require('../../url-Ce7CVaQD.cjs');
|
|
7
7
|
require('../../middleware-CWvRH4EW.cjs');
|
|
8
|
-
const require_session = require('../../session-
|
|
9
|
-
const require_origin_check = require('../../origin-check-
|
|
8
|
+
const require_session = require('../../session-Cwrj4GfV.cjs');
|
|
9
|
+
const require_origin_check = require('../../origin-check-DjLTuZQ8.cjs');
|
|
10
10
|
|
|
11
11
|
exports.freshSessionMiddleware = require_session.freshSessionMiddleware;
|
|
12
12
|
exports.getSessionFromCtx = require_session.getSessionFromCtx;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as getSessionFromCtx, J as sessionMiddleware, K as requestOnlySessionMiddleware, W as freshSessionMiddleware, q as sensitiveSessionMiddleware } from "../../index-
|
|
1
|
+
import { G as getSessionFromCtx, J as sessionMiddleware, K as requestOnlySessionMiddleware, W as freshSessionMiddleware, q as sensitiveSessionMiddleware } from "../../index-BCzB3uDD.cjs";
|
|
2
2
|
import { t as ContextVars } from "../../hono-DOM31WQz.cjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as hono135 from "hono";
|
|
4
4
|
import { Context } from "hono";
|
|
5
5
|
|
|
6
6
|
//#region src/api/middleware/origin-check.d.ts
|
|
@@ -11,6 +11,6 @@ import { Context } from "hono";
|
|
|
11
11
|
* @param getValue - Function to get the callback URL(s) from the context.
|
|
12
12
|
* @returns The middleware function.
|
|
13
13
|
*/
|
|
14
|
-
declare const originCheck: (getValue: <V extends object>(ctx: Context<ContextVars<V>>) => string | string[] | undefined | Promise<string | string[] | undefined>) => (ctx: Context<ContextVars<object>, string, {}>, next:
|
|
14
|
+
declare const originCheck: (getValue: <V extends object>(ctx: Context<ContextVars<V>>) => string | string[] | undefined | Promise<string | string[] | undefined>) => (ctx: Context<ContextVars<object>, string, {}>, next: hono135.Next) => Promise<void | Response>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { freshSessionMiddleware, getSessionFromCtx, originCheck, requestOnlySessionMiddleware, sensitiveSessionMiddleware, sessionMiddleware };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as getSessionFromCtx, J as sessionMiddleware, K as requestOnlySessionMiddleware, W as freshSessionMiddleware, q as sensitiveSessionMiddleware } from "../../index-
|
|
2
|
-
import { t as ContextVars } from "../../hono-
|
|
3
|
-
import * as
|
|
1
|
+
import { G as getSessionFromCtx, J as sessionMiddleware, K as requestOnlySessionMiddleware, W as freshSessionMiddleware, q as sensitiveSessionMiddleware } from "../../index-CrmLTEj8.mjs";
|
|
2
|
+
import { t as ContextVars } from "../../hono-D0VqxVy1.mjs";
|
|
3
|
+
import * as hono82 from "hono";
|
|
4
4
|
import { Context } from "hono";
|
|
5
5
|
|
|
6
6
|
//#region src/api/middleware/origin-check.d.ts
|
|
@@ -11,6 +11,6 @@ import { Context } from "hono";
|
|
|
11
11
|
* @param getValue - Function to get the callback URL(s) from the context.
|
|
12
12
|
* @returns The middleware function.
|
|
13
13
|
*/
|
|
14
|
-
declare const originCheck: (getValue: <V extends object>(ctx: Context<ContextVars<V>>) => string | string[] | undefined | Promise<string | string[] | undefined>) => (ctx: Context<ContextVars<object>, string, {}>, next:
|
|
14
|
+
declare const originCheck: (getValue: <V extends object>(ctx: Context<ContextVars<V>>) => string | string[] | undefined | Promise<string | string[] | undefined>) => (ctx: Context<ContextVars<object>, string, {}>, next: hono82.Next) => Promise<void | Response>;
|
|
15
15
|
//#endregion
|
|
16
16
|
export { freshSessionMiddleware, getSessionFromCtx, originCheck, requestOnlySessionMiddleware, sensitiveSessionMiddleware, sessionMiddleware };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "../../hono-CoKYWnXA.mjs";
|
|
2
|
-
import "../../crypto-
|
|
2
|
+
import "../../crypto-DH2Aa7jN.mjs";
|
|
3
3
|
import "../../json-B1v2qRTQ.mjs";
|
|
4
|
-
import "../../cookies-
|
|
4
|
+
import "../../cookies-BTs1o992.mjs";
|
|
5
5
|
import "../../logged-CyGfp8_H.mjs";
|
|
6
6
|
import "../../url-BoUuoIwZ.mjs";
|
|
7
7
|
import "../../middleware-CE6OhDkq.mjs";
|
|
8
|
-
import { a as requestOnlySessionMiddleware, l as sensitiveSessionMiddleware, r as getSessionFromCtx, t as freshSessionMiddleware, u as sessionMiddleware } from "../../session-
|
|
8
|
+
import { a as requestOnlySessionMiddleware, l as sensitiveSessionMiddleware, r as getSessionFromCtx, t as freshSessionMiddleware, u as sessionMiddleware } from "../../session-CM3rmOYF.mjs";
|
|
9
9
|
import { n as originCheck } from "../../origin-check-8Gajklvh.mjs";
|
|
10
10
|
|
|
11
11
|
export { freshSessionMiddleware, getSessionFromCtx, originCheck, requestOnlySessionMiddleware, sensitiveSessionMiddleware, sessionMiddleware };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as contextStorage } from "./hono-CoKYWnXA.mjs";
|
|
2
2
|
import { r as runWithTransaction, t as getIp } from "./ip-BjNYspCH.mjs";
|
|
3
|
-
import { n as crypto_exports } from "./crypto-
|
|
3
|
+
import { n as crypto_exports } from "./crypto-DH2Aa7jN.mjs";
|
|
4
4
|
import { t as safeJSONParse } from "./json-B1v2qRTQ.mjs";
|
|
5
|
-
import { n as cookies_exports, o as deleteSessionCookie, y as setSessionCookie } from "./cookies-
|
|
5
|
+
import { n as cookies_exports, o as deleteSessionCookie, y as setSessionCookie } from "./cookies-BTs1o992.mjs";
|
|
6
6
|
import { r as createMiddleware } from "./middleware-CE6OhDkq.mjs";
|
|
7
|
-
import { _ as initContextMiddleware, a as requestOnlySessionMiddleware, c as revokeSessions, d as createAPI, f as createEndpoint, g as initHooksMiddleware, h as initErrorHandler, i as listSessions, l as sensitiveSessionMiddleware, m as setDefaultExecutionCtx, n as getSession, o as revokeOtherSessions, p as setRenderer, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-
|
|
7
|
+
import { _ as initContextMiddleware, a as requestOnlySessionMiddleware, c as revokeSessions, d as createAPI, f as createEndpoint, g as initHooksMiddleware, h as initErrorHandler, i as listSessions, l as sensitiveSessionMiddleware, m as setDefaultExecutionCtx, n as getSession, o as revokeOtherSessions, p as setRenderer, s as revokeSession, t as freshSessionMiddleware, u as sessionMiddleware } from "./session-CM3rmOYF.mjs";
|
|
8
8
|
import { n as originCheck, r as wildcardMatch, t as initOriginCheckMiddleware } from "./origin-check-8Gajklvh.mjs";
|
|
9
|
-
import { n as sendVerificationEmail, r as verifyEmail, t as createEmailVerificationToken } from "./email-verification-
|
|
10
|
-
import { n as decryptOAuthToken, r as setTokenUtil, t as handleOAuthUserInfo } from "./oauth2-
|
|
11
|
-
import { n as parseState, t as generateState } from "./state-
|
|
12
|
-
import { t as social_providers_exports } from "./social-providers-
|
|
9
|
+
import { n as sendVerificationEmail, r as verifyEmail, t as createEmailVerificationToken } from "./email-verification-C_lBu_JY.mjs";
|
|
10
|
+
import { n as decryptOAuthToken, r as setTokenUtil, t as handleOAuthUserInfo } from "./oauth2-C56wz-n9.mjs";
|
|
11
|
+
import { n as parseState, t as generateState } from "./state-CQghgH9I.mjs";
|
|
12
|
+
import { t as social_providers_exports } from "./social-providers-B8RK5yqI.mjs";
|
|
13
13
|
import { r as generateId } from "./utils-D4vZd1-9.mjs";
|
|
14
14
|
import { c as parseUserInput } from "./schema-DTIwLLmf.mjs";
|
|
15
15
|
import { isDevelopment } from "@faire-auth/core/env";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
2
|
-
const require_ip = require('./ip-
|
|
3
|
-
const require_crypto = require('./crypto-
|
|
4
|
-
const require_json = require('./json
|
|
5
|
-
const require_cookies = require('./cookies-
|
|
1
|
+
const require_chunk = require('./chunk-fPmz2rbM.cjs');
|
|
2
|
+
const require_ip = require('./ip-C17Qdq-G.cjs');
|
|
3
|
+
const require_crypto = require('./crypto-DpSCnrTp.cjs');
|
|
4
|
+
const require_json = require('./json--tl7Grvs.cjs');
|
|
5
|
+
const require_cookies = require('./cookies-BTl72THv.cjs');
|
|
6
6
|
const require_middleware = require('./middleware-CWvRH4EW.cjs');
|
|
7
|
-
const require_session = require('./session-
|
|
8
|
-
const require_origin_check = require('./origin-check-
|
|
9
|
-
const require_email_verification = require('./email-verification-
|
|
10
|
-
const require_oauth2 = require('./oauth2-
|
|
11
|
-
const require_state = require('./state
|
|
12
|
-
const require_social_providers = require('./social-providers-
|
|
13
|
-
const require_schema = require('./schema-
|
|
7
|
+
const require_session = require('./session-Cwrj4GfV.cjs');
|
|
8
|
+
const require_origin_check = require('./origin-check-DjLTuZQ8.cjs');
|
|
9
|
+
const require_email_verification = require('./email-verification-DI_0H4JC.cjs');
|
|
10
|
+
const require_oauth2 = require('./oauth2-5RL4cVNS.cjs');
|
|
11
|
+
const require_state = require('./state-CvSihlVT.cjs');
|
|
12
|
+
const require_social_providers = require('./social-providers-BmFOIIPk.cjs');
|
|
13
|
+
const require_schema = require('./schema-CirKflVs.cjs');
|
|
14
14
|
let __faire_auth_core_env = require("@faire-auth/core/env");
|
|
15
15
|
let __faire_auth_core_error = require("@faire-auth/core/error");
|
|
16
16
|
let __faire_auth_core_factory = require("@faire-auth/core/factory");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_chunk = require('./chunk-
|
|
2
|
-
const require_cookies = require('./cookies-
|
|
1
|
+
const require_chunk = require('./chunk-fPmz2rbM.cjs');
|
|
2
|
+
const require_cookies = require('./cookies-BTl72THv.cjs');
|
|
3
3
|
const require_middleware = require('./middleware-CWvRH4EW.cjs');
|
|
4
4
|
let __faire_auth_core_datatypes = require("@faire-auth/core/datatypes");
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as serializeSignedCookie, p as parseSetCookieHeader } from "./cookies-
|
|
1
|
+
import { _ as serializeSignedCookie, p as parseSetCookieHeader } from "./cookies-BTs1o992.mjs";
|
|
2
2
|
import { n as createHook } from "./middleware-CE6OhDkq.mjs";
|
|
3
3
|
import { createHMAC } from "@faire-auth/core/datatypes";
|
|
4
4
|
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
1
|
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
2
|
var __defProp = Object.defineProperty;
|
|
6
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJS = (cb, mod) => function() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
6
|
var __export = (all) => {
|
|
14
7
|
let target = {};
|
|
15
8
|
for (var name in all) __defProp(target, name, {
|
|
@@ -29,11 +22,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
29
22
|
return to;
|
|
30
23
|
};
|
|
31
24
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
32
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
33
|
-
value: mod,
|
|
34
|
-
enumerable: true
|
|
35
|
-
}) : target, mod));
|
|
36
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
37
25
|
|
|
38
26
|
//#endregion
|
|
39
|
-
export {
|
|
27
|
+
export { __reExport as n, __export as t };
|