@better-auth/infra 0.3.0 → 0.3.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/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ 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.1] - 2026-06-22
9
+
10
+ ### Changed
11
+
12
+ - **`dashClient` typing** — The client plugin now declares an explicit `BetterAuthClientPlugin` uses the updated signature, so `createAuthClient` inference works without casts when composing with other plugins.
13
+
14
+ ### Fixed
15
+
16
+ - **Package metadata** — Repository and issue tracker URLs now point to `better-auth/infrastructure`.
17
+
8
18
  ## [0.3.0] - 2026-06-19
9
19
 
10
20
  ### Added
@@ -75,6 +85,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
75
85
 
76
86
  - Fixed impossible travel security challenges.
77
87
 
78
- [0.3.0]: https://github.com/better-auth/better-auth-infra/compare/@better-auth/infra@0.2.14...@better-auth/infra@0.3.0
88
+ [0.3.1]: https://github.com/better-auth/infrastructure/compare/infra@v0.3.0...infra@v0.3.1
89
+ [0.3.0]: https://github.com/better-auth/infrastructure/compare/infra@v0.2.14...infra@v0.3.0
79
90
  [0.2.14]: https://github.com/better-auth/better-auth-infra/compare/@better-auth/infra@0.2.13...@better-auth/infra@0.2.14
80
91
  [0.2.13]: https://github.com/better-auth/better-auth-infra/compare/@better-auth/infra@0.2.12...@better-auth/infra@0.2.13
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-CZzJyRrV.mjs";
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";
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-DjtrPUlP.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-24lSgXId.mjs";
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";
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.0";
4
+ const PLUGIN_VERSION = "0.3.1";
5
5
  //#endregion
6
6
  //#region src/constants.ts
7
7
  /**
@@ -1,4 +1,4 @@
1
- import { i as INFRA_USER_AGENT } from "./constants-vBiGTmGf.mjs";
1
+ import { i as INFRA_USER_AGENT } from "./constants-Cjw_ECs7.mjs";
2
2
  import { createFetch } from "@better-fetch/fetch";
3
3
  //#region src/fetch.ts
4
4
  function createAPI(options, fetchOptions) {
@@ -1,3 +1,5 @@
1
+ import { BetterAuthClientPlugin } from "better-auth";
2
+
1
3
  //#region src/dash-client.d.ts
2
4
  interface DashAuditLog {
3
5
  eventType: string;
@@ -54,38 +56,6 @@ interface DashClientOptions {
54
56
  session?: SessionLike | null;
55
57
  }) => string | undefined;
56
58
  }
57
- declare const dashClient: (options?: DashClientOptions) => {
58
- id: "dash";
59
- getActions: ($fetch: import("@better-fetch/fetch").BetterFetch) => {
60
- dash: {
61
- getAuditLogs: (input?: DashGetAuditLogsInput) => Promise<{
62
- data: null;
63
- error: {
64
- message?: string | undefined;
65
- status: number;
66
- statusText: string;
67
- };
68
- } | {
69
- data: DashAuditLogsResponse;
70
- error: null;
71
- }>;
72
- getAllAuditLogs: (input?: DashGetAllAuditLogsInput) => Promise<{
73
- data: null;
74
- error: {
75
- message?: string | undefined;
76
- status: number;
77
- statusText: string;
78
- };
79
- } | {
80
- data: DashAuditLogsResponse;
81
- error: null;
82
- }>;
83
- };
84
- };
85
- pathMethods: {
86
- "/events/audit-logs": "GET";
87
- "/events/all-audit-logs": "GET";
88
- };
89
- };
59
+ declare const dashClient: (options?: DashClientOptions) => BetterAuthClientPlugin;
90
60
  //#endregion
91
61
  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-vBiGTmGf.mjs";
1
+ import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-Cjw_ECs7.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-vBiGTmGf.mjs";
2
- import { a as createAPI, o as createKV, r as hmacSha256Hex } from "./crypto-DjtrPUlP.mjs";
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";
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-CZzJyRrV.mjs";
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";
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-DjtrPUlP.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-24lSgXId.mjs";
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";
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-DjtrPUlP.mjs";
1
+ import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-DuXBYsfj.mjs";
2
2
  //#region src/dash-client.ts
3
3
  function resolveDashUserId(input, options) {
4
4
  return input.userId || options?.resolveUserId?.({
@@ -10,7 +10,7 @@ function resolveDashUserId(input, options) {
10
10
  const dashClient = (options) => {
11
11
  return {
12
12
  id: "dash",
13
- getActions: ($fetch) => ({ dash: {
13
+ getActions: ($fetch, _store, _options) => ({ dash: {
14
14
  getAuditLogs: async (input = {}) => {
15
15
  const userId = resolveDashUserId(input, options);
16
16
  return $fetch("/events/audit-logs", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/infra",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Dashboard and analytics plugin for Better Auth",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",