@authhero/cloudflare-adapter 2.24.0 → 2.24.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.
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
WHERE index1 = ${M(e)}
|
|
18
18
|
AND blob1 = ${M(s)}
|
|
19
19
|
LIMIT 1
|
|
20
|
-
`,a=await fe(t,r);return a.length===0||!a[0]?null:ht(a[0])}}function _s(t){const e={};return(t.match(/(\w+):(\S+)/g)||[]).forEach(n=>{const r=n.indexOf(":"),a=n.substring(0,r),i=n.substring(r+1);a&&i&&(e[a]=i)}),e}function ft(t){return{log_id:"blob1",tenant_id:"blob2",type:"blob3",description:"blob4",ip:"blob5",user_agent:"blob6",user_id:"blob7",user_name:"blob8",connection:"blob9",connection_id:"blob10",client_id:"blob11",client_name:"blob12",audience:"blob13",scope:"blob14",strategy:"blob15",strategy_type:"blob16",hostname:"blob17"}[t]||null}function gs(t){const e=[];for(const[s,n]of Object.entries(t)){const r=ft(s);r&&
|
|
20
|
+
`,a=await fe(t,r);return a.length===0||!a[0]?null:ht(a[0])}}function _s(t){const e={};return(t.match(/(\w+):(\S+)/g)||[]).forEach(n=>{const r=n.indexOf(":"),a=n.substring(0,r),i=n.substring(r+1);a&&i&&(e[a]=i)}),e}function ft(t){return{log_id:"blob1",tenant_id:"blob2",type:"blob3",description:"blob4",ip:"blob5",user_agent:"blob6",user_id:"blob7",user_name:"blob8",connection:"blob9",connection_id:"blob10",client_id:"blob11",client_name:"blob12",audience:"blob13",scope:"blob14",strategy:"blob15",strategy_type:"blob16",hostname:"blob17"}[t]||null}function gs(t){const e=[];for(const[s,n]of Object.entries(t)){if(!n)continue;if(s==="success"){n==="true"?e.push("blob3 LIKE 's%'"):n==="false"&&e.push("blob3 LIKE 'f%'");continue}const r=ft(s);r&&e.push(`${r} = ${M(n)}`)}return e}function vs(t){if(t==="date")return"double2";const e=ft(t);return e||"timestamp"}function bs(t){return async(e,s={})=>{const{page:n=0,per_page:r=50,include_totals:a=!1,sort:i,q:o}=s,c=t.dataset||"authhero_logs",u=[`index1 = ${M(e)}`];if(o){const O=_s(o);u.push(...gs(O))}const p=u.join(" AND ");let k="ORDER BY timestamp DESC";if(i&&i.sort_by){const O=vs(i.sort_by),j=i.sort_order==="asc"?"ASC":"DESC";k=`ORDER BY ${O} ${j}`}const C=n*r,S=`LIMIT ${r} OFFSET ${C}`,E=`
|
|
21
21
|
SELECT *
|
|
22
22
|
FROM ${Je(c)}
|
|
23
23
|
WHERE ${p}
|
|
@@ -3610,8 +3610,13 @@ function ht(t) {
|
|
|
3610
3610
|
function ms(t) {
|
|
3611
3611
|
const e = [];
|
|
3612
3612
|
for (const [s, n] of Object.entries(t)) {
|
|
3613
|
+
if (!n) continue;
|
|
3614
|
+
if (s === "success") {
|
|
3615
|
+
n === "true" ? e.push("blob3 LIKE 's%'") : n === "false" && e.push("blob3 LIKE 'f%'");
|
|
3616
|
+
continue;
|
|
3617
|
+
}
|
|
3613
3618
|
const r = ht(s);
|
|
3614
|
-
r &&
|
|
3619
|
+
r && e.push(`${r} = ${M(n)}`);
|
|
3615
3620
|
}
|
|
3616
3621
|
return e;
|
|
3617
3622
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "https://github.com/markusahlstrand/authhero"
|
|
13
13
|
},
|
|
14
|
-
"version": "2.24.
|
|
14
|
+
"version": "2.24.2",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"nanoid": "^5.1.6",
|
|
48
48
|
"wretch": "^3.0.2",
|
|
49
|
-
"@authhero/adapter-interfaces": "1.
|
|
50
|
-
"@authhero/kysely-adapter": "10.
|
|
49
|
+
"@authhero/adapter-interfaces": "1.5.0",
|
|
50
|
+
"@authhero/kysely-adapter": "10.127.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"build": "tsc && vite build && dts-bundle-generator --config ./dts-bundle-generator.config.ts",
|