@authhero/kysely-adapter 0.7.14 → 0.8.1
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var Jn = Object.defineProperty;
|
|
2
2
|
var Kn = (n, e, t) => e in n ? Jn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var Ht = (n, e, t) => Kn(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
var Gt = class extends Error {
|
|
5
5
|
constructor(e = 500, t) {
|
|
6
6
|
super(t == null ? void 0 : t.message, { cause: t == null ? void 0 : t.cause });
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
Ht(this, "res");
|
|
8
|
+
Ht(this, "status");
|
|
9
9
|
this.res = t == null ? void 0 : t.res, this.status = e;
|
|
10
10
|
}
|
|
11
11
|
getResponse() {
|
|
@@ -17,7 +17,7 @@ var Gt = class extends Error {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
|
-
function
|
|
20
|
+
function Hn(n) {
|
|
21
21
|
return async (e, t) => {
|
|
22
22
|
const { identities: s, ...r } = t, a = {
|
|
23
23
|
...r,
|
|
@@ -47,7 +47,7 @@ function R(n) {
|
|
|
47
47
|
e[t] === null ? delete e[t] : typeof e[t] == "object" && (Array.isArray(e[t]) ? e[t] = e[t].map(R) : e[t] = R(e[t]));
|
|
48
48
|
return e;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Qn(n, e) {
|
|
51
51
|
var t = {};
|
|
52
52
|
for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && e.indexOf(s) < 0 && (t[s] = n[s]);
|
|
53
53
|
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -59,7 +59,7 @@ function Yn(n, e) {
|
|
|
59
59
|
var t;
|
|
60
60
|
return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function He(n, e) {
|
|
63
63
|
const t = n.ZodType.prototype[e];
|
|
64
64
|
n.ZodType.prototype[e] = function(...s) {
|
|
65
65
|
const r = t.apply(this, s);
|
|
@@ -71,24 +71,24 @@ function Gn(n) {
|
|
|
71
71
|
return;
|
|
72
72
|
n.ZodType.prototype.openapi = function(r, a) {
|
|
73
73
|
var o, c, d, u, l, j;
|
|
74
|
-
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, Re =
|
|
74
|
+
const A = typeof r == "string" ? a : r, U = A ?? {}, { param: ie } = U, Re = Qn(U, ["param"]), oe = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ce = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), Re), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || ie ? {
|
|
75
75
|
param: Object.assign(Object.assign({}, (j = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || j === void 0 ? void 0 : j.param), ie)
|
|
76
76
|
} : void 0), de = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(oe).length > 0 ? { _internal: oe } : void 0), Object.keys(ce).length > 0 ? { metadata: ce } : void 0) }));
|
|
77
77
|
if (Yn(this, "ZodObject")) {
|
|
78
78
|
const $e = this.extend;
|
|
79
79
|
de.extend = function(...Pe) {
|
|
80
|
-
var K,
|
|
80
|
+
var K, H, Q, ue, xe, Te;
|
|
81
81
|
const Oe = $e.apply(this, Pe);
|
|
82
82
|
return Oe._def.openapi = {
|
|
83
83
|
_internal: {
|
|
84
|
-
extendedFrom: !((
|
|
84
|
+
extendedFrom: !((H = (K = this._def.openapi) === null || K === void 0 ? void 0 : K._internal) === null || H === void 0) && H.refId ? { refId: (ue = (Q = this._def.openapi) === null || Q === void 0 ? void 0 : Q._internal) === null || ue === void 0 ? void 0 : ue.refId, schema: this } : (xe = this._def.openapi) === null || xe === void 0 ? void 0 : xe._internal.extendedFrom
|
|
85
85
|
},
|
|
86
86
|
metadata: (Te = Oe._def.openapi) === null || Te === void 0 ? void 0 : Te.metadata
|
|
87
87
|
}, Oe;
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
return de;
|
|
91
|
-
},
|
|
91
|
+
}, He(n, "optional"), He(n, "nullable"), He(n, "default"), He(n, "transform"), He(n, "refine");
|
|
92
92
|
const e = n.ZodObject.prototype.deepPartial;
|
|
93
93
|
n.ZodObject.prototype.deepPartial = function() {
|
|
94
94
|
const r = this._def.shape(), a = e.apply(this), o = a._def.shape();
|
|
@@ -648,7 +648,7 @@ class S {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
const ns = /^c[^\s-]{8,}$/i, ss = /^[0-9a-z]+$/, rs = /^[0-9A-HJKMNP-TV-Z]{26}$/, as = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, is = /^[a-z0-9_-]{21}$/i, os = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, cs = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ds = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
651
|
-
let
|
|
651
|
+
let Qt;
|
|
652
652
|
const us = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ls = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ps = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, kn = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", hs = new RegExp(`^${kn}$`);
|
|
653
653
|
function bn(n) {
|
|
654
654
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
@@ -720,7 +720,7 @@ class F extends S {
|
|
|
720
720
|
message: r.message
|
|
721
721
|
}), t.dirty());
|
|
722
722
|
else if (r.kind === "emoji")
|
|
723
|
-
|
|
723
|
+
Qt || (Qt = new RegExp(ds, "u")), Qt.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
724
724
|
validation: "emoji",
|
|
725
725
|
code: p.invalid_string,
|
|
726
726
|
message: r.message
|
|
@@ -2849,7 +2849,7 @@ var w;
|
|
|
2849
2849
|
})(w || (w = {}));
|
|
2850
2850
|
const vs = (n, e = {
|
|
2851
2851
|
message: `Input not instance of ${n.name}`
|
|
2852
|
-
}) => On((t) => t instanceof n, e), Sn = F.create, Zn = fe.create, ws = Lt.create, ks = me.create, jn = st.create, bs = je.create, xs = Pt.create, Ts = rt.create, Os = at.create, Ss = Be.create, Zs = Se.create, js = re.create, Ns = Dt.create, Cs = B.create, Is = I.create, Es = I.strictCreate, As = it.create, Rs = Jt.create, $s = ot.create, Ps = ee.create, Ds = ct.create, Ms = Mt.create, Ls = Ne.create, Vs = Ue.create, Us = dt.create, Fs = ut.create, zs = _e.create, Bs = lt.create, Ws = We.create, fn = q.create, qs = Y.create, Js = ge.create, Ks = q.createWithPreprocess,
|
|
2852
|
+
}) => On((t) => t instanceof n, e), Sn = F.create, Zn = fe.create, ws = Lt.create, ks = me.create, jn = st.create, bs = je.create, xs = Pt.create, Ts = rt.create, Os = at.create, Ss = Be.create, Zs = Se.create, js = re.create, Ns = Dt.create, Cs = B.create, Is = I.create, Es = I.strictCreate, As = it.create, Rs = Jt.create, $s = ot.create, Ps = ee.create, Ds = ct.create, Ms = Mt.create, Ls = Ne.create, Vs = Ue.create, Us = dt.create, Fs = ut.create, zs = _e.create, Bs = lt.create, Ws = We.create, fn = q.create, qs = Y.create, Js = ge.create, Ks = q.createWithPreprocess, Hs = Nt.create, Qs = () => Sn().optional(), Ys = () => Zn().optional(), Gs = () => jn().optional(), Xs = {
|
|
2853
2853
|
string: (n) => F.create({ ...n, coerce: !0 }),
|
|
2854
2854
|
number: (n) => fe.create({ ...n, coerce: !0 }),
|
|
2855
2855
|
boolean: (n) => st.create({
|
|
@@ -2955,8 +2955,8 @@ var i = /* @__PURE__ */ Object.freeze({
|
|
|
2955
2955
|
oboolean: Gs,
|
|
2956
2956
|
onumber: Ys,
|
|
2957
2957
|
optional: qs,
|
|
2958
|
-
ostring:
|
|
2959
|
-
pipeline:
|
|
2958
|
+
ostring: Qs,
|
|
2959
|
+
pipeline: Hs,
|
|
2960
2960
|
preprocess: Ks,
|
|
2961
2961
|
promise: Ws,
|
|
2962
2962
|
record: Ds,
|
|
@@ -3237,12 +3237,24 @@ _r.extend({
|
|
|
3237
3237
|
hook_id: i.string()
|
|
3238
3238
|
});
|
|
3239
3239
|
const gr = i.object({
|
|
3240
|
-
alg: i.
|
|
3240
|
+
alg: i.enum([
|
|
3241
|
+
"RS256",
|
|
3242
|
+
"RS384",
|
|
3243
|
+
"RS512",
|
|
3244
|
+
"ES256",
|
|
3245
|
+
"ES384",
|
|
3246
|
+
"ES512",
|
|
3247
|
+
"HS256",
|
|
3248
|
+
"HS384",
|
|
3249
|
+
"HS512"
|
|
3250
|
+
]),
|
|
3241
3251
|
e: i.string(),
|
|
3242
3252
|
kid: i.string(),
|
|
3243
|
-
kty: i.
|
|
3253
|
+
kty: i.enum(["RSA", "EC", "oct"]),
|
|
3244
3254
|
n: i.string(),
|
|
3245
|
-
|
|
3255
|
+
x5t: i.string().optional(),
|
|
3256
|
+
x5c: i.array(i.string()).optional(),
|
|
3257
|
+
use: i.enum(["sig", "enc"]).optional()
|
|
3246
3258
|
});
|
|
3247
3259
|
i.object({
|
|
3248
3260
|
keys: i.array(gr)
|
|
@@ -3386,20 +3398,13 @@ i.object({
|
|
|
3386
3398
|
created_at: i.string(),
|
|
3387
3399
|
...xr.shape
|
|
3388
3400
|
});
|
|
3389
|
-
i.object({
|
|
3390
|
-
private_key: i.string().optional(),
|
|
3391
|
-
public_key: i.string().optional(),
|
|
3392
|
-
kid: i.string(),
|
|
3393
|
-
created_at: i.string().optional(),
|
|
3394
|
-
revoked_at: i.string().optional()
|
|
3395
|
-
});
|
|
3396
3401
|
i.object({
|
|
3397
3402
|
kid: i.string().openapi({ description: "The key id of the signing key" }),
|
|
3398
3403
|
cert: i.string().openapi({ description: "The public certificate of the signing key" }),
|
|
3399
3404
|
fingerprint: i.string().openapi({ description: "The cert fingerprint" }),
|
|
3400
3405
|
thumbprint: i.string().openapi({ description: "The cert thumbprint" }),
|
|
3401
3406
|
pkcs7: i.string().optional().openapi({
|
|
3402
|
-
description: "The
|
|
3407
|
+
description: "The private key in pkcs7 format"
|
|
3403
3408
|
}),
|
|
3404
3409
|
current: i.boolean().optional().openapi({ description: "True if the key is the current key" }),
|
|
3405
3410
|
next: i.boolean().optional().openapi({ description: "True if the key is the next key" }),
|
|
@@ -3671,7 +3676,7 @@ function $r(n) {
|
|
|
3671
3676
|
}
|
|
3672
3677
|
function Pr(n) {
|
|
3673
3678
|
return {
|
|
3674
|
-
create:
|
|
3679
|
+
create: Hn(n),
|
|
3675
3680
|
remove: Er(n),
|
|
3676
3681
|
get: Cr(n),
|
|
3677
3682
|
list: Ir(n),
|
|
@@ -3829,10 +3834,10 @@ function Kr(n) {
|
|
|
3829
3834
|
get: Jr(n)
|
|
3830
3835
|
};
|
|
3831
3836
|
}
|
|
3832
|
-
function
|
|
3837
|
+
function Hr(n) {
|
|
3833
3838
|
return async (e, t) => await n.selectFrom("sessions").where("sessions.tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).selectAll().executeTakeFirst() ?? null;
|
|
3834
3839
|
}
|
|
3835
|
-
function
|
|
3840
|
+
function Qr(n) {
|
|
3836
3841
|
return async (e, t) => {
|
|
3837
3842
|
const s = {
|
|
3838
3843
|
...t,
|
|
@@ -3872,8 +3877,8 @@ function Xr(n) {
|
|
|
3872
3877
|
}
|
|
3873
3878
|
function ea(n) {
|
|
3874
3879
|
return {
|
|
3875
|
-
create:
|
|
3876
|
-
get:
|
|
3880
|
+
create: Qr(n),
|
|
3881
|
+
get: Hr(n),
|
|
3877
3882
|
list: Xr(n),
|
|
3878
3883
|
remove: Yr(n),
|
|
3879
3884
|
update: Gr(n)
|
|
@@ -4175,13 +4180,13 @@ function ja(n) {
|
|
|
4175
4180
|
};
|
|
4176
4181
|
}
|
|
4177
4182
|
function Na(n) {
|
|
4178
|
-
return async (e, t) => !!(await n.updateTable("keys").set(
|
|
4183
|
+
return async (e, t) => !!(await n.updateTable("keys").set(t).where("kid", "=", e).execute()).length;
|
|
4179
4184
|
}
|
|
4180
4185
|
function Ca(n) {
|
|
4181
4186
|
return {
|
|
4182
4187
|
create: ja(n),
|
|
4183
4188
|
list: Za(n),
|
|
4184
|
-
|
|
4189
|
+
update: Na(n)
|
|
4185
4190
|
};
|
|
4186
4191
|
}
|
|
4187
4192
|
function Ia(n) {
|
|
@@ -4247,7 +4252,7 @@ function Ra(n) {
|
|
|
4247
4252
|
}
|
|
4248
4253
|
function $a(n) {
|
|
4249
4254
|
return async (e, t) => {
|
|
4250
|
-
var o, c, d, u, l, j, A, U, ie, Re, oe, ce, de, $e, Pe, K,
|
|
4255
|
+
var o, c, d, u, l, j, A, U, ie, Re, oe, ce, de, $e, Pe, K, H, Q;
|
|
4251
4256
|
const { colors: s, font: r, ...a } = t;
|
|
4252
4257
|
try {
|
|
4253
4258
|
await n.insertInto("branding").values({
|
|
@@ -4267,8 +4272,8 @@ function $a(n) {
|
|
|
4267
4272
|
colors_page_background_type: (oe = (Re = t.colors) == null ? void 0 : Re.page_background) == null ? void 0 : oe.type,
|
|
4268
4273
|
colors_page_background_start: (de = (ce = t.colors) == null ? void 0 : ce.page_background) == null ? void 0 : de.start,
|
|
4269
4274
|
colors_page_background_end: (Pe = ($e = t.colors) == null ? void 0 : $e.page_background) == null ? void 0 : Pe.end,
|
|
4270
|
-
colors_page_background_angle_dev: (
|
|
4271
|
-
font_url: (
|
|
4275
|
+
colors_page_background_angle_dev: (H = (K = t.colors) == null ? void 0 : K.page_background) == null ? void 0 : H.angle_deg,
|
|
4276
|
+
font_url: (Q = t.font) == null ? void 0 : Q.url
|
|
4272
4277
|
}).where("tenant_id", "=", e).execute();
|
|
4273
4278
|
}
|
|
4274
4279
|
};
|
|
@@ -4352,7 +4357,7 @@ function Ba(n, e) {
|
|
|
4352
4357
|
var t;
|
|
4353
4358
|
return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
|
|
4354
4359
|
}
|
|
4355
|
-
function
|
|
4360
|
+
function Qe(n, e) {
|
|
4356
4361
|
const t = n.ZodType.prototype[e];
|
|
4357
4362
|
n.ZodType.prototype[e] = function(...s) {
|
|
4358
4363
|
const r = t.apply(this, s);
|
|
@@ -4370,18 +4375,18 @@ function Wa(n) {
|
|
|
4370
4375
|
if (Ba(this, "ZodObject")) {
|
|
4371
4376
|
const $e = this.extend;
|
|
4372
4377
|
de.extend = function(...Pe) {
|
|
4373
|
-
var K,
|
|
4378
|
+
var K, H, Q, ue, xe, Te;
|
|
4374
4379
|
const Oe = $e.apply(this, Pe);
|
|
4375
4380
|
return Oe._def.openapi = {
|
|
4376
4381
|
_internal: {
|
|
4377
|
-
extendedFrom: !((
|
|
4382
|
+
extendedFrom: !((H = (K = this._def.openapi) === null || K === void 0 ? void 0 : K._internal) === null || H === void 0) && H.refId ? { refId: (ue = (Q = this._def.openapi) === null || Q === void 0 ? void 0 : Q._internal) === null || ue === void 0 ? void 0 : ue.refId, schema: this } : (xe = this._def.openapi) === null || xe === void 0 ? void 0 : xe._internal.extendedFrom
|
|
4378
4383
|
},
|
|
4379
4384
|
metadata: (Te = Oe._def.openapi) === null || Te === void 0 ? void 0 : Te.metadata
|
|
4380
4385
|
}, Oe;
|
|
4381
4386
|
};
|
|
4382
4387
|
}
|
|
4383
4388
|
return de;
|
|
4384
|
-
},
|
|
4389
|
+
}, Qe(n, "optional"), Qe(n, "nullable"), Qe(n, "default"), Qe(n, "transform"), Qe(n, "refine");
|
|
4385
4390
|
const e = n.ZodObject.prototype.deepPartial;
|
|
4386
4391
|
n.ZodObject.prototype.deepPartial = function() {
|
|
4387
4392
|
const r = this._def.shape(), a = e.apply(this), o = a._def.shape();
|
|
@@ -4940,7 +4945,7 @@ class Z {
|
|
|
4940
4945
|
return this.safeParse(null).success;
|
|
4941
4946
|
}
|
|
4942
4947
|
}
|
|
4943
|
-
const
|
|
4948
|
+
const Ha = /^c[^\s-]{8,}$/i, Qa = /^[0-9a-z]+$/, Ya = /^[0-9A-HJKMNP-TV-Z]{26}$/, Ga = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Xa = /^[a-z0-9_-]{21}$/i, ei = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, ti = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ni = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
4944
4949
|
let Yt;
|
|
4945
4950
|
const si = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ri = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ai = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Ln = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ii = new RegExp(`^${Ln}$`);
|
|
4946
4951
|
function Vn(n) {
|
|
@@ -5031,13 +5036,13 @@ class z extends Z {
|
|
|
5031
5036
|
message: a.message
|
|
5032
5037
|
}), s.dirty());
|
|
5033
5038
|
else if (a.kind === "cuid")
|
|
5034
|
-
|
|
5039
|
+
Ha.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
5035
5040
|
validation: "cuid",
|
|
5036
5041
|
code: h.invalid_string,
|
|
5037
5042
|
message: a.message
|
|
5038
5043
|
}), s.dirty());
|
|
5039
5044
|
else if (a.kind === "cuid2")
|
|
5040
|
-
|
|
5045
|
+
Qa.test(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
|
|
5041
5046
|
validation: "cuid2",
|
|
5042
5047
|
code: h.invalid_string,
|
|
5043
5048
|
message: a.message
|
|
@@ -7277,7 +7282,7 @@ function It(n, e = "", t = {}) {
|
|
|
7277
7282
|
}
|
|
7278
7283
|
return t;
|
|
7279
7284
|
}
|
|
7280
|
-
function
|
|
7285
|
+
function Hi(n, e) {
|
|
7281
7286
|
const t = {};
|
|
7282
7287
|
for (const [s, r] of Object.entries(n)) {
|
|
7283
7288
|
const a = e.find(
|
|
@@ -7295,7 +7300,7 @@ function Qi(n, e) {
|
|
|
7295
7300
|
}
|
|
7296
7301
|
return t;
|
|
7297
7302
|
}
|
|
7298
|
-
function
|
|
7303
|
+
function Qi(n) {
|
|
7299
7304
|
return async (e, t) => {
|
|
7300
7305
|
const s = {
|
|
7301
7306
|
themeId: Ae(),
|
|
@@ -7326,7 +7331,7 @@ function Xi(n) {
|
|
|
7326
7331
|
}
|
|
7327
7332
|
function eo(n) {
|
|
7328
7333
|
return {
|
|
7329
|
-
create:
|
|
7334
|
+
create: Qi(n),
|
|
7330
7335
|
get: Gi(n),
|
|
7331
7336
|
remove: Yi(n),
|
|
7332
7337
|
update: Xi(n)
|
|
@@ -7336,7 +7341,7 @@ function to(n) {
|
|
|
7336
7341
|
return async (e, t) => {
|
|
7337
7342
|
const s = (/* @__PURE__ */ new Date()).toISOString(), r = await n.selectFrom("logins").where("logins.expires_at", ">", s).where("logins.login_id", "=", t).selectAll().executeTakeFirst();
|
|
7338
7343
|
return r ? vr.parse(
|
|
7339
|
-
|
|
7344
|
+
Hi(R(r), ["authParams"])
|
|
7340
7345
|
) : null;
|
|
7341
7346
|
};
|
|
7342
7347
|
}
|
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.
|
|
14
|
+
"version": "0.8.1",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"kysely-bun-sqlite": "^0.3.2",
|
|
42
42
|
"kysely-planetscale": "^1.4.0",
|
|
43
43
|
"nanoid": "^5.0.7",
|
|
44
|
-
"@authhero/adapter-interfaces": "^0.
|
|
44
|
+
"@authhero/adapter-interfaces": "^0.14.0"
|
|
45
45
|
},
|
|
46
46
|
"scripts": {
|
|
47
47
|
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",
|