@authhero/kysely-adapter 0.6.8 → 0.6.9

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.
@@ -7415,19 +7415,18 @@ function Nt(n, e = "", t = {}) {
7415
7415
  }
7416
7416
  function co(n, e) {
7417
7417
  const t = {};
7418
- Array.isArray(e) || (e = []);
7419
7418
  for (const [r, s] of Object.entries(n)) {
7420
- let a = t;
7421
- const o = r.split("_");
7422
- let c = !1;
7423
- if (o.forEach((d, u) => {
7424
- const l = o.slice(0, u + 1).join("_");
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]);
7426
- }), !c && o.length > 1) {
7427
- let d = t;
7428
- o.forEach((u, l) => {
7429
- l === o.length - 1 ? d[u] = s : (d[u] || (d[u] = {}), d = d[u]);
7430
- });
7419
+ const a = e.find(
7420
+ (o) => r.startsWith(`${o}_`)
7421
+ );
7422
+ if (!a)
7423
+ t[r] = s;
7424
+ else {
7425
+ const o = r.slice(a.length + 1);
7426
+ t[a] = {
7427
+ ...t[a],
7428
+ [o]: s
7429
+ };
7431
7430
  }
7432
7431
  }
7433
7432
  return t;
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.8",
14
+ "version": "0.6.9",
15
15
  "files": [
16
16
  "dist"
17
17
  ],