@better-auth/infra 0.4.11 → 0.4.12
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 +8 -2
- package/dist/client.mjs +2 -2
- package/dist/{constants-C82aGVpa.mjs → constants-D1m_WRqw.mjs} +1 -1
- package/dist/{crypto-CgNWT4f3.mjs → crypto-DZ0e3fu4.mjs} +1 -1
- package/dist/email.mjs +1 -1
- package/dist/index.d.mts +6 -1
- package/dist/index.mjs +6 -3
- package/dist/native.mjs +2 -2
- package/dist/{pow-retry-B5TObAcM.mjs → pow-retry-Cl7MAw6O.mjs} +1 -1
- package/package.json +5 -5
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/).
|
|
7
7
|
|
|
8
|
+
## [0.4.12] - 2026-09-28
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`GET /dash/directory-sync/connection-count`** — When directory sync mode is unavailable (no SCIM / managed not enabled), returns `{ count: 0, mode: "unavailable" }` instead of **404**. Platform usage/billing treated 404 as “old plugin” and walked every customer org, which could time out on large tenants.
|
|
13
|
+
|
|
8
14
|
## [0.4.11] - 2026-09-23
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -15,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
15
21
|
|
|
16
22
|
### Added
|
|
17
23
|
|
|
18
|
-
- **`GET /dash/directory-sync/connection-count`** — Project-wide directory sync connection count (`{ count, mode }`). Managed mode counts `active` / `decommissioning` connections; legacy mode counts `scimProvider` rows.
|
|
24
|
+
- **`GET /dash/directory-sync/connection-count`** — Project-wide directory sync connection count (`{ count, mode }`). Managed mode counts `active` / `decommissioning` connections; legacy mode counts `scimProvider` rows. When directory sync is unavailable, returns `{ count: 0, mode: "unavailable" }` (see Unreleased; previously 404).
|
|
19
25
|
|
|
20
26
|
### Fixed
|
|
21
27
|
|
|
@@ -257,4 +263,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
257
263
|
[0.3.1]: https://github.com/better-auth/infrastructure/compare/infra@v0.3.0...infra@v0.3.1
|
|
258
264
|
[0.3.0]: https://github.com/better-auth/infrastructure/compare/infra@v0.2.14...infra@v0.3.0
|
|
259
265
|
[0.2.14]: https://github.com/better-auth/better-auth-infra/compare/@better-auth/infra@0.2.13...@better-auth/infra@0.2.14
|
|
260
|
-
[0.2.13]: https://github.com/better-auth/better-auth-infra/compare/@better-auth/infra@0.2.12...@better-auth/infra@0.2.13
|
|
266
|
+
[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.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as hash, o as createKV } from "./crypto-
|
|
2
|
-
import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, s as generateRequestId, t as createPowRetryTimeout } from "./pow-retry-
|
|
1
|
+
import { n as hash, o as createKV } from "./crypto-DZ0e3fu4.mjs";
|
|
2
|
+
import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, s as generateRequestId, t as createPowRetryTimeout } from "./pow-retry-Cl7MAw6O.mjs";
|
|
3
3
|
import { env } from "@better-auth/core/env";
|
|
4
4
|
//#region src/sentinel/fingerprint.ts
|
|
5
5
|
function murmurhash3(str, seed = 0) {
|
package/dist/email.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-
|
|
1
|
+
import { i as INFRA_USER_AGENT, n as INFRA_API_URL } from "./constants-D1m_WRqw.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.d.mts
CHANGED
|
@@ -372,7 +372,12 @@ interface DashDirectoryRegenerateTokenResponse {
|
|
|
372
372
|
}
|
|
373
373
|
interface DashDirectorySyncConnectionCountResponse {
|
|
374
374
|
count: number;
|
|
375
|
-
|
|
375
|
+
/**
|
|
376
|
+
* `unavailable` = SCIM/managed directory sync is not configured on this
|
|
377
|
+
* auth server. Still a successful count (0) so platform callers do not
|
|
378
|
+
* fall back to walking every organization.
|
|
379
|
+
*/
|
|
380
|
+
mode: "managed" | "legacy" | "unavailable";
|
|
376
381
|
}
|
|
377
382
|
//#endregion
|
|
378
383
|
//#region src/events/constants.d.ts
|
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-
|
|
2
|
-
import { a as createAPI, n as hash$1, o as createKV, r as hmacSha256Hex } from "./crypto-
|
|
1
|
+
import { i as INFRA_USER_AGENT, n as INFRA_API_URL, o as PLUGIN_VERSION, r as INFRA_KV_URL } from "./constants-D1m_WRqw.mjs";
|
|
2
|
+
import { a as createAPI, n as hash$1, o as createKV, r as hmacSha256Hex } from "./crypto-DZ0e3fu4.mjs";
|
|
3
3
|
import { EMAIL_TEMPLATES, createEmailSender, sendBulkEmails, sendEmail } from "./email.mjs";
|
|
4
4
|
import { getCurrentAdapter, getCurrentAuthContext, getCurrentDBAdapterAsyncLocalStorage, runWithTransaction } from "@better-auth/core/context";
|
|
5
5
|
import { APIError, generateId, getAuthTables, logger } from "better-auth";
|
|
@@ -5707,7 +5707,10 @@ const countDirectorySyncConnections = (options) => {
|
|
|
5707
5707
|
mode: "legacy"
|
|
5708
5708
|
};
|
|
5709
5709
|
}
|
|
5710
|
-
|
|
5710
|
+
return {
|
|
5711
|
+
count: 0,
|
|
5712
|
+
mode: "unavailable"
|
|
5713
|
+
};
|
|
5711
5714
|
});
|
|
5712
5715
|
};
|
|
5713
5716
|
const listOrganizationDirectories = (options) => {
|
package/dist/native.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as createKV, t as bytesToHex } from "./crypto-
|
|
2
|
-
import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, t as createPowRetryTimeout } from "./pow-retry-
|
|
1
|
+
import { o as createKV, t as bytesToHex } from "./crypto-DZ0e3fu4.mjs";
|
|
2
|
+
import { a as resolveSentinelClientIdentifyUrl, c as identify, i as solvePoWChallenge, l as dashClient, n as decodePoWChallenge, o as resolveIdentifyClientRetry, r as encodePoWSolution, t as createPowRetryTimeout } from "./pow-retry-Cl7MAw6O.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-
|
|
1
|
+
import { i as randomBytes, n as hash, t as bytesToHex } from "./crypto-DZ0e3fu4.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.4.
|
|
3
|
+
"version": "0.4.12",
|
|
4
4
|
"description": "Dashboard and analytics plugin for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
},
|
|
67
67
|
"homepage": "https://better-auth.com",
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@better-auth/kysely-adapter": "1.7.
|
|
70
|
-
"@better-auth/scim": "1.7.
|
|
71
|
-
"@better-auth/sso": "1.7.
|
|
69
|
+
"@better-auth/kysely-adapter": "1.7.6",
|
|
70
|
+
"@better-auth/scim": "1.7.6",
|
|
71
|
+
"@better-auth/sso": "1.7.6",
|
|
72
72
|
"@infra/mocks": "0.0.0",
|
|
73
73
|
"@infra/utils": "0.0.0",
|
|
74
74
|
"@types/bun": "latest",
|
|
75
75
|
"@types/node": "^24.12.0",
|
|
76
76
|
"@vitest/browser-playwright": "5.0.0",
|
|
77
77
|
"@vitest/coverage-istanbul": "^5.0.0",
|
|
78
|
-
"better-auth": "1.7.
|
|
78
|
+
"better-auth": "1.7.6",
|
|
79
79
|
"expo-crypto": "^57.0.3",
|
|
80
80
|
"msw": "^2.14.6",
|
|
81
81
|
"playwright": "^1.63.0",
|