@better-auth/infra 0.3.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to `@better-auth/infra` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.2] - 2026-06-22
9
+
10
+ ### Fixed
11
+
12
+ - **`dashClient` typing** — Restores correct `createAuthClient` inference when composing `dashClient()` with other client plugins.
13
+
8
14
  ## [0.3.1] - 2026-06-22
9
15
 
10
16
  ### Changed
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as DashGetAuditLogsInput, i as DashGetAllAuditLogsInput, n as DashAuditLogsResponse, o as dashClient, r as DashClientOptions, t as DashAuditLog } from "./dash-client-CImS7uA_.mjs";
1
+ import { a as DashGetAuditLogsInput, i as DashGetAllAuditLogsInput, n as DashAuditLogsResponse, o as dashClient, r as DashClientOptions, t as DashAuditLog } from "./dash-client-DXuu2ctl.mjs";
2
2
 
3
3
  //#region src/sentinel/client.d.ts
4
4
  interface SentinelClientOptions {
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { n as hash, o as createKV } from "./crypto-DuXBYsfj.mjs";
2
- import { a as resolveSentinelClientIdentifyUrl, c as dashClient, i as solvePoWChallenge, n as decodePoWChallenge, o as generateRequestId, r as encodePoWSolution, s as identify, t as createPowRetryTimeout } from "./pow-retry-DyWb0par.mjs";
1
+ import { n as hash, o as createKV } from "./crypto-B1NYwfFV.mjs";
2
+ import { a as resolveSentinelClientIdentifyUrl, c as dashClient, i as solvePoWChallenge, n as decodePoWChallenge, o as generateRequestId, r as encodePoWSolution, s as identify, t as createPowRetryTimeout } from "./pow-retry-BfzBUq0O.mjs";
3
3
  import { env } from "@better-auth/core/env";
4
4
  //#region src/sentinel/fingerprint.ts
5
5
  function murmurhash3(str, seed = 0) {
@@ -1,7 +1,7 @@
1
1
  import { env } from "@better-auth/core/env";
2
2
  //#endregion
3
3
  //#region src/version.ts
4
- const PLUGIN_VERSION = "0.3.1";
4
+ const PLUGIN_VERSION = "0.3.2";
5
5
  //#endregion
6
6
  //#region src/constants.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { i as INFRA_USER_AGENT } from "./constants-Cjw_ECs7.mjs";
1
+ import { i as INFRA_USER_AGENT } from "./constants-9UwOSy9A.mjs";
2
2
  import { createFetch } from "@better-fetch/fetch";
3
3
  //#region src/fetch.ts
4
4
  function createAPI(options, fetchOptions) {
@@ -1,4 +1,5 @@
1
- import { BetterAuthClientPlugin } from "better-auth";
1
+ import { BetterAuthClientOptions, ClientStore } from "better-auth";
2
+ import { BetterFetch } from "@better-fetch/fetch";
2
3
 
3
4
  //#region src/dash-client.d.ts
4
5
  interface DashAuditLog {
@@ -56,6 +57,38 @@ interface DashClientOptions {
56
57
  session?: SessionLike | null;
57
58
  }) => string | undefined;
58
59
  }
59
- declare const dashClient: (options?: DashClientOptions) => BetterAuthClientPlugin;
60
+ declare const dashClient: (options?: DashClientOptions) => {
61
+ id: string;
62
+ getActions: ($fetch: BetterFetch, _store: ClientStore, _options: BetterAuthClientOptions | undefined) => {
63
+ dash: {
64
+ getAuditLogs: (input?: DashGetAuditLogsInput) => Promise<{
65
+ data: null;
66
+ error: {
67
+ message?: string | undefined;
68
+ status: number;
69
+ statusText: string;
70
+ };
71
+ } | {
72
+ data: DashAuditLogsResponse;
73
+ error: null;
74
+ }>;
75
+ getAllAuditLogs: (input?: DashGetAllAuditLogsInput) => Promise<{
76
+ data: null;
77
+ error: {
78
+ message?: string | undefined;
79
+ status: number;
80
+ statusText: string;
81
+ };
82
+ } | {
83
+ data: DashAuditLogsResponse;
84
+ error: null;
85
+ }>;
86
+ };
87
+ };
88
+ pathMethods: {
89
+ readonly "/events/audit-logs": "GET";
90
+ readonly "/events/all-audit-logs": "GET";
91
+ };
92
+ };
60
93
  //#endregion
61
94
  export { DashGetAuditLogsInput as a, DashGetAllAuditLogsInput as i, DashAuditLogsResponse as n, dashClient as o, DashClientOptions as r, DashAuditLog as t };
package/dist/email.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-Cjw_ECs7.mjs";
1
+ import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-9UwOSy9A.mjs";
2
2
  import { logger } from "better-auth";
3
3
  import { env } from "@better-auth/core/env";
4
4
  import { createFetch } from "@better-fetch/fetch";
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { i as INFRA_USER_AGENT, n as INFRA_API_URL, o as PLUGIN_VERSION, r as INFRA_KV_URL } from "./constants-Cjw_ECs7.mjs";
2
- import { a as createAPI, o as createKV, r as hmacSha256Hex } from "./crypto-DuXBYsfj.mjs";
1
+ import { i as INFRA_USER_AGENT, n as INFRA_API_URL, o as PLUGIN_VERSION, r as INFRA_KV_URL } from "./constants-9UwOSy9A.mjs";
2
+ import { a as createAPI, o as createKV, r as hmacSha256Hex } from "./crypto-B1NYwfFV.mjs";
3
3
  import { EMAIL_TEMPLATES, createEmailSender, sendBulkEmails, sendEmail } from "./email.mjs";
4
4
  import { getCurrentAuthContext } from "@better-auth/core/context";
5
5
  import { APIError, generateId, getAuthTables, logger } from "better-auth";
package/dist/native.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as DashGetAuditLogsInput, i as DashGetAllAuditLogsInput, n as DashAuditLogsResponse, o as dashClient, r as DashClientOptions, t as DashAuditLog } from "./dash-client-CImS7uA_.mjs";
1
+ import { a as DashGetAuditLogsInput, i as DashGetAllAuditLogsInput, n as DashAuditLogsResponse, o as dashClient, r as DashClientOptions, t as DashAuditLog } from "./dash-client-DXuu2ctl.mjs";
2
2
  import { BetterAuthClientPlugin } from "better-auth";
3
3
 
4
4
  //#region src/sentinel/native/client.d.ts
package/dist/native.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { o as createKV, t as bytesToHex } from "./crypto-DuXBYsfj.mjs";
2
- import { a as resolveSentinelClientIdentifyUrl, c as dashClient, i as solvePoWChallenge, n as decodePoWChallenge, r as encodePoWSolution, s as identify, t as createPowRetryTimeout } from "./pow-retry-DyWb0par.mjs";
1
+ import { o as createKV, t as bytesToHex } from "./crypto-B1NYwfFV.mjs";
2
+ import { a as resolveSentinelClientIdentifyUrl, c as dashClient, i as solvePoWChallenge, n as decodePoWChallenge, r as encodePoWSolution, s as identify, t as createPowRetryTimeout } from "./pow-retry-BfzBUq0O.mjs";
3
3
  import { env } from "@better-auth/core/env";
4
4
  import { Dimensions, InteractionManager, PixelRatio, Platform } from "react-native";
5
5
  //#region src/sentinel/native/components.ts
@@ -1,4 +1,4 @@
1
- import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-DuXBYsfj.mjs";
1
+ import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-B1NYwfFV.mjs";
2
2
  //#region src/dash-client.ts
3
3
  function resolveDashUserId(input, options) {
4
4
  return input.userId || options?.resolveUserId?.({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/infra",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Dashboard and analytics plugin for Better Auth",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",