@authhero/kysely-adapter 0.6.7 → 0.6.8
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/kysely-adapter.mjs
CHANGED
|
@@ -7415,6 +7415,7 @@ function Nt(n, e = "", t = {}) {
|
|
|
7415
7415
|
}
|
|
7416
7416
|
function co(n, e) {
|
|
7417
7417
|
const t = {};
|
|
7418
|
+
Array.isArray(e) || (e = []);
|
|
7418
7419
|
for (const [r, s] of Object.entries(n)) {
|
|
7419
7420
|
let a = t;
|
|
7420
7421
|
const o = r.split("_");
|
|
@@ -7424,9 +7425,9 @@ function co(n, e) {
|
|
|
7424
7425
|
e.includes(l) && u < o.length - 1 ? (c = !0, a[d] || (a[d] = {}), a = a[d]) : u === o.length - 1 ? a[d] = s : (a[d] || (a[d] = {}), a = a[d]);
|
|
7425
7426
|
}), !c && o.length > 1) {
|
|
7426
7427
|
let d = t;
|
|
7427
|
-
o.forEach((u) => {
|
|
7428
|
-
d[u] || (d[u] = {}), d = d[u];
|
|
7429
|
-
})
|
|
7428
|
+
o.forEach((u, l) => {
|
|
7429
|
+
l === o.length - 1 ? d[u] = s : (d[u] || (d[u] = {}), d = d[u]);
|
|
7430
|
+
});
|
|
7430
7431
|
}
|
|
7431
7432
|
}
|
|
7432
7433
|
return t;
|
|
@@ -7471,7 +7472,9 @@ function fo(n) {
|
|
|
7471
7472
|
function mo(n) {
|
|
7472
7473
|
return async (e, t) => {
|
|
7473
7474
|
const r = (/* @__PURE__ */ new Date()).toISOString(), s = await n.selectFrom("logins").where("logins.expires_at", ">", r).where("logins.login_id", "=", t).selectAll().executeTakeFirst();
|
|
7474
|
-
return s ? gs.parse(
|
|
7475
|
+
return s ? gs.parse(
|
|
7476
|
+
co(R(s), ["authParams"])
|
|
7477
|
+
) : null;
|
|
7475
7478
|
};
|
|
7476
7479
|
}
|
|
7477
7480
|
function _o(n) {
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "0.6.
|
|
14
|
+
"version": "0.6.8",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"@types/node": "^20.14.9",
|
|
32
32
|
"dts-bundle-generator": "^9.5.1",
|
|
33
33
|
"typescript": "^5.5.2",
|
|
34
|
-
"vite": "^5.3.2"
|
|
34
|
+
"vite": "^5.3.2",
|
|
35
|
+
"vitest": "^1.6.0"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"@hono/zod-openapi": "^0.14.5",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"@authhero/adapter-interfaces": "^0.10.5"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
|
-
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts"
|
|
47
|
+
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",
|
|
48
|
+
"test": "vitest"
|
|
47
49
|
}
|
|
48
50
|
}
|